#include #include #include #include extern Player *D_800DC4DC; extern Player *D_800DC4E0; extern Player *D_800DC4E4; extern Player *D_800DC4E8; extern Player *D_800DC4EC; extern Player *D_800DC4F0; extern Player *D_800DC4F4; extern Player *D_800DC4F8; extern Player *D_800DC4FC; extern Camera *camera1; s32 func_80027D00(Player *arg0) { s32 phi_v1; if (arg0 == D_800DC4DC) { phi_v1 = 0; } if (arg0 == D_800DC4E0) { phi_v1 = 1; } if (arg0 == D_800DC4E4) { phi_v1 = 2; } if (arg0 == D_800DC4E8) { phi_v1 = 3; } if (arg0 == D_800DC4EC) { phi_v1 = 4; } if (arg0 == D_800DC4F0) { phi_v1 = 5; } if (arg0 == D_800DC4F4) { phi_v1 = 6; } if (arg0 == D_800DC4F8) { phi_v1 = 7; } return phi_v1; } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800C94A4(s32, s8, u16 *); // extern ? func_800C9A88(s32, s8, u16 *); // extern extern s32 D_8018D168; void func_80027DA8(u16 *arg0, s8 arg1) { u16 *temp_a2; u16 temp_v0; u16 temp_v0_2; temp_a2 = arg0; if (D_8015F890 != 1) { temp_v0 = *arg0; if ((temp_v0 & 0x10) != 0x10) { if ((D_8018D168 == 1) && ((temp_v0 & 0x4000) == 0x4000) && ((temp_v0 & 0x100) != 0x100)) { arg0 = temp_a2; func_800C94A4(arg1 & 0xFF, arg1, temp_a2); *arg0 = *arg0 | 0x10; return; } if ((temp_v0 & 0x2000) == 0) { arg0 = temp_a2; func_800C9A88(arg1 & 0xFF, arg1, temp_a2); *arg0 = *arg0 | 0x10; return; } // Duplicate return node #14. Try simplifying control flow for better match return; } // Duplicate return node #14. Try simplifying control flow for better match return; } temp_v0_2 = *temp_a2; if ((temp_v0_2 & 0x10) != 0x10) { if ((D_8018D168 == 1) && (temp_a2 == D_800DC4DC)) { arg0 = temp_a2; func_800C94A4(arg1 & 0xFF, arg1, temp_a2); *arg0 = *arg0 | 0x10; return; } if ((temp_v0_2 & 0x2000) == 0) { arg0 = temp_a2; func_800C9A88(arg1 & 0xFF, arg1, temp_a2); *arg0 = *arg0 | 0x10; } // Duplicate return node #14. Try simplifying control flow for better match } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80027DA8.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909 ? func_800C8F80(s32, ?, s8); /* extern */ ? func_800C9018(s32, ?, s8); /* extern */ ? func_800CA288(s32, ?, s8); /* extern */ ? func_800CA2B8(s32, s8); /* extern */ ? func_800CA2E4(s32, ?, s8); /* extern */ ? func_800CA30C(s32, s8); /* extern */ extern ? D_80164438; extern ? D_80165300; u16 gCurrentCourseId; /* unable to generate initializer */ void func_80027EDC(u16 *arg0, s8 arg1) { s16 *sp1C; s16 *temp_v0_10; s16 *temp_v0_12; s16 *temp_v0_13; s16 *temp_v0_15; s16 *temp_v0_16; s16 *temp_v0_17; s16 *temp_v0_18; s16 *temp_v0_20; s16 *temp_v0_21; s16 *temp_v0_23; s16 *temp_v0_24; s16 *temp_v0_25; s16 *temp_v0_27; s16 *temp_v0_28; s16 *temp_v0_30; s16 *temp_v0_31; s16 *temp_v0_33; s16 *temp_v0_34; s16 *temp_v0_36; s16 *temp_v0_37; s16 *temp_v0_39; s16 *temp_v0_3; s16 *temp_v0_40; s16 *temp_v0_41; s16 *temp_v0_42; s16 *temp_v0_44; s16 *temp_v0_45; s16 *temp_v0_47; s16 *temp_v0_48; s16 *temp_v0_4; s16 *temp_v0_6; s16 *temp_v0_7; s16 *temp_v0_9; s16 temp_a0; s16 temp_v0_11; s16 temp_v0_14; s16 temp_v0_19; s16 temp_v0_22; s16 temp_v0_26; s16 temp_v0_29; s16 temp_v0_2; s16 temp_v0_32; s16 temp_v0_35; s16 temp_v0_38; s16 temp_v0_43; s16 temp_v0_46; s16 temp_v0_5; s16 temp_v0_8; s32 temp_a0_2; s32 temp_t2; s32 temp_t6; s32 temp_v1; s32 temp_v1_10; s32 temp_v1_11; s32 temp_v1_12; s32 temp_v1_13; s32 temp_v1_14; s32 temp_v1_2; s32 temp_v1_3; s32 temp_v1_4; s32 temp_v1_5; s32 temp_v1_6; s32 temp_v1_7; s32 temp_v1_8; s32 temp_v1_9; s8 temp_a2; u16 temp_t5; u16 temp_t9; u16 temp_v0; s16 phi_a0; s8 phi_a2; s16 *phi_v0; temp_v0 = *arg0; temp_a2 = arg1; phi_a2 = temp_a2; if (((temp_v0 & 0x4000) == 0x4000) && ((temp_v0 & 0x100) != 0x100)) { temp_t9 = gCurrentCourseId; switch (temp_t9) { /* switch 1 */ case 0: /* switch 1 */ temp_v1 = temp_a2 * 2; temp_v0_2 = *(&D_80164438 + temp_v1); if ((temp_v0_2 >= 0x19B) && (temp_v0_2 < 0x1B9)) { temp_v0_3 = temp_v1 + &D_80165300; if (*temp_v0_3 != 1) { sp1C = temp_v0_3; func_800CA288(temp_a2 & 0xFF, 0x55, temp_a2); } *(temp_v1 + &D_80165300) = 1; return; } temp_v0_4 = temp_v1 + &D_80165300; if (*temp_v0_4 != 0) { sp1C = temp_v0_4; func_800CA2B8(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_4; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 1: /* switch 1 */ temp_v1_2 = temp_a2 * 2; temp_v0_5 = *(&D_80164438 + temp_v1_2); if ((temp_v0_5 >= 0xA0) && (temp_v0_5 < 0xB4)) { temp_v0_6 = temp_v1_2 + &D_80165300; if (*temp_v0_6 != 1) { sp1C = temp_v0_6; func_800CA288(temp_a2 & 0xFF, 0x55, temp_a2); } *(temp_v1_2 + &D_80165300) = 1; return; } temp_v0_7 = temp_v1_2 + &D_80165300; if (*temp_v0_7 != 0) { sp1C = temp_v0_7; func_800CA2B8(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_7; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 2: /* switch 1 */ temp_v1_3 = temp_a2 * 2; temp_v0_8 = *(&D_80164438 + temp_v1_3); if ((temp_v0_8 >= 0x29) && (temp_v0_8 < 0x1D2)) { temp_v0_9 = temp_v1_3 + &D_80165300; if (*temp_v0_9 != 1) { sp1C = temp_v0_9; func_800CA288(temp_a2 & 0xFF, 0x41, temp_a2); } *(temp_v1_3 + &D_80165300) = 1; return; } temp_v0_10 = temp_v1_3 + &D_80165300; if (*temp_v0_10 != 0) { sp1C = temp_v0_10; func_800CA2B8(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_10; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 3: /* switch 1 */ temp_v1_4 = temp_a2 * 2; temp_v0_11 = *(&D_80164438 + temp_v1_4); if ((temp_v0_11 >= 0x180) && (temp_v0_11 < 0x1E1)) { temp_v0_12 = temp_v1_4 + &D_80165300; if (*temp_v0_12 != 1) { sp1C = temp_v0_12; func_800CA288(temp_a2 & 0xFF, 0x41, temp_a2); } *(temp_v1_4 + &D_80165300) = 1; return; } temp_v0_13 = temp_v1_4 + &D_80165300; if (*temp_v0_13 != 0) { sp1C = temp_v0_13; func_800CA2B8(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_13; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 8: /* switch 1 */ temp_v1_5 = temp_a2 * 2; temp_v0_14 = *(&D_80164438 + temp_v1_5); if ((temp_v0_14 >= 0x145) && (temp_v0_14 < 0x18B)) { temp_v0_15 = temp_v1_5 + &D_80165300; if (*temp_v0_15 != 1) { sp1C = temp_v0_15; func_800CA288(temp_a2 & 0xFF, 0x55, temp_a2); } *(temp_v1_5 + &D_80165300) = 1; return; } temp_v0_16 = temp_v1_5 + &D_80165300; if (*temp_v0_16 != 0) { sp1C = temp_v0_16; func_800CA2B8(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_16; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 10: /* switch 1 */ if ((temp_v0 & 0x800) != 0x800) { temp_t6 = temp_a2 * 2; temp_v0_17 = temp_t6 + &D_80165300; if (*temp_v0_17 != 1) { sp1C = temp_v0_17; func_800CA288(temp_a2 & 0xFF, 0x1E, temp_a2); } *(temp_t6 + &D_80165300) = 1; return; } temp_v0_18 = (temp_a2 * 2) + &D_80165300; if (*temp_v0_18 != 0) { sp1C = temp_v0_18; func_800CA2B8(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_18; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 12: /* switch 1 */ temp_v1_6 = temp_a2 * 2; temp_v0_19 = *(&D_80164438 + temp_v1_6); if ((temp_v0_19 >= 0x11C) && (temp_v0_19 < 0x209)) { temp_v0_20 = temp_v1_6 + &D_80165300; if (*temp_v0_20 != 1) { sp1C = temp_v0_20; func_800CA288(temp_a2 & 0xFF, 0x55, temp_a2); } *(temp_v1_6 + &D_80165300) = 1; return; } temp_v0_21 = temp_v1_6 + &D_80165300; if (*temp_v0_21 != 0) { sp1C = temp_v0_21; func_800CA2B8(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_21; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 18: /* switch 1 */ temp_v1_7 = temp_a2 * 2; temp_v0_22 = *(&D_80164438 + temp_v1_7); if (((temp_v0_22 >= 0) && (temp_v0_22 < 0x65)) || ((temp_v0_22 >= 0x14A) && (temp_v0_22 < 0x21F))) { temp_v0_25 = temp_v1_7 + &D_80165300; if (*temp_v0_25 != 2) { sp1C = temp_v0_25; func_800C8F80(temp_a2 & 0xFF, 0x170802D, temp_a2); } *(temp_v1_7 + &D_80165300) = 2; return; } if ((temp_v0_22 >= 0x288) && (temp_v0_22 < 0x305)) { temp_v0_23 = temp_v1_7 + &D_80165300; if (*temp_v0_23 != 1) { sp1C = temp_v0_23; func_800CA288(temp_a2 & 0xFF, 0x55, temp_a2); } *(temp_v1_7 + &D_80165300) = 1; return; } temp_v0_24 = temp_v1_7 + &D_80165300; temp_a0 = *temp_v0_24; phi_a0 = temp_a0; if (temp_a0 != 0) { if (temp_a0 == 1) { temp_a0_2 = temp_a2 & 0xFF; sp1C = temp_v0_24; arg1 = temp_a2; func_800CA2B8(temp_a0_2, temp_a2); phi_a0 = *temp_v0_24; phi_a2 = arg1; } if (phi_a0 == 2) { sp1C = temp_v1_7 + &D_80165300; func_800C9018(phi_a2 & 0xFF, 0x170802D, phi_a2); } phi_v0 = temp_v1_7 + &D_80165300; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; } } else { temp_t5 = gCurrentCourseId; switch (temp_t5) { /* switch 2 */ case 0: /* switch 2 */ temp_v1_8 = temp_a2 * 2; temp_v0_26 = *(&D_80164438 + temp_v1_8); if ((temp_v0_26 >= 0x19B) && (temp_v0_26 < 0x1B9)) { temp_v0_27 = temp_v1_8 + &D_80165300; if (*temp_v0_27 != 1) { sp1C = temp_v0_27; func_800CA2E4(temp_a2 & 0xFF, 0x55, temp_a2); } *(temp_v1_8 + &D_80165300) = 1; return; } temp_v0_28 = temp_v1_8 + &D_80165300; if (*temp_v0_28 != 0) { sp1C = temp_v0_28; func_800CA30C(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_28; block_127: *phi_v0 = 0; } default: /* switch 2 */ default: /* switch 1 */ return; case 1: /* switch 2 */ temp_v1_9 = temp_a2 * 2; temp_v0_29 = *(&D_80164438 + temp_v1_9); if ((temp_v0_29 >= 0xA0) && (temp_v0_29 < 0xB4)) { temp_v0_30 = temp_v1_9 + &D_80165300; if (*temp_v0_30 != 1) { sp1C = temp_v0_30; func_800CA2E4(temp_a2 & 0xFF, 0x55, temp_a2); } *(temp_v1_9 + &D_80165300) = 1; return; } temp_v0_31 = temp_v1_9 + &D_80165300; if (*temp_v0_31 != 0) { sp1C = temp_v0_31; func_800CA30C(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_31; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 2: /* switch 2 */ temp_v1_10 = temp_a2 * 2; temp_v0_32 = *(&D_80164438 + temp_v1_10); if ((temp_v0_32 >= 0x29) && (temp_v0_32 < 0x1D2)) { temp_v0_33 = temp_v1_10 + &D_80165300; if (*temp_v0_33 != 1) { sp1C = temp_v0_33; func_800CA2E4(temp_a2 & 0xFF, 0x41, temp_a2); } *(temp_v1_10 + &D_80165300) = 1; return; } temp_v0_34 = temp_v1_10 + &D_80165300; if (*temp_v0_34 != 0) { sp1C = temp_v0_34; func_800CA30C(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_34; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 3: /* switch 2 */ temp_v1_11 = temp_a2 * 2; temp_v0_35 = *(&D_80164438 + temp_v1_11); if ((temp_v0_35 >= 0x180) && (temp_v0_35 < 0x1E1)) { temp_v0_36 = temp_v1_11 + &D_80165300; if (*temp_v0_36 != 1) { sp1C = temp_v0_36; func_800CA2E4(temp_a2 & 0xFF, 0x41, temp_a2); } *(temp_v1_11 + &D_80165300) = 1; return; } temp_v0_37 = temp_v1_11 + &D_80165300; if (*temp_v0_37 != 0) { sp1C = temp_v0_37; func_800CA30C(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_37; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 8: /* switch 2 */ temp_v1_12 = temp_a2 * 2; temp_v0_38 = *(&D_80164438 + temp_v1_12); if ((temp_v0_38 >= 0x145) && (temp_v0_38 < 0x18B)) { temp_v0_39 = temp_v1_12 + &D_80165300; if (*temp_v0_39 != 1) { sp1C = temp_v0_39; func_800CA2E4(temp_a2 & 0xFF, 0x55, temp_a2); } *(temp_v1_12 + &D_80165300) = 1; return; } temp_v0_40 = temp_v1_12 + &D_80165300; if (*temp_v0_40 != 0) { sp1C = temp_v0_40; func_800CA30C(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_40; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 10: /* switch 2 */ if ((temp_v0 & 0x800) != 0x800) { temp_t2 = temp_a2 * 2; temp_v0_41 = temp_t2 + &D_80165300; if (*temp_v0_41 != 1) { sp1C = temp_v0_41; func_800CA2E4(temp_a2 & 0xFF, 0x1E, temp_a2); } *(temp_t2 + &D_80165300) = 1; return; } temp_v0_42 = (temp_a2 * 2) + &D_80165300; if (*temp_v0_42 != 0) { sp1C = temp_v0_42; func_800CA30C(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_42; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 12: /* switch 2 */ temp_v1_13 = temp_a2 * 2; temp_v0_43 = *(&D_80164438 + temp_v1_13); if ((temp_v0_43 >= 0x11C) && (temp_v0_43 < 0x209)) { temp_v0_44 = temp_v1_13 + &D_80165300; if (*temp_v0_44 != 1) { sp1C = temp_v0_44; func_800CA2E4(temp_a2 & 0xFF, 0x55, temp_a2); } *(temp_v1_13 + &D_80165300) = 1; return; } temp_v0_45 = temp_v1_13 + &D_80165300; if (*temp_v0_45 != 0) { sp1C = temp_v0_45; func_800CA30C(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_45; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; case 18: /* switch 2 */ temp_v1_14 = temp_a2 * 2; temp_v0_46 = *(&D_80164438 + temp_v1_14); if ((temp_v0_46 >= 0x288) && (temp_v0_46 < 0x305)) { temp_v0_47 = temp_v1_14 + &D_80165300; if (*temp_v0_47 != 1) { sp1C = temp_v0_47; func_800CA2E4(temp_a2 & 0xFF, 0x55, temp_a2); } *(temp_v1_14 + &D_80165300) = 1; return; } temp_v0_48 = temp_v1_14 + &D_80165300; if (*temp_v0_48 != 0) { sp1C = temp_v0_48; func_800CA30C(temp_a2 & 0xFF, temp_a2); phi_v0 = temp_v0_48; goto block_127; } /* Duplicate return node #128. Try simplifying control flow for better match */ return; } } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80027EDC.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? control_cpu_movement(Player *, s32, s8, s8); // extern u16 func_8001FB0C(s32, f32, f32, ?); // extern ? func_8002D028(s8); // extern ? func_8002E594(Player *, s32, s8, s8); // extern ? func_8002F730(Player *, s32, s8, s8); // extern extern ? D_801633F8; void func_80028864(Player *arg0, s32 arg1, s8 arg2, s8 arg3) { u16 sp1E; Player *temp_a0; Player *temp_a0_2; Player *temp_a0_3; Player *temp_a0_4; s16 temp_v0_7; s32 temp_t4; s32 temp_v0_2; u16 temp_v0; u16 temp_v0_3; u16 temp_v0_4; u16 temp_v0_5; u16 temp_v0_6; Player *phi_a0; temp_v0 = arg0->unk_000; phi_a0 = arg0; if ((temp_v0 & PLAYER_START_SEQUENCE) == 0) { temp_v0_2 = D_800DC52C; if (temp_v0_2 != 0) { if ((temp_v0_2 != 1) && (temp_v0_2 != 2)) { if (temp_v0_2 != 3) { } else { temp_v0_3 = func_8001FB0C(camera1, D_8016557C, 0.0f); temp_a0 = arg0; sp1E = temp_v0_3; phi_a0 = temp_a0; if (temp_v0_3 == 1) { } else { arg0 = temp_a0; temp_v0_4 = func_8001FB0C(temp_a0, (bitwise f32) camera2, D_8016557C, 0); temp_a0_2 = arg0; sp1E = temp_v0_4; phi_a0 = temp_a0_2; if (temp_v0_4 == 1) { } else { arg0 = temp_a0_2; temp_v0_5 = func_8001FB0C(temp_a0_2, (bitwise f32) camera3, D_8016557C, 0); temp_a0_3 = arg0; sp1E = temp_v0_5; phi_a0 = temp_a0_3; if (temp_v0_5 == 1) { } else { arg0 = temp_a0_3; sp1E = func_8001FB0C(temp_a0_3, (bitwise f32) camera4, D_8016557C, 0); phi_a0 = arg0; } } } goto block_17; } } else { temp_v0_6 = func_8001FB0C(camera1, D_8016557C, 0.0f); temp_a0_4 = arg0; sp1E = temp_v0_6; phi_a0 = temp_a0_4; if (temp_v0_6 == 1) { } else { arg0 = temp_a0_4; sp1E = func_8001FB0C(temp_a0_4, (bitwise f32) camera2, D_8016557C, 0); phi_a0 = arg0; } goto block_17; } } else { sp1E = func_8001FB0C(camera1, D_8016557C, 0.0f); phi_a0 = arg0; block_17: } if ((sp1E == 1) || ((phi_a0->unk_000 & PLAYER_INVISIBLE_OR_BOMB) == PLAYER_INVISIBLE_OR_BOMB) || (gModeSelection == BATTLE) || (temp_v0_7 = phi_a0->unk_0CA, ((temp_v0_7 & 2) != 0)) || ((temp_v0_7 & 8) != 0) || (*(&D_801633F8 + (arg2 * 2)) == 1)) { temp_t4 = phi_a0->unk_0BC & ~0x1000; phi_a0->unk_0BC = temp_t4; if (((temp_t4 & 0x80) == 0x80) || ((temp_t4 & 0x40) == 0x40) || ((temp_t4 & 0x400) == 0x400) || ((temp_t4 & 0x4000) == 0x4000) || ((temp_t4 & 0x80000) == 0x80000) || ((temp_t4 & 0x800000) == 0x800000) || ((temp_t4 & 0x1000000) == 0x1000000) || ((temp_t4 & 0x2000000) == 0x2000000) || ((temp_t4 & 0x20000) == 0x20000) || ((phi_a0->unk_044 & 0x800) != 0)) { func_8002E594(phi_a0, arg1, arg3, arg2); return; } func_8002D268(phi_a0, arg1, arg3, arg2); return; } control_cpu_movement(phi_a0, arg1, arg3, arg2); return; } if ((temp_v0 & 0x200) == 0x200) { func_8002D028(arg2); func_8002F730(arg0, arg1, arg3, arg2); return; } if ((temp_v0 & 0x80) != 0) { func_8002D268(arg0, arg1, arg3, arg2); return; } if ((temp_v0 & 0x4000) != 0x4000) { arg0->unk_09C = 50.0f; } arg0->unk_0BC &= -9; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80028864.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_8002E594(s8, s8); // extern void func_80028C44(Player *arg0, s32 arg1, s8 arg2, s8 arg3) { s32 temp_t9; if ((arg0->unk_000 & 0x2000) == 0) { temp_t9 = arg0->unk_0BC & ~0x1000; arg0->unk_0BC = temp_t9; if (((temp_t9 & 0x80) == 0x80) || ((temp_t9 & 0x40) == 0x40) || ((temp_t9 & 0x400) == 0x400) || ((temp_t9 & 0x4000) == 0x4000) || ((temp_t9 & 0x80000) == 0x80000) || ((temp_t9 & 0x800000) == 0x800000) || ((temp_t9 & 0x1000000) == 0x1000000) || ((temp_t9 & 0x2000000) == 0x2000000) || ((temp_t9 & 0x20000) == 0x20000) || ((arg0->unk_044 & 0x800) != 0)) { func_8002E594(arg3, arg2); return; } func_8002D268(arg0, arg1, arg3, arg2); return; } arg0->unk_0BC &= -9; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80028C44.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_8002E594(s8, s8); // extern extern s32 D_800DC510; void func_80028D3C(Player *arg0, s32 arg1, s8 arg2, s8 arg3) { s16 temp_v0; s32 temp_t3; s32 temp_v0_2; if ((((arg0->unk_000 & 0x2000) == 0) && (D_800DC510 != 5)) || (temp_v0 = arg0->unk_0CA, ((temp_v0 & 2) != 0)) || ((temp_v0 & 8) != 0) || (temp_v0_2 = arg0->unk_0BC, ((temp_v0_2 & 0x4F010CC0) != 0))) { temp_t3 = arg0->unk_0BC & ~0x1000; arg0->unk_0BC = temp_t3; if (((temp_t3 & 0x80) == 0x80) || ((temp_t3 & 0x40) == 0x40) || ((temp_t3 & 0x400) == 0x400) || ((temp_t3 & 0x4000) == 0x4000) || ((temp_t3 & 0x80000) == 0x80000) || ((temp_t3 & 0x800000) == 0x800000) || ((temp_t3 & 0x1000000) == 0x1000000) || ((temp_t3 & 0x2000000) == 0x2000000) || ((temp_t3 & 0x20000) == 0x20000) || ((arg0->unk_044 & 0x800) != 0)) { func_8002E594(arg3, arg2); return; } func_8002D268(arg0, arg1, arg3, arg2); return; } arg0->unk_0BC = temp_v0_2 & ~8; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80028D3C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80027DA8(s8); // extern ? func_80028864(void *, s32, s8, s8); // extern ? func_80028C44(void *, s32, s8, s8); // extern ? func_80028D3C(void *, s32, s8, s8); // extern ? func_80038C6C(s8, s8); // extern void func_80028E70(void *arg0, s32 arg1, s8 arg2, s8 arg3) { s32 temp_v0_2; u16 temp_v0; temp_v0 = arg0->unk0; if ((temp_v0 & 0x8000) == 0x8000) { if (D_800DC50C == 5) { if ((temp_v0 & 0x2000) == 0) { func_80038C6C(arg3, arg2); return; } arg0->unkBC = arg0->unkBC & ~8; return; } func_80027DA8(arg2); temp_v0_2 = gModeSelection; if ((temp_v0_2 != TIME_TRIALS) && (temp_v0_2 != VERSUS)) { if (temp_v0_2 != BATTLE) { func_80028864(arg0, arg1, arg2, arg3); // Duplicate return node #12. Try simplifying control flow for better match return; } func_80028D3C(arg0, arg1, arg2, arg3); return; } func_80028C44(arg0, arg1, arg2, arg3); } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80028E70.s") #endif extern s16 D_80164AF0; void func_80028F70(void) { D_80164AF0 = 0; func_80028E70(D_800DC4FC, camera1, 0, 0); func_80028E70(D_800DC4E0, camera1, 1, 0); func_80028E70(D_800DC4E4, camera1, 2, 0); func_80028E70(D_800DC4E8, camera1, 3, 0); func_80028E70(D_800DC4EC, camera1, 4, 0); func_80028E70(D_800DC4F0, camera1, 5, 0); func_80028E70(D_800DC4F4, camera1, 6, 0); func_80028E70(D_800DC4F8, camera1, 7, 0); } void func_80029060(void) { D_80164AF0 = 0; func_80028E70(D_800DC4FC, camera1, 0, 0); func_80028E70(D_800DC4E0, camera1, 1, 0); func_80028E70(D_800DC4E4, camera1, 2, 0); func_80028E70(D_800DC4E8, camera1, 3, 0); func_80028E70(D_800DC4EC, camera1, 4, 0); func_80028E70(D_800DC4F0, camera1, 5, 0); func_80028E70(D_800DC4F4, camera1, 6, 0); func_80028E70(D_800DC4F8, camera1, 7, 0); } void func_80029150(void) { } void func_80029158(void) { D_80164AF0 = 0; func_80028E70(D_800DC4FC, camera1, 0, 0); func_80028E70(D_800DC4E0, camera1, 1, 0); func_80028E70(D_800DC4E4, camera1, 2, 0); func_80028E70(D_800DC4E8, camera1, 3, 0); } void func_800291E8(void) { } void func_800291F0(void) { } void func_800291F8(void) { } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80029200(Player *arg0, s8 arg1) { s32 i; for (i = 0; i < 8; i++) { arg0->unk_24C[arg1] = i; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80029200.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80022634(void *, s16, ?, void *); // extern ? func_80029200(Player *, s8); // extern s16 func_802B7830(f32, f32); // extern s32 func_802B7C40(f32, s32); // extern f32 sins(s32); // extern f32 coss(s32); // extern extern ? D_800DDBD4; extern f64 D_800ED788; extern f64 D_800ED790; void func_8002934C(Player *player, s32 arg1, s8 arg2, s8 arg3) { f32 sp50; f32 sp28; void *sp24; s32 sp20; f32 temp_f0; f32 temp_f2; f32 temp_f4; f32 temp_f6; s16 *temp_a1; s16 *temp_v0_3; s16 temp_t8; s16 temp_v1_6; s32 temp_a0; s32 temp_a0_3; s32 temp_a2; s32 temp_a2_2; s32 temp_t3; s32 temp_t6; s32 temp_t6_3; s32 temp_t7; s32 temp_t7_2; s32 temp_t9; s32 temp_t9_2; s32 temp_v0_2; s32 temp_v1; s32 temp_v1_2; s32 temp_v1_3; s32 temp_v1_4; s32 temp_v1_5; s32 temp_v1_7; u16 temp_a0_2; u16 temp_t6_2; u16 temp_v0; void *temp_a3; void *phi_a3; s32 phi_v1; f32 phi_f2; f32 phi_f0; s32 phi_a0; s32 phi_t1; s32 phi_v0; s32 phi_a2; s32 phi_v1_2; s32 phi_t2; s32 phi_a1; s32 phi_v0_2; s32 phi_t0; s16 phi_v1_3; s32 phi_a2_2; s32 phi_v0_3; temp_t7 = arg2 * 2; temp_a3 = player + temp_t7; temp_a3->unk48 = func_802B7830(player->posX - arg1->unk0, player->posZ - arg1->unk8); player->unk_244[arg2] = ((player->unk_02E + temp_a3->unk48 + player->unk_0C0) & 0xFFFF) / 0x80; temp_f6 = player->unk_224; temp_v1 = player->unk_0BC; temp_f4 = D_800DDBD4[player->characterId] * 18.0f; temp_f0 = player->unk_230 - player->unk_23C; temp_f2 = temp_f4 * temp_f6; phi_a3 = temp_a3; phi_f2 = temp_f2; if ((temp_v1 & 8) != 8) { if ((temp_v1 & 0x40000000) == 0x40000000) { sp24 = temp_a3; sp50 = temp_f2; temp_a3->unkCC = func_802B7C40(temp_f0 / temp_f2) * D_800ED788; } else { sp24 = temp_a3; sp50 = temp_f2; temp_a3->unkCC = func_802B7C40(temp_f0 / temp_f2) * 2; } phi_a3 = player + temp_t7; phi_f2 = temp_f4 * temp_f6; } phi_v1 = player->unk_0BC; if ((player->unk_0BC & 0x4000000) == 0x4000000) { phi_a3->unkCC = player->unk_D9C; phi_v1 = player->unk_0BC; } if ((phi_v1 & 8) != 8) { sp24 = phi_a3; phi_a3->unkD4 = func_802B7C40((player->unk_1F8 - player->unk_1FC) / phi_f2, 0x4000000) * D_800ED790; } else { temp_v0 = phi_a3->unk244; if ((temp_v0 >= 0) && (temp_v0 < 0x101)) { phi_f0 = player->rotY - player->posY; } else { phi_f0 = player->posY - player->rotY; } sp24 = phi_a3; phi_a3->unkD4 = func_802B7C40(phi_f0 / phi_f2, 0x4000000) * 0.5; } if ((player->unk_0BC & 0x4000000) == 0x4000000) { phi_a3->unkD4 = player->unk_D9C; } sp24 = phi_a3; func_80029200(player, arg2); temp_a0 = (player->unk_02E + phi_a3->unk48 + player->unk_0C0) & 0xFFFF; sp20 = temp_a0; sp28 = sins(temp_a0); func_80022634(phi_a3 + 0x50, (coss(temp_a0) * phi_a3->unkCC) + (phi_a3->unkD4 * sp28), 0x3F000000, phi_a3); temp_a0_2 = phi_a3->unk244; temp_t3 = arg2 * 4; temp_v1_2 = 4 << temp_t3; temp_t8 = player->unk_002 & ~temp_v1_2; player->unk_002 = temp_t8; phi_a0 = temp_a0_2; if (temp_a0_2 >= 0x101) { player->unk_002 = temp_t8 | temp_v1_2; phi_a0 = (0x201 - temp_a0_2) & 0xFFFF; } temp_v1_3 = player->unk_0BC; if (((temp_v1_3 & 0x80) != 0x80) && (phi_t1 = 0x80000, ((temp_v1_3 & 0x40) != 0x40)) && (temp_v0_2 = temp_v1_3 & 0x80000, phi_v0 = temp_v0_2, phi_a2 = 0x800000, phi_v0 = temp_v0_2, (temp_v0_2 != 0x80000)) && (phi_t2 = 0x20000, ((temp_v1_3 & 0x800000) != 0x800000)) && ((temp_v1_3 & 0x20000) != 0x20000) && ((player->unk_044 & 0x800) == 0)) { phi_a1 = 0x666; if (phi_a0 < 0x51) { phi_a1 = 0x208; goto block_28; } phi_t0 = 0xF; } else { phi_v0 = temp_v1_3 & 0x80000; phi_a1 = 0x666; block_28: phi_t1 = 0x80000; phi_a2 = 0x800000; phi_t2 = 0x20000; phi_t0 = 0; } if ((phi_t1 == phi_v0) || (phi_a2 == (temp_v1_3 & phi_a2)) || ((player->unk_044 & 0x800) != 0)) { phi_a3->unk50 = 0; } phi_v1_2 = player->unk_0BC; if (((player->unk_0BC & 8) == 8) && ((player->unk_0CA & 2) == 2)) { phi_a3->unk50 = 0; phi_v1_2 = player->unk_0BC; } temp_t9 = (player->unk_02E + phi_a3->unk48 + player->unk_0C0) & 0xFFFF; if (((phi_v1_2 & 0x80) == 0x80) || ((phi_v1_2 & 0x40) == 0x40) || (phi_t1 == (phi_v1_2 & phi_t1)) || (phi_a2 == (phi_v1_2 & phi_a2)) || (phi_t2 == (phi_v1_2 & phi_t2)) || ((player->unk_044 & 0x800) != 0)) { if (temp_t9 >= 0x7FF9) { temp_t6 = ((-temp_t9 & 0xFFFF) / phi_a1) & 0xFFFF; phi_v0_2 = temp_t6; if (temp_t6 == 0) { phi_v0_2 = 1; } } else { phi_v0_2 = (temp_t9 / phi_a1) & 0xFFFF; } } else { phi_v0_3 = temp_t9; if (temp_t9 >= 0x7FF9) { phi_v0_3 = -temp_t9 & 0xFFFF; } phi_v0_2 = (phi_v0_3 / phi_a1) & 0xFFFF; } temp_t6_2 = phi_v0_2 + phi_t0; phi_a3->unk244 = temp_t6_2; if ((temp_t6_2 & 0xFFFF) >= 0x23) { phi_a3->unk244 = 0x22; } temp_v1_4 = player->unk_0BC; if ((((temp_v1_4 & 0x80) != 0) || ((temp_v1_4 & 0x40) != 0) || ((temp_v1_4 & phi_t1) != 0) || ((temp_v1_4 & phi_a2) != 0) || ((temp_v1_4 & phi_t2) != 0) || ((player->unk_044 & 0x800) != 0)) && (phi_a3->unk244 >= 0x14)) { phi_a3->unk244 = 0; } if (phi_a3->unk24C >= 9) { phi_a3->unk24C = 4; } temp_v1_5 = player->unk_0BC; if ((phi_t1 == (temp_v1_5 & phi_t1)) || (phi_a2 == (temp_v1_5 & phi_a2)) || ((player->unk_044 & 0x800) != 0)) { phi_a3->unk24C = 4; } if (((player->unk_0BC & 0x400) == 0x400) || ((player->unk_0BC & 0x1000000) == 0x1000000) || ((player->unk_0BC & 0x2000000) == 0x2000000) || ((player->unk_0BC << 0xF) < 0) || ((player->unk_0BC & 0x80) != 0) || ((player->unk_0BC & 0x40) != 0)) { temp_a2_2 = 1 << temp_t3; player->unk_002 = player->unk_002 | temp_a2_2; temp_t9_2 = arg3 * 2; temp_v0_3 = (arg2 * 0x10) + temp_t9_2 + D_80165190; *temp_v0_3 = 1; temp_v1_7 = player->unk_0BC; phi_a2_2 = temp_a2_2; if (((temp_v1_7 & 0x80) != 0) || ((temp_v1_7 & 0x40) != 0)) { if ((phi_a3->unk244 == *(D_801650D0 + ((arg2 * 0x10) + temp_t9_2))) && (phi_a3->unk24C == *(D_80165110 + ((arg2 * 0x10) + temp_t9_2)))) { player->unk_002 = player->unk_002 & ~temp_a2_2; *temp_v0_3 = 1; } } else if ((player->unk_0A8 >> 8) == (*(D_80165150 + ((arg2 * 0x10) + temp_t9_2)) >> 8)) { player->unk_002 = player->unk_002 & ~temp_a2_2; } phi_v1_3 = *(D_801650D0 + ((arg2 * 0x10) + temp_t9_2)); } else { temp_a2 = 1 << temp_t3; player->unk_002 = player->unk_002 | temp_a2; temp_t6_3 = arg3 * 2; temp_t7_2 = arg2 * 0x10; temp_a1 = temp_t7_2 + temp_t6_3 + D_801650D0; temp_v1_6 = *temp_a1; phi_v1_3 = temp_v1_6; phi_a2_2 = temp_a2; if ((phi_a3->unk244 == temp_v1_6) && (phi_a3->unk24C == *(D_80165110 + (temp_t7_2 + temp_t6_3))) && (*(D_80165190 + (temp_t7_2 + temp_t6_3)) == 0)) { player->unk_002 = player->unk_002 & ~temp_a2; phi_v1_3 = *temp_a1; } } temp_a0_3 = phi_v1_3 - phi_a3->unk244; if ((temp_a0_3 >= 0x14) || (temp_a0_3 < -0x13)) { player->unk_002 = player->unk_002 | phi_a2_2; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002934C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800225CC(void *, f32, ?); // extern ? func_80022634(void *, s16, ?); // extern s32 func_802ABD10(u16); // extern ? func_802AFA34(void *, void *, f32, f32, f32); // extern ? func_802B63B8(f32, f32 *, f32 *, f32 *); // extern s32 func_802B7C40(f32); // extern extern ? D_800DDBD4; extern f64 D_800ED798; extern f64 D_800ED7A0; extern f64 D_800ED7A8; extern f64 D_800ED7B0; void func_80029B4C(void *arg0, ? arg1, f32 arg2, ? arg3) { f32 sp94; f32 sp90; f32 sp8C; f32 sp88; f32 sp84; f32 sp80; f32 sp5C; f32 sp54; f32 sp50; f32 sp48; f32 sp40; f64 sp38; f32 sp34; f64 sp28; f32 *temp_a0; f32 *temp_a0_2; f32 *temp_a0_3; f32 *temp_a0_4; f32 temp_f0_2; f32 temp_f12; f32 temp_f14; f32 temp_f2; f32 temp_f2_3; f64 temp_f0; f64 temp_f2_2; s16 temp_t5; s32 temp_t2; s32 temp_v0; s32 temp_v0_2; s32 temp_v0_3; s32 temp_v1; f32 phi_f12; s32 phi_v0; s16 phi_a1; s32 phi_v1; if ((arg0->unkBC & 0x40000000) == 0x40000000) { phi_f12 = (*(&D_800DDBD4 + (arg0->unk254 * 4)) / 2.0f) * (arg0->unk224 * 1.5) * 18.0; } else { phi_f12 = (*(&D_800DDBD4 + (arg0->unk254 * 4)) / 2.0f) * 18.0f; } sp48 = phi_f12; func_802B6540(&sp5C, 0.0f, 1.0f, 0.0f, arg0->unk2E + arg0->unkC0); temp_f0 = phi_f12; temp_a0 = &sp8C; temp_f2 = phi_f12 - 2.0f; sp8C = temp_f0 - D_800ED798; sp38 = temp_f0; sp94 = temp_f2; sp40 = temp_f2; sp90 = -arg0->unk70; func_802B63B8(phi_f12, temp_a0, &sp5C); sp80 = arg0->unk198; sp84 = arg0->unk19C; sp88 = arg0->unk1A0; arg0->unk198 = sp8C + arg0->unk14; arg0->unk19C = sp90 + arg0->unk18; arg0->unk1A0 = sp94 + arg0->unk1C; func_802AFA34(arg0, arg0 + 0x198, sp80, sp84, sp88); temp_f14 = -phi_f12; temp_f2_2 = temp_f14; temp_a0_2 = &sp8C; sp8C = temp_f2_2 + D_800ED7A0; sp34 = temp_f14; sp28 = temp_f2_2; sp94 = sp40; sp90 = -arg0->unk70; func_802B63B8(phi_f12, (bitwise f32 *) temp_f14, temp_a0_2, &sp5C); sp80 = arg0->unk1B0; sp84 = arg0->unk1B4; sp88 = arg0->unk1B8; arg0->unk1B0 = sp8C + arg0->unk14; arg0->unk1B4 = sp90 + arg0->unk18; arg0->unk1B8 = sp94 + arg0->unk1C; func_802AFA34(arg0, arg0 + 0x1B0, sp80, sp84, sp88); temp_a0_3 = &sp8C; temp_f12 = sp34 + 4.0f; sp8C = temp_f0 - D_800ED7A8; sp94 = temp_f12; sp40 = temp_f12; sp90 = -arg0->unk70; func_802B63B8(temp_f12, temp_a0_3, &sp5C); sp80 = arg0->unk1C8; sp84 = arg0->unk1CC; sp88 = arg0->unk1D0; arg0->unk1C8 = sp8C + arg0->unk14; arg0->unk1CC = sp90 + arg0->unk18; arg0->unk1D0 = sp94 + arg0->unk1C; func_802AFA34(arg0, arg0 + 0x1C8, sp80, sp84, sp88); temp_a0_4 = &sp8C; sp8C = temp_f2_2 + D_800ED7B0; sp94 = sp40; sp90 = -arg0->unk70; func_802B63B8((bitwise f32) temp_a0_4, &sp5C); sp80 = arg0->unk1E0; sp84 = arg0->unk1E4; sp88 = arg0->unk1E8; arg0->unk1E0 = sp8C + arg0->unk14; arg0->unk1E4 = sp90 + arg0->unk18; arg0->unk1E8 = sp94 + arg0->unk1C; func_802AFA34(arg0, arg0 + 0x1E0, sp80, sp84, sp88); if ((arg0->unkBC & 8) == 0) { func_800225CC(arg0 + 0x230, (arg0->unk1A8 + arg0->unk1D8) / 2.0f, 0x3F000000); func_800225CC(arg0 + 0x23C, (arg0->unk1C0 + arg0->unk1F0) / 2.0f, 0x3F000000); func_800225CC(arg0 + 0x1FC, (arg0->unk1A8 + arg0->unk1C0) / 2.0f, 0x3F000000); func_800225CC(arg0 + 0x1F8, (arg0->unk1D8 + arg0->unk1F0) / 2.0f, 0x3F000000); } temp_f2_3 = ((*(&D_800DDBD4 + (arg0->unk254 * 4)) * 18.0f) + 1.0f) * arg0->unk224; sp50 = temp_f2_3; arg0->unk206 = -func_802B7C40((arg0->unk23C - arg0->unk230) / temp_f2_3); if (((arg0->unkCA & 2) == 2) || (temp_t2 = arg0->unkBC & 8, phi_v0 = temp_t2, (temp_t2 != 0))) { arg0->unk206 = 0; phi_v0 = arg0->unkBC & 8; } if (phi_v0 != 8) { func_80022634(arg0 + 0xC4, func_802B7C40((arg0->unk1F8 - arg0->unk1FC) / temp_f2_3), 0x3F000000); } else { temp_f0_2 = arg0->unk24 - arg2; sp54 = temp_f0_2; temp_v0 = func_802B7C40(temp_f0_2 / temp_f2_3); phi_a1 = temp_v0 * 0xA; if (temp_f0_2 >= 0.0f) { phi_a1 = temp_v0 / 4; } func_80022634(arg0 + 0xC4, phi_a1, 0x3F000000); } if (((arg0->unkBC & 8) == 8) && ((arg0->unkCA & 2) == 2)) { arg0->unkC4 = arg0->unkD9C; } temp_t5 = func_802ABD10(arg0->unk11A) & 0xFF; temp_v1 = temp_t5 & 0xFFFF; arg0->unkF8 = temp_t5; phi_v1 = temp_v1; if (temp_v1 == 0xFE) { temp_v0_2 = arg0->unkBC; phi_v1 = temp_v1; if ((temp_v0_2 & 0x100000) != 0x100000) { phi_v1 = temp_v1; if ((temp_v0_2 & 8) != 8) { arg0->unkC = arg0->unkC | 0x800000; phi_v1 = temp_t5 & 0xFFFF; } } } if (phi_v1 == 0xFC) { temp_v0_3 = arg0->unkBC; if (((temp_v0_3 & 4) != 4) && ((temp_v0_3 & 8) != 8)) { arg0->unkC = arg0->unkC | 0x8000; } } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80029B4C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80022634(void *, s16, ?); // extern s32 func_802ABD10(u16); // extern s32 func_802ABD7C(u16); // extern f32 func_802ABE30(f32, f32, f32, u16); // extern s32 func_802B7C40(f32); // extern f32 sins(s32); // extern f32 coss(s32); // extern extern ? D_800DDBD4; void func_8002A194(void *arg0, f32 arg1, f32 arg2, f32 arg3) { s16 sp3A; f32 sp30; s32 sp28; f32 temp_f0; f32 temp_f0_2; f32 temp_f12; f32 temp_f12_2; f32 temp_f12_3; f32 temp_f12_4; f32 temp_f14; f32 temp_f20; f32 temp_f2; s16 temp_v1; s32 temp_t0; s32 temp_t7; s32 temp_t8; s32 temp_t9; s32 temp_v0; s32 temp_v0_2; s32 temp_v0_3; u16 temp_v1_2; f32 phi_f20; s16 phi_a1; temp_v1 = -arg0->unk2E - arg0->unkC0; if ((arg0->unkBC & 0x40000000) == 0x40000000) { phi_f20 = (((*(&D_800DDBD4 + (arg0->unk254 * 4)) * 18.0f) / 2.0f) * (arg0->unk224 * 1.5)) - 1.0; } else { phi_f20 = (((*(&D_800DDBD4 + (arg0->unk254 * 4)) * 18.0f) / 2.0f) * arg0->unk224) - 1.0f; } temp_t7 = (temp_v1 + 0x2000) & 0xFFFF; sp28 = temp_t7; sp3A = temp_v1; arg0->unk1A0 = (coss(temp_t7) * phi_f20) + arg3; temp_f12 = (sins(sp28) * phi_f20) + arg1; arg0->unk198 = temp_f12; arg0->unk1A8 = func_802ABE30(temp_f12, arg2, arg0->unk1A0, arg0->unk11A); temp_t8 = (sp3A - 0x2000) & 0xFFFF; sp28 = temp_t8; arg0->unk1B8 = (coss(temp_t8) * phi_f20) + arg3; temp_f12_2 = (sins(sp28) * phi_f20) + arg1; arg0->unk1B0 = temp_f12_2; arg0->unk1C0 = func_802ABE30(temp_f12_2, arg2, arg0->unk1B8, arg0->unk11A); temp_t9 = (sp3A + 0x6000) & 0xFFFF; sp28 = temp_t9; arg0->unk1D0 = (coss(temp_t9) * phi_f20) + arg3; temp_f12_3 = (sins(sp28) * phi_f20) + arg1; arg0->unk1C8 = temp_f12_3; arg0->unk1D8 = func_802ABE30(temp_f12_3, arg2, arg0->unk1D0, arg0->unk11A); temp_t0 = (sp3A - 0x6000) & 0xFFFF; sp28 = temp_t0; arg0->unk1E8 = (coss(temp_t0) * phi_f20) + arg3; arg0->unk1E0 = (sins(sp28) * phi_f20) + arg1; arg0->unk1F0 = func_802ABE30(arg0->unk1C8, arg2, arg0->unk1D0, arg0->unk11A); if ((arg0->unkBC & 8) != 8) { temp_f0 = arg0->unk1A8; temp_f2 = arg0->unk1D8; temp_f12_4 = arg0->unk1C0; temp_f14 = arg0->unk1F0; arg0->unk230 = (temp_f0 + temp_f2) / 2.0f; arg0->unk23C = (temp_f12_4 + temp_f14) / 2.0f; arg0->unk1FC = (temp_f0 + temp_f12_4) / 2.0f; arg0->unk1F8 = (temp_f2 + temp_f14) / 2.0f; } temp_v1_2 = func_802ABD10(arg0->unk11A) & 0xFF; arg0->unkF8 = temp_v1_2; arg0->unk1EC = temp_v1_2; arg0->unk1D4 = temp_v1_2; arg0->unk1BC = temp_v1_2; arg0->unk1A4 = temp_v1_2; temp_f20 = (*(&D_800DDBD4 + (arg0->unk254 * 4)) * 18.0f) + 1.0f; arg0->unk206 = -func_802B7C40((arg0->unk23C - arg0->unk230) / temp_f20); if ((arg0->unkBC & 8) != 8) { func_80022634(arg0 + 0xC4, func_802B7C40((arg0->unk1F8 - arg0->unk1FC) / temp_f20), 0x3F000000); } else { temp_f0_2 = arg0->unk24 - arg2; sp30 = temp_f0_2; temp_v0 = func_802B7C40(temp_f0_2 / temp_f20); phi_a1 = temp_v0 * 0xA; if (temp_f0_2 >= 0.0f) { phi_a1 = (temp_v0 << 0x11) >> 0x10; } func_80022634(arg0 + 0xC4, phi_a1, 0x3F000000); } if (func_802ABD7C(arg0->unk11A) != 0) { arg0->unk1F4 = arg0->unk1F4 | 1; } else { arg0->unk1F4 = arg0->unk1F4 & ~1; } if (arg0->unkF8 == 0xFE) { temp_v0_2 = arg0->unkBC; if (((temp_v0_2 & 0x100000) != 0x100000) && ((temp_v0_2 & 8) != 8)) { arg0->unkC = arg0->unkC | 0x800000; } } if (arg0->unkF8 == 0xFC) { temp_v0_3 = arg0->unkBC; if (((temp_v0_3 & 4) != 4) && ((temp_v0_3 & 8) != 8)) { arg0->unkC = arg0->unkC | 0x8000; } } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002A194.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_8002A5F4(void *arg0, f32 arg1, void *arg2, f32 arg3, f32 arg4) { f32 temp_f0; f32 temp_f12; f32 temp_f14; f32 temp_f16; f32 temp_f18; f32 temp_f20; f32 temp_f20_2; f32 temp_f2; temp_f0 = arg2->unk0; temp_f2 = arg2->unk4; temp_f12 = arg2->unk8; temp_f14 = -arg0->unk0; temp_f16 = -arg0->unk4; temp_f18 = -arg0->unk8; if (arg1 < -arg4) { temp_f20 = (temp_f14 * temp_f0) + (temp_f16 * temp_f2) + (temp_f18 * temp_f12); arg2->unk0 = (temp_f0 - (temp_f20 * temp_f14)) - (temp_f20 * temp_f14 * arg3); arg2->unk4 = (temp_f2 - (temp_f20 * temp_f16)) - (temp_f20 * temp_f16 * arg3); arg2->unk8 = (temp_f12 - (temp_f20 * temp_f18)) - (temp_f20 * temp_f18 * arg3); return; } temp_f20_2 = (temp_f14 * temp_f0) + (temp_f16 * temp_f2) + (temp_f18 * temp_f12); arg2->unk0 = temp_f0 - (temp_f20_2 * temp_f14); arg2->unk4 = temp_f2 - (temp_f20_2 * temp_f16); arg2->unk8 = temp_f12 - (temp_f20_2 * temp_f18); } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002A5F4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800C9060(u8, ?); // extern ? func_800C90F4(?, s32, void *); // extern void func_8002A704(void *arg0, u8 arg1) { s32 temp_a1; u16 temp_v0; void *temp_a2; void *phi_a2; temp_v0 = arg0->unk0; temp_a2 = arg0; arg0->unkBC = arg0->unkBC | 0x2000; arg0->unkC = arg0->unkC & 0xFDFFFFFF; phi_a2 = temp_a2; if (((temp_v0 & 0x4000) == 0x4000) && ((temp_v0 & 0x100) != 0x100)) { temp_a1 = (temp_a2->unk254 * 0x10) + 0x29008001; arg0 = temp_a2; func_800C90F4(0, temp_a1, temp_a2); func_800C9060(arg1, 0x1900A40B); phi_a2 = arg0; } phi_a2->unkDC = 0x50; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002A704.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800C9250(s32, s8, s32); // extern void func_8002A79C(void *arg0, s8 arg1) { s32 temp_v0; s32 temp_v1; u16 temp_v0_2; temp_v0 = arg0->unkBC; temp_v1 = temp_v0 & 0x100; if ((temp_v1 != 0x100) && ((temp_v0 & 0x10) != 0x10) && (arg0->unk22A >= 2)) { arg0->unkBC = temp_v0 | 0x100; arg0->unk23A = 0; arg0->unk22A = 0; arg0->unk228 = 0; if (D_8015F890 != 1) { temp_v0_2 = arg0->unk0; if (((temp_v0_2 & 0x4000) != 0) && ((temp_v0_2 & 0x100) == 0)) { func_800C9250(arg1 & 0xFF, arg1, 0x100); return; } // Duplicate return node #12. Try simplifying control flow for better match return; } if (arg0 == D_800DC4DC) { func_800C9250(arg1 & 0xFF, arg1, 0x100); return; } // Duplicate return node #12. Try simplifying control flow for better match return; } if (temp_v1 == 0x100) { arg0->unk23A = arg0->unk23A + 1; if (arg0->unk23A >= 0x1F) { arg0->unk23A = 0; arg0->unkBC = arg0->unkBC & ~0x100; arg0->unk22A = 0; arg0->unk228 = 0; } } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002A79C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800C9060(s32, ?, s8); // extern void func_8002A8A4(void *arg0, s8 arg1) { s16 temp_v0; s16 temp_v0_2; s16 temp_v0_3; s16 temp_v0_4; s16 temp_v1; s16 temp_v1_2; if ((arg0->unkC0 / 0xB6) > 0) { if ((arg0->unk7C >> 0x10) < -9) { temp_v0 = arg0->unk228; if (temp_v0 < 0x65) { arg0->unk228 = temp_v0 + 1; } if ((arg0->unk228 == 0x64) && ((arg0->unk0 & 0x4000) != 0)) { func_800C9060(arg1 & 0xFF, 0x1900851E, arg1); return; } // Duplicate return node #30. Try simplifying control flow for better match return; } temp_v0_2 = arg0->unk228; if ((temp_v0_2 >= 0x12) && (temp_v0_2 < 0x64)) { temp_v1 = arg0->unk22A; if (temp_v1 < 3) { arg0->unk22A = temp_v1 + 1; } } if ((arg0->unk228 >= 0xA) && (arg0->unk228 < 0x64)) { arg0->unk228 = 0xA; return; } arg0->unk228 = 0; goto block_29; } if ((arg0->unk7C >> 0x10) >= 0xA) { temp_v0_3 = arg0->unk228; if (temp_v0_3 < 0x65) { arg0->unk228 = temp_v0_3 + 1; } if ((arg0->unk228 == 0x64) && ((arg0->unk0 & 0x4000) != 0)) { func_800C9060(arg1 & 0xFF, 0x1900851E, arg1); return; } // Duplicate return node #30. Try simplifying control flow for better match return; } temp_v0_4 = arg0->unk228; if ((temp_v0_4 >= 0x12) && (temp_v0_4 < 0x64)) { temp_v1_2 = arg0->unk22A; if (temp_v1_2 < 3) { arg0->unk22A = temp_v1_2 + 1; } } if ((arg0->unk228 >= 0xA) && (arg0->unk228 < 0x64)) { arg0->unk228 = 0xA; return; } arg0->unk228 = 0; block_29: arg0->unk22A = 0; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002A8A4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80036C5C(); // extern extern ? gkartHopJerkTable; extern ? gKartHopInitialVelocityTable; /** * Function: func_8002AA50 * Parameters: * Player *player - A pointer to a Player * Some sort of hop initalization function, only runs when the hop button is * first pressed. * Initializes several Player struct members, most importantly kartHopVelocity. * This marks the beginning of a hop. * Refer to gKartHopInitialVelocityTable in kart_attributes.inc.c for possible * starting values of kartHopVelocity (by default, 0.93f for all characterIds) * Sets kartHopAcceleration (kartHopAccleration) to 0.0f * Refer to gKartHopJerkTable in kart_attributes.inc.c for possible starting * values of kartHopJerk (by default, 0.03f for all characterIds) * Sets unk_100 to 500.0f * Sets unk_DAC to 3.0f * Sets the second bit of unk_0BC. * This is probably some sort of flag, something like "is hopping" or "is in the air" * Calls func_80036C5C * No idea what that function does **/ void func_8002AA50(Player *player) { player->kartHopAcceleration = 0.0f; player->kartHopJerk = gkartHopJerkTable[player->characterId]; player->unk_0BC |= 2; player->kartHopVelocity = gKartHopInitialVelocityTable[player->characterId]; player->unk_DAC = 3.0f; player->unk_100 = 500.0f; func_80036C5C(player); } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002AA50.s") #endif /** * Function: func_8002AAC0 * Parameters: * Player *player - A pointer to a Player * First kartHopJerk is subtracted from kartHopAcceleration * Then kartHopAcceleration is added to kartHopVelocity. * If kartHopVelocity is less than or equal to zero, all three * values (kartHop{Jerk,Acceleration,Velocity}) are set to 0.0f, * thereby ending the rising portion of the hop. * kartHopVelocity is restricted to values in [-INF, 15.0f] * kartHopAcceleration is restricted to values in [-9.0f, 9.0f] **/ void func_8002AAC0(Player *player) { player->kartHopAcceleration -= player->kartHopJerk; if (player->kartHopAcceleration >= 9.0f) { player->kartHopAcceleration = 9.0f; } if (player->kartHopAcceleration <= -9.0f) { player->kartHopAcceleration = -9.0f; } player->kartHopVelocity += player->kartHopAcceleration; if (player->kartHopVelocity >= 15.0f) { player->kartHopVelocity = 15.0f; } if (player->kartHopVelocity <= 0.0f) { player->kartHopJerk = 0.0f; player->kartHopAcceleration = 0.0f; player->kartHopVelocity = 0.0f; } } #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800225CC(void *, f32, ?); // extern extern f32 D_800ED7B8; extern f32 D_800ED7BC; extern f32 D_800ED7C0; extern f32 D_800ED7C4; extern f32 D_800ED7C8; void func_8002AB70(void *arg0) { void *sp20; s32 temp_lo; void *temp_a0; void *temp_a0_2; void *temp_a0_3; void *temp_a0_4; s32 phi_v0; s32 phi_v0_2; s32 phi_v0_3; if (((arg0->unkBC & 8) != 8) && (arg0->unk8C > 0.0f)) { temp_lo = arg0->unkC4 / 0xB6; if ((temp_lo < -1) && (temp_lo >= -0x14) && (((arg0->unk94 / 18.0f) * 216.0f) >= 20.0f)) { func_800225CC(arg0 + 0x100, 500.0f, 0x3F800000); temp_a0 = arg0 + 0xDAC; sp20 = temp_a0; func_800225CC(temp_a0, 3.0f, 0x3D4CCCCD); } else { func_800225CC(arg0 + 0x100, gKartGravityTable[arg0->unk254], 0x3DCCCCCD); temp_a0_2 = arg0 + 0xDAC; sp20 = temp_a0_2; func_800225CC(temp_a0_2, 1.0f, 0x3D8F5C29); } } else { if (arg0->unk124 >= 50.0f) { arg0->unkDAC = 2.0f; } func_800225CC(arg0 + 0x100, gKartGravityTable[arg0->unk254], 0x3CA3D70A); temp_a0_3 = arg0 + 0xDAC; if ((arg0->unkBC & 2) == 2) { temp_a0_4 = arg0 + 0xDAC; sp20 = temp_a0_4; func_800225CC(temp_a0_4, 1.0f, 0x3D8F5C29); } else { sp20 = temp_a0_3; func_800225CC(temp_a0_3, 1.0f, 0x3D8F5C29); } } if ((arg0->unkBC & 0x100000) == 0x100000) { func_800225CC(sp20, 20.0f, 0x3F800000); arg0->unk100 = D_800ED7B8; } phi_v0 = arg0->unkBC; if ((arg0->unkBC & 4) == 4) { func_800225CC(sp20, 25.0f, 0x3F800000); arg0->unk100 = 1800.0f; phi_v0 = arg0->unkBC; } phi_v0_2 = phi_v0; if ((phi_v0 & 0x400) == 0x400) { arg0->unk100 = D_800ED7BC; phi_v0_2 = arg0->unkBC; } if (phi_v0_2 & 0x80000) { arg0->unk100 = D_800ED7C0; } if ((arg0->unk44 & 0x800) != 0) { arg0->unk100 = D_800ED7C4; } if ((arg0->unkBC & 0x800000) == 0x800000) { arg0->unk100 = 300.0f; } phi_v0_3 = arg0->unkBC; if ((arg0->unkBC & 0x1000000) == 0x1000000) { arg0->unk100 = D_800ED7C8; phi_v0_3 = arg0->unkBC; } if ((phi_v0_3 & 0x2000000) == 0x2000000) { arg0->unk100 = 800.0f; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002AB70.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 u16 func_802B7830(f32, f32, s16, void *); // extern f32 sins(s32, void *); // extern f32 coss(s32); // extern void func_8002AE38(void *arg0, s8 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) { s16 sp2E; f32 sp28; f32 sp24; u16 sp1A; f32 temp_f16; f32 temp_f2; s16 temp_a0; s16 temp_a0_2; s16 temp_v0_2; s16 temp_v0_3; s32 temp_lo; s32 temp_t2; s32 temp_t9; s32 temp_v0; void *temp_a2; void *temp_a2_2; s32 phi_v1; s32 phi_v0; s32 phi_v0_2; s16 phi_t7; void *phi_a2; s32 phi_v0_3; temp_a2 = arg0; temp_a0 = arg0->unk2E; arg0 = temp_a2; sp28 = (sins(-temp_a0 & 0xFFFF, temp_a2) * arg0->unk94) + arg2; temp_a2_2 = arg0; temp_f2 = temp_a2_2->unk94; temp_v0 = temp_a2_2->unkBC; temp_f16 = (coss(-arg0->unk2E & 0xFFFF) * temp_f2) + arg3; phi_a2 = temp_a2_2; if (((temp_v0 & 0x800) != 0x800) && ((temp_v0 & 0x10) != 0x10) && ((temp_a2_2->unk44 & 0x4000) == 0) && ((((temp_f2 / 18.0f) * 216.0f) <= 8.0f) || ((temp_t2 = temp_a2_2->unk7C >> 0x10, ((temp_t2 < 5) != 0)) && (temp_t2 >= -4)))) { if ((temp_v0 & 0x20) == 0x20) { temp_v0_2 = temp_a2_2->unkC0; phi_t7 = temp_v0_2 - (temp_v0_2 / 0xA); goto block_33; } temp_a0_2 = temp_a2_2->unkC0; temp_a2_2->unkC0 = temp_a2_2->unk78 * 9; temp_a2_2->unkC0 = temp_a0_2 + ((temp_a2_2->unkC0 - temp_a0_2) / 0xF); return; } temp_v0_3 = temp_a2_2->unkC0; if ((D_801652C0[arg1] & 8) != 0) { phi_v1 = 2; } else { phi_v1 = 0; } if ((temp_a2_2->unk9C >= 200.0f) && (phi_v1 == 2) && ((temp_lo = temp_v0_3 / 0xB6, ((temp_lo < 0x10) == 0)) || (temp_lo < -0xF))) { sp2E = temp_v0_3; arg0 = temp_a2_2; sp24 = temp_f16; sp1A = func_802B7830(arg2 - arg4, arg3 - arg5, temp_v0_3, temp_a2_2); arg0->unkC0 = sp1A - func_802B7830(arg2 - sp28, arg3 - temp_f16); } else { sp2E = temp_v0_3; arg0 = temp_a2_2; sp24 = temp_f16; sp1A = func_802B7830(arg2 - arg4, arg3 - arg5, temp_v0_3, temp_a2_2); arg0->unkC0 = (sp1A - func_802B7830(arg2 - sp28, arg3 - temp_f16)) * 2; } phi_a2 = arg0; if (((arg0->unkBC & 0x10) != 0x10) && (((temp_t9 = arg0->unk7C >> 0x10, (temp_t9 > 0)) && (arg0->unkC0 < 0)) || ((temp_t9 < 0) && (arg0->unkC0 > 0)))) { phi_v0 = arg0->unkC0; if (arg0->unkC0 > 0) { arg0->unkC0 = arg0->unk78 * 0x14; phi_v0 = arg0->unkC0; } phi_v0_2 = phi_v0; if (phi_v0 < 0) { arg0->unkC0 = arg0->unk78 * 0x14; phi_v0_2 = arg0->unkC0; } arg0->unkC0 = temp_v0_3 + ((phi_v0_2 - temp_v0_3) / 0xC); return; } if (arg0->unkC0 >= 0x1C71) { arg0->unkC0 = 0x1C70; } phi_v0_3 = arg0->unkC0; if (arg0->unkC0 < -0x1C70) { arg0->unkC0 = -0x1C70; phi_v0_3 = arg0->unkC0; } phi_t7 = temp_v0_3 + ((phi_v0_3 - temp_v0_3) / 0xC); block_33: phi_a2->unkC0 = phi_t7; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002AE38.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_8002A704(void *, s8); // extern ? func_8008C528(void *, s8); // extern ? func_8008C73C(void *, s8); // extern ? func_8008CDC0(void *, s8); // extern ? func_8008D0FC(void *, s8); // extern ? func_8008D3C4(void *, s8); // extern ? func_8008D570(void *, s8); // extern ? func_8008D7B0(void *, s8); // extern ? func_8008DABC(void *, s8); // extern ? func_8008DF98(void *, s8); // extern ? func_8008E6C0(void *, s8); // extern ? func_8008EAE0(s8, s8); // extern ? func_8008EC88(void *, s8); // extern ? func_8008EEE4(void *, s8); // extern ? func_8008F778(void *, s8); // extern ? func_8008FA38(void *, s8); // extern void func_8002B308(void *arg0, s8 arg1, ? arg2) { s32 temp_v0; s32 phi_v0; s32 phi_v0_2; s32 phi_v0_3; s32 phi_v0_4; s32 phi_v0_5; s32 phi_v0_6; s32 phi_v0_7; s32 phi_v0_8; s32 phi_v0_9; s32 phi_v0_10; s32 phi_v0_11; s32 phi_v0_12; s32 phi_v0_13; s32 phi_v0_14; s32 phi_v0_15; s32 phi_v0_16; s32 phi_v0_17; temp_v0 = arg0->unkC; phi_v0 = temp_v0; if ((temp_v0 & 2) == 2) { func_8008EAE0(arg1); phi_v0 = arg0->unkC; } phi_v0_2 = phi_v0; if ((phi_v0 & 4) == 4) { func_8008C528(arg0, arg1); phi_v0_2 = arg0->unkC; } phi_v0_3 = phi_v0_2; if ((phi_v0_2 & 1) == 1) { func_8008CDC0(arg0, arg1); phi_v0_3 = arg0->unkC; } phi_v0_4 = phi_v0_3; if ((phi_v0_3 & 0x200) == 0x200) { func_8008D3C4(arg0, arg1); phi_v0_4 = arg0->unkC; } phi_v0_5 = phi_v0_4; if ((phi_v0_4 & 0x2000000) == 0x2000000) { func_8002A704(arg0, arg1); phi_v0_5 = arg0->unkC; } phi_v0_6 = phi_v0_5; if ((phi_v0_5 & 0x1000) == 0x1000) { func_8008D570(arg0, arg1); phi_v0_6 = arg0->unkC; } phi_v0_7 = phi_v0_6; if ((phi_v0_6 & 0x20000) == 0x20000) { func_8008D7B0(arg0, arg1); phi_v0_7 = arg0->unkC; } phi_v0_8 = phi_v0_7; if ((phi_v0_7 & 0x100) == 0x100) { func_8008DABC(arg0, arg1); phi_v0_8 = arg0->unkC; } phi_v0_9 = phi_v0_8; if ((phi_v0_8 & 0x4000) == 0x4000) { func_8008DF98(arg0, arg1); phi_v0_9 = arg0->unkC; } phi_v0_10 = phi_v0_9; if ((phi_v0_9 & 0x200000) == 0x200000) { func_8008C73C(arg0, arg1); phi_v0_10 = arg0->unkC; } phi_v0_11 = phi_v0_10; if ((phi_v0_10 & 0x400000) == 0x400000) { func_8008E6C0(arg0, arg1); phi_v0_11 = arg0->unkC; } phi_v0_12 = phi_v0_11; if ((phi_v0_11 & 0x1000000) == 0x1000000) { func_8008EAE0(arg0, arg1); phi_v0_12 = arg0->unkC; } phi_v0_13 = phi_v0_12; if ((phi_v0_12 & 0x800000) == 0x800000) { func_8008EC88(arg0, arg1); phi_v0_13 = arg0->unkC; } phi_v0_14 = phi_v0_13; if ((phi_v0_13 & 0x8000) == 0x8000) { func_8008EEE4(arg0, arg1); phi_v0_14 = arg0->unkC; } phi_v0_15 = phi_v0_14; if ((phi_v0_14 & 0x2000) == 0x2000) { func_8008F778(arg0, arg1); phi_v0_15 = arg0->unkC; } phi_v0_16 = phi_v0_15; if ((phi_v0_15 & 0x800) == 0x800) { func_8008FA38(arg0, arg1); phi_v0_16 = arg0->unkC; } phi_v0_17 = phi_v0_16; if ((phi_v0_16 & 0x80) != 0) { func_8008D0FC(arg0, arg1); phi_v0_17 = arg0->unkC; } if (phi_v0_17 & 0x80000) { func_8008E6C0(arg0, arg1); } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002B308.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_8002B5C0(void *arg0, ? arg1, ? arg2) { s16 temp_v0; s32 phi_v0; s32 phi_v0_2; s32 phi_v0_3; s32 phi_v0_4; s32 phi_v0_5; s32 phi_v0_6; s32 phi_v0_7; s32 phi_v0_8; s32 phi_v0_9; s32 phi_v0_10; s32 phi_v0_11; temp_v0 = arg0->unkCA; if (((temp_v0 & 8) != 0) || ((temp_v0 & 2) != 0)) { arg0->unkC = arg0->unkC & 0xFE1D0478; } if ((arg0->unkBC & 0x400) == 0x400) { arg0->unkC = arg0->unkC & 0xFF5D457E; } phi_v0 = arg0->unkBC; if (((arg0->unkBC & 0x80) == 0x80) || ((arg0->unkBC & 0x40) == 0x40)) { arg0->unkC = arg0->unkC & 0xFF5F457E; phi_v0 = arg0->unkBC; } if ((phi_v0 & 0x800) == 0x800) { arg0->unkC = arg0->unkC & 0xFF5D457E; } if ((arg0->unk44 & 0x4000) != 0) { arg0->unkC = arg0->unkC & 0xFF5D457E; } if ((arg0->unkBC & 0x80000) == 0x80000) { arg0->unkC = arg0->unkC & 0xFE1D4478; } phi_v0_2 = arg0->unkBC; if ((arg0->unkBC & 0x800000) == 0x800000) { arg0->unkC = arg0->unkC & 0xFE1D0478; phi_v0_2 = arg0->unkBC; } phi_v0_3 = phi_v0_2; if ((phi_v0_2 & 0x4000000) == 0x4000000) { arg0->unkC = arg0->unkC & 0xFE1D0578; phi_v0_3 = arg0->unkBC; } phi_v0_4 = phi_v0_3; if ((phi_v0_3 & 0x1000000) == 0x1000000) { arg0->unkC = arg0->unkC & 0xFE1D4478; phi_v0_4 = arg0->unkBC; } phi_v0_5 = phi_v0_4; if ((phi_v0_4 & 0x2000000) == 0x2000000) { arg0->unkC = arg0->unkC & 0xFE1D4478; phi_v0_5 = arg0->unkBC; } phi_v0_6 = phi_v0_5; if ((phi_v0_5 & 0x100000) == 0x100000) { arg0->unkC = arg0->unkC & 0xFE1D0478; phi_v0_6 = arg0->unkBC; } phi_v0_7 = phi_v0_6; if ((phi_v0_6 & 4) == 4) { arg0->unkC = arg0->unkC & 0xFE1D0478; phi_v0_7 = arg0->unkBC; } phi_v0_8 = phi_v0_7; if ((phi_v0_7 & 0x10000) == 0x10000) { arg0->unkC = arg0->unkC & 0xFE1D0478; phi_v0_8 = arg0->unkBC; } phi_v0_9 = phi_v0_8; if ((phi_v0_8 & 0x200) == 0x200) { arg0->unkC = arg0->unkC & 0xFE9D8478; phi_v0_9 = arg0->unkBC; } phi_v0_10 = phi_v0_9; if ((phi_v0_9 & 0x80000000) == 0x80000000) { arg0->unkC = arg0->unkC & 0xFE9D8678; phi_v0_10 = arg0->unkBC; } phi_v0_11 = phi_v0_10; if ((phi_v0_10 & 0x4000) == 0x4000) { arg0->unkC = arg0->unkC & 0xFF5D45FF; phi_v0_11 = arg0->unkBC; } if ((phi_v0_11 & 0x20000) == 0x20000) { arg0->unkC = arg0->unkC & 0xFE1D0478; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002B5C0.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_8002B308(void *, s8, s8); // extern ? func_8002B5C0(s8, s8); // extern ? func_800911B4(void *, s8); // extern void func_8002B830(void *arg0, s8 arg1, s8 arg2) { s32 temp_v0; s32 phi_v0; void *phi_a0; temp_v0 = arg0->unkC; phi_v0 = temp_v0; if (temp_v0 != 0) { func_8002B5C0(arg1, arg2); phi_v0 = arg0->unkC; } phi_a0 = arg0; if (phi_v0 != 0) { arg0 = arg0; func_8002B308(arg0, arg1, arg2); phi_a0 = arg0; } if ((phi_a0->unk44 & 0x400) != 0) { func_800911B4(phi_a0, arg1); } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002B830.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_8008C73C(void *, s8); // extern s32 func_802B5224(void *, void *); // extern extern f64 D_800ED7D0; void func_8002B9CC(void *arg0, s8 arg1, ? arg2) { f32 (*temp_v0_3)[3]; f32 temp_f0; f32 temp_f0_2; f32 temp_f14; f32 temp_f14_2; f32 temp_f2; s32 temp_v0_2; s32 temp_v0_4; struct_D_8018CE10 *temp_v0; if ((arg0->unk46 & 2) == 2) { temp_v0 = &D_8018CE10[arg1]; temp_f0 = temp_v0->unk_04; temp_f14 = temp_v0->unk_0C; if ((sqrtf((temp_f0 * temp_f0) + (0.0f * 0.0f) + (temp_f14 * temp_f14)) >= 6.5) && (temp_v0_2 = arg0->unkBC, arg0->unk8C = arg0->unk8C / 4.0f, arg0->unk9C = arg0->unk9C / 4.0f, ((temp_v0_2 & 0x80) == 0)) && ((temp_v0_2 & 0x40) == 0)) { func_8008C73C(arg0, arg1); return; } // Duplicate return node #10. Try simplifying control flow for better match return; } temp_v0_3 = &D_80165070[arg1]; temp_f0_2 = temp_v0_3->unk0 - arg0->unk34; temp_f2 = temp_v0_3->unk4 - arg0->unk38; temp_f14_2 = temp_v0_3->unk8 - arg0->unk3C; if (D_800ED7D0 <= sqrtf((temp_f0_2 * temp_f0_2) + (temp_f2 * temp_f2) + (temp_f14_2 * temp_f14_2))) { temp_v0_4 = arg0->unkBC; arg0->unk8C = arg0->unk8C / 4.0f; arg0->unk9C = arg0->unk9C / 4.0f; if (((temp_v0_4 & 0x80) == 0) && ((temp_v0_4 & 0x40) == 0)) { func_8008C73C(arg0, arg1); } } arg0->unk234 = (-func_802B5224(arg0 + 0x14, arg0 + 0x20) - (arg0->unk2E - arg0->unkC0)) / 0xB6; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002B9CC.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s32 func_802B5224(f32 *, f32 *); // extern ? func_802B63B8(f32 *, f32 *); // extern extern ? D_800E3C98; void func_8002BB9C(void *arg0, f32 *arg1, f32 *arg2, ? arg3) { f32 sp64; f32 sp60; f32 sp5C; f32 sp58; f32 sp54; f32 sp50; f32 sp4C; ? sp30; f32 *temp_a0; f32 *temp_a0_2; s16 temp_a1; s32 temp_lo; s32 temp_lo_2; s32 temp_t9; u16 temp_v0; s32 phi_v0; s32 phi_v0_2; sp30.unk0 = D_800E3C98.unk0; sp30.unk4 = D_800E3C98.unk4; sp30.unk8 = D_800E3C98.unk8; sp30.unkC = D_800E3C98.unkC; sp30.unk10 = D_800E3C98.unk10; temp_v0 = arg0->unk256; if ((temp_v0 > 0) && (temp_v0 < 3) && ((arg0->unk46 & 0x20) != 0) && ((func_802B6540(&sp64, 0.0f, 1.0f, 0.0f, 0), sp5C = 0.0f, temp_a0 = &sp58, sp58 = *arg1, sp60 = *arg2, func_802B63B8(temp_a0, &sp64), temp_a0_2 = &sp4C, sp4C = arg0->unk20, sp50 = 0.0f, sp54 = arg0->unk28, func_802B63B8(temp_a0_2, &sp64), temp_a1 = arg0->unk2E, temp_lo = ((temp_a1 - -func_802B5224(&sp58, &sp4C)) + 0x10000) / 0xB6, ((temp_lo < 0x97) == 0)) || (temp_lo < -0x96))) { temp_t9 = arg0->unk7C >> 0x10; temp_lo_2 = temp_t9 / 6; phi_v0 = temp_lo_2; if (temp_lo_2 < 0) { phi_v0 = temp_lo_2 * -1; } phi_v0_2 = phi_v0; if (phi_v0 >= 8) { phi_v0_2 = 8; } if (temp_t9 < 0) { arg0->unk2E = temp_a1 - (sp + (phi_v0_2 * 2))->unk30; return; } arg0->unk2E = temp_a1 + (sp + (phi_v0_2 * 2))->unk30; // Duplicate return node #12. Try simplifying control flow for better match } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002BB9C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 extern ? D_800E3CAC; extern ? D_800E3CC8; void func_8002BD58(void *arg0) { ? sp2C; ? spC; s16 temp_t5; s16 temp_v0; s32 phi_v0; sp2C.unk0 = D_800E3CAC.unk0; sp2C.unk4 = D_800E3CAC.unk4; sp2C.unk8 = D_800E3CAC.unk8; sp2C.unkC = D_800E3CAC.unkC; sp2C.unk10 = D_800E3CAC.unk10; sp2C.unk14 = D_800E3CAC.unk14; sp2C.unk18 = D_800E3CAC.unk18; spC.unk0 = D_800E3CC8.unk0; spC.unk4 = D_800E3CC8.unk4; spC.unk8 = D_800E3CC8.unk8; spC.unkC = D_800E3CC8.unkC; spC.unk10 = D_800E3CC8.unk10; spC.unk14 = D_800E3CC8.unk14; spC.unk18 = D_800E3CC8.unk18; spC.unk1C = D_800E3CC8.unk1C; temp_v0 = arg0->unk234; if (temp_v0 >= 0) { if ((temp_v0 >= 5) && (temp_v0 < 0x1E)) { arg0->unk7C = *(&sp2C + ((temp_v0 / 6) * 4)); } if ((temp_v0 >= 0x1E) && (temp_v0 < 0x50)) { arg0->unk7C = *(&spC + (((temp_v0 - 0x1E) / 0xC) * 4)); } if (((temp_v0 < 0x50) || (temp_v0 >= 0x5B)) && (temp_v0 >= 0x5B) && (temp_v0 < 0xA1)) { arg0->unk7C = sp10; return; } // Duplicate return node #23. Try simplifying control flow for better match return; } temp_t5 = temp_v0 * -1; if ((temp_v0 < -4) && (temp_v0 >= -0x1E)) { arg0->unk7C = *(&sp2C + ((temp_t5 / 6) * 4)) * -1; } phi_v0 = arg0->unk234; if ((arg0->unk234 < -0x1E) && (arg0->unk234 >= -0x50)) { arg0->unk7C = *(&spC + (((temp_t5 - 0x1E) / 0xC) * 4)) * -1; phi_v0 = arg0->unk234; } if (((phi_v0 >= -0x50) || (phi_v0 < -0x5A)) && (phi_v0 < -0x5A) && (phi_v0 >= -0xA0)) { arg0->unk7C = sp10 * -1; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002BD58.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s32 func_8001FD78(void *, s32, s32, s32); // extern ? func_800C9060(u8, ?, s32); // extern ? func_800C90F4(u8, s32, s32); // extern void func_8002BF4C(void *arg0, u8 arg1) { s32 sp30; s32 temp_a2; s32 temp_s1; s32 temp_t2; s32 temp_v0_2; u16 temp_v0; Player *phi_s0; s32 phi_v0; s32 phi_s1; s32 phi_a2; s32 phi_a2_2; phi_a2_2 = 0; if (((arg0->unk94 / 18.0f) * 216.0f) < 50.0f) { arg0->unkE2 = 0; arg0->unkBC = arg0->unkBC & 0xFFDFFFFF; return; } phi_s0 = D_800DC4DC; phi_s1 = 0; if ((arg0->unkBC & 0x200000) == 0x200000) { arg0->unkE2 = arg0->unkE2 - 1; if (arg0->unkE2 <= 0) { arg0->unkBC = arg0->unkBC & 0xFFDFFFFF; return; } // Duplicate return node #18. Try simplifying control flow for better match return; } loop_6: if ((arg0 != phi_s0) && (temp_v0 = phi_s0->unk_000, ((temp_v0 & 0x100) == 0)) && ((temp_v0 & 0x8000) != 0) && (temp_v0_2 = func_8001FD78(arg0, phi_s0->posX, phi_s0->posY, phi_s0->posZ), temp_a2 = temp_v0_2, phi_a2 = temp_a2, phi_a2_2 = temp_a2, (temp_v0_2 == 1))) { arg0->unkE2 = arg0->unkE2 + 1; if (arg0->unkE2 >= 0x3D) { temp_t2 = arg0->unk0 & 0x100; arg0->unkBC = arg0->unkBC | 0x200000; phi_v0 = temp_t2; if (temp_t2 != 0x100) { sp30 = temp_a2; func_800C90F4(arg1, (arg0->unk254 * 0x10) + 0x29008001, temp_a2); phi_v0 = arg0->unk0 & 0x100; } phi_a2 = temp_a2; if (phi_v0 != 0x100) { sp30 = temp_a2; func_800C9060(arg1, 0x19008011, temp_a2); phi_a2 = temp_a2; } } } else { temp_s1 = phi_s1 + 0xDD8; phi_s0 += 0xDD8; phi_s1 = temp_s1; phi_a2 = phi_a2_2; if (temp_s1 != 0x6EC0) { goto loop_6; } } if (phi_a2 == 0) { arg0->unkE2 = 0; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002BF4C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_8002C11C(void *arg0) { if ((arg0->unkBC & 0x10) == 0x10) { arg0->unk204 = arg0->unk204 + 1; if (arg0->unk204 >= 0x65) { arg0->unk204 = 0x64; return; } // Duplicate return node #5. Try simplifying control flow for better match return; } arg0->unk204 = arg0->unk204 - 1; if (arg0->unk204 < 0) { arg0->unk204 = 0; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002C11C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s32 func_802ABDF4(u16, s8, void *); // extern extern ? D_80164438; extern ? D_801645B0; extern ? D_80165310; extern ? D_80165320; extern ? D_80165330; void func_8002C17C(void *arg0, s8 arg1) { s16 *sp1C; s16 *temp_v1; s16 *temp_v1_2; s16 *temp_v1_3; s16 *temp_v1_4; s16 *temp_v1_5; s16 *temp_v1_6; s16 temp_v0; s32 temp_a0; s32 temp_a3; s32 temp_v0_2; s32 temp_v0_3; s32 temp_v0_4; s32 temp_v0_5; s32 temp_v0_6; s32 temp_v0_7; s32 temp_v0_8; s32 temp_v0_9; u16 temp_a0_2; temp_v0 = gCurrentCourseId; if (temp_v0 != 4) { if (temp_v0 != 5) { if (temp_v0 != 7) { if (temp_v0 != 0xD) { *(&D_80165330 + (arg1 * 2)) = 0; // Duplicate return node #33. Try simplifying control flow for better match return; } temp_v0_2 = arg1 * 2; temp_v1 = temp_v0_2 + &D_80165330; if ((arg0->unk124 >= 600.0f) && (*temp_v1 == 0)) { *temp_v1 = 1; *(&D_80165320 + temp_v0_2) = *(&D_80164438 + temp_v0_2); *(&D_80165310 + temp_v0_2) = *(&D_801645B0 + temp_v0_2); return; } temp_v0_3 = arg1 * 2; temp_v1_2 = temp_v0_3 + &D_80165330; if (*temp_v1_2 == 0) { *(&D_80165320 + temp_v0_3) = *(&D_80164438 + temp_v0_3); *(&D_80165310 + temp_v0_3) = *(&D_801645B0 + temp_v0_3); return; } if (((arg0->unkBC & 8) == 0) && ((arg0->unkCA & 1) == 0)) { *temp_v1_2 = 0; return; } // Duplicate return node #33. Try simplifying control flow for better match return; } temp_a0 = arg0->unkBC; temp_v0_4 = arg1 * 2; temp_a3 = temp_a0 & 0x100000; if ((temp_a3 != 0) && (temp_v1_3 = temp_v0_4 + &D_80165330, (*temp_v1_3 == 0))) { *temp_v1_3 = 1; *(&D_80165320 + temp_v0_4) = *(&D_80164438 + temp_v0_4); *(&D_80165310 + temp_v0_4) = *(&D_801645B0 + temp_v0_4); return; } if ((temp_a3 == 0) && (temp_v0_5 = arg1 * 2, ((temp_a0 & 8) == 0))) { *(&D_80165330 + temp_v0_5) = 0; *(&D_80165320 + temp_v0_5) = *(&D_80164438 + temp_v0_5); *(&D_80165310 + temp_v0_5) = *(&D_801645B0 + temp_v0_5); return; } // Duplicate return node #33. Try simplifying control flow for better match return; } temp_a0_2 = arg0->unkF8; temp_v0_6 = arg1 * 2; if ((temp_a0_2 == 0xB) && (temp_v1_4 = temp_v0_6 + &D_80165330, (*temp_v1_4 == 0))) { *temp_v1_4 = 1; *(&D_80165320 + temp_v0_6) = *(&D_80164438 + temp_v0_6); *(&D_80165310 + temp_v0_6) = *(&D_801645B0 + temp_v0_6); return; } temp_v0_7 = arg1 * 2; if (temp_a0_2 != 0xB) { *(&D_80165330 + temp_v0_7) = 0; *(&D_80165320 + temp_v0_7) = *(&D_80164438 + temp_v0_7); *(&D_80165310 + temp_v0_7) = *(&D_801645B0 + temp_v0_7); return; } // Duplicate return node #33. Try simplifying control flow for better match return; } temp_v0_8 = arg1 * 2; temp_v1_5 = temp_v0_8 + &D_80165330; if ((arg0->unk124 >= 600.0f) && (*temp_v1_5 == 0)) { *temp_v1_5 = 1; *(&D_80165320 + temp_v0_8) = *(&D_80164438 + temp_v0_8); *(&D_80165310 + temp_v0_8) = *(&D_801645B0 + temp_v0_8); return; } temp_v0_9 = arg1 * 2; temp_v1_6 = temp_v0_9 + &D_80165330; if (*temp_v1_6 == 0) { *(&D_80165320 + temp_v0_9) = *(&D_80164438 + temp_v0_9); *(&D_80165310 + temp_v0_9) = *(&D_801645B0 + temp_v0_9); return; } if (((arg0->unkBC & 8) == 0) && (sp1C = temp_v1_6, (func_802ABDF4(arg0->unk11A, arg1, arg0) == 0))) { *temp_v1_6 = 0; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002C17C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_8002C17C(void *, s8); // extern ? func_80090778(void *); // extern ? func_80090868(void *); // extern ? func_800C9060(u8, ?, f32 *); // extern f32 func_802AAB4C(); // extern s32 func_802ABDF4(u16); // extern void func_8002C4F8(void *arg0, s8 arg1) { f32 *sp24; f32 *temp_a2; f32 temp_f0; s16 temp_v0; s16 temp_v0_2; s16 temp_v0_3; u16 temp_t1; u16 temp_t5; u16 temp_v1; f32 *phi_a2; temp_f0 = func_802AAB4C(); temp_a2 = &D_801652A0[arg1]; *temp_a2 = temp_f0; phi_a2 = temp_a2; if (arg0->unk18 <= temp_f0) { arg0->unkDE = arg0->unkDE | 2; } else { arg0->unkDE = arg0->unkDE & 0xFFFD; } if (arg0->unk70 < (*temp_a2 - arg0->unk18)) { temp_t5 = arg0->unkDE | 1; arg0->unkDE = temp_t5; arg0->unkDE = temp_t5 & 0xFFFD; } else { arg0->unkDE = arg0->unkDE & 0xFFFE; } if (arg0->unk70 < (*temp_a2 - arg0->unk18)) { temp_v1 = arg0->unkDE; temp_t1 = temp_v1 | 8; if ((temp_v1 & 4) != 4) { arg0->unkDE = temp_t1; arg0->unkDE = temp_t1 | 4; temp_v0 = gCurrentCourseId; if ((temp_v0 != 6) && (temp_v0 != 0x10) && (temp_v0 != 0xD) && ((arg0->unk0 & 0x4000) == 0x4000)) { if ((temp_v0 == 2) || (temp_v0 == 0x13)) { sp24 = temp_a2; func_800C9060(arg1, 0x1900801C, temp_a2); } else { sp24 = temp_a2; func_800C9060(arg1, 0x19008008, temp_a2); } phi_a2 = sp24; } } } temp_v0_2 = gCurrentCourseId; if ((temp_v0_2 == 6) || (temp_v0_2 == 0x10) || (temp_v0_2 == 0xD)) { arg0->unkDE = arg0->unkDE & 0xFFF3; } if ((arg0->unk70 < (*phi_a2 - arg0->unk18)) && (arg0->unk124 >= 600.0f)) { arg0->unkCA = arg0->unkCA | 1; } if (arg0->unk124 >= 600.0f) { arg0->unkCA = arg0->unkCA | 0x100; } else if ((arg0->unkBC & 8) != 8) { arg0->unkCA = arg0->unkCA & 0xFEFF; } if (((arg0->unk0 & 0x1000) != 0) && ((func_802ABDF4(arg0->unk11A) != 0) || ((arg0->unkCA & 1) != 0))) { temp_v0_3 = arg0->unkCA; if (((temp_v0_3 & 2) == 0) && ((temp_v0_3 & 8) == 0) && ((arg0->unkBC & 0x1000) == 0)) { func_80090778(arg0); func_80090868(arg0); } } if (((arg0->unk0 & 0x1000) != 0) && (arg0->unkF8 == 0xFD) && ((arg0->unkBC & 8) == 0)) { func_80090778(arg0); func_80090868(arg0); } func_8002C17C(arg0, arg1); } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002C4F8.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_8001CA24(void *, ?); // extern ? func_8002B9CC(s8, s8); // extern ? func_8008D554(void *); // extern void func_8002C7E4(void *arg0, s8 arg1, s8 arg2) { s16 temp_v1_3; s32 temp_v0; s32 temp_v0_2; u16 temp_t3; u16 temp_t6; u16 temp_v1; u16 temp_v1_2; u16 phi_v1; temp_v1 = arg0->unk46; phi_v1 = temp_v1; if ((temp_v1 & 1) != 1) { temp_v0 = arg0->unkBC; if ((temp_v0 & 0x8000) == 0x8000) { if ((temp_v0 & 0x2000) != 0x2000) { func_8002B9CC(arg1, arg2); phi_v1 = arg0->unk46; } temp_t6 = phi_v1 | 1; arg0->unk46 = temp_t6; arg0->unk44 = arg0->unk44 & 0xFFFE; arg0->unk46 = temp_t6 | 8; if ((arg0->unk0 & 0x4000) == 0x4000) { func_8001CA24(arg0, 0x40333333); } temp_v1_2 = arg0->unk46; if ((temp_v1_2 & 2) == 2) { temp_t3 = temp_v1_2 | 4; if ((temp_v1_2 & 4) != 4) { arg0->unk46 = temp_t3; arg0->unk46 = temp_t3 | 0x40; if ((arg0->unkBC & 0x2000) != 0) { func_8008D554(arg0); } } } } } temp_v0_2 = arg0->unkBC; if ((temp_v0_2 & 0x8000) == 0x8000) { arg0->unkBC = temp_v0_2 & 0xFFFF7FFF; arg0->unk10C = 1; arg0->unk44 = arg0->unk44 & 0xFFFE; return; } temp_v1_3 = arg0->unk10C; arg0->unk46 = arg0->unk46 & 0xFFFE; arg0->unkBC = temp_v0_2 & 0xFFFF7FFF; if (temp_v1_3 > 0) { arg0->unk10C = temp_v1_3 + 1; } if (arg0->unk10C >= 0xA) { arg0->unk10C = 0; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002C7E4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_8001CA24(u16 *, ?); // extern ? func_80031F48(u16 *, ?); // extern ? func_8008D554(u16 *); // extern ? func_8008F494(u16 *, s8, u16 *); // extern ? func_800CAEC4(u8, f32); // extern extern f64 D_800ED7D8; void func_8002C954(u16 *arg0, s8 arg1, void *arg2) { f32 (*temp_v0_3)[3]; f32 temp_f0; f32 temp_f0_2; f32 temp_f0_4; f32 temp_f14; f32 temp_f14_2; f32 temp_f2; f64 temp_f0_3; f64 temp_f2_2; s16 temp_v0_2; s32 temp_v0; s32 temp_v1; u16 *temp_a0; u16 *temp_a3; u16 temp_t1; u16 *phi_a3; u16 *phi_a3_2; u16 *phi_a3_3; f32 phi_f14; u16 *phi_a3_4; temp_v0 = arg0->unkBC; temp_v1 = temp_v0 & 0x10000; temp_a3 = arg0; temp_f0 = arg0->unk18 - arg0->unk74; phi_a3 = temp_a3; if ((((temp_v1 != 0x10000) && ((temp_v0 & 0x100000) == 0x100000)) || (((temp_f0 >= 20.0f) || (temp_f0 < -1.0f)) && (temp_v1 == 0) && ((temp_v0 & 8) != 0)) || ((temp_a3->unk114 == 0) && (temp_v1 == 0))) && ((temp_v0_2 = temp_a3->unkCA, temp_a0 = temp_a3, ((temp_v0_2 & 2) == 0)) || ((temp_v0_2 & 8) == 0))) { arg0 = temp_a3; func_8008F494(temp_a0, arg1, temp_a3); phi_a3 = arg0; } phi_a3_2 = phi_a3; if ((phi_a3->unk46 & 0x20) != 0x20) { if ((phi_a3->unk11C < -1.0f) || (phi_a3->unk120 < -1.0f)) { phi_a3->unk256 = 1; } phi_a3->unk46 = phi_a3->unk46 | 0x20; } if (((phi_a3->unk0 & 0x4000) == 0x4000) && (((phi_a3->unk94 / 18.0f) * 216.0f) > 30.0f)) { arg0 = phi_a3; func_8001CA24(phi_a3, 0x40400000); phi_a3_2 = arg0; } temp_t1 = phi_a3_2->unk256 + 1; phi_a3_2->unk46 = phi_a3_2->unk46 | 0x10; phi_a3_2->unk256 = temp_t1; phi_a3_3 = phi_a3_2; if ((temp_t1 & 0xFFFF) >= 0xA) { phi_a3_2->unk256 = 0; } if ((phi_a3_2->unkC4 >= 0) && (((phi_a3_2->unk94 / 18.0f) * 216.0f) > 5.0f)) { arg0 = phi_a3_2; func_80031F48(phi_a3_2, 0x41900000); phi_a3_3 = arg0; } phi_a3_4 = phi_a3_3; if ((*phi_a3_3 & 0x4000) == 0x4000) { temp_v0_3 = &D_80165070[arg1]; temp_f0_2 = temp_v0_3->unk0 - arg2->unk0; temp_f14 = temp_v0_3->unk4 - arg2->unk4; arg0 = phi_a3_3; temp_f2 = temp_v0_3->unk8 - arg2->unk8; temp_f14_2 = sqrtf((temp_f0_2 * temp_f0_2) + (temp_f14 * temp_f14) + (temp_f2 * temp_f2)) / 3.0f; phi_f14 = temp_f14_2; phi_a3_4 = arg0; if (temp_f14_2 >= 1.0) { phi_f14 = 1.0f; } temp_f2_2 = D_800ED7D8; temp_f0_3 = phi_f14; if ((temp_f0_3 <= temp_f2_2) && (((arg0->unk94 / 18.0f) * 216.0f) >= 40.0f) && ((arg0->unk0 & 0x100) == 0)) { arg0 = arg0; func_800CAEC4(arg1, 0.6f); goto block_37; } if ((arg0->unk0 & 0x100) == 0) { if ((temp_f0_3 <= temp_f2_2) && (temp_f0_4 = (arg0->unk94 / 18.0f) * 216.0f, (temp_f0_4 < 40.0f)) && (temp_f0_4 >= 10.0f)) { arg0 = arg0; func_800CAEC4(arg1, 0.3f); } else { arg0 = arg0; func_800CAEC4(arg1, phi_f14); } block_37: phi_a3_4 = arg0; } } if ((phi_a3_4->unkBC & 0x2000) != 0) { arg0 = phi_a3_4; func_8008D554(phi_a3_4); arg0->unk8C = arg0->unk8C / 2.0f; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002C954.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80031F48(void *, ?); // extern ? func_8008C62C(void *, s8); // extern ? func_8008C9EC(void *, s8); // extern ? func_8008CEB0(void *, s8); // extern ? func_8008D170(void *, s8); // extern ? func_8008D4B4(void *); // extern ? func_8008D698(void *, s8); // extern ? func_8008D8B4(void *, s8); // extern ? func_8008DC08(void *, s8); // extern ? func_8008E118(void *, s8); // extern ? func_8008E4A4(void *, s8); // extern ? func_8008E8D8(void *, s8); // extern ? func_8008EDC0(void *); // extern ? func_8008F008(void *); // extern ? func_8008F1B8(void *, s8); // extern ? func_8008F3F4(void *, s8); // extern ? func_8008F650(void *, s8); // extern ? func_8008F8DC(void *, s8); // extern ? func_8008FC64(void *, s8); // extern ? func_8008FCDC(void *, s8); // extern ? func_80090970(void *, s8, s8); // extern ? func_80091298(void *, s8); // extern extern s32 D_800DC510; void func_8002CD48(void *arg0, s8 arg1, s8 arg2) { s16 temp_v0; s32 phi_v0; s32 phi_v0_2; s32 phi_v0_3; s32 phi_v0_4; s32 phi_v0_5; s32 phi_v0_6; s32 phi_v0_7; s32 phi_v0_8; s32 phi_v0_9; s32 phi_v0_10; s32 phi_v0_11; s32 phi_v0_12; s32 phi_v0_13; s32 phi_v0_14; temp_v0 = arg0->unkCA; if (((temp_v0 & 2) == 2) || ((temp_v0 & 8) == 8)) { func_80090970(arg0, arg1, arg2); } if ((arg0->unkBC & 0x800) == 0x800) { func_8008CEB0(arg0, arg1); } if ((arg0->unk44 & 0x4000) != 0) { func_8008D170(arg0, arg1); } if ((arg0->unkBC & 0x2000) == 0x2000) { func_8008D4B4(arg0); } phi_v0 = arg0->unkBC; if ((arg0->unkBC & 0x100000) == 0x100000) { func_8008EDC0(arg0); phi_v0 = arg0->unkBC; } phi_v0_2 = phi_v0; if ((phi_v0 & 4) == 4) { func_8008F008(arg0); phi_v0_2 = arg0->unkBC; } phi_v0_3 = phi_v0_2; if ((phi_v0_2 & 0x4000000) == 0x4000000) { func_8008DC08(arg0, arg1); phi_v0_3 = arg0->unkBC; } phi_v0_4 = phi_v0_3; if ((phi_v0_3 & 0x40000000) == 0x40000000) { func_8008E118(arg0, arg1); phi_v0_4 = arg0->unkBC; } phi_v0_5 = phi_v0_4; if ((phi_v0_4 & 0x10000) == 0x10000) { func_8008F3F4(arg0, arg1); phi_v0_5 = arg0->unkBC; } phi_v0_6 = phi_v0_5; if ((phi_v0_5 & 0x200) == 0x200) { func_8008F650(arg0, arg1); phi_v0_6 = arg0->unkBC; } phi_v0_7 = phi_v0_6; if ((phi_v0_6 & 0x80000000) == 0x80000000) { func_8008F8DC(arg0, arg1); phi_v0_7 = arg0->unkBC; } phi_v0_8 = phi_v0_7; if (((phi_v0_7 & 0x20000000) == 0x20000000) && (arg0->unk228 >= 0x64)) { func_80031F48(arg0, 0x40800000); phi_v0_8 = arg0->unkBC; } phi_v0_9 = phi_v0_8; if (((phi_v0_8 & 0x80) == 0x80) || ((phi_v0_8 & 0x40) == 0x40)) { func_8008C9EC(arg0, arg1); phi_v0_9 = arg0->unkBC; } phi_v0_10 = phi_v0_9; if ((phi_v0_9 & 0x400) == 0x400) { func_8008C62C(arg0, arg1); phi_v0_10 = arg0->unkBC; } phi_v0_11 = phi_v0_10; if ((phi_v0_10 & 0x1000000) == 0x1000000) { func_8008E4A4(arg0, arg1); phi_v0_11 = arg0->unkBC; } phi_v0_12 = phi_v0_11; if ((phi_v0_11 & 0x2000000) == 0x2000000) { func_8008E8D8(arg0, arg1); phi_v0_12 = arg0->unkBC; } phi_v0_13 = phi_v0_12; if ((phi_v0_12 & 0x4000) == 0x4000) { func_8008F1B8(arg0, arg1); phi_v0_13 = arg0->unkBC; } phi_v0_14 = phi_v0_13; if ((phi_v0_13 & 0x80000) == 0x80000) { func_8008D698(arg0, arg1); phi_v0_14 = arg0->unkBC; } if ((phi_v0_14 & 0x800000) == 0x800000) { func_8008D8B4(arg0, arg1); func_80031F48(arg0, 0x41200000); } if (D_800DC510 != 5) { if (arg0->unkC & 0x4000000) { func_8008FC64(arg0, arg1); } if ((arg0->unkC * 0x10) < 0) { func_8008FCDC(arg0, arg1); } } if ((arg0->unk44 & 0x800) != 0) { func_80091298(arg0, arg1); } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002CD48.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800224F0(void *, ?, ?); // extern ? func_8003680C(f32, void *, s16, s32, s32); // extern s32 func_802B5224(s32, f32 *, s32, s32); // extern void func_8002D028(void *arg0, s8 arg1) { f32 sp54; f32 sp50; f32 sp4C; s16 sp46; s32 sp34; s16 *sp2C; f32 *temp_a1; f32 temp_f0; f32 temp_f0_2; f32 temp_f2; s16 *temp_v0_2; s16 temp_v0; s16 temp_v1; s16 temp_v1_2; s32 temp_a3; s32 temp_f18; s32 temp_f8; s32 temp_t1; s32 phi_a2; s32 phi_a2_2; temp_a3 = arg1 * 2; temp_v0 = D_80165270[arg1]; temp_a1 = &sp4C; sp34 = temp_a3; sp4C = D_80165210[temp_v0]; sp50 = 0.0f; sp54 = D_80165230[temp_v0]; temp_f0 = 8.0f * 182.0f; temp_v1 = -func_802B5224(arg0 + 0x14, temp_a1, arg1 << 0x18, temp_a3) - arg0->unk2E; temp_f8 = temp_f0; temp_f18 = -8.0f * 182.0f; phi_a2 = temp_v1; if (temp_f8 < temp_v1) { phi_a2 = temp_f8; } phi_a2_2 = phi_a2; if (phi_a2 < temp_f18) { phi_a2_2 = temp_f18; } temp_v0_2 = &D_80165020[arg1]; sp2C = temp_v0_2; temp_t1 = (*temp_v0_2 + ((phi_a2_2 * 0x35) / temp_f0)) / 2; sp46 = temp_t1; func_8003680C(182.0f, arg0, temp_t1, phi_a2_2, temp_a3); *temp_v0_2 = temp_t1; temp_f0_2 = sp54 - arg0->unk1C; temp_f2 = sp4C - arg0->unk14; if (sqrtf((temp_f0_2 * temp_f0_2) + (temp_f2 * temp_f2)) <= 8.0f) { func_800224F0(arg0 + 0x2E, -0x8000, 0x16C); temp_v1_2 = arg0->unk2E; if ((temp_v1_2 < -0x7F41) || (temp_v1_2 >= 0x7F42)) { arg0->unk0 = arg0->unk0 & 0xFDFF; } arg0->unk8C = 0.0f; arg0->unk94 = 0.0f; arg0->unk104 = 0.0f; arg0->unk240 = 0; arg0->unk7C = 0; arg0->unk34 = 0.0f; arg0->unk38 = 0.0f; arg0->unk3C = 0.0f; arg0->unkC0 = 0; arg0->unk78 = 0; return; } arg0->unk8C = 1200.0f; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002D028.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80027EDC(Player *, s8); // extern ? func_80029B4C(Player *, f32, f32, f32); // extern ? func_8002A194(Player *, f32, f32, f32); // extern ? func_8002A79C(Player *, s8); // extern ? func_8002AAC0(f32, f64, Player *); // extern ? func_8002AB70(Player *); // extern ? func_8002AE38(Player *, s8, f32, f32, f32, f32); // extern ? func_8002B830(Player *, s8, s8); // extern ? func_8002BB9C(Player *, f32 *, f32 *, s8, s32, f32 *); // extern ? func_8002BF4C(Player *, s8); // extern ? func_8002C11C(Player *); // extern ? func_8002C4F8(Player *, s8); // extern ? func_8002C7E4(f32, f32, Player *, s8, s8); // extern ? func_8002C954(Player *, s8, f32 *); // extern ? func_8002CD48(Player *, s8, s8); // extern ? func_8002FCA8(Player *, s8); // extern f32 func_80030150(Player *, s8); // extern ? func_80037BB4(Player *, f32 *); // extern ? func_8003F46C(Player *, ? *, f32 *, f32 *, f32 *, f32 *, f32 *, f32 *); // extern ? func_8003F734(Player *, ? *, f32 *, f32 *, f32 *, f32 *, f32 *); // extern ? func_8003FBAC(Player *, ? *, f32 *, f32 *, f32 *, f32 *, f32 *); // extern ? func_8008F494(Player *, s8); // extern ? func_8008F5A4(Player *, s8); // extern ? func_800C9060(u8, ?); // extern ? func_800CADD0(u8, f32); // extern s32 func_802ABDB8(u16); // extern f32 func_802ABE30(f32, f32, f32, u16); // extern ? func_802AD950(s16 *, f32, f32, f32, f32, f32, f32, f32); // extern ? func_802B63B8(f32 *, f32 *); // extern f32 sins(s32); // extern f32 coss(f32, f32, s32, s32); // extern extern ? D_800E3CE8; extern ? D_800E3CF4; extern ? D_800E3D00; extern ? D_800E3D0C; extern s32 D_800E3D18; extern f64 D_800ED7E0; extern f64 D_800ED7E8; extern f32 D_800ED7F0; extern f64 D_800ED7F8; extern f64 D_800ED800; extern f64 D_800ED808; extern f64 D_800ED810; extern f64 D_800ED818; extern f64 D_800ED820; extern f64 D_800ED828; extern f64 D_800ED830; extern f32 D_800ED838; extern f64 D_800ED840; extern ? gKartTopSpeedTable; void func_8002D268(Player *player, s32 arg1, s8 arg2, s8 arg3) { f32 sp18C; f32 sp184; f32 sp180; f32 sp17C; f32 sp178; f32 sp16C; f32 sp160; ? sp104; f32 spFC; f32 spF8; f32 spF4; f32 spF0; f32 spE8; f32 spB4; f32 spB0; f32 spAC; f32 spA8; f32 spA0; f32 sp9C; f32 sp98; ? sp8C; s32 sp7C; f32 sp60; f32 *sp58; struct_D_8018CE10 *sp54; ? *temp_t7; f32 (*temp_v0_18)[3]; f32 *temp_a1; f32 *temp_v0_19; f32 temp_f0; f32 temp_f0_2; f32 temp_f0_7; f32 temp_f0_8; f32 temp_f0_9; f32 temp_f12; f32 temp_f12_2; f32 temp_f12_3; f32 temp_f12_6; f32 temp_f12_7; f32 temp_f14; f32 temp_f14_2; f32 temp_f14_3; f32 temp_f2_2; f32 temp_f2_3; f32 temp_f2_7; f32 temp_f2_8; f32 temp_f2_9; f32 temp_f4; f64 temp_f0_3; f64 temp_f0_4; f64 temp_f0_5; f64 temp_f0_6; f64 temp_f12_4; f64 temp_f12_5; f64 temp_f14_4; f64 temp_f14_5; f64 temp_f14_6; f64 temp_f16; f64 temp_f16_2; f64 temp_f16_3; f64 temp_f18; f64 temp_f2; f64 temp_f2_4; f64 temp_f2_5; f64 temp_f2_6; f64 temp_f8; s16 temp_t6_2; s16 temp_v0_11; s16 temp_v0_13; s16 temp_v0_15; s16 temp_v0_4; s16 temp_v0_5; s16 temp_v0_6; s16 temp_v0_7; s16 temp_v0_9; s32 *temp_t6; s32 temp_f6; s32 temp_t4; s32 temp_t4_2; s32 temp_t5; s32 temp_v0_16; s32 temp_v0_2; s32 temp_v0_3; s32 temp_v1; s32 temp_v1_2; s32 temp_v1_3; struct_D_8018CE10 *temp_t9; u16 temp_v0; u16 temp_v0_10; u16 temp_v0_12; u16 temp_v0_14; u16 temp_v0_17; u16 temp_v0_8; s32 *phi_t6; ? *phi_t7; s32 phi_v0; f32 phi_f12; f32 phi_f14; f64 phi_f14_2; f64 phi_f16; s32 phi_v1; s32 phi_v1_2; sp184.unk0 = D_800E3CE8.unk0; sp184.unk4 = D_800E3CE8.unk4; sp184.unk8 = D_800E3CE8.unk8; sp178.unk0 = D_800E3CF4.unk0; sp178.unk4 = D_800E3CF4.unk4; sp178.unk8 = D_800E3CF4.unk8; sp16C.unk0 = D_800E3D00.unk0; sp16C.unk4 = D_800E3D00.unk4; sp16C.unk8 = D_800E3D00.unk8; sp160.unk0 = D_800E3D0C.unk0; sp160.unk4 = D_800E3D0C.unk4; sp160.unk8 = D_800E3D0C.unk8; phi_t6 = &D_800E3D18; phi_t7 = &sp104; do { temp_t6 = phi_t6 + 0xC; temp_t7 = phi_t7 + 0xC; temp_t7->unk-C = *phi_t6; temp_t7->unk-8 = temp_t6->unk-8; temp_t7->unk-4 = temp_t6->unk-4; phi_t6 = temp_t6; phi_t7 = temp_t7; } while (temp_t6 != (&D_800E3D18 + 0x54)); temp_t7->unk0 = temp_t6->unk0; temp_t7->unk4 = temp_t6->unk4; sp7C = 0; func_80027EDC(player, arg3); func_8002C11C(player); if ((player->unk_000 & 0x4000) == 0x4000) { func_8002A79C(player, arg3); } func_8002B830(player, arg3, arg2); temp_v0 = player->unk_000; if (((temp_v0 & 0x4000) == 0x4000) && ((temp_v0 & 0x100) != 0x100)) { func_8002BF4C(player, arg3); } func_8002CD48(player, arg3, arg2); if (((player->unk_0BC & 0x20000000) == 0x20000000) && (player->unk_228 >= 0x64)) { sp7C = 2; } func_80037BB4(player, &sp160); func_8002AB70(player); func_8002FCA8(player, arg3); if ((player->unk_044 & 1) != 0) { player->unk_064 *= -1.0f; player->unk_06C *= -1.0f; } if ((player->unk_1D4 == 1) && (player->unk_1EC == 1)) { temp_f0 = player->unk_100; temp_f12 = player->unk_064 + sp16C; temp_f2 = D_800ED7E0; spB4 = ((-player->unk_140 * temp_f0) * temp_f2) + (-1.0f * temp_f12); spB0 = -player->unk_144 * temp_f0; temp_f14 = player->unk_06C + sp174; spAC = ((-player->unk_148 * temp_f0) * temp_f2) + (-1.0f * temp_f14); phi_f12 = temp_f12; phi_f14 = temp_f14; } else { temp_f6 = ((player->unk_094 / 18.0f) * 216.0f) / 10.0f; phi_v0 = temp_f6; if (temp_f6 >= 0xA) { phi_v0 = 0xA; } temp_f0_2 = player->unk_100; temp_f12_2 = player->unk_064 + sp16C; temp_f2_2 = (sp + (phi_v0 * 4))->unk104; spB4 = (temp_f2_2 * (-player->unk_140 * temp_f0_2)) + (-1.0f * temp_f12_2); spB0 = -player->unk_144 * temp_f0_2; temp_f14_2 = player->unk_06C + sp174; spAC = (temp_f2_2 * (-player->unk_148 * temp_f0_2)) + (-1.0f * temp_f14_2); phi_f12 = temp_f12_2; phi_f14 = temp_f14_2; } temp_v0_2 = player->unk_0BC; temp_v1 = temp_v0_2 & 8; if ((temp_v1 != 8) && ((temp_v0_2 & 0x20) == 0x20)) { spB4 = phi_f12 * 0.0f; spAC = phi_f14 * 0.0f; spB0 = (player->unk_100 * -1.0f) / 4.0f; } if (temp_v1 == 8) { spB4 = phi_f12 * 0.0f; spB0 = player->unk_100 * -1.0f; spAC = phi_f14 * 0.0f; } sp60 = coss(phi_f12, phi_f14, (player->unk_02E + player->unk_0C0) & 0xFFFF, 1); temp_a1 = player->unk_174; temp_f2_3 = (sins((player->unk_02E + player->unk_0C0) & 0xFFFF) * -(player->rotX - player->posX)) + ((player->rotZ - player->posZ) * sp60); if (D_800ED7E8 < temp_f2_3) { player->unk_044 |= 8; } else { player->unk_044 &= 0xFFF7; } if ((player->unk_08C <= 0.0f) && (temp_v0_3 = player->unk_0BC, ((temp_v0_3 & 1) == 1)) && ((temp_v0_3 & 0x20) != 0x20)) { sp180 = temp_f2_3 * D_800ED7F0; } else { sp180 = 0.0f; } sp17C = 0.0f; sp58 = temp_a1; func_802B63B8(&sp178, temp_a1); temp_f14_3 = spAC; temp_f12_3 = temp_f14_3 + sp180; spB4 += sp178; spAC = temp_f12_3; func_8002C7E4(temp_f12_3, temp_f14_3, player, arg3, arg2); sp18C = func_80030150(player, arg3); func_802B63B8(&sp184, temp_a1); sp98 = player->unk_034; sp9C = player->unk_038; spA0 = player->unk_03C; if (((player->unk_10C < 3) && (player->unk_256 < 3)) || ((player->unk_0BC & 0x2000) == 0x2000)) { temp_t4 = player->unk_07C >> 0x10; if ((temp_t4 >= 0x28) || (temp_t4 < -0x27)) { temp_f0_5 = sp98; temp_f14_6 = D_800ED7F8; temp_f12_5 = sp7C; temp_f16_3 = D_800ED800; temp_f18 = D_800ED808; temp_f2_6 = spA0; sp98 = temp_f0_5 + ((((sp184 + spB4 + sp160) - (temp_f0_5 * (temp_f14_6 * player->unk_0FC))) / temp_f16_3) / ((player->unk_20C * temp_f18) + 1.0 + temp_f12_5)); spA0 = temp_f2_6 + ((((sp18C + spAC + sp168) - (temp_f2_6 * (temp_f14_6 * player->unk_0FC))) / temp_f16_3) / ((player->unk_20C * temp_f18) + 1.0 + temp_f12_5)); phi_f14_2 = temp_f14_6; phi_f16 = temp_f16_3; } else { temp_f0_4 = sp98; temp_f14_5 = D_800ED810; temp_f12_4 = sp7C + 1; temp_f16_2 = D_800ED818; temp_f2_5 = spA0; sp98 = temp_f0_4 + ((((sp184 + spB4 + sp160) - (temp_f0_4 * (temp_f14_5 * player->unk_0FC))) / temp_f16_2) / temp_f12_4); spA0 = temp_f2_5 + ((((sp18C + spAC + sp168) - (temp_f2_5 * (temp_f14_5 * player->unk_0FC))) / temp_f16_2) / temp_f12_4); phi_f14_2 = temp_f14_5; phi_f16 = temp_f16_2; } } else { temp_f0_3 = sp98; temp_f14_4 = D_800ED820; temp_f16 = D_800ED828; temp_f2_4 = spA0; sp98 = temp_f0_3 + ((((sp184 + spB4 + sp160) - (temp_f0_3 * (temp_f14_4 * player->unk_0FC))) / temp_f16) / 30.0); spA0 = temp_f2_4 + ((((sp18C + spAC + sp168) - (temp_f2_4 * (temp_f14_4 * player->unk_0FC))) / temp_f16) / 30.0); phi_f14_2 = temp_f14_4; phi_f16 = temp_f16; } temp_f0_6 = sp9C; sp9C = temp_f0_6 + ((((sp188 + spB0 + sp164) - (temp_f0_6 * (phi_f14_2 * player->unk_0FC))) / phi_f16) / player->unk_DAC); temp_v0_4 = player->unk_0CA; if (((temp_v0_4 & 2) == 2) || ((temp_v0_4 & 8) == 8) || ((player->unk_0BC & 0x4000000) == 0x4000000) || ((temp_v0_4 & 1) != 0)) { sp98 = 0.0f; sp9C = 0.0f; spA0 = 0.0f; } temp_v0_5 = player->unk_044; if ((temp_v0_5 & 0x10) == 0x10) { player->unk_044 = temp_v0_5 & 0xFFEF; } temp_f0_7 = player->posX; spF0 = temp_f0_7; temp_f2_7 = player->posZ; temp_f12_6 = player->posY; spE8 = temp_f2_7; player->rotX = temp_f0_7; player->rotZ = temp_f2_7; player->rotY = temp_f12_6; temp_t9 = &D_8018CE10[arg3]; sp54 = temp_t9; spFC = temp_t9->unk_04 + (temp_f0_7 + player->unk_034); spF8 = player->unk_038 + temp_f12_6; spF4 = temp_t9->unk_0C + (spE8 + player->unk_03C); temp_v0_6 = player->unk_0CA; if (((temp_v0_6 & 2) != 2) && ((temp_v0_6 & 8) != 8) && ((player->unk_0BC & 0x4000000) != 0x4000000) && ((temp_v0_6 & 1) == 0)) { func_8002AAC0(temp_f12_6, phi_f14_2, player); temp_f4 = spF8 + player->unk_0EC; temp_f8 = temp_f4; spF8 = temp_f4; spF8 = temp_f8 - D_800ED830; } func_802AD950(&player->unk_110, player->unk_070, spFC, spF8, spF4, player->rotX, player->rotY, player->rotZ); player->unk_058 = 0.0f; player->unk_060 = 0.0f; player->unk_05C = 1.0f; if ((player->unk_044 & 1) != 1) { func_802B6540(sp58, player->unk_058, player->unk_05C, player->unk_060, player->unk_02E); } else { func_802B6540(sp58, player->unk_058, player->unk_05C, player->unk_060, player->unk_02E + 0x8000); } player->unk_0BC |= 8; player->unk_0C2 += 1; spA8 = player->unk_124; if (spA8 <= 0.0f) { temp_v0_7 = player->unk_0C2; temp_t4_2 = player->unk_0BC & ~2; temp_t5 = temp_t4_2 & ~8; player->unk_0BC = temp_t4_2; player->unk_0BC = temp_t5; if (temp_v0_7 >= 0x23) { if (temp_v0_7 >= 0x32) { player->unk_0C2 = 0x32; } temp_v0_8 = player->unk_000; temp_v1_2 = temp_v0_8 & 0x4000; player->unk_DCC = 0; player->unk_0B6 = player->unk_0B6 | 0x100; player->unk_DC0 = 3.0f; phi_v1 = temp_v1_2; if ((temp_v1_2 == 0x4000) && ((player->unk_0BC & 0x100000) == 0x100000) && ((temp_v0_8 & 0x100) != 0x100)) { func_800C9060(arg3, 0x1900A60A); phi_v1 = player->unk_000 & 0x4000; } else if ((temp_v1_2 == 0x4000) && ((temp_v0_8 & 0x100) != 0x100)) { func_800CADD0(arg3, player->unk_0C2 / 35.0f); phi_v1 = player->unk_000 & 0x4000; } if (phi_v1 == 0x4000) { player->unk_044 |= 0x100; } } temp_v0_9 = player->unk_0C2; if ((temp_v0_9 < 0x23) && (temp_v0_9 >= 0x1C) && (((player->unk_094 / 18.0f) * 216.0f) >= 20.0f)) { temp_v0_10 = player->unk_000; temp_v1_3 = temp_v0_10 & 0x4000; player->unk_DCC = 0; player->unk_DC0 = D_800ED838; phi_v1_2 = temp_v1_3; if ((temp_v1_3 == 0x4000) && ((temp_v0_10 & 0x100) != 0x100)) { func_800CADD0(arg3, player->unk_0C2 / 35.0f); phi_v1_2 = player->unk_000 & 0x4000; } if (phi_v1_2 == 0x4000) { player->unk_044 |= 0x100; } } temp_v0_11 = player->unk_0C2; if ((temp_v0_11 < 0x1C) && (temp_v0_11 >= 4) && (((player->unk_094 / 18.0f) * 216.0f) >= 20.0f)) { temp_v0_12 = player->unk_000; player->unk_DCC = 0; player->unk_DC0 = 1.5f; if (((temp_v0_12 & 0x4000) == 0x4000) && ((temp_v0_12 & 0x100) != 0x100)) { temp_v0_13 = player->unk_0C2; if ((temp_v0_13 < 0xB) && (temp_v0_13 >= 4) && (gCurrentCourseId == 2)) { func_800CADD0(arg3, temp_v0_13 / 14.0f); } else { func_800CADD0(arg3, temp_v0_13 / 25.0f); } } } player->unk_0C2 = 0; player->unk_0EC = player->unk_0C2; } spA8 = player->unk_124; if (spA8 <= 0.0f) { func_8003F46C(player, &sp8C, &sp98, &sp178, &spA8, &spFC, &spF8, &spF4); } spA8 = player->unk_11C; if (spA8 < 0.0f) { func_8003F734(player, &sp8C, &sp98, &spA8, &spFC, &spF8, &spF4); func_8002C954(player, arg3, &sp98); } spA8 = player->unk_120; if (spA8 < 0.0f) { func_8003FBAC(player, &sp8C, &sp98, &spA8, &spFC, &spF8, &spF4); func_8002C954(player, arg3, &sp98); } spA8 = player->unk_11C; if (spA8 >= 0.0f) { spA8 = player->unk_120; if (spA8 >= 0.0f) { temp_v0_14 = player->unk_256; player->unk_046 = player->unk_046 & 0xFFDF; if (temp_v0_14 != 0) { temp_t6_2 = temp_v0_14 + 1; player->unk_256 = temp_t6_2; if ((temp_t6_2 & 0xFFFF) >= 0xA) { player->unk_256 = 0; } } } } if (((player->unk_0BC & 8) == 0) && (func_802ABDB8(player->unk_11A) != 0) && ((player->unk_0BC & 0x10000) != 0x10000)) { temp_v0_15 = player->unk_0CA; if (((temp_v0_15 & 2) == 0) || ((temp_v0_15 & 8) == 0)) { func_8008F494(player, arg3); } } else if (((player->unk_0BC & 8) == 0) && (func_802ABDB8(player->unk_11A) == 0) && (player->unk_0BC & 0x10000)) { func_8008F5A4(player, arg3); } player->unk_074 = func_802ABE30(spFC, spF8, spF4, player->unk_11A); if (((player->unk_000 & 0x4000) == 0x4000) && ((temp_v0_16 = D_800DC52C, (temp_v0_16 == 0)) || (temp_v0_16 == 2) || (temp_v0_16 == 1))) { func_80029B4C(player, spFC, spF8, spF4); } else { func_8002A194(player, spFC, spF8, spF4); } func_8002AE38(player, arg3, spF0, spE8, spFC, spF4); player->unk_22C = player->unk_094; player->unk_094 = sqrtf((spA0 * spA0) + (sp98 * sp98)); if ((player->unk_08C <= 0.0f) && (player->unk_094 <= D_800ED840) && (sp54->unk_04 == 0.0f) && (sp54->unk_0C == 0.0f)) { sp98 += sp98 * -1.0f; spA0 += spA0 * -1.0f; } else { player->posX = spFC; player->posZ = spF4; } temp_v0_17 = player->unk_000; player->posY = spF8; if (((temp_v0_17 & 0x4000) != 0) && ((temp_v0_17 & 0x1000) == 0)) { func_8002BB9C(player, &spFC, &spF4, arg2, arg3, &sp98); } player->unk_064 = sp178; player->unk_06C = sp180; player->unk_034 = sp98; player->unk_038 = sp9C; player->unk_03C = spA0; temp_v0_18 = &D_80165070[arg3]; temp_v0_18->unk0 = sp98; temp_v0_18->unk4 = sp9C; temp_v0_18->unk8 = spA0; if ((player->unk_000 & 0x4000) == 0x4000) { temp_f2_8 = player->unk_094; temp_v0_19 = (player->characterId * 4) + &gKartTopSpeedTable; temp_f12_7 = *temp_v0_19; if (temp_f12_7 < temp_f2_8) { temp_f0_8 = temp_f12_7 / temp_f2_8; player->unk_034 *= temp_f0_8; player->unk_038 *= temp_f0_8; player->unk_03C *= temp_f0_8; player->unk_094 = *temp_v0_19; } } if ((player->unk_044 & 1) == 1) { temp_f2_9 = player->unk_094; if (temp_f2_9 > 1.0f) { temp_f0_9 = 1.0f / temp_f2_9; player->unk_094 = 1.0f; player->unk_034 *= temp_f0_9; player->unk_038 *= temp_f0_9; player->unk_03C *= temp_f0_9; } } if (player->unk_124 >= 500.0f) { player->unk_078 = player->unk_078 / 2; } func_8002C4F8(player, arg3); } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002D268.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s32 func_80027D00(); // extern void func_8002E4C4(void *arg0) { s32 sp1C; f32 temp_f12; f32 temp_f2; s32 temp_v0; temp_v0 = func_80027D00(); sp1C = temp_v0; arg0->unkF0 = 0.0f; arg0->unkF4 = 0.0f; arg0->unkEC = 0.0f; temp_f2 = func_802AE1C0(arg0->unk14, D_80164510[temp_v0] + 10.0f, arg0->unk1C) + arg0->unk70; arg0->unk18 = temp_f2; temp_f12 = D_80164510[sp1C]; if (((temp_f2 - temp_f12) > 1200.0f) || ((arg0->unk18 - temp_f12) < -1200.0f)) { arg0->unk18 = arg0->unk24; } arg0->unk38 = 0.0f; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002E4C4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80029B4C(void *, f32, f32, f32); // extern ? func_8002A194(void *, f32, f32, f32); // extern ? func_8002AAC0(f64, f64, void *); // extern ? func_8002AB70(void *); // extern ? func_8002AE38(void *, s8, f32, f32, f32, f32); // extern ? func_8002B830(s8, s8); // extern ? func_8002C4F8(void *, s8); // extern ? func_8002C7E4(void *, s8, s8); // extern ? func_8002C954(void *, s8, f32 *); // extern ? func_8002CD48(void *, s8, s8); // extern ? func_8002FCA8(void *, s8); // extern f32 func_80030150(void *, s8); // extern ? func_80031F48(void *, ?); // extern ? func_8003F46C(void *, ? *, f32 *, f32 *, f32 *, f32 *, f32 *, f32 *); // extern ? func_8003F734(void *, ? *, f32 *, f32 *, f32 *, f32 *, f32 *); // extern ? func_8003FBAC(void *, ? *, f32 *, f32 *, f32 *, f32 *, f32 *); // extern ? func_8008F494(void *, s8); // extern ? func_8008F5A4(void *, s8); // extern ? func_800CADD0(u8, f32); // extern s32 func_802ABDB8(u16); // extern f32 func_802ABE30(f32, f32, f32, u16); // extern ? func_802AD950(void *, s32, f32, f32, f32, f32, f32, f32); // extern ? func_802B63B8(f32 *, f32 *); // extern extern ? D_800E3D74; extern ? D_800E3D80; extern ? D_800E3D8C; extern f64 D_800ED848; extern f64 D_800ED850; extern f64 D_800ED858; extern f64 D_800ED860; extern f64 D_800ED868; extern f64 D_800ED870; extern f64 D_800ED878; extern f32 D_800ED880; extern f32 D_800ED884; extern f64 D_800ED888; extern f64 D_800ED890; extern ? gKartTopSpeedTable; void func_8002E594(void *arg0, ? arg1, s8 arg2, s8 arg3) { f32 spF4; f32 spEC; f32 spE0; f32 spD4; f32 spD0; f32 spCC; f32 spC8; f32 spBC; f32 spB4; f32 sp80; f32 sp7C; f32 sp78; f32 sp74; f32 sp5C; f32 sp58; f32 sp54; ? sp48; s16 sp46; f32 *sp40; f32 *temp_a0; f32 *temp_a0_2; f32 *temp_v0_15; f32 temp_f0; f32 temp_f0_5; f32 temp_f0_6; f32 temp_f12_3; f32 temp_f18; f32 temp_f2_4; f32 temp_f2_5; f32 temp_f4; f32 temp_f6; f64 temp_f0_2; f64 temp_f0_3; f64 temp_f0_4; f64 temp_f12; f64 temp_f12_2; f64 temp_f14; f64 temp_f14_2; f64 temp_f16; f64 temp_f2; f64 temp_f2_2; f64 temp_f2_3; s16 temp_v0_10; s16 temp_v0_12; s16 temp_v0_4; s16 temp_v0_6; s16 temp_v0_8; s32 temp_t1; s32 temp_t5; s32 temp_v0; s32 temp_v0_13; s32 temp_v0_14; s32 temp_v0_2; s32 temp_v0_3; s32 temp_v0_7; s32 temp_v0_9; s32 temp_v1_4; struct_D_8018CE10 *temp_v0_5; u16 temp_t8; u16 temp_v0_11; u16 temp_v1; u16 temp_v1_2; u16 temp_v1_3; f64 phi_f14; f64 phi_f12; s32 phi_v0; s32 phi_v0_2; s32 phi_v0_3; s32 phi_v0_4; f32 phi_f0; f32 phi_f0_2; f32 phi_f0_3; f32 phi_f0_4; f32 phi_f0_5; spEC.unk0 = D_800E3D74.unk0; spEC.unk4 = D_800E3D74.unk4; spEC.unk8 = D_800E3D74.unk8; spE0.unk0 = D_800E3D80.unk0; spE0.unk4 = D_800E3D80.unk4; spE0.unk8 = D_800E3D80.unk8; spD4.unk0 = D_800E3D8C.unk0; spD4.unk4 = D_800E3D8C.unk4; spD4.unk8 = D_800E3D8C.unk8; func_8002B830(arg3, arg2); temp_v0 = arg0->unkBC; if (((temp_v0 & 0x80) == 0x80) || ((temp_v0 & 0x40) == 0x40) || ((temp_v0 & 0x4000) == 0x4000) || ((temp_v0 & 0x80000) == 0x80000) || ((temp_v0 & 0x800000) == 0x800000) || ((temp_v0 & 0x20000) == 0x20000) || ((arg0->unk44 & 0x800) != 0)) { sp46 = 1; } else { sp46 = 0; } func_8002CD48(arg0, arg3, arg2); func_8002AB70(arg0); func_8002FCA8(arg0, arg3); temp_v0_2 = arg0->unkBC; if (((temp_v0_2 & 0x80) == 0x80) || ((temp_v0_2 & 0x40) == 0x40) || ((temp_v0_2 & 0x20000) == 0x20000)) { temp_f2 = D_800ED848; temp_f0 = arg0->unk100; sp80 = ((-arg0->unk140 * temp_f0) * temp_f2) + (-1.0f * arg0->unk64); sp7C = -arg0->unk144 * temp_f0; sp78 = ((-arg0->unk148 * temp_f0) * temp_f2) + (-1.0f * arg0->unk6C); } else { sp80 = arg0->unk64 * -1.0f; sp7C = arg0->unk100 * -1.0f; sp78 = arg0->unk6C * -1.0f; } func_8002C7E4(arg0, arg3, arg2); if (sp46 == 1) { temp_a0 = arg0 + 0x174; sp40 = temp_a0; func_802B6540(temp_a0, arg0->unk58, arg0->unk5C, arg0->unk60, arg0->unk2E); func_802B6540(arg0 + 0x150, arg0->unk58, arg0->unk5C, arg0->unk60, arg0->unkAE); } else { temp_a0_2 = arg0 + 0x174; sp40 = temp_a0_2; func_802B6540(temp_a0_2, arg0->unk58, arg0->unk5C, arg0->unk60, arg0->unk2E); } spF4 = func_80030150(arg0, arg3); if (sp46 == 1) { func_802B63B8(&spEC, arg0 + 0x150); } else { func_802B63B8(&spEC, sp40); } sp54 = arg0->unk34; sp58 = arg0->unk38; sp5C = arg0->unk3C; if ((arg0->unk10C < 3) && (arg0->unk256 < 3) && (temp_v0_3 = arg0->unkBC, ((temp_v0_3 & 0x400) != 0x400)) && ((temp_v0_3 & 0x1000000) != 0x1000000) && ((temp_v0_3 & 0x2000000) != 0x2000000)) { temp_f0_2 = sp54; temp_f12 = D_800ED850; temp_f14 = D_800ED858; temp_f2_2 = sp5C; sp54 = temp_f0_2 + ((((spEC + sp80 + spD4) - (temp_f0_2 * (temp_f14 * arg0->unkFC))) / temp_f12) / ((arg0->unk20C * 5.0f) + 1.0f)); sp5C = temp_f2_2 + ((((spF4 + sp78 + spDC) - (temp_f2_2 * (temp_f14 * arg0->unkFC))) / temp_f12) / ((arg0->unk20C * 5.0f) + 1.0f)); phi_f14 = temp_f14; phi_f12 = temp_f12; } else { temp_f0_3 = sp54; temp_f12_2 = D_800ED860; temp_f14_2 = D_800ED868; temp_f16 = D_800ED870; temp_f2_3 = sp5C; sp54 = temp_f0_3 + ((((spEC + sp80 + spD4) - (temp_f0_3 * (temp_f14_2 * arg0->unkFC))) / temp_f12_2) * temp_f16); sp5C = temp_f2_3 + ((((spF4 + sp78 + spDC) - (temp_f2_3 * (temp_f14_2 * arg0->unkFC))) / temp_f12_2) * temp_f16); phi_f14 = D_800ED878; phi_f12 = temp_f12_2; } temp_f0_4 = sp58; sp58 = temp_f0_4 + ((((spF0 + sp7C + spD8) - (temp_f0_4 * (phi_f14 * arg0->unkFC))) / phi_f12) / arg0->unkDAC); temp_v0_4 = arg0->unkCA; if (((temp_v0_4 & 2) == 2) || ((temp_v0_4 & 8) == 8)) { sp58 = 0.0f; sp54 = 0.0f; sp5C = 0.0f; } temp_f0_5 = arg0->unk14; spBC = temp_f0_5; temp_f2_4 = arg0->unk18; temp_f18 = arg0->unk1C; arg0->unk20 = temp_f0_5; arg0->unk24 = temp_f2_4; arg0->unk28 = temp_f18; temp_v0_5 = &D_8018CE10[arg3]; spD0 = temp_v0_5->unk_04 + (temp_f0_5 + arg0->unk34); spCC = arg0->unk38 + temp_f2_4; spB4 = temp_f18; temp_f6 = temp_v0_5->unk_0C + (temp_f18 + arg0->unk3C); spC8 = temp_f6; func_8002AAC0(phi_f12, phi_f14, arg0); temp_f4 = spCC + arg0->unkEC; spCC = temp_f4; func_802AD950(arg0 + 0x110, arg0->unk70, spD0, temp_f4, temp_f6, arg0->unk20, arg0->unk24, arg0->unk28); arg0->unkBC = arg0->unkBC | 8; arg0->unkC2 = arg0->unkC2 + 1; arg0->unk58 = 0.0f; arg0->unk60 = 0.0f; arg0->unk5C = 1.0f; sp74 = arg0->unk124; phi_f0 = 0.0f; phi_f0_2 = 0.0f; phi_f0_3 = 0.0f; phi_f0_4 = 0.0f; phi_f0 = 0.0f; phi_f0_5 = 0.0f; phi_f0 = 0.0f; if (sp74 <= 0.0f) { temp_t1 = arg0->unkBC & ~2; temp_t5 = temp_t1 & ~8; arg0->unkBC = temp_t1; arg0->unkBC = temp_t5; if (((temp_t5 & 0x400) != 0x400) && ((temp_t5 & 0x1000000) != 0x1000000) && ((temp_t5 & 0x2000000) != 0x2000000)) { temp_v0_6 = arg0->unkC2; if (temp_v0_6 >= 0x1C) { if (temp_v0_6 >= 0x32) { arg0->unkC2 = 0x32; } temp_v1 = arg0->unk0; temp_v0_7 = temp_v1 & 0x4000; arg0->unkDCC = 0; arg0->unkB6 = arg0->unkB6 | 0x100; arg0->unkDC0 = 3.0f; phi_v0 = temp_v0_7; if ((temp_v0_7 == 0x4000) && ((temp_v1 & 0x100) != 0x100)) { func_800CADD0(arg3, arg0->unkC2 / 50.0f); phi_v0 = arg0->unk0 & 0x4000; } phi_f0_5 = 0.0f; if (phi_v0 == 0x4000) { arg0->unk44 = arg0->unk44 | 0x100; } } temp_v0_8 = arg0->unkC2; phi_f0 = phi_f0_5; phi_f0 = phi_f0_5; if ((temp_v0_8 < 0x1C) && (temp_v0_8 >= 0xA) && (((arg0->unk94 / 18.0f) * 216.0f) >= 20.0f)) { temp_v1_2 = arg0->unk0; temp_v0_9 = temp_v1_2 & 0x4000; arg0->unkDCC = 0; arg0->unkDC0 = 2.0f; phi_v0_2 = temp_v0_9; if ((temp_v0_9 == 0x4000) && ((temp_v1_2 & 0x100) != 0x100)) { func_800CADD0(arg3, arg0->unkC2 / 50.0f); phi_v0_2 = arg0->unk0 & 0x4000; } if (phi_v0_2 == 0x4000) { arg0->unk44 = arg0->unk44 | 0x100; } } goto block_63; } temp_v0_10 = arg0->unkC2; if (temp_v0_10 >= 0xA) { if (temp_v0_10 >= 0x32) { arg0->unkC2 = 0x32; } temp_v1_3 = arg0->unk0; phi_v0_3 = arg0->unkC2; if (((temp_v1_3 & 0x4000) == 0x4000) && ((temp_v1_3 & 0x100) != 0x100)) { func_800CADD0(arg3, arg0->unkC2 / 20.0f); phi_v0_3 = arg0->unkC2; } phi_v0_4 = phi_v0_3; phi_f0 = 0.0f; if (phi_v0_3 >= 0x28) { arg0->unkC2 = 0x14; phi_v0_4 = arg0->unkC2; } if ((arg0->unkBC & 0x400) == 0x400) { arg0->unkC2 = phi_v0_4 / 6.5; arg0->unkF4 = 0.0f; arg0->unkF0 = D_800ED880; } else { arg0->unkC2 = phi_v0_4 / 7.5; arg0->unkF4 = 0.0f; arg0->unkF0 = D_800ED884; if ((arg0->unk0 & 0x4000) == 0x4000) { arg0->unk44 = arg0->unk44 | 0x100; } } } else { block_63: arg0->unkC2 = 0; } arg0->unkEC = arg0->unkC2; } sp74 = arg0->unk124; phi_f0_2 = phi_f0; if (sp74 <= phi_f0) { func_8003F46C(arg0, &sp48, &sp54, &spE0, &sp74, &spD0, &spCC, &spC8); } sp74 = arg0->unk11C; phi_f0_3 = phi_f0_2; if (sp74 < phi_f0_2) { func_8003F734(arg0, &sp48, &sp54, &sp74, &spD0, &spCC, &spC8); func_8002C954(arg0, arg3, &sp54); func_80031F48(arg0, 0x40C00000); } sp74 = arg0->unk120; phi_f0_4 = phi_f0_3; if (sp74 < phi_f0_3) { func_8003FBAC(arg0, &sp48, &sp54, &sp74, &spD0, &spCC, &spC8); func_8002C954(arg0, arg3, &sp54); func_80031F48(arg0, 0x40C00000); } sp74 = arg0->unk11C; if (phi_f0_4 <= sp74) { sp74 = arg0->unk120; if (phi_f0_4 <= sp74) { temp_v0_11 = arg0->unk256; arg0->unk46 = arg0->unk46 & 0xFFDF; if (temp_v0_11 != 0) { temp_t8 = temp_v0_11 + 1; arg0->unk256 = temp_t8; if ((temp_t8 & 0xFFFF) >= 0xA) { arg0->unk256 = 0; } } } } if ((func_802ABDB8(arg0->unk11A) != 0) && ((arg0->unkBC & 0x10000) != 0x10000) && (((arg0->unk94 / 18.0f) * 216.0f) >= 20.0f)) { temp_v0_12 = arg0->unkCA; if (((temp_v0_12 & 2) == 0) || ((temp_v0_12 & 8) == 0)) { func_8008F494(arg0, arg3); } } else if (((arg0->unkBC & 8) == 0) && (func_802ABDB8(arg0->unk11A) == 0) && (arg0->unkBC & 0x10000)) { func_8008F5A4(arg0, arg3); } arg0->unk74 = func_802ABE30(spD0, spCC, spC8, arg0->unk11A); if (((arg0->unk0 & 0x4000) == 0x4000) && ((temp_v0_13 = D_800DC52C, (temp_v0_13 == 0)) || (temp_v0_13 == 2) || (temp_v0_13 == 1))) { func_80029B4C(arg0, spD0, spCC, spC8); } else { func_8002A194(arg0, spD0, spCC, spC8); } func_8002AE38(arg0, arg3, spBC, spB4, spD0, spC8); arg0->unk22C = arg0->unk94; temp_v0_14 = arg0->unkBC; arg0->unk94 = sqrtf((sp5C * sp5C) + (sp54 * sp54)); temp_v1_4 = temp_v0_14 & 0x400; if (((temp_v1_4 != 0x400) && (arg0->unk8C <= 0.0f) && (arg0->unk94 < D_800ED888)) || ((temp_v1_4 != 0x400) && (arg0->unk8C <= 0.0f) && (arg0->unk94 < D_800ED890) && ((temp_v0_14 & 1) == 1))) { sp54 += sp54 * -1.0f; sp5C += sp5C * -1.0f; } else { arg0->unk14 = spD0; arg0->unk1C = spC8; } arg0->unk18 = spCC; arg0->unk64 = spE0; arg0->unk6C = spE8; arg0->unk34 = sp54; arg0->unk38 = sp58; arg0->unk3C = sp5C; if ((arg0->unk0 & 0x4000) == 0x4000) { temp_f2_5 = arg0->unk94; temp_v0_15 = (arg0->unk254 * 4) + &gKartTopSpeedTable; temp_f12_3 = *temp_v0_15; if (temp_f12_3 < temp_f2_5) { temp_f0_6 = temp_f12_3 / temp_f2_5; arg0->unk34 = arg0->unk34 * temp_f0_6; arg0->unk38 = arg0->unk38 * temp_f0_6; arg0->unk3C = arg0->unk3C * temp_f0_6; arg0->unk94 = *temp_v0_15; } } func_8002C4F8(arg0, arg3); } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002E594.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_8002B830(s8, s8); // extern ? func_8002CD48(void *, s8, s8); // extern f32 func_80030150(void *, s8); // extern ? func_802B63B8(f32 *, f32 *); // extern extern ? D_800E3D98; extern ? D_800E3DA4; extern ? D_800E3DB0; extern ? D_800E3DBC; extern f64 D_800ED898; extern f64 D_800ED8A0; extern ? gKartTopSpeedTable; void control_cpu_movement(void *arg0, ? arg1, s8 arg2, s8 arg3) { f32 spFC; f32 spF4; ? spE8; f32 spDC; f32 spD0; f32 spCC; f32 spC4; f32 sp84; f32 sp7C; f32 sp70; f32 sp6C; f32 sp68; f32 sp40; f32 *sp3C; f32 (*temp_v0)[3]; f32 *temp_a1; f32 *temp_v1; f32 temp_f0_2; f32 temp_f12; f32 temp_f12_2; f32 temp_f14; f32 temp_f2_2; f32 temp_f8; f32 temp_f8_2; f64 temp_f0; f64 temp_f16; f64 temp_f18; f64 temp_f2; s32 temp_t1; spF4.unk0 = D_800E3D98.unk0; spF4.unk4 = D_800E3D98.unk4; spF4.unk8 = D_800E3D98.unk8; spE8.unk0 = D_800E3DA4.unk0; spE8.unk8 = D_800E3DA4.unk8; spE8.unk4 = D_800E3DA4.unk4; spDC.unk0 = D_800E3DB0.unk0; spDC.unk4 = D_800E3DB0.unk4; spDC.unk8 = D_800E3DB0.unk8; spD0.unk0 = D_800E3DBC.unk0; spD0.unk4 = D_800E3DBC.unk4; spD0.unk8 = D_800E3DBC.unk8; arg0->unkBC = arg0->unkBC | 0x1000; arg0->unk44 = arg0->unk44 | 0x10; sp40 = D_80164510[arg3]; arg0->unk204 = 0; arg0->unkBC = arg0->unkBC & ~0x10; func_8002B830(arg3, arg2); func_8002CD48(arg0, arg3, arg2); sp84 = spDC + (0.0f * arg0->unk64); sp7C = spE4 + (0.0f * arg0->unk6C); arg0->unk10C = 0; arg0->unk256 = 0; arg0->unkBC = arg0->unkBC & 0xFFFF7FFF; temp_a1 = arg0 + 0x174; spFC = func_80030150(arg0, arg3); sp3C = temp_a1; func_802B63B8(&spF4, temp_a1); sp6C = 0.0f; sp68 = arg0->unk34; sp70 = arg0->unk3C; temp_f0 = sp68; temp_f16 = D_800ED898; temp_f18 = D_800ED8A0; temp_f2 = sp70; temp_f8 = temp_f0 + (((spF4 + sp84 + spD0) - (temp_f0 * (temp_f16 * arg0->unkFC))) / temp_f18); sp68 = temp_f8; temp_f8_2 = temp_f2 + (((spFC + sp7C + spD8) - (temp_f2 * (temp_f16 * arg0->unkFC))) / temp_f18); sp70 = temp_f8_2; temp_f12 = arg0->unk14; temp_f14 = arg0->unk1C; arg0->unk20 = temp_f12; arg0->unk28 = temp_f14; arg0->unk24 = sp40; spCC = arg0->unk34 + temp_f12; spC4 = arg0->unk3C + temp_f14; arg0->unkC0 = 0; arg0->unkF0 = 0.0f; arg0->unkF4 = 0.0f; arg0->unkEC = 0.0f; func_802B6540(sp3C, arg0->unk58, arg0->unk5C, arg0->unk60, arg0->unk2E); arg0->unkC2 = 0; temp_t1 = arg0->unkBC & ~2; arg0->unkBC = temp_t1; arg0->unkBC = temp_t1 & ~8; arg0->unkC4 = 0; arg0->unk206 = 0; arg0->unk22C = arg0->unk94; arg0->unk94 = sqrtf((sp70 * sp70) + (temp_f8 * temp_f8)); arg0->unk14 = spCC; arg0->unk1C = spC4; arg0->unk64 = 0.0f; arg0->unk6C = 0.0f; arg0->unk18 = sp40; temp_v0 = &D_80165070[arg3]; arg0->unk34 = sp68; arg0->unk38 = sp6C; arg0->unk3C = sp70; temp_v0->unk0 = sp68; temp_v0->unk4 = sp6C; temp_v0->unk8 = temp_f8_2; temp_f2_2 = arg0->unk94; temp_v1 = (arg0->unk254 * 4) + &gKartTopSpeedTable; temp_f12_2 = *temp_v1; if (temp_f12_2 < temp_f2_2) { temp_f0_2 = temp_f12_2 / temp_f2_2; arg0->unk34 = arg0->unk34 * temp_f0_2; arg0->unk38 = arg0->unk38 * temp_f0_2; arg0->unk3C = arg0->unk3C * temp_f0_2; arg0->unk94 = *temp_v1; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/control_cpu_movement.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80029B4C(void *, f32, f32, f32); // extern ? func_8002A194(void *, f32, f32, f32); // extern ? func_8002AAC0(f64, f32, void *); // extern ? func_8002AE38(void *, s8, f32, f32, f32, f32); // extern f32 func_80030150(void *, s8); // extern ? func_80037BB4(? *); // extern ? func_8003F46C(void *, ? *, f32 *, f32 *, f32 *, f32 *, f32 *, f32 *); // extern f32 func_802ABE30(f32, f32, f32, u16); // extern ? func_802AD950(void *, s32, f32, f32, f32, f32, f32, f32); // extern ? func_802B63B8(f32 *, f32 *); // extern extern ? D_800E3DC8; extern ? D_800E3DD4; extern ? D_800E3DE0; extern ? D_800E3DEC; extern f64 D_800ED8A8; extern f64 D_800ED8B0; extern f32 D_800ED8B8; extern f64 D_800ED8C0; extern f64 D_800ED8C8; extern f64 D_800ED8D0; extern ? gKartTopSpeedTable; void func_8002F730(void *arg0, ? arg1, ? arg2, s8 arg3) { f32 spFC; f32 spF4; f32 spE8; ? spDC; ? spD0; f32 spCC; f32 spC8; f32 spC4; f32 spC0; f32 spBC; f32 spB8; f32 sp84; f32 sp7C; f32 sp78; f32 sp70; f32 sp6C; f32 sp68; ? sp5C; f32 *sp4C; f32 sp44; f32 sp34; f32 (*temp_v0_2)[3]; f32 *temp_a1; f32 *temp_v0_3; f32 temp_f0_2; f32 temp_f10; f32 temp_f10_2; f32 temp_f12_2; f32 temp_f14; f32 temp_f2_2; f32 temp_f2_3; f32 temp_f6; f32 temp_f6_2; f32 temp_f6_3; f32 temp_f8; f64 temp_f0; f64 temp_f12; f64 temp_f16; f64 temp_f18; f64 temp_f2; s32 temp_v0; spF4.unk0 = D_800E3DC8.unk0; spF4.unk4 = D_800E3DC8.unk4; spF4.unk8 = D_800E3DC8.unk8; spE8.unk0 = D_800E3DD4.unk0; spE8.unk4 = D_800E3DD4.unk4; spE8.unk8 = D_800E3DD4.unk8; spDC.unk0 = D_800E3DE0.unk0; spDC.unk4 = D_800E3DE0.unk4; spDC.unk8 = D_800E3DE0.unk8; spD0.unk0 = D_800E3DEC.unk0; spD0.unk4 = D_800E3DEC.unk4; spD0.unk8 = D_800E3DEC.unk8; func_80037BB4(&spD0); temp_f6 = arg0->unk64 * 0.0f; sp84 = temp_f6; temp_f10 = arg0->unk6C * 0.0f; sp7C = temp_f10; temp_a1 = arg0 + 0x174; spFC = func_80030150(arg0, arg3); sp4C = temp_a1; func_802B63B8(&spF4, temp_a1); temp_f16 = D_800ED8A8; sp68 = arg0->unk34; sp6C = arg0->unk38; temp_f0 = sp68; sp70 = arg0->unk3C; temp_f18 = D_800ED8B0; temp_f2 = sp70; sp68 = temp_f0 + (((spF4 + temp_f6) - (temp_f0 * temp_f16)) / temp_f18); temp_f12 = sp6C; sp70 = temp_f2 + (((spFC + temp_f10) - (temp_f2 * temp_f16)) / temp_f18); sp6C = temp_f12 + (((spF8 + D_800ED8B8) - (temp_f12 * temp_f16)) / temp_f18); temp_f14 = arg0->unk14; spC0 = temp_f14; temp_f6_2 = arg0->unk18; sp44 = temp_f6_2; spBC = sp44; sp34 = arg0->unk1C; spB8 = sp34; arg0->unk20 = temp_f14; arg0->unk24 = temp_f6_2; arg0->unk28 = sp34; spCC = arg0->unk34 + temp_f14; temp_f10_2 = arg0->unk38 + sp44; spC8 = temp_f10_2; temp_f8 = arg0->unk3C + spB8; spC4 = temp_f8; func_8002AAC0(temp_f12, temp_f14, arg0); temp_f6_3 = temp_f10_2 + arg0->unkEC; spC8 = temp_f6_3; func_802AD950(arg0 + 0x110, arg0->unk70, spCC, temp_f6_3, temp_f8, arg0->unk20, arg0->unk24, arg0->unk28); arg0->unk58 = 0.0f; arg0->unk60 = 0.0f; arg0->unk5C = 1.0f; func_802B6540(sp4C, 0.0f, 1.0f, 0.0f, arg0->unk2E); arg0->unkBC = arg0->unkBC & ~8; sp78 = arg0->unk124; if (sp78 <= 0.0f) { func_8003F46C(arg0, &sp5C, &sp68, &spE8, &sp78, &spCC, &spC8, &spC4); } arg0->unk74 = func_802ABE30(spCC, spC8, spC4, arg0->unk11A); if (((arg0->unk0 & 0x4000) == 0x4000) && ((temp_v0 = D_800DC52C, (temp_v0 == 0)) || (temp_v0 == 2) || (temp_v0 == 1))) { func_80029B4C(arg0, spCC, spC8, spC4); } else { func_8002A194(arg0, spCC, spC8, spC4); } func_8002AE38(arg0, arg3, spC0, spB8, spCC, spC4); arg0->unk22C = arg0->unk94; temp_f2_2 = arg0->unk8C; arg0->unk94 = sqrtf((sp70 * sp70) + ((sp68 * sp68) + (sp6C * sp6C))); if (((temp_f2_2 <= 0.0f) && (arg0->unk94 < D_800ED8C0)) || ((temp_f2_2 <= 0.0f) && (arg0->unk94 < D_800ED8C8) && ((arg0->unkBC & 1) == 1))) { sp68 += sp68 * -1.0f; sp70 += sp70 * -1.0f; } else { arg0->unk14 = spCC; arg0->unk1C = spC4; } arg0->unk18 = spC8 - D_800ED8D0; arg0->unk64 = spE8; arg0->unk6C = spF0; arg0->unk34 = sp68; arg0->unk38 = sp6C; arg0->unk3C = sp70; temp_v0_2 = &D_80165070[arg3]; temp_v0_2->unk0 = sp68; temp_v0_2->unk4 = sp6C; temp_v0_2->unk8 = sp70; if ((arg0->unk0 & 0x4000) == 0x4000) { temp_f2_3 = arg0->unk94; temp_v0_3 = (arg0->unk254 * 4) + &gKartTopSpeedTable; temp_f12_2 = *temp_v0_3; if (temp_f12_2 < temp_f2_3) { temp_f0_2 = temp_f12_2 / temp_f2_3; arg0->unk34 = arg0->unk34 * temp_f0_2; arg0->unk38 = arg0->unk38 * temp_f0_2; arg0->unk3C = arg0->unk3C * temp_f0_2; arg0->unk94 = *temp_v0_3; } } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002F730.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 extern ? D_800E2A90; extern ? D_800E2AB0; void func_8002FCA8(void *arg0, s8 arg1) { f32 temp_f2; s32 temp_lo; s32 temp_v0; u8 temp_v1; u8 temp_v1_2; u8 temp_v1_3; u8 temp_v1_4; s32 phi_v1; f32 phi_f12; f32 phi_f0; f32 phi_f0_2; f32 phi_f0_3; f32 phi_f0_4; f32 phi_f0_5; temp_v0 = arg0->unkBC; phi_f0_2 = 0.0f; phi_f0_5 = 0.0f; if ((temp_v0 & 0x200) != 0x200) { temp_v1 = arg0->unk1EC; if (temp_v1 < 0xF) { phi_f0_5 = 0.0f + *(*(&D_800E2A90 + (arg0->unk254 * 4)) + (temp_v1 * 4)); } temp_v1_2 = arg0->unk1D4; phi_f0_4 = phi_f0_5; if (temp_v1_2 < 0xF) { phi_f0_4 = phi_f0_5 + *(*(&D_800E2A90 + (arg0->unk254 * 4)) + (temp_v1_2 * 4)); } temp_v1_3 = arg0->unk1BC; phi_f0_3 = phi_f0_4; if (temp_v1_3 < 0xF) { phi_f0_3 = phi_f0_4 + *(*(&D_800E2AB0 + (arg0->unk254 * 4)) + (temp_v1_3 * 4)); } temp_v1_4 = arg0->unk1A4; phi_f0_2 = phi_f0_3; if (temp_v1_4 < 0xF) { phi_f0_2 = phi_f0_3 + *(*(&D_800E2AB0 + (arg0->unk254 * 4)) + (temp_v1_4 * 4)); } } phi_v1 = 0; phi_f0 = phi_f0_2; if ((D_801652C0[arg1] & 4) != 0) { phi_v1 = 2; } if ((arg0->unk9C >= 200.0f) && (phi_v1 == 2) && ((temp_lo = arg0->unkC0 / 0xB6, ((temp_lo < 0x10) == 0)) || (temp_lo < -0xF))) { phi_f0 = phi_f0_2 + 1.0; } if (((temp_v0 & 0x200000) == 0x200000) && ((arg0->unk0 & 0x4000) != 0x4000)) { phi_f0 = -3.0f; } temp_f2 = arg0->unk88; if (temp_f2 >= 0.0f) { phi_f12 = temp_f2 * phi_f0; } else { phi_f12 = -temp_f2 * phi_f0; } arg0->unk208 = temp_f2 - phi_f12; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002FCA8.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 extern ? D_800E2E90; extern f64 D_800ED8D8; extern f64 D_800ED8E0; extern f64 D_800ED8E8; extern f64 D_800ED8F0; extern f64 D_800ED8F8; extern f64 D_800ED900; extern f64 D_800ED908; extern f64 D_800ED910; extern f64 D_800ED918; extern f64 D_800ED920; extern f64 D_800ED928; void func_8002FE84(void *arg0, f32 arg1) { f32 temp_f0; f32 temp_f0_2; f32 temp_f0_3; s32 temp_lo; s32 temp_lo_2; s32 temp_v0; u8 temp_v0_2; u8 temp_v0_3; f32 phi_f0; f64 phi_f18; f32 phi_f0_2; f32 phi_f0_3; temp_v0 = arg0->unkBC; if ((temp_v0 & 0x4000) == 0x4000) { temp_f0 = arg0->unk9C; arg0->unk98 = ((temp_f0 * temp_f0) / 25.0f) * D_800ED8D8; return; } if ((temp_v0 & 8) == 8) { temp_f0_2 = arg0->unk9C; arg0->unk98 = ((temp_f0_2 * temp_f0_2) / 25.0f) * D_800ED8E0; return; } arg0->unk98 = arg1; temp_lo = arg0->unkC4 / 0xB6; if ((temp_lo >= 0x12) || (temp_lo < -0x11)) { phi_f0 = 0.0f + ((temp_lo * D_800ED8E8) / D_800ED8F0); } else { phi_f0 = 0.0f + ((temp_lo * D_800ED8F8) / D_800ED900); } temp_v0_2 = arg0->unk1EC; arg0->unk98 = (1.0f - phi_f0) * arg1; phi_f0_3 = phi_f0; if (temp_v0_2 == 8) { phi_f0_3 = phi_f0 + (*(*(&D_800E2E90 + (arg0->unk254 * 4)) + (temp_v0_2 * 4)) * D_800ED908); } temp_v0_3 = arg0->unk1D4; phi_f0_2 = phi_f0_3; if (temp_v0_3 == 8) { phi_f0_2 = phi_f0_3 + (*(*(&D_800E2E90 + (arg0->unk254 * 4)) + (temp_v0_3 * 4)) * D_800ED910); } temp_lo_2 = arg0->unkC0 / 0xB6; if (temp_lo_2 < 0) { phi_f18 = phi_f0_2 + (-temp_lo_2 * D_800ED918); } else { phi_f18 = phi_f0_2 + (temp_lo_2 * D_800ED920); } arg0->unk98 = arg1 * (1.0 + (phi_f18 * D_800ED928)); if ((arg0->unkBC & 0x20) == 0x20) { temp_f0_3 = arg0->unk9C + 180.0f; arg0->unk98 = (temp_f0_3 * temp_f0_3) / 25.0f; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8002FE84.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800225CC(void *, f32, void *, f32, ?, void *); // extern ? func_8002FE84(f32, void *, f32); // extern extern ? D_800E2E90; extern ? D_800E2EB0; extern f64 D_800ED930; extern f64 D_800ED938; extern f64 D_800ED940; extern f64 D_800ED948; extern f64 D_800ED950; extern f64 D_800ED958; extern f64 D_800ED960; extern f64 D_800ED968; extern f64 D_800ED970; extern f64 D_800ED978; extern f64 D_800ED980; extern f64 D_800ED988; extern f64 D_800ED990; extern f64 D_800ED998; extern f64 D_800ED9A0; extern f64 D_800ED9A8; extern f64 D_800ED9B0; extern ? gKartTurnSpeedReductionTable0; extern ? gKartTurnSpeedReductionTable1; f32 func_80030150(void *arg0, s8 arg1) { f32 sp24; f32 sp1C; f32 temp_f0; f32 temp_f0_2; f32 temp_f0_3; f32 temp_f12; f32 temp_f2; f32 temp_f2_2; f32 temp_f2_3; f32 temp_f4; f64 temp_f18; s16 temp_v0_6; s32 temp_a1; s32 temp_a1_2; s32 temp_a1_3; s32 temp_a2; s32 temp_lo; s32 temp_lo_2; s32 temp_lo_3; s32 temp_t0; s32 temp_t5; s32 temp_t8; u16 temp_v0_5; u8 temp_v0; u8 temp_v0_2; u8 temp_v0_3; u8 temp_v0_4; void *temp_a0; void *temp_a0_2; void *temp_a0_3; void *temp_a3; s32 phi_v0; f32 phi_f0; void *phi_f12; void *phi_a3; f32 phi_f0_2; s32 phi_v0_2; void *phi_a3_2; f32 phi_f14; void *phi_a3_3; f32 phi_f0_3; f32 phi_f2; f32 phi_f0_4; f64 phi_f4; f32 phi_f0_5; f32 phi_f0_6; f32 phi_f0_7; f32 phi_f0_8; f32 phi_f0_9; f64 phi_f4_2; f32 phi_f0_10; f32 phi_f0_11; f32 phi_f0_12; f64 phi_f6; temp_a3 = arg0; temp_f2 = (arg0->unk94 / 18.0f) * 216.0f; phi_a3 = temp_a3; phi_f0_2 = 0.0f; phi_f14 = 0.0f; phi_f12 = arg0; phi_f0_6 = 0.0f; phi_f0_12 = 0.0f; if (temp_f2 >= 8.0f) { temp_a1 = arg0->unkBC; temp_t0 = temp_a1 & 0x200; temp_a2 = temp_a1 & 8; if (temp_t0 != 0x200) { temp_v0 = arg0->unk1EC; if (temp_v0 >= 0xF) { } else { phi_f0_12 = 0.0f + *(*(&D_800E2E90 + (temp_a3->unk254 * 4)) + (temp_v0 * 4)); } temp_v0_2 = temp_a3->unk1D4; phi_f0_10 = phi_f0_12; if (temp_v0_2 < 0xF) { phi_f0_10 = phi_f0_12 + *(*(&D_800E2E90 + (temp_a3->unk254 * 4)) + (temp_v0_2 * 4)); } temp_v0_3 = temp_a3->unk1BC; phi_f0_8 = phi_f0_10; if (temp_v0_3 < 0xF) { phi_f0_8 = phi_f0_10 + *(*(&D_800E2EB0 + (temp_a3->unk254 * 4)) + (temp_v0_3 * 4)); } temp_v0_4 = temp_a3->unk1A4; phi_f0_6 = phi_f0_8; if (temp_v0_4 < 0xF) { phi_f0_6 = phi_f0_8 + *(*(&D_800E2E90 + (temp_a3->unk254 * 4)) + (temp_v0_4 * 4)); } } phi_f0_5 = phi_f0_6; if ((temp_a2 != 8) && ((temp_a3->unkCA & 2) != 2)) { temp_lo = temp_a3->unkC4 / 0xB6; if (temp_f2 >= 20.0f) { if ((temp_lo >= 0x12) || (temp_lo < -0x11)) { phi_f0_11 = phi_f0_6 - ((temp_lo * D_800ED930) / 3.0); } else { phi_f6 = phi_f0_6 - ((temp_lo * D_800ED938) / 3.0); goto block_20; } } else { temp_f0 = phi_f0_6 + D_800ED940; phi_f0_11 = temp_f0; if ((temp_a1 & 0x40000000) == 0x40000000) { phi_f6 = temp_f0 + D_800ED948; block_20: phi_f0_11 = phi_f6; } } if (((temp_a1 & 0x10) == 0x10) || (temp_a3->unk204 > 0)) { temp_lo_3 = temp_a3->unkC0 / 0xB6; phi_v0 = temp_lo_3; if (temp_lo_3 < 0) { phi_f0_9 = phi_f0_11 + (-temp_lo_3 * D_800ED950); } else { phi_f0_9 = phi_f0_11 + (temp_lo_3 * D_800ED958); } } else { temp_lo_2 = temp_a3->unkC0 / 0xB6; temp_t8 = temp_a3->unk254 * 4; phi_v0 = temp_lo_2; if (temp_lo_2 < 0) { phi_f0_9 = phi_f0_11 + (-temp_lo_2 * (D_800ED960 + *(&gKartTurnSpeedReductionTable0 + temp_t8))); } else { phi_f0_9 = phi_f0_11 + (temp_lo_2 * (D_800ED968 + *(&gKartTurnSpeedReductionTable0 + temp_t8))); } } phi_f0_7 = phi_f0_9; if (((temp_a1 & 0x20000000) == 0x20000000) && (temp_a3->unk228 < 0xA)) { if (phi_v0 < 0) { phi_f4_2 = phi_f0_9 + (-phi_v0 * D_800ED970); } else { phi_f4_2 = phi_f0_9 + (phi_v0 * D_800ED978); } phi_f0_7 = phi_f4_2; } phi_f0_5 = phi_f0_7; if (temp_t0 == 0x200) { phi_f0_5 = phi_f0_7 + -0.25; } } temp_v0_5 = temp_a3->unkDE; phi_f0_4 = phi_f0_5; if ((temp_v0_5 & 1) == 1) { phi_f4 = phi_f0_5 + D_800ED980; goto block_44; } if ((temp_v0_5 & 2) == 2) { phi_f0_4 = phi_f0_5 + D_800ED988; } temp_f2_2 = D_801652A0[arg1]; phi_f0 = phi_f0_4; phi_f12 = NULL; phi_f12 = NULL; if (((temp_f2_2 - temp_a3->unk1D8) >= 3.5) || ((temp_f2_2 - temp_a3->unk1F0) >= 3.5)) { phi_f4 = phi_f0_4 + D_800ED990; block_44: phi_f0 = phi_f4; } if (temp_a2 != 0) { temp_f18 = temp_a3->unk8C * D_800ED998; sp24 = phi_f0; arg0 = temp_a3; func_800225CC(phi_f12, 0.0f, temp_a3 + 0xA0, temp_f18, 0x3E19999A, temp_a3); phi_a3 = arg0; phi_f0_2 = phi_f0; } else { arg0 = temp_a3; sp24 = phi_f0; func_800225CC(phi_f12, 0.0f, temp_a3 + 0xA0, 0.0f, 0x3DCCCCCD, temp_a3); phi_a3 = arg0; phi_f0_2 = phi_f0; } } else { temp_a3->unkA0 = 0.0f; temp_a3->unkE8 = 0.0f; if ((temp_a3->unkC4 / 0xB6) < 0) { temp_f0_2 = 0.0f + D_800ED9A0; phi_f0_2 = temp_f0_2; if ((temp_a3->unkBC * 2) < 0) { phi_f0_2 = temp_f0_2 + D_800ED9A8; } } } temp_t5 = phi_a3->unk0 & 0x4000; phi_v0_2 = temp_t5; phi_a3_2 = phi_a3; phi_f14 = 0.0f; if (temp_t5 != 0x4000) { if ((phi_a3->unkBC & 0x200000) == 0x200000) { arg0 = phi_a3; sp24 = phi_f0_2; func_800225CC(phi_a3 + 0xE8, 380.0f, 0x3F000000, (bitwise f32) phi_a3); phi_v0_2 = arg0->unk0 & 0x4000; phi_a3_2 = arg0; } else { arg0 = phi_a3; sp24 = phi_f0_2; func_800225CC(phi_a3 + 0xE8, 0.0f, 0x3DCCCCCD, (bitwise f32) phi_a3); phi_v0_2 = arg0->unk0 & 0x4000; phi_a3_2 = arg0; } } phi_a3_3 = phi_a3_2; phi_f0_3 = phi_f0_2; if (phi_v0_2 == 0x4000) { temp_a1_2 = phi_a3_2->unkBC; temp_a0 = phi_a3_2 + 0xE8; if (((temp_a1_2 & 0x100) == 0x100) && ((temp_a1_2 & 0x10) != 0x10)) { arg0 = phi_a3_2; sp24 = phi_f0_2; func_800225CC(temp_a0, 580.0f, 0x3E4CCCCD, (bitwise f32) phi_a3_2); } else { arg0 = phi_a3_2; sp24 = phi_f0_2; func_800225CC(temp_a0, phi_f14, 0x3C23D70A, (bitwise f32) phi_a3_2); } if ((arg0->unkBC & 0x200000) == 0x200000) { arg0 = arg0; sp24 = sp24; func_800225CC(arg0 + 0xE4, 580.0f, 0x3C23D70A, (bitwise f32) arg0); } else { arg0 = arg0; sp24 = sp24; func_800225CC(arg0 + 0xE4, 0.0f, 0x3C23D70A, (bitwise f32) arg0); } phi_a3_3 = arg0; phi_f0_3 = sp24; } arg0 = phi_a3_3; func_800225CC(phi_a3_3 + 0x104, phi_f0_3, (bitwise void *) (*(&gKartTurnSpeedReductionTable1 + (phi_a3_3->unk254 * 4)) + D_800ED9B0), (bitwise f32) phi_a3_3); temp_f0_3 = arg0->unk8C; temp_f12 = arg0->unk80; temp_f2_3 = (temp_f0_3 + arg0->unkE8 + temp_f12 + arg0->unkE4) - arg0->unkA0; phi_f2 = temp_f2_3; if (temp_f2_3 < 0.0f) { phi_f2 = 0.0f; } temp_v0_6 = arg0->unkCA; if (((temp_v0_6 & 2) == 2) || ((temp_v0_6 & 8) == 8) || ((arg0->unk0 & 0x2000) == 0x2000)) { return (1.0f - arg0->unk104) * phi_f2; } temp_a1_3 = arg0->unkBC; if (((temp_a1_3 & 0x80) == 0x80) || ((temp_a1_3 & 0x40) == 0x40) || ((temp_a1_3 & 0x1000000) == 0x1000000) || ((temp_a1_3 & 0x2000000) == 0x2000000)) { return (1.0f - arg0->unk104) * phi_f2; } if (((temp_a1_3 & 0x2000) == 0x2000) || ((temp_a1_3 & 0x100000) == 0x100000) || (temp_a0_2 = arg0, ((temp_a1_3 & 4) == 4))) { temp_f4 = temp_f12 + temp_f0_3; temp_a0_3 = arg0; arg0 = arg0; func_8002FE84(temp_f12, temp_a0_3, temp_f4); return arg0->unk80 + arg0->unk8C; } arg0 = arg0; sp1C = phi_f2; func_8002FE84(temp_f12, temp_a0_2, phi_f2); return (1.0f - arg0->unk104) * phi_f2; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80030150.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 extern f32 D_800ED9B8; extern f32 D_800ED9BC; extern f32 D_800ED9C0; extern f32 D_800ED9C4; extern f32 D_800ED9C8; extern f32 D_800ED9CC; extern f32 D_800ED9D0; extern f32 D_800ED9D4; void func_80030A34(void *arg0) { s16 temp_v0; s16 temp_v0_3; u16 temp_v0_2; void *phi_a1; f32 phi_f0; f32 phi_f2; f32 phi_f12; temp_v0 = arg0->unkCA; phi_a1 = arg0; if (((temp_v0 & 2) != 2) && ((temp_v0 & 8) != 8)) { if ((((arg0->unk94 / 18.0f) * 216.0f) >= 8.0f) && (arg0->unkDC0 < 1.0f)) { temp_v0_2 = arg0->unkF8; if (temp_v0_2 != 1) { if ((temp_v0_2 != 0xE) && (temp_v0_2 != 0x10)) { phi_f0 = D_800ED9C8; phi_f2 = D_800ED9CC; phi_f12 = 0.0f; } else { phi_f0 = D_800ED9C0; phi_f2 = D_800ED9C4; phi_f12 = 0.0f; } } else { arg0 = arg0; phi_a1 = arg0; if (random_int(0xA) != 8) { phi_f0 = D_800ED9B8; phi_f2 = D_800ED9BC; phi_f12 = 0.0f; } else { arg0->unk7A = 0; arg0->unk108 = 0.0f; goto block_16; } } } else { arg0 = arg0; phi_a1 = arg0; if (random_int(0xA) != 8) { phi_f0 = D_800ED9D0; phi_f2 = D_800ED9D4; phi_f12 = 0.0f; } else { arg0->unk7A = 0; arg0->unk108 = 0.0f; block_16: phi_a1 = arg0; phi_f0 = 0.0f; phi_f2 = 0.0f; phi_f12 = 0.0f; } } phi_a1->unk7A = phi_a1->unk7A + 1; temp_v0_3 = phi_a1->unk7A; phi_a1->unk108 = (temp_v0_3 * phi_f0) - (0.5 * phi_f2 * (temp_v0_3 * temp_v0_3)); if ((temp_v0_3 != 0) && (phi_a1->unk108 < phi_f12)) { phi_a1->unk7A = 0; } if (phi_a1->unk108 <= phi_f12) { phi_a1->unk108 = phi_f12; } } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80030A34.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80030C34(s32 arg0) { s32 sp4; s32 *temp_a0; s32 *temp_a1; s32 *temp_a1_2; s32 *temp_a3; s32 *temp_v0; s32 *temp_v0_2; s32 *temp_v0_3; s32 temp_a2; s32 temp_a2_2; s32 temp_t5; s32 phi_v0; s32 phi_a2; if (arg0 == D_800DC4DC) { sp4 = 0; } phi_v0 = sp4; if (arg0 == D_800DC4E0) { phi_v0 = 1; } if (arg0 == D_800DC4E4) { phi_v0 = 2; } if (arg0 == D_800DC4E8) { phi_v0 = 3; } if (arg0 == D_800DC4EC) { phi_v0 = 4; } if (arg0 == D_800DC4F0) { phi_v0 = 5; } if (arg0 == D_800DC4F4) { phi_v0 = 6; } if (arg0 == D_800DC4F8) { phi_v0 = 7; } temp_a0 = &D_80165460[phi_v0]; temp_v0 = &D_80165480[phi_v0]; if (*temp_a0 == 0) { temp_v0_2 = &gPlayerIsThrottleActive[phi_v0]; if (*temp_v0_2 == 1) { temp_a1 = &D_80165420[phi_v0]; temp_a2 = *temp_a1; if ((temp_a2 < 2) || (temp_a2 >= 9)) { D_80165440[phi_v0] = 0; } *temp_a1 = 0; D_80165400[phi_v0] = 0; } temp_a1_2 = &D_80165420[phi_v0]; *temp_v0_2 = 0; temp_a3 = &D_80165440[phi_v0]; temp_a2_2 = *temp_a1_2 + 1; *temp_a1_2 = temp_a2_2; phi_a2 = temp_a2_2; if (temp_a2_2 >= 9) { *temp_a1_2 = 9; phi_a2 = 9; } if ((phi_a2 >= 2) && (phi_a2 < 9)) { temp_v0_3 = &D_80165400[phi_v0]; if (*temp_v0_3 == 0) { *temp_a3 = *temp_a3 + 1; } *temp_v0_3 = 1; } if (*temp_a3 == 5) { *temp_a0 = 1; D_80165480[phi_v0] = 0x78; *temp_a3 = 0; *temp_a1_2 = 0; return; } // Duplicate return node #33. Try simplifying control flow for better match return; } temp_t5 = *temp_v0 - 1; *temp_v0 = temp_t5; if (temp_t5 <= 0) { *temp_a0 = 0; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80030C34.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80030E00(s32 arg0) { s32 sp4; s32 *temp_a0; s32 *temp_a1; s32 *temp_a1_2; s32 *temp_a3; s32 *temp_v0; s32 *temp_v0_2; s32 *temp_v0_3; s32 temp_a2; s32 temp_a2_2; s32 temp_t5; s32 phi_v0; s32 phi_a2; if (arg0 == D_800DC4DC) { sp4 = 0; } phi_v0 = sp4; if (arg0 == D_800DC4E0) { phi_v0 = 1; } if (arg0 == D_800DC4E4) { phi_v0 = 2; } if (arg0 == D_800DC4E8) { phi_v0 = 3; } if (arg0 == D_800DC4EC) { phi_v0 = 4; } if (arg0 == D_800DC4F0) { phi_v0 = 5; } if (arg0 == D_800DC4F4) { phi_v0 = 6; } if (arg0 == D_800DC4F8) { phi_v0 = 7; } temp_a0 = &D_80165460[phi_v0]; temp_v0 = &D_80165480[phi_v0]; if (*temp_a0 == 0) { temp_v0_2 = &gPlayerIsThrottleActive[phi_v0]; temp_a1 = &D_80165420[phi_v0]; if (*temp_v0_2 == 0) { temp_a2 = *temp_a1; if ((temp_a2 < 2) || (temp_a2 >= 9)) { D_80165440[phi_v0] = 0; } *temp_a1 = 0; D_80165400[phi_v0] = 0; } temp_a1_2 = &D_80165420[phi_v0]; *temp_v0_2 = 1; temp_a3 = &D_80165440[phi_v0]; temp_a2_2 = *temp_a1_2 + 1; *temp_a1_2 = temp_a2_2; phi_a2 = temp_a2_2; if (temp_a2_2 >= 9) { *temp_a1_2 = 9; phi_a2 = 9; } if ((phi_a2 >= 2) && (phi_a2 < 9)) { temp_v0_3 = &D_80165400[phi_v0]; if (*temp_v0_3 == 0) { *temp_a3 = *temp_a3 + 1; } *temp_v0_3 = 1; } if (*temp_a3 == 5) { *temp_a0 = 1; D_80165480[phi_v0] = 0x78; *temp_a3 = 0; *temp_a1_2 = 0; return; } // Duplicate return node #33. Try simplifying control flow for better match return; } temp_t5 = *temp_v0 - 1; *temp_v0 = temp_t5; if (temp_t5 <= 0) { *temp_a0 = 0; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80030E00.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s8 func_80027D00(); // extern ? func_8008F104(f32, f64, void *, s8); // extern extern f64 D_800ED9D8; extern f64 D_800ED9E0; extern f64 D_800ED9E8; extern f64 D_800ED9F0; extern f64 D_800ED9F8; extern f64 D_800EDA00; extern f64 D_800EDA08; extern f64 D_800EDA10; extern f64 D_800EDA18; extern f64 D_800EDA20; extern f64 D_800EDA28; extern f64 D_800EDA30; extern f64 D_800EDA38; extern f64 D_800EDA40; extern f64 D_800EDA48; extern f64 D_800EDA50; extern f64 D_800EDA58; extern f64 D_800EDA60; extern f64 D_800EDA68; extern f64 D_800EDA70; extern f64 D_800EDA78; extern f64 D_800EDA80; extern f64 D_800EDA88; extern f64 D_800EDA90; extern f64 D_800EDA98; extern f64 D_800EDAA0; extern f64 D_800EDAA8; extern f64 D_800EDAB0; extern f64 D_800EDAB8; extern f64 D_800EDAC0; extern f64 D_800EDAC8; extern f64 D_800EDAD0; extern f64 D_800EDAD8; extern f64 D_800EDAE0; extern f64 D_800EDAE8; extern f64 D_800EDAF0; extern ? gKartAccelerationTables; extern ? gKartTable800E36B0; void func_80030FC8(void *arg0) { f32 temp_f0_3; f32 temp_f12; f32 temp_f12_10; f32 temp_f12_11; f32 temp_f12_12; f32 temp_f12_13; f32 temp_f12_14; f32 temp_f12_15; f32 temp_f12_16; f32 temp_f12_17; f32 temp_f12_2; f32 temp_f12_3; f32 temp_f12_4; f32 temp_f12_5; f32 temp_f12_6; f32 temp_f12_7; f32 temp_f12_8; f32 temp_f12_9; f64 temp_f0; f64 temp_f0_2; f64 temp_f14; f64 temp_f14_2; f64 temp_f2; f64 temp_f2_2; s32 temp_t0; s32 temp_t0_2; s32 temp_t2; s32 temp_t2_2; s32 temp_t4; s32 temp_t4_2; s32 temp_t6; s32 temp_t6_2; s32 temp_t8; s32 temp_t8_2; s32 temp_v0_2; s8 temp_a1; s8 temp_v0; void *temp_a0; f64 phi_f0; f64 phi_f2; f64 phi_f0_2; f64 phi_f2_2; f64 phi_f0_3; f64 phi_f2_3; f64 phi_f0_4; f64 phi_f2_4; f64 phi_f0_5; f64 phi_f2_5; f64 phi_f0_6; f64 phi_f2_6; f64 phi_f0_7; f64 phi_f2_7; f64 phi_f0_8; f64 phi_f2_8; f64 phi_f0_9; f64 phi_f0_10; f64 phi_f2_9; f64 phi_f0_11; f64 phi_f2_10; f64 phi_f0_12; f64 phi_f2_11; f64 phi_f0_13; f64 phi_f2_12; f64 phi_f0_14; f64 phi_f2_13; f64 phi_f0_15; f64 phi_f2_14; f64 phi_f0_16; f64 phi_f2_15; f64 phi_f0_17; f64 phi_f2_16; f64 phi_f0_18; f32 phi_f12; f32 phi_f12_2; f32 phi_f12_3; f64 phi_f14; temp_v0 = func_80027D00(); temp_a0 = arg0; if (D_80165460[temp_v0] == 0) { temp_f0 = temp_a0->unk9C; phi_f0 = temp_f0; if ((temp_f0 >= 0.0) && (temp_f0 < (temp_a0->unk214 * D_800ED9D8))) { temp_a0->unk9C = temp_f0 + (**(&gKartAccelerationTables + (temp_a0->unk254 * 4)) + (D_800ED9E0 * (temp_a0->unkC4 / 0xB6))); phi_f0 = temp_a0->unk9C; } temp_f14 = D_800ED9E8; temp_f2 = temp_a0->unk214; phi_f2 = temp_f2; phi_f0_2 = phi_f0; phi_f14 = temp_f14; phi_f14 = temp_f14; phi_f12 = temp_a0->unk9C; if (((temp_f2 * D_800ED9F0) <= phi_f0) && (phi_f0 < (temp_f2 * D_800ED9F8))) { temp_a0->unk9C = phi_f0 + ((*(&gKartAccelerationTables + (temp_a0->unk254 * 4)))->unk4 + (temp_f14 * (temp_a0->unkC4 / 0xB6))); temp_f12 = temp_a0->unk9C; phi_f2 = temp_a0->unk214; phi_f0_2 = temp_f12; phi_f12 = temp_f12; } phi_f2_2 = phi_f2; phi_f0_3 = phi_f0_2; if (((phi_f2 * D_800EDA00) <= phi_f0_2) && (phi_f0_2 < (phi_f2 * D_800EDA08))) { temp_a0->unk9C = phi_f0_2 + ((*(&gKartAccelerationTables + (temp_a0->unk254 * 4)))->unk8 + (temp_f14 * (temp_a0->unkC4 / 0xB6))); temp_f12_2 = temp_a0->unk9C; phi_f2_2 = temp_a0->unk214; phi_f0_3 = temp_f12_2; phi_f12 = temp_f12_2; } phi_f2_3 = phi_f2_2; phi_f0_4 = phi_f0_3; if (((phi_f2_2 * D_800EDA10) <= phi_f0_3) && (phi_f0_3 < (phi_f2_2 * D_800EDA18))) { temp_a0->unk9C = phi_f0_3 + ((*(&gKartAccelerationTables + (temp_a0->unk254 * 4)))->unkC + (temp_f14 * (temp_a0->unkC4 / 0xB6))); temp_f12_3 = temp_a0->unk9C; phi_f2_3 = temp_a0->unk214; phi_f0_4 = temp_f12_3; phi_f12 = temp_f12_3; } phi_f2_4 = phi_f2_3; phi_f0_5 = phi_f0_4; if (((phi_f2_3 * D_800EDA20) <= phi_f0_4) && (phi_f0_4 < (phi_f2_3 * 0.5))) { temp_a0->unk9C = phi_f0_4 + ((*(&gKartAccelerationTables + (temp_a0->unk254 * 4)))->unk10 + (temp_f14 * (temp_a0->unkC4 / 0xB6))); temp_f12_4 = temp_a0->unk9C; phi_f2_4 = temp_a0->unk214; phi_f0_5 = temp_f12_4; phi_f12 = temp_f12_4; } phi_f2_5 = phi_f2_4; phi_f0_6 = phi_f0_5; if (((phi_f2_4 * 0.5) <= phi_f0_5) && (phi_f0_5 < (phi_f2_4 * D_800EDA28))) { temp_a0->unk9C = phi_f0_5 + ((*(&gKartAccelerationTables + (temp_a0->unk254 * 4)))->unk14 + (temp_f14 * (temp_a0->unkC4 / 0xB6))); temp_f12_5 = temp_a0->unk9C; phi_f2_5 = temp_a0->unk214; phi_f0_6 = temp_f12_5; phi_f12 = temp_f12_5; } phi_f2_6 = phi_f2_5; phi_f0_7 = phi_f0_6; if (((phi_f2_5 * D_800EDA30) <= phi_f0_6) && (phi_f0_6 < (phi_f2_5 * D_800EDA38))) { temp_a0->unk9C = phi_f0_6 + ((*(&gKartAccelerationTables + (temp_a0->unk254 * 4)))->unk18 + (temp_f14 * (temp_a0->unkC4 / 0xB6))); temp_f12_6 = temp_a0->unk9C; phi_f2_6 = temp_a0->unk214; phi_f0_7 = temp_f12_6; phi_f12 = temp_f12_6; } phi_f2_7 = phi_f2_6; phi_f0_8 = phi_f0_7; if (((phi_f2_6 * D_800EDA40) <= phi_f0_7) && (phi_f0_7 < (phi_f2_6 * D_800EDA48))) { temp_a0->unk9C = phi_f0_7 + ((*(&gKartAccelerationTables + (temp_a0->unk254 * 4)))->unk1C + (temp_f14 * (temp_a0->unkC4 / 0xB6))); temp_f12_7 = temp_a0->unk9C; phi_f2_7 = temp_a0->unk214; phi_f0_8 = temp_f12_7; phi_f12 = temp_f12_7; } phi_f2_8 = phi_f2_7; phi_f0_9 = phi_f0_8; if (((phi_f2_7 * D_800EDA50) <= phi_f0_8) && (phi_f0_8 < (phi_f2_7 * D_800EDA58))) { temp_a0->unk9C = phi_f0_8 + ((*(&gKartAccelerationTables + (temp_a0->unk254 * 4)))->unk20 + (temp_f14 * (temp_a0->unkC4 / 0xB6))); temp_f12_8 = temp_a0->unk9C; phi_f2_8 = temp_a0->unk214; phi_f0_9 = temp_f12_8; phi_f12 = temp_f12_8; } if (((phi_f2_8 * D_800EDA60) <= phi_f0_9) && (phi_f0_9 <= phi_f2_8)) { temp_a0->unk9C = phi_f0_9 + ((*(&gKartAccelerationTables + (temp_a0->unk254 * 4)))->unk24 + (temp_f14 * (temp_a0->unkC4 / 0xB6))); goto block_61; } } else { temp_f0_2 = temp_a0->unk9C; phi_f0_10 = temp_f0_2; if ((temp_f0_2 >= 0.0) && (temp_f0_2 < (temp_a0->unk214 * D_800EDA68))) { temp_t8 = temp_a0->unk254 * 4; temp_a0->unk9C = temp_f0_2 + ((**(&gKartAccelerationTables + temp_t8) + (D_800EDA70 * (temp_a0->unkC4 / 0xB6))) * *(&gKartTable800E36B0 + temp_t8)); phi_f0_10 = temp_a0->unk9C; } temp_f14_2 = D_800EDA78; temp_f2_2 = temp_a0->unk214; phi_f2_9 = temp_f2_2; phi_f0_11 = phi_f0_10; phi_f14 = temp_f14_2; phi_f14 = temp_f14_2; phi_f12 = temp_a0->unk9C; if (((temp_f2_2 * D_800EDA80) <= phi_f0_10) && (phi_f0_10 < (temp_f2_2 * D_800EDA88))) { temp_t4 = temp_a0->unk254 * 4; temp_a0->unk9C = phi_f0_10 + (((*(&gKartAccelerationTables + temp_t4))->unk4 + (temp_f14_2 * (temp_a0->unkC4 / 0xB6))) * *(&gKartTable800E36B0 + temp_t4)); temp_f12_9 = temp_a0->unk9C; phi_f2_9 = temp_a0->unk214; phi_f0_11 = temp_f12_9; phi_f12 = temp_f12_9; } phi_f2_10 = phi_f2_9; phi_f0_12 = phi_f0_11; if (((phi_f2_9 * D_800EDA90) <= phi_f0_11) && (phi_f0_11 < (phi_f2_9 * D_800EDA98))) { temp_t0 = temp_a0->unk254 * 4; temp_a0->unk9C = phi_f0_11 + (((*(&gKartAccelerationTables + temp_t0))->unk8 + (temp_f14_2 * (temp_a0->unkC4 / 0xB6))) * *(&gKartTable800E36B0 + temp_t0)); temp_f12_10 = temp_a0->unk9C; phi_f2_10 = temp_a0->unk214; phi_f0_12 = temp_f12_10; phi_f12 = temp_f12_10; } phi_f2_11 = phi_f2_10; phi_f0_13 = phi_f0_12; if (((phi_f2_10 * D_800EDAA0) <= phi_f0_12) && (phi_f0_12 < (phi_f2_10 * D_800EDAA8))) { temp_t6 = temp_a0->unk254 * 4; temp_a0->unk9C = phi_f0_12 + (((*(&gKartAccelerationTables + temp_t6))->unkC + (temp_f14_2 * (temp_a0->unkC4 / 0xB6))) * *(&gKartTable800E36B0 + temp_t6)); temp_f12_11 = temp_a0->unk9C; phi_f2_11 = temp_a0->unk214; phi_f0_13 = temp_f12_11; phi_f12 = temp_f12_11; } phi_f2_12 = phi_f2_11; phi_f0_14 = phi_f0_13; if (((phi_f2_11 * D_800EDAB0) <= phi_f0_13) && (phi_f0_13 < (phi_f2_11 * 0.5))) { temp_t2 = temp_a0->unk254 * 4; temp_a0->unk9C = phi_f0_13 + (((*(&gKartAccelerationTables + temp_t2))->unk10 + (temp_f14_2 * (temp_a0->unkC4 / 0xB6))) * *(&gKartTable800E36B0 + temp_t2)); temp_f12_12 = temp_a0->unk9C; phi_f2_12 = temp_a0->unk214; phi_f0_14 = temp_f12_12; phi_f12 = temp_f12_12; } phi_f2_13 = phi_f2_12; phi_f0_15 = phi_f0_14; if (((phi_f2_12 * 0.5) <= phi_f0_14) && (phi_f0_14 < (phi_f2_12 * D_800EDAB8))) { temp_t8_2 = temp_a0->unk254 * 4; temp_a0->unk9C = phi_f0_14 + (((*(&gKartAccelerationTables + temp_t8_2))->unk14 + (temp_f14_2 * (temp_a0->unkC4 / 0xB6))) * *(&gKartTable800E36B0 + temp_t8_2)); temp_f12_13 = temp_a0->unk9C; phi_f2_13 = temp_a0->unk214; phi_f0_15 = temp_f12_13; phi_f12 = temp_f12_13; } phi_f2_14 = phi_f2_13; phi_f0_16 = phi_f0_15; if (((phi_f2_13 * D_800EDAC0) <= phi_f0_15) && (phi_f0_15 < (phi_f2_13 * D_800EDAC8))) { temp_t4_2 = temp_a0->unk254 * 4; temp_a0->unk9C = phi_f0_15 + (((*(&gKartAccelerationTables + temp_t4_2))->unk18 + (temp_f14_2 * (temp_a0->unkC4 / 0xB6))) * *(&gKartTable800E36B0 + temp_t4_2)); temp_f12_14 = temp_a0->unk9C; phi_f2_14 = temp_a0->unk214; phi_f0_16 = temp_f12_14; phi_f12 = temp_f12_14; } phi_f2_15 = phi_f2_14; phi_f0_17 = phi_f0_16; if (((phi_f2_14 * D_800EDAD0) <= phi_f0_16) && (phi_f0_16 < (phi_f2_14 * D_800EDAD8))) { temp_t0_2 = temp_a0->unk254 * 4; temp_a0->unk9C = phi_f0_16 + (((*(&gKartAccelerationTables + temp_t0_2))->unk1C + (temp_f14_2 * (temp_a0->unkC4 / 0xB6))) * *(&gKartTable800E36B0 + temp_t0_2)); temp_f12_15 = temp_a0->unk9C; phi_f2_15 = temp_a0->unk214; phi_f0_17 = temp_f12_15; phi_f12 = temp_f12_15; } phi_f2_16 = phi_f2_15; phi_f0_18 = phi_f0_17; if (((phi_f2_15 * D_800EDAE0) <= phi_f0_17) && (phi_f0_17 < (phi_f2_15 * D_800EDAE8))) { temp_t6_2 = temp_a0->unk254 * 4; temp_a0->unk9C = phi_f0_17 + (((*(&gKartAccelerationTables + temp_t6_2))->unk20 + (temp_f14_2 * (temp_a0->unkC4 / 0xB6))) * *(&gKartTable800E36B0 + temp_t6_2)); temp_f12_16 = temp_a0->unk9C; phi_f2_16 = temp_a0->unk214; phi_f0_18 = temp_f12_16; phi_f12 = temp_f12_16; } if (((phi_f2_16 * D_800EDAF0) <= phi_f0_18) && (phi_f0_18 <= phi_f2_16)) { temp_t2_2 = temp_a0->unk254 * 4; temp_a0->unk9C = phi_f0_18 + (((*(&gKartAccelerationTables + temp_t2_2))->unk24 + (temp_f14_2 * (temp_a0->unkC4 / 0xB6))) * *(&gKartTable800E36B0 + temp_t2_2)); block_61: phi_f12 = temp_a0->unk9C; } } temp_a1 = temp_v0; phi_f12_2 = phi_f12; if (phi_f12 < 0.0f) { temp_a0->unk9C = 0.0f; phi_f12_2 = temp_a0->unk9C; } temp_f0_3 = temp_a0->unk214; phi_f12_3 = phi_f12_2; if (temp_f0_3 <= phi_f12_2) { temp_a0->unk9C = temp_f0_3; } temp_v0_2 = temp_a0->unkBC; if (((temp_v0_2 & 8) == 0) || ((temp_v0_2 * 2) < 0)) { temp_f12_17 = temp_a0->unk9C; temp_a0->unk8C = (temp_f12_17 * temp_f12_17) / 25.0f; phi_f12_3 = temp_f12_17; } temp_a0->unk44 = temp_a0->unk44 | 0x20; if ((temp_a0->unkC * 8) < 0) { arg0 = temp_a0; func_8008F104(phi_f12_3, phi_f14, temp_a0, temp_a1); arg0->unkC = arg0->unkC & 0xEFFFFFFF; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80030FC8.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s8 func_80027D00(); // extern ? func_8008F104(void *, s8); // extern extern f64 D_800EDAF8; void func_80031F48(void *arg0, f32 arg1) { f32 temp_f0; f32 temp_f0_2; s8 temp_a1; void *temp_a0; temp_a0 = arg0; temp_a1 = func_80027D00(); temp_a0->unk9C = temp_a0->unk9C - arg1; if (temp_a0->unk9C <= 0.0f) { temp_a0->unk9C = 0.0f; } if (temp_a0->unk94 < D_800EDAF8) { temp_a0->unk8C = 0.0f; } temp_f0 = temp_a0->unk214; if (temp_f0 <= temp_a0->unk9C) { temp_a0->unk9C = temp_f0; } if ((temp_a0->unkBC & 8) != 8) { temp_f0_2 = temp_a0->unk9C; temp_a0->unk8C = (temp_f0_2 * temp_f0_2) / 25.0f; } temp_a0->unk44 = temp_a0->unk44 & 0xFFDF; if ((temp_a0->unkC * 8) < 0) { arg0 = temp_a0; func_8008F104(temp_a0, temp_a1); arg0->unkC = arg0->unkC & 0xEFFFFFFF; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80031F48.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80032050(s32 arg0) { s32 sp4; s32 *temp_a0; s32 *temp_a1; s32 *temp_a1_2; s32 *temp_a3; s32 *temp_v0; s32 *temp_v0_2; s32 *temp_v0_3; s32 temp_a2; s32 temp_a2_2; s32 temp_t5; s32 phi_v0; s32 phi_a2; if (arg0 == D_800DC4DC) { sp4 = 0; } phi_v0 = sp4; if (arg0 == D_800DC4E0) { phi_v0 = 1; } if (arg0 == D_800DC4E4) { phi_v0 = 2; } if (arg0 == D_800DC4E8) { phi_v0 = 3; } if (arg0 == D_800DC4EC) { phi_v0 = 4; } if (arg0 == D_800DC4F0) { phi_v0 = 5; } if (arg0 == D_800DC4F4) { phi_v0 = 6; } if (arg0 == D_800DC4F8) { phi_v0 = 7; } temp_a0 = &D_80165520[phi_v0]; temp_v0 = &D_80165540[phi_v0]; if (*temp_a0 == 0) { temp_v0_2 = &D_801654A0[phi_v0]; if (*temp_v0_2 == 1) { temp_a1 = &D_801654E0[phi_v0]; temp_a2 = *temp_a1; if ((temp_a2 < 2) || (temp_a2 >= 9)) { D_80165500[phi_v0] = 0; } *temp_a1 = 0; D_801654C0[phi_v0] = 0; } temp_a1_2 = &D_801654E0[phi_v0]; *temp_v0_2 = 0; temp_a3 = &D_80165500[phi_v0]; temp_a2_2 = *temp_a1_2 + 1; *temp_a1_2 = temp_a2_2; phi_a2 = temp_a2_2; if (temp_a2_2 >= 9) { *temp_a1_2 = 9; phi_a2 = 9; } if ((phi_a2 >= 2) && (phi_a2 < 9)) { temp_v0_3 = &D_801654C0[phi_v0]; if (*temp_v0_3 == 0) { *temp_a3 = *temp_a3 + 1; } *temp_v0_3 = 1; } if (*temp_a3 == 5) { *temp_a0 = 1; D_80165540[phi_v0] = 0x78; *temp_a3 = 0; *temp_a1_2 = 0; return; } // Duplicate return node #33. Try simplifying control flow for better match return; } temp_t5 = *temp_v0 - 1; *temp_v0 = temp_t5; if (temp_t5 <= 0) { *temp_a0 = 0; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80032050.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_8003221C(s32 arg0) { s32 sp4; s32 *temp_a0; s32 *temp_a1; s32 *temp_a1_2; s32 *temp_a3; s32 *temp_v0; s32 *temp_v0_2; s32 *temp_v0_3; s32 temp_a2; s32 temp_a2_2; s32 temp_t5; s32 phi_v0; s32 phi_a2; if (arg0 == D_800DC4DC) { sp4 = 0; } phi_v0 = sp4; if (arg0 == D_800DC4E0) { phi_v0 = 1; } if (arg0 == D_800DC4E4) { phi_v0 = 2; } if (arg0 == D_800DC4E8) { phi_v0 = 3; } if (arg0 == D_800DC4EC) { phi_v0 = 4; } if (arg0 == D_800DC4F0) { phi_v0 = 5; } if (arg0 == D_800DC4F4) { phi_v0 = 6; } if (arg0 == D_800DC4F8) { phi_v0 = 7; } temp_a0 = &D_80165520[phi_v0]; temp_v0 = &D_80165540[phi_v0]; if (*temp_a0 == 0) { temp_v0_2 = &D_801654A0[phi_v0]; temp_a1 = &D_801654E0[phi_v0]; if (*temp_v0_2 == 0) { temp_a2 = *temp_a1; if ((temp_a2 < 2) || (temp_a2 >= 9)) { D_80165500[phi_v0] = 0; } *temp_a1 = 0; D_801654C0[phi_v0] = 0; } temp_a1_2 = &D_801654E0[phi_v0]; *temp_v0_2 = 1; temp_a3 = &D_80165500[phi_v0]; temp_a2_2 = *temp_a1_2 + 1; *temp_a1_2 = temp_a2_2; phi_a2 = temp_a2_2; if (temp_a2_2 >= 9) { *temp_a1_2 = 9; phi_a2 = 9; } if ((phi_a2 >= 2) && (phi_a2 < 9)) { temp_v0_3 = &D_801654C0[phi_v0]; if (*temp_v0_3 == 0) { *temp_a3 = *temp_a3 + 1; } *temp_v0_3 = 1; } if (*temp_a3 == 5) { *temp_a0 = 1; D_80165540[phi_v0] = 0x78; *temp_a3 = 0; *temp_a1_2 = 0; return; } // Duplicate return node #33. Try simplifying control flow for better match return; } temp_t5 = *temp_v0 - 1; *temp_v0 = temp_t5; if (temp_t5 <= 0) { *temp_a0 = 0; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8003221C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80031F48(f32, f32, f32); // extern extern ? D_800E3210; extern f64 D_800EDB00; extern f64 D_800EDB08; void func_800323E4(void *arg0) { s32 sp24; f32 sp1C; f32 temp_f0; s32 temp_t5; u8 temp_v0; u8 temp_v0_2; s32 phi_v1; f32 phi_f2; f32 phi_f12; f32 phi_f2_2; phi_f2_2 = 0.0f; if (arg0 == D_800DC4DC) { sp24 = 0; } phi_v1 = sp24; if (arg0 == D_800DC4E0) { phi_v1 = 1; } if (arg0 == D_800DC4E4) { phi_v1 = 2; } if (arg0 == D_800DC4E8) { phi_v1 = 3; } if (arg0 == D_800DC4EC) { phi_v1 = 4; } if (arg0 == D_800DC4F0) { phi_v1 = 5; } if (arg0 == D_800DC4F4) { phi_v1 = 6; } if (arg0 == D_800DC4F8) { phi_v1 = 7; } temp_t5 = arg0->unkBC | 1; arg0->unkBC = temp_t5; if ((temp_t5 & 0x20) == 0x20) { func_80031F48(0.0f, 1.0f); arg0->unk20C = 0.0f; return; } temp_v0 = arg0->unk1EC; if (temp_v0 < 0xF) { phi_f2_2 = 0.0f + *(*(&D_800E3210 + (arg0->unk254 * 4)) + (temp_v0 * 4)); } temp_v0_2 = arg0->unk1D4; phi_f2 = phi_f2_2; if (temp_v0_2 < 0xF) { phi_f2 = phi_f2_2 + *(*(&D_800E3210 + (arg0->unk254 * 4)) + (temp_v0_2 * 4)); } if ((arg0->unk22C - arg0->unk94) <= 0.0f) { arg0->unk20C = 0.0f; } else { arg0->unk20C = arg0->unk20C + D_800EDB00; if (arg0->unk20C >= 2.0f) { arg0->unk20C = 2.0f; } } phi_f12 = 2.0f; if (D_80165520[phi_v1] == 1) { if (arg0->unk20C >= 2.0f) { func_80031F48(2.0f, (1.0f - phi_f2) * 5.0f); return; } func_80031F48(2.0f, (1.0f - phi_f2) * 3.0f); return; } if (((arg0->unk94 / 18.0f) * 216.0f) <= 20.0f) { sp1C = phi_f2; func_80031F48(2.0f, (1.0f - phi_f2) * 4.0f); phi_f12 = 2.0f; } temp_f0 = 1.0f - phi_f2; if (phi_f12 <= arg0->unk20C) { func_80031F48(phi_f12, (bitwise f32) arg0, temp_f0 * 2.5); return; } func_80031F48(phi_f12, (bitwise f32) arg0, temp_f0 * D_800EDB08); } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_800323E4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s32 func_80027D00(); // extern extern f64 D_800EDB10; extern f64 D_800EDB18; extern f64 D_800EDB20; extern f64 D_800EDB28; extern f64 D_800EDB30; extern f64 D_800EDB38; extern f64 D_800EDB40; extern f64 D_800EDB48; extern f64 D_800EDB50; extern f64 D_800EDB58; extern f64 D_800EDB60; extern f64 D_800EDB68; extern f64 D_800EDB70; extern f64 D_800EDB78; extern f64 D_800EDB80; extern f64 D_800EDB88; extern f32 D_800EDB90; extern s16 D_801656F0; extern ? gKartAccelerationTables; extern s32 gRaceFrameCounter; void func_80032700(void *arg0) { f32 temp_f0_2; f64 temp_f0; f64 temp_f2; s32 temp_t6; s32 temp_v0; f64 phi_f0; f64 phi_f2; f64 phi_f0_2; f64 phi_f2_2; f64 phi_f0_3; f64 phi_f2_3; f64 phi_f0_4; f64 phi_f2_4; f64 phi_f0_5; f64 phi_f2_5; f64 phi_f0_6; f64 phi_f2_6; f64 phi_f0_7; f64 phi_f2_7; f64 phi_f0_8; f64 phi_f2_8; f64 phi_f0_9; s32 phi_v0; temp_f0 = arg0->unk9C; phi_f0 = temp_f0; if ((temp_f0 >= 0.0) && (temp_f0 < (arg0->unk214 * D_800EDB10))) { arg0->unk9C = temp_f0 + (**(&gKartAccelerationTables + (arg0->unk254 * 4)) * 3.0); phi_f0 = arg0->unk9C; } temp_f2 = arg0->unk214; phi_f2 = temp_f2; phi_f0_2 = phi_f0; if (((temp_f2 * D_800EDB18) <= phi_f0) && (phi_f0 < (temp_f2 * D_800EDB20))) { arg0->unk9C = phi_f0 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk4 * 3.0); phi_f2 = arg0->unk214; phi_f0_2 = arg0->unk9C; } phi_f2_2 = phi_f2; phi_f0_3 = phi_f0_2; if (((phi_f2 * D_800EDB28) <= phi_f0_2) && (phi_f0_2 < (phi_f2 * D_800EDB30))) { arg0->unk9C = phi_f0_2 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk8 * 3.0); phi_f2_2 = arg0->unk214; phi_f0_3 = arg0->unk9C; } phi_f2_3 = phi_f2_2; phi_f0_4 = phi_f0_3; if (((phi_f2_2 * D_800EDB38) <= phi_f0_3) && (phi_f0_3 < (phi_f2_2 * D_800EDB40))) { arg0->unk9C = phi_f0_3 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unkC * 3.0); phi_f2_3 = arg0->unk214; phi_f0_4 = arg0->unk9C; } phi_f2_4 = phi_f2_3; phi_f0_5 = phi_f0_4; if (((phi_f2_3 * D_800EDB48) <= phi_f0_4) && (phi_f0_4 < (phi_f2_3 * 0.5))) { arg0->unk9C = phi_f0_4 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk10 * 3.0); phi_f2_4 = arg0->unk214; phi_f0_5 = arg0->unk9C; } phi_f2_5 = phi_f2_4; phi_f0_6 = phi_f0_5; if (((phi_f2_4 * 0.5) <= phi_f0_5) && (phi_f0_5 < (phi_f2_4 * D_800EDB50))) { arg0->unk9C = phi_f0_5 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk14 * 3.0); phi_f2_5 = arg0->unk214; phi_f0_6 = arg0->unk9C; } phi_f2_6 = phi_f2_5; phi_f0_7 = phi_f0_6; if (((phi_f2_5 * D_800EDB58) <= phi_f0_6) && (phi_f0_6 < (phi_f2_5 * D_800EDB60))) { arg0->unk9C = phi_f0_6 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk18 * 2.5); phi_f2_6 = arg0->unk214; phi_f0_7 = arg0->unk9C; } phi_f2_7 = phi_f2_6; phi_f0_8 = phi_f0_7; if (((phi_f2_6 * D_800EDB68) <= phi_f0_7) && (phi_f0_7 < (phi_f2_6 * D_800EDB70))) { arg0->unk9C = phi_f0_7 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk1C * 2.5); phi_f2_7 = arg0->unk214; phi_f0_8 = arg0->unk9C; } phi_f2_8 = phi_f2_7; phi_f0_9 = phi_f0_8; if (((phi_f2_7 * D_800EDB78) <= phi_f0_8) && (phi_f0_8 < (phi_f2_7 * D_800EDB80))) { arg0->unk9C = phi_f0_8 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk20 * 2.5); phi_f2_8 = arg0->unk214; phi_f0_9 = arg0->unk9C; } if (((phi_f2_8 * D_800EDB88) <= phi_f0_9) && (phi_f0_9 <= phi_f2_8)) { arg0->unk9C = phi_f0_9 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk24 * 2.5); } if (D_801656F0 == 1) { phi_v0 = 8; if (gModeSelection == TIME_TRIALS) { phi_v0 = 0x14; } if (((gRaceFrameCounter - D_801652E0[func_80027D00()]) < phi_v0) && ((arg0->unk44 & 0x20) != 0x20)) { arg0->unkC = arg0->unkC | 0x2000000; } else if ((arg0->unk214 * D_800EDB90) <= arg0->unk9C) { temp_v0 = arg0->unkC; temp_t6 = temp_v0 | 0x10000000; if ((temp_v0 & 0x2000000) != 0x2000000) { arg0->unkC = temp_t6; arg0->unkC = temp_t6 & 0xFDFFFFFF; } } } temp_f0_2 = arg0->unk9C; arg0->unk44 = arg0->unk44 | 0x20; arg0->unk98 = (temp_f0_2 * temp_f0_2) / 25.0f; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80032700.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 extern f64 D_800EDB98; extern f64 D_800EDBA0; void func_80032CB0(void *arg0, f32 arg1) { f32 temp_f2; f32 phi_f0; arg0->unk9C = arg0->unk9C - arg1; if (arg0->unk9C <= 0.0f) { arg0->unk9C = 0.0f; } if (arg0->unk94 < D_800EDB98) { arg0->unk8C = 0.0f; } temp_f2 = arg0->unk214; if (temp_f2 <= arg0->unk9C) { arg0->unk9C = temp_f2; } phi_f0 = arg0->unk9C; if (arg0->unk9C <= (temp_f2 * D_800EDBA0)) { arg0->unkC = arg0->unkC & 0xEFFFFFFF; phi_f0 = arg0->unk9C; } arg0->unkC = arg0->unkC & 0xFDFFFFFF; arg0->unk44 = arg0->unk44 & 0xFFDF; arg0->unk98 = (phi_f0 * phi_f0) / 25.0f; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80032CB0.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80027D00(); // extern extern f64 D_800EDBA8; extern f64 D_800EDBB0; extern f64 D_800EDBB8; extern f64 D_800EDBC0; extern f64 D_800EDBC8; extern f64 D_800EDBD0; extern f64 D_800EDBD8; extern f64 D_800EDBE0; extern f64 D_800EDBE8; extern f64 D_800EDBF0; extern f64 D_800EDBF8; extern f64 D_800EDC00; extern f64 D_800EDC08; extern f64 D_800EDC10; extern f64 D_800EDC18; extern f64 D_800EDC20; extern f64 D_800EDC28; extern f64 D_800EDC30; extern f64 D_800EDC38; extern f64 D_800EDC40; extern ? gKartAccelerationTables; void func_80032D94(void *arg0) { f32 temp_f12; f32 temp_f12_2; f32 temp_f12_3; f32 temp_f12_4; f32 temp_f12_5; f32 temp_f12_6; f32 temp_f12_7; f32 temp_f12_8; f64 temp_f0; f64 temp_f14; f64 temp_f14_2; f64 temp_f2; f64 phi_f0; f64 phi_f2; f64 phi_f0_2; f64 phi_f2_2; f64 phi_f0_3; f64 phi_f2_3; f64 phi_f0_4; f64 phi_f2_4; f64 phi_f0_5; f64 phi_f2_5; f64 phi_f0_6; f64 phi_f2_6; f64 phi_f0_7; f64 phi_f2_7; f64 phi_f0_8; f64 phi_f2_8; f64 phi_f0_9; f32 phi_f12; f32 phi_f12_2; func_80027D00(); temp_f0 = arg0->unk9C; phi_f0 = temp_f0; if ((temp_f0 >= 0.0) && (temp_f0 < (arg0->unk214 * D_800EDBA8))) { arg0->unk9C = temp_f0 + (**(&gKartAccelerationTables + (arg0->unk254 * 4)) * D_800EDBB0); phi_f0 = arg0->unk9C; } temp_f14 = D_800EDBB8; temp_f2 = arg0->unk214; phi_f2 = temp_f2; phi_f0_2 = phi_f0; phi_f12 = arg0->unk9C; if (((temp_f2 * D_800EDBC0) <= phi_f0) && (phi_f0 < (temp_f2 * D_800EDBC8))) { arg0->unk9C = phi_f0 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk4 * temp_f14); temp_f12 = arg0->unk9C; phi_f2 = arg0->unk214; phi_f0_2 = temp_f12; phi_f12 = temp_f12; } phi_f2_2 = phi_f2; phi_f0_3 = phi_f0_2; if (((phi_f2 * D_800EDBD0) <= phi_f0_2) && (phi_f0_2 < (phi_f2 * D_800EDBD8))) { arg0->unk9C = phi_f0_2 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk8 * temp_f14); temp_f12_2 = arg0->unk9C; phi_f2_2 = arg0->unk214; phi_f0_3 = temp_f12_2; phi_f12 = temp_f12_2; } phi_f2_3 = phi_f2_2; phi_f0_4 = phi_f0_3; if (((phi_f2_2 * D_800EDBE0) <= phi_f0_3) && (phi_f0_3 < (phi_f2_2 * D_800EDBE8))) { arg0->unk9C = phi_f0_3 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unkC * temp_f14); temp_f12_3 = arg0->unk9C; phi_f2_3 = arg0->unk214; phi_f0_4 = temp_f12_3; phi_f12 = temp_f12_3; } phi_f2_4 = phi_f2_3; phi_f0_5 = phi_f0_4; if (((phi_f2_3 * D_800EDBF0) <= phi_f0_4) && (phi_f0_4 < (phi_f2_3 * 0.5))) { arg0->unk9C = phi_f0_4 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk10 * temp_f14); temp_f12_4 = arg0->unk9C; phi_f2_4 = arg0->unk214; phi_f0_5 = temp_f12_4; phi_f12 = temp_f12_4; } phi_f2_5 = phi_f2_4; phi_f0_6 = phi_f0_5; if (((phi_f2_4 * 0.5) <= phi_f0_5) && (phi_f0_5 < (phi_f2_4 * D_800EDBF8))) { arg0->unk9C = phi_f0_5 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk14 * temp_f14); temp_f12_5 = arg0->unk9C; phi_f2_5 = arg0->unk214; phi_f0_6 = temp_f12_5; phi_f12 = temp_f12_5; } phi_f2_6 = phi_f2_5; phi_f0_7 = phi_f0_6; if (((phi_f2_5 * D_800EDC00) <= phi_f0_6) && (phi_f0_6 < (phi_f2_5 * D_800EDC08))) { arg0->unk9C = phi_f0_6 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk18 * temp_f14); temp_f12_6 = arg0->unk9C; phi_f2_6 = arg0->unk214; phi_f0_7 = temp_f12_6; phi_f12 = temp_f12_6; } phi_f2_7 = phi_f2_6; phi_f0_8 = phi_f0_7; if (((phi_f2_6 * D_800EDC10) <= phi_f0_7) && (phi_f0_7 < (phi_f2_6 * D_800EDC18))) { arg0->unk9C = phi_f0_7 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk1C * D_800EDC20); temp_f12_7 = arg0->unk9C; phi_f2_7 = arg0->unk214; phi_f0_8 = temp_f12_7; phi_f12 = temp_f12_7; } temp_f14_2 = D_800EDC28; phi_f2_8 = phi_f2_7; phi_f0_9 = phi_f0_8; if (((phi_f2_7 * D_800EDC30) <= phi_f0_8) && (phi_f0_8 < (phi_f2_7 * D_800EDC38))) { arg0->unk9C = phi_f0_8 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk20 * temp_f14_2); temp_f12_8 = arg0->unk9C; phi_f2_8 = arg0->unk214; phi_f0_9 = temp_f12_8; phi_f12 = temp_f12_8; } if (((phi_f2_8 * D_800EDC40) <= phi_f0_9) && (phi_f0_9 <= phi_f2_8)) { arg0->unk9C = phi_f0_9 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk24 * temp_f14_2); phi_f12 = arg0->unk9C; } phi_f12_2 = phi_f12; if (phi_f12 < 0.0f) { arg0->unk9C = 0.0f; phi_f12_2 = arg0->unk9C; } arg0->unk98 = (phi_f12_2 * phi_f12_2) / 25.0f; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80032D94.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80033280(void *arg0, f32 arg1) { f32 temp_f2; f32 phi_f0; arg0->unk9C = arg0->unk9C - arg1; if (arg0->unk9C <= 0.0f) { arg0->unk9C = 0.0f; } temp_f2 = arg0->unk214; phi_f0 = arg0->unk9C; if (temp_f2 <= arg0->unk9C) { arg0->unk9C = temp_f2; phi_f0 = arg0->unk9C; } arg0->unk98 = (phi_f0 * phi_f0) / 25.0f; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80033280.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 extern f64 D_800EDC48; extern f64 D_800EDC50; extern f64 D_800EDC58; extern f64 D_800EDC60; extern f64 D_800EDC68; extern f64 D_800EDC70; extern f64 D_800EDC78; extern f64 D_800EDC80; extern f64 D_800EDC88; extern f64 D_800EDC90; extern f64 D_800EDC98; extern f64 D_800EDCA0; extern f64 D_800EDCA8; extern f64 D_800EDCB0; extern f64 D_800EDCB8; extern f64 D_800EDCC0; extern f64 D_800EDCC8; extern f64 D_800EDCD0; extern f64 D_800EDCD8; extern f64 D_800EDCE0; extern ? gKartAccelerationTables; void func_800332E8(void *arg0, s32 arg1) { f32 *temp_v0; f64 temp_f0; f64 temp_f12; f64 temp_f12_2; f64 temp_f2; f64 phi_f0; f64 phi_f2; f64 phi_f0_2; f64 phi_f2_2; f64 phi_f0_3; f64 phi_f2_3; f64 phi_f0_4; f64 phi_f2_4; f64 phi_f0_5; f64 phi_f2_5; f64 phi_f0_6; f64 phi_f2_6; f64 phi_f0_7; f64 phi_f2_7; f64 phi_f0_8; f64 phi_f2_8; f64 phi_f0_9; temp_v0 = &D_80165280[arg1]; temp_f0 = *temp_v0; phi_f0 = temp_f0; if ((temp_f0 >= 0.0) && (temp_f0 < (arg0->unk214 * D_800EDC48))) { *temp_v0 = temp_f0 + (**(&gKartAccelerationTables + (arg0->unk254 * 4)) * D_800EDC50); phi_f0 = *temp_v0; } temp_f12 = D_800EDC58; temp_f2 = arg0->unk214; phi_f2 = temp_f2; phi_f0_2 = phi_f0; if (((temp_f2 * D_800EDC60) <= phi_f0) && (phi_f0 < (temp_f2 * D_800EDC68))) { *temp_v0 = phi_f0 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk4 * temp_f12); phi_f2 = arg0->unk214; phi_f0_2 = *temp_v0; } phi_f2_2 = phi_f2; phi_f0_3 = phi_f0_2; if (((phi_f2 * D_800EDC70) <= phi_f0_2) && (phi_f0_2 < (phi_f2 * D_800EDC78))) { *temp_v0 = phi_f0_2 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk8 * temp_f12); phi_f2_2 = arg0->unk214; phi_f0_3 = *temp_v0; } phi_f2_3 = phi_f2_2; phi_f0_4 = phi_f0_3; if (((phi_f2_2 * D_800EDC80) <= phi_f0_3) && (phi_f0_3 < (phi_f2_2 * D_800EDC88))) { *temp_v0 = phi_f0_3 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unkC * temp_f12); phi_f2_3 = arg0->unk214; phi_f0_4 = *temp_v0; } phi_f2_4 = phi_f2_3; phi_f0_5 = phi_f0_4; if (((phi_f2_3 * D_800EDC90) <= phi_f0_4) && (phi_f0_4 < (phi_f2_3 * 0.5))) { *temp_v0 = phi_f0_4 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk10 * temp_f12); phi_f2_4 = arg0->unk214; phi_f0_5 = *temp_v0; } phi_f2_5 = phi_f2_4; phi_f0_6 = phi_f0_5; if (((phi_f2_4 * 0.5) <= phi_f0_5) && (phi_f0_5 < (phi_f2_4 * D_800EDC98))) { *temp_v0 = phi_f0_5 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk14 * temp_f12); phi_f2_5 = arg0->unk214; phi_f0_6 = *temp_v0; } phi_f2_6 = phi_f2_5; phi_f0_7 = phi_f0_6; if (((phi_f2_5 * D_800EDCA0) <= phi_f0_6) && (phi_f0_6 < (phi_f2_5 * D_800EDCA8))) { *temp_v0 = phi_f0_6 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk18 * temp_f12); phi_f2_6 = arg0->unk214; phi_f0_7 = *temp_v0; } phi_f2_7 = phi_f2_6; phi_f0_8 = phi_f0_7; if (((phi_f2_6 * D_800EDCB0) <= phi_f0_7) && (phi_f0_7 < (phi_f2_6 * D_800EDCB8))) { *temp_v0 = phi_f0_7 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk1C * D_800EDCC0); phi_f2_7 = arg0->unk214; phi_f0_8 = *temp_v0; } temp_f12_2 = D_800EDCC8; phi_f2_8 = phi_f2_7; phi_f0_9 = phi_f0_8; if (((phi_f2_7 * D_800EDCD0) <= phi_f0_8) && (phi_f0_8 < (phi_f2_7 * D_800EDCD8))) { *temp_v0 = phi_f0_8 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk20 * temp_f12_2); phi_f2_8 = arg0->unk214; phi_f0_9 = *temp_v0; } if (((phi_f2_8 * D_800EDCE0) <= phi_f0_9) && (phi_f0_9 <= phi_f2_8)) { *temp_v0 = phi_f0_9 + ((*(&gKartAccelerationTables + (arg0->unk254 * 4)))->unk24 * temp_f12_2); } arg0->unk44 = arg0->unk44 | 0x20; if (*temp_v0 < 0.0f) { *temp_v0 = 0.0f; } arg0->unk98 = (*temp_v0 * *temp_v0) / 25.0f; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_800332E8.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_800337CC(void *arg0, f32 arg1, s32 arg2) { f32 *temp_v0; f32 temp_f2; f32 phi_f0; arg0->unk44 = arg0->unk44 & 0xFFDF; temp_v0 = &D_80165280[arg2]; *temp_v0 = *temp_v0 - arg1; if (*temp_v0 <= 0.0f) { *temp_v0 = 0.0f; } temp_f2 = arg0->unk214; phi_f0 = *temp_v0; if (temp_f2 <= *temp_v0) { *temp_v0 = temp_f2; phi_f0 = *temp_v0; } arg0->unk98 = (phi_f0 * phi_f0) / 25.0f; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_800337CC.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80033850(void *arg0, f32 arg1) { arg0->unk90 = arg0->unk90 + arg1; if (arg0->unk90 >= 0.0f) { arg0->unk90 = 0.0f; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80033850.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80033884(void *arg0, s32 *arg1, s32 *arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) { s32 temp_at; s32 temp_v0; s32 temp_v0_3; u32 temp_t8; u32 temp_v0_2; u32 temp_v1; s32 phi_v1; s32 phi_v1_2; temp_v0 = *arg1; if ((temp_v0 >= arg4) || (-arg4 >= temp_v0)) { temp_v1 = arg0->unk200; temp_t8 = temp_v1 - 0x800; temp_at = temp_t8 < 0xF0000000; temp_v0_2 = temp_v1; arg0->unk200 = temp_t8; phi_v1 = temp_t8; if (temp_at == 0) { arg0->unk200 = temp_v0_2; phi_v1 = temp_v0_2; } phi_v1_2 = phi_v1; if (arg5 >= phi_v1) { arg0->unk200 = arg5; phi_v1_2 = arg5; } temp_v0_3 = *arg2; if (arg3 < temp_v0_3) { *arg2 = temp_v0_3 - phi_v1_2; } else { *arg2 = temp_v0_3 + phi_v1_2; } if (arg0->unk90 < arg6) { arg0->unk90 = -arg6; } } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80033884.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80033850(s32); // extern void func_80033A40(void *arg0, s32 *arg1, s32 *arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) { s32 temp_at; s32 temp_v0; s32 temp_v1_2; u32 temp_t8; u32 temp_v0_2; u32 temp_v1; s32 phi_v0; s32 phi_v0_2; temp_v0 = *arg1; if ((temp_v0 >= arg4) || (-arg4 >= temp_v0)) { temp_v0_2 = arg0->unk200; temp_t8 = temp_v0_2 - 0x800; temp_at = temp_t8 < 0xF0000000; temp_v1 = temp_v0_2; arg0->unk200 = temp_t8; phi_v0 = temp_t8; if (temp_at == 0) { arg0->unk200 = temp_v1; phi_v0 = temp_v1; } phi_v0_2 = phi_v0; if (arg5 >= phi_v0) { arg0->unk200 = arg5; phi_v0_2 = arg5; } temp_v1_2 = *arg2; if (arg3 < temp_v1_2) { *arg2 = temp_v1_2 - phi_v0_2; } else { *arg2 = temp_v1_2 + phi_v0_2; } func_80033850(arg6); } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80033A40.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_8002A8A4(f32, f32, void *, s8); // extern ? func_8002BD58(void *, s32); // extern ? func_80033884(void *, s32 *, s32 *, s32, s32, s32, s32); // extern ? func_80033A40(void *, s32 *, s32 *, s32, s32, s32, f32); // extern ? func_80036CB4(void *); // extern s32 func_80038534(void *); // extern extern ? D_800E3410; extern ? D_800E3610; extern s32 D_800E3DF8; extern f64 D_800EDCE8; extern f64 D_800EDCF0; extern f32 D_800EDCF8; extern f32 D_800EDCFC; extern f32 D_800EDD00; extern f32 D_800EDD04; extern f32 D_800EDD08; extern f32 D_800EDD0C; extern f32 D_800EDD10; extern f32 D_800EDD14; extern f32 D_800EDD18; extern f32 D_800EDD1C; extern f32 D_800EDD20; extern f32 D_800EDD24; extern f32 D_800EDD28; extern f32 D_800EDD2C; extern f32 D_800EDD30; extern f32 D_800EDD34; extern f32 D_800EDD38; extern f32 D_800EDD3C; extern f32 D_800EDD40; extern f32 D_800EDD44; extern f32 D_800EDD48; extern f32 D_800EDD4C; extern f32 D_800EDD50; extern f32 D_800EDD54; extern f32 D_800EDD58; extern f32 D_800EDD5C; extern f64 D_800EDD60; extern f64 D_800EDD68; extern f64 D_800EDD70; extern f64 D_800EDD78; extern f64 D_800EDD80; extern ? gKartHandlingTable; extern ? gKartTable800E3650; void func_80033AE0(void *arg0, void *arg1, s8 arg2) { s32 sp2E4; s32 sp2E0; s32 sp2D0; s32 sp2CC; s32 sp2C8; f32 sp2C4; f32 sp2C0; f32 sp2BC; ? sp44; s32 sp40; s32 sp3C; s32 sp38; ? *temp_t6; f32 temp_f0; f32 temp_f0_2; f32 temp_f0_3; f32 temp_f0_5; f32 temp_f0_7; f32 temp_f0_8; f32 temp_f0_9; f64 temp_f0_4; f64 temp_f0_6; s16 temp_v1_3; s16 temp_v1_6; s32 *temp_t7; s32 *temp_v0; s32 *temp_v0_2; s32 temp_f6; s32 temp_f8; s32 temp_lo; s32 temp_lo_10; s32 temp_lo_11; s32 temp_lo_12; s32 temp_lo_13; s32 temp_lo_14; s32 temp_lo_15; s32 temp_lo_16; s32 temp_lo_17; s32 temp_lo_2; s32 temp_lo_3; s32 temp_lo_4; s32 temp_lo_5; s32 temp_lo_6; s32 temp_lo_7; s32 temp_lo_8; s32 temp_lo_9; s32 temp_t2; s32 temp_t3; s32 temp_t3_2; s32 temp_t4; s32 temp_t4_2; s32 temp_t5; s32 temp_t5_2; s32 temp_t7_2; s32 temp_t9; s32 temp_v0_10; s32 temp_v0_3; s32 temp_v0_7; s32 temp_v1; s32 temp_v1_2; s32 temp_v1_4; s32 temp_v1_5; s32 temp_v1_7; s32 temp_v1_8; u16 temp_v0_6; u8 temp_v0_4; u8 temp_v0_5; u8 temp_v0_8; u8 temp_v0_9; s32 *phi_t7; ? *phi_t6; s32 phi_t1; s32 phi_a0; f32 phi_f2; s32 phi_s1; s32 phi_t0; s32 phi_v1; f32 phi_f2_2; f32 phi_f2_3; f32 phi_f12; f32 phi_f0; f32 phi_f0_2; s16 phi_s1_2; f32 phi_f0_3; f32 phi_f0_4; s16 phi_s1_3; s16 phi_t4; f32 phi_f2_4; s32 phi_t0_2; s32 phi_t0_3; s32 phi_v1_2; s32 phi_v1_3; f32 phi_f0_5; f32 phi_f2_5; f32 phi_f12_2; sp2C0 = 0.0f; phi_t7 = &D_800E3DF8; phi_t6 = &sp44; do { temp_t7 = phi_t7 + 0xC; temp_t6 = phi_t6 + 0xC; temp_t6->unk-C = *phi_t7; temp_t6->unk-8 = temp_t7->unk-8; temp_t6->unk-4 = temp_t7->unk-4; phi_t7 = temp_t7; phi_t6 = temp_t6; } while (temp_t7 != (&D_800E3DF8 + 0x270)); temp_v1 = arg0->unkBC; if ((((temp_v1 & 2) != 2) && (((temp_lo = arg0->unkC0 / 0xB6, ((temp_lo < 7) != 0)) && (temp_lo >= -6)) || ((arg1->unk4 & 0x10) != 0x10))) || (((arg0->unk94 / 18.0f) * 216.0f) <= 20.0f) || ((temp_v1 & 0x8000) == 0x8000)) { sp2BC = 0.0f; func_80036CB4(arg0); } temp_lo_2 = arg0->unkC0 / 0xB6; if (temp_lo_2 < -5) { arg0->unk44 = arg0->unk44 | 4; arg0->unk44 = arg0->unk44 & 0xFFFD; temp_v0 = &D_801652C0[arg2]; *temp_v0 = *temp_v0 + 1; phi_s1 = arg2 * 4; } else if (temp_lo_2 >= 6) { arg0->unk44 = arg0->unk44 | 2; arg0->unk44 = arg0->unk44 & 0xFFFB; temp_v0_2 = &D_801652C0[arg2]; *temp_v0_2 = *temp_v0_2 + 1; phi_s1 = arg2 * 4; } else { arg0->unk44 = arg0->unk44 & 0xFFF9; D_801652C0[arg2] = 0; phi_s1 = arg2 * 4; } temp_v1_2 = arg0->unkBC; if (((temp_v1_2 & 2) == 2) || ((temp_v1_2 & 0x10) == 0x10)) { arg0->unk44 = arg0->unk44 & 0xFFF9; } sp2BC = 0.0f; sp2E4 = arg0->unk7C; temp_v0_3 = func_80038534(arg1); temp_v1_3 = arg0->unk44; phi_t1 = temp_v0_3; phi_f2_4 = 0.0f; if (((temp_v1_3 & 1) == 1) || ((temp_v1_3 & 8) == 8)) { phi_t1 = -temp_v0_3; } temp_t3 = (phi_t1 << 0x10) & 0xFFFF0000; arg0->unk7C = temp_t3; temp_t5 = sp2E4 - temp_t3; sp2D0 = temp_t5; temp_t9 = temp_t5 >> 0x10; sp2D0 = temp_t9; arg0->unkFA = temp_t9; if (((sp2D0 >= 0x5A) || (sp2D0 < -0x59)) && ((arg0->unk44 & 0x4000) == 0)) { temp_v1_4 = arg0->unkBC; if (((temp_v1_4 & 0x10) == 0) && (gCCSelection == CC_150) && (gModeSelection != BATTLE) && ((temp_v1_4 & 8) == 0) && (((arg0->unk94 / 18.0f) * 216.0f) >= 40.0f) && (arg0->unk204 == 0)) { arg0->unkC = arg0->unkC | 0x80; } } temp_v0_4 = arg0->unk1EC; temp_v1_5 = arg0->unkBC; if (temp_v0_4 < 0xF) { phi_f2_4 = 0.0f + *(*(&D_800E3610 + (arg0->unk254 * 4)) + (temp_v0_4 * 4)); } temp_v0_5 = arg0->unk1D4; phi_f2 = phi_f2_4; if (temp_v0_5 < 0xF) { phi_f2 = phi_f2_4 + *(*(&D_800E3610 + (arg0->unk254 * 4)) + (temp_v0_5 * 4)); } if ((temp_v1_5 & 0x20) == 0x20) { phi_t0_2 = 0xA; phi_v1_2 = 0xA; } else { phi_a0 = 0; phi_t0_2 = 8; if (((temp_v1_5 & 0x10) == 0x10) && ((temp_v1_5 & 2) != 2)) { phi_a0 = 3; } phi_v1_2 = 8; if (((arg0->unk94 / 18.0f) * 216.0f) >= 15.0f) { temp_v1_6 = arg0->unk44; if ((temp_v1_6 & 2) == 2) { if ((sp2D0 < 0x24) && (sp2D0 >= 0)) { temp_f8 = (*(&gKartTable800E3650 + (arg0->unk254 * 4)) + 1.0f) * ((phi_a0 + 0xF) * (1.0f + phi_f2)); sp2C8 = temp_f8; sp2CC = temp_f8; } else { temp_f0 = 1.0f + phi_f2; sp2C8 = (phi_a0 + 5) * temp_f0; sp2CC = (phi_a0 + 9) * temp_f0; } } else if ((temp_v1_6 & 4) == 4) { if ((sp2D0 >= -0x23) && (sp2D0 <= 0)) { temp_f6 = (*(&gKartTable800E3650 + (arg0->unk254 * 4)) + 1.0f) * ((phi_a0 + 0xF) * (1.0f + phi_f2)); sp2C8 = temp_f6; sp2CC = temp_f6; } else { temp_f0_2 = 1.0f + phi_f2; sp2C8 = (phi_a0 + 5) * temp_f0_2; sp2CC = (phi_a0 + 9) * temp_f0_2; } } else { temp_f0_3 = 1.0f + phi_f2; sp2C8 = (phi_a0 + 3) * temp_f0_3; sp2CC = (phi_a0 + 6) * temp_f0_3; } phi_t0_2 = sp2CC; phi_v1_2 = sp2C8; } else { sp2C8 = 8; sp2CC = 8; } } temp_v0_6 = arg0->unkDE; phi_t0_3 = phi_t0_2; phi_v1_3 = phi_v1_2; if ((temp_v0_6 & 1) == 1) { phi_t0 = phi_t0_2 * 1.5; phi_v1 = phi_v1_2 * 1.5; } else { if ((temp_v0_6 & 2) == 2) { temp_f0_4 = D_800EDCE8; phi_t0_3 = phi_t0_2 * temp_f0_4; phi_v1_3 = phi_v1_2 * temp_f0_4; } temp_f0_5 = *(D_801652A0 + phi_s1); phi_t0 = phi_t0_3; phi_v1 = phi_v1_3; if (((temp_f0_5 - arg0->unk1D8) >= 3.5) || ((temp_f0_5 - arg0->unk1F0) >= 3.5)) { temp_f0_6 = D_800EDCF0; phi_t0 = phi_t0_3 * temp_f0_6; phi_v1 = phi_v1_3 * temp_f0_6; } } sp2E0 = phi_t1; sp2CC = phi_t0; sp2C8 = phi_v1; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x5A, 0x78000 / phi_v1, 0x1C2); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x59, 0x76000 / sp2C8, 0x1B8); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x58, 0x74000 / sp2C8, 0x1AE); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x57, 0x72000 / sp2C8, 0x1A4); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x56, 0x70000 / sp2C8, 0x19A); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x55, 0x58000 / sp2C8, 0x190); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x54, 0x56000 / sp2C8, 0x18B); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x53, 0x50000 / sp2C8, 0x186); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x52, 0x4F000 / sp2C8, 0x186); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x51, 0x4E000 / sp2C8, 0x17C); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x50, 0x4D000 / sp2C8, 0x172); temp_lo_3 = 0x4C000 / sp2C8; sp40 = temp_lo_3; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x4F, temp_lo_3, 0x168); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x4E, temp_lo_3, 0x168); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x4D, 0x4B000 / sp2C8, 0x15E); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x4C, 0x4A000 / sp2C8, 0x154); temp_lo_4 = 0x49000 / sp2C8; sp40 = temp_lo_4; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x4B, temp_lo_4, 0x14A); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x4A, sp40, 0x14A); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x49, sp40, 0x14A); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x48, 0x48000 / sp2C8, 0x140); temp_lo_5 = 0x47000 / sp2C8; sp40 = temp_lo_5; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x47, temp_lo_5, 0x13B); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x46, temp_lo_5, 0x13B); temp_lo_6 = 0x46000 / sp2C8; sp40 = temp_lo_6; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x45, temp_lo_6, 0x131); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x44, sp40, 0x131); temp_lo_7 = 0x45000 / sp2C8; sp3C = temp_lo_7; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x43, temp_lo_7, 0x118); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x42, sp40, 0x10E); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x41, sp3C, 0x10E); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x40, 0x44000 / sp2C8, 0x104); temp_lo_8 = 0x43000 / sp2C8; sp40 = temp_lo_8; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x3F, temp_lo_8, 0xFA); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x3E, sp40, 0xFA); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x3D, sp40, 0xFA); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x3C, 0x3D000 / sp2C8, 0xF5); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x3B, 0x3C000 / sp2C8, 0xF5); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x3A, 0x3B000 / sp2C8, 0xF5); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x39, 0x3A000 / sp2C8, 0xF5); temp_lo_9 = 0x38000 / sp2C8; sp40 = temp_lo_9; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x38, temp_lo_9, 0xF5); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x37, sp40, 0xE6); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x36, sp40, 0xE6); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x35, sp40, 0xE6); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x34, sp40, 0xE6); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x33, sp40, 0xE6); temp_lo_10 = 0x32000 / sp2C8; sp40 = temp_lo_10; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x32, temp_lo_10, 0xDC); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x31, sp40, 0xDC); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x30, sp40, 0xDC); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x2F, sp40, 0xDC); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x2E, sp40, 0xDC); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x2D, 0x30000 / sp2C8, 0x6E); temp_lo_11 = 0x2E000 / sp2C8; sp40 = temp_lo_11; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x2C, temp_lo_11, 0x6E); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x2B, sp40, 0x6E); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x2A, sp40, 0x6E); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x29, sp40, 0x6E); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x28, sp40, 0x6E); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x27, 0x2C000 / sp2C8, 0x6E); temp_lo_12 = 0x28000 / sp2C8; sp40 = temp_lo_12; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x26, temp_lo_12, 0x6E); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x25, temp_lo_12, 0x6E); temp_lo_13 = 0x24000 / sp2C8; sp40 = temp_lo_13; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x24, temp_lo_13, 0x6E); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x23, temp_lo_13, 0x6E); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x22, 0x22000 / sp2C8, 0x6E); temp_lo_14 = 0x20000 / sp2C8; sp40 = temp_lo_14; func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x20, temp_lo_14, 0x64); func_80033884(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x1F, temp_lo_14, 0x64); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x1E, 0x1F000 / sp2CC, D_800EDCF8); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x1D, 0x1E000 / sp2CC, D_800EDCFC); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x1C, 0x1D000 / sp2CC, D_800EDD00); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x1B, 0x1C000 / sp2CC, D_800EDD04); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x1A, 0x1B000 / sp2CC, D_800EDD08); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x19, 0x1A000 / sp2CC, 1.0f); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x18, 0x19000 / sp2CC, 1.0f); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x17, 0x18000 / sp2CC, 1.0f); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x16, 0x17000 / sp2CC, 1.0f); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x15, 0x16000 / sp2CC, 1.0f); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x14, 0x15000 / sp2CC, D_800EDD0C); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x13, 0x14000 / sp2CC, D_800EDD10); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x12, 0x13000 / sp2CC, D_800EDD14); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x11, 0x12000 / sp2CC, D_800EDD18); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0x10, 0x11000 / sp2CC, D_800EDD1C); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0xF, 0x10000 / sp2CC, D_800EDD20); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0xE, 0xF000 / sp2CC, D_800EDD24); temp_lo_15 = 0xE000 / sp2CC; sp40 = temp_lo_15; func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0xD, temp_lo_15, D_800EDD28); temp_lo_16 = 0xD000 / sp2CC; sp3C = temp_lo_16; func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0xC, temp_lo_16, D_800EDD2C); temp_lo_17 = 0xC000 / sp2CC; sp38 = temp_lo_17; func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0xB, temp_lo_17, D_800EDD30); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0xA, sp40, D_800EDD34); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 9, sp3C, D_800EDD38); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 8, sp38, D_800EDD3C); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 7, 0xB000 / sp2CC, D_800EDD40); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 6, 0xA000 / sp2CC, D_800EDD44); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 5, 0x9000 / sp2CC, D_800EDD48); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 4, 0x8000 / sp2CC, D_800EDD4C); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 3, 0x7000 / sp2CC, D_800EDD50); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 2, 0x6000 / sp2CC, D_800EDD54); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 1, 0x5000 / sp2CC, D_800EDD58); func_80033A40(arg0, &sp2D0, &sp2E4, arg0->unk7C, 0, 0 / sp2CC, D_800EDD5C); temp_v1_7 = arg0->unkBC; temp_v0_7 = temp_v1_7 & 0x10; if (temp_v0_7 == 0x10) { phi_f2_2 = (sp2E4 >> 0x10) / 8; phi_f0_5 = (arg0->unk94 / 18.0f) * 216.0f; } else { temp_f0_7 = (arg0->unk94 / 18.0f) * 216.0f; phi_f0_5 = temp_f0_7; if (temp_f0_7 <= 25.0f) { phi_f2_2 = (sp2E4 >> 0x10) / 0xC; } else { phi_f2_2 = (sp2E4 >> 0x10) / (8.0f + (arg0->unk9C / 50.0f)); } } phi_f2_5 = phi_f2_2; if (phi_f2_2 < 0.0f) { phi_f2_5 = -phi_f2_2; } if ((temp_v1_7 & 0x20) == 0x20) { phi_f2_3 = (sp + (phi_f0_5 * 4))->unk6C * 1.5f * phi_f2_5; } else if (temp_v0_7 == 0x10) { phi_f2_3 = (sp + (phi_f0_5 * 4))->unk44 * phi_f2_5; } else { phi_f2_3 = (sp + (phi_f0_5 * 4))->unk44 * 1.5f * phi_f2_5; } arg0->unk7C = sp2E4; if (arg0->unk10C != 0) { sp2C4 = phi_f2_3; func_8002BD58(arg0, 0x10); } temp_v0_8 = arg0->unk1EC; arg0->unkBC = arg0->unkBC & 0xDFFFFFFF; if (temp_v0_8 >= 0xF) { phi_f12_2 = sp2C0; } else { phi_f12_2 = 0.0f + *(*(&D_800E3410 + (arg0->unk254 * 4)) + (temp_v0_8 * 4)); } temp_v0_9 = arg0->unk1D4; phi_f12 = phi_f12_2; if (temp_v0_9 < 0xF) { phi_f12 = phi_f12_2 + *(*(&D_800E3410 + (arg0->unk254 * 4)) + (temp_v0_9 * 4)); } temp_v1_8 = arg0->unkBC; temp_v0_10 = temp_v1_8 & 2; if ((temp_v0_10 != 2) && ((temp_v1_8 & 0x10) != 0x10)) { if ((temp_v1_8 & 0x20) == 0x20) { arg0->unk78 = ((arg0->unk7C >> 0x10) * 5) * phi_f2_3; } else { if ((temp_v1_8 & 1) != 1) { temp_t3_2 = arg0->unk7C >> 0x10; temp_t4 = arg0->unk254 * 4; if ((temp_t3_2 >= 0x2D) || (temp_t3_2 < -0x2C)) { arg0->unk78 = (*(&gKartHandlingTable + temp_t4) + D_800EDD60) * (temp_t3_2 * (phi_f2_3 + (phi_f2_3 * phi_f12))); } else { arg0->unk78 = *(&gKartHandlingTable + temp_t4) * (temp_t3_2 * (phi_f2_3 + (phi_f2_3 * phi_f12))); } } else { temp_f0_8 = (arg0->unk94 / 18.0f) * 216.0f; phi_f0 = temp_f0_8; if ((temp_f0_8 >= 0.0f) && (temp_f0_8 < 8.0f)) { arg0->unk78 = (arg0->unk7C >> 0x10) * (phi_f2_3 + (phi_f2_3 * phi_f12)); phi_f0 = (arg0->unk94 / 18.0f) * 216.0f; } phi_f0_2 = phi_f0; if ((phi_f0 >= 8.0f) && (phi_f0 < 65.0f)) { arg0->unk78 = (arg0->unk7C >> 0x10) * (phi_f2_3 + 1.5 + (phi_f2_3 * phi_f12)); phi_f0_2 = (arg0->unk94 / 18.0f) * 216.0f; } if (phi_f0_2 >= 65.0f) { arg0->unk78 = (arg0->unk7C >> 0x10) * (phi_f2_3 + D_800EDD68 + (phi_f2_3 * phi_f12)); } } arg0->unk228 = 0; if (arg0->unk22A < 2) { arg0->unk22A = 0; } } } else if (((temp_v1_8 & 8) != 8) && (temp_v0_10 != 2)) { if ((arg0->unkC0 / 0xB6) > 0) { temp_t5_2 = arg0->unk7C >> 0x10; phi_s1_2 = (((temp_t5_2 * 0xD) + 0x2B1) / 0x6A) + 0x28; if (temp_t5_2 < -0x27) { temp_t2 = temp_v1_8 | 0x20000000; arg0->unkBC = temp_t2; if (temp_t5_2 < -0x31) { arg0->unkBC = temp_t2 | 0x20000000; } } sp2C4 = phi_f2_3; sp2C0 = phi_f12; func_8002A8A4(phi_f12, 0.0f, arg0, arg2); } else { temp_t7_2 = arg0->unk7C >> 0x10; phi_s1_2 = (((temp_t7_2 * 0xD) + 0x2B1) / 0x6A) - 0x35; if (temp_t7_2 >= 0x28) { temp_t4_2 = temp_v1_8 | 0x20000000; arg0->unkBC = temp_t4_2; if (temp_t7_2 < -0x31) { arg0->unkBC = temp_t4_2 | 0x20000000; } } sp2C4 = phi_f2_3; sp2C0 = phi_f12; func_8002A8A4(phi_f12, 0.0f, arg0, arg2); } temp_f0_9 = (arg0->unk94 / 18.0f) * 216.0f; phi_f0_3 = temp_f0_9; if ((temp_f0_9 >= 0.0f) && (temp_f0_9 < 8.0f)) { arg0->unk78 = phi_s1_2 * (sp2C4 + 2.0f + (sp2C4 * sp2C0)); phi_f0_3 = (arg0->unk94 / 18.0f) * 216.0f; } phi_f0_4 = phi_f0_3; if ((phi_f0_3 >= 8.0f) && (phi_f0_3 < 65.0f)) { arg0->unk78 = phi_s1_2 * (sp2C4 + 3.0f + (sp2C4 * sp2C0)); phi_f0_4 = (arg0->unk94 / 18.0f) * 216.0f; } if (phi_f0_4 >= 65.0f) { arg0->unk78 = phi_s1_2 * (sp2C4 + 3.5 + (sp2C4 * sp2C0)); } if ((arg0->unkBC & 0x20000000) == 0x20000000) { arg0->unk78 = arg0->unk78 * D_800EDD70; } else { phi_t4 = arg0->unk78 * D_800EDD78; goto block_125; } } else { phi_s1_3 = arg0->unk7C >> 0x10; if (sp2E0 == 0) { phi_s1_3 = 0; } if (((arg0->unk94 / 18.0f) * 216.0f) <= 5.0f) { arg0->unk78 = phi_s1_3 * (phi_f2_3 + 6.0f); } else { phi_t4 = phi_s1_3 * (phi_f2_3 + 1.5f); block_125: arg0->unk78 = phi_t4; } } if (gModeSelection == BATTLE) { arg0->unk78 = arg0->unk78 * D_800EDD80; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80033AE0.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80022598(f32, s32 *, s16, ?, void *); // extern ? func_80036CB4(f32, void *, s32); // extern extern s32 D_800E4068; extern ? D_800E4308; extern f64 D_800EDD88; void func_8003680C(void *arg0, s16 arg1) { s32 sp304; ? sp44; ? sp24; ? *temp_t1; s16 temp_v1_2; s32 *temp_a0; s32 *temp_t6; s32 temp_t4; s32 temp_t8; s32 temp_v0; s32 temp_v0_2; s32 temp_v0_3; s32 temp_v1; void *temp_a3; s32 *phi_t6; ? *phi_t1; f32 phi_f0; f32 phi_f0_2; s16 phi_v0; s16 phi_v0_2; f32 phi_f0_3; temp_a3 = arg0; sp304 = 0; phi_t6 = &D_800E4068; phi_t1 = &sp44; do { temp_t6 = phi_t6 + 0xC; temp_t1 = phi_t1 + 0xC; temp_t1->unk-C = *phi_t6; temp_t1->unk-8 = temp_t6->unk-8; temp_t1->unk-4 = temp_t6->unk-4; phi_t6 = temp_t6; phi_t1 = temp_t1; } while (temp_t6 != (&D_800E4068 + 0x2A0)); sp24.unk0 = D_800E4308.unk0; sp24.unk4 = D_800E4308.unk4; sp24.unkC = D_800E4308.unkC; sp24.unk8 = D_800E4308.unk8; sp24.unk10 = D_800E4308.unk10; sp24.unk14 = D_800E4308.unk14; sp24.unk1C = D_800E4308.unk1C; sp24.unk18 = D_800E4308.unk18; temp_v0 = temp_a3->unkBC; if (((temp_v0 & 0x80) == 0) && ((temp_v0 & 0x40) == 0) && ((temp_v0 & 0x400) == 0) && ((temp_v0 << 0xF) >= 0) && ((temp_v0 << 0xE) >= 0) && ((temp_v0 << 7) >= 0) && ((temp_v0 << 6) >= 0) && ((temp_v0 << 5) >= 0)) { temp_t8 = temp_v0 & 0xDFFFFFFF; if (!(((temp_a3->unk94 / 18.0f) * 216.0f) >= 110.0f)) { temp_a3->unkBC = temp_t8; temp_a3->unk228 = 0; if ((temp_t8 & 0x80) == 0) { temp_a0 = &sp304; if ((temp_t8 & 0x40) == 0) { sp304 = temp_a3->unk7C >> 0x10; arg0 = temp_a3; func_80022598(216.0f, temp_a0, arg1, 0x3EB33333, temp_a3); temp_t4 = sp304 << 0x10; sp304 = temp_t4; temp_v0_2 = arg0->unkBC; temp_v1 = temp_v0_2 & 0x10; if (temp_v1 == 0x10) { phi_f0 = (temp_t4 >> 0x10) / 5; } else { phi_f0 = (sp304 >> 0x10) / (8.0f + (arg0->unk9C / 50.0f)); } phi_f0_3 = phi_f0; if (phi_f0 < 0.0f) { phi_f0_3 = -phi_f0; } if (temp_v1 == 0x10) { phi_f0_2 = *(&sp44 + (((arg0->unk94 / 18.0f) * 216.0f) * 4)) * phi_f0_3; } else { phi_f0_2 = (sp + (arg0->unk254 * 4))->unk24 * *(&sp44 + (((arg0->unk94 / 18.0f) * 216.0f) * 4)) * phi_f0_3; } arg0->unk7C = sp304; if (((temp_v0_2 & 2) != 2) && (temp_v1 != 0x10)) { if ((temp_v0_2 & 1) != 1) { arg0->unk78 = (sp304 >> 0x10) * phi_f0_2; } else { arg0->unk78 = (arg0->unk7C >> 0x10) * (phi_f0_2 + 1.5); } } else if ((temp_v0_2 & 8) != 8) { if ((arg0->unkC0 / 0xB6) > 0) { phi_v0 = arg0->unk7C >> 0x10; } else { phi_v0 = arg0->unk7C >> 0x10; } arg0->unk78 = phi_v0 * (phi_f0_2 + 3.0); arg0->unk78 = arg0->unk78 * D_800EDD88; } else { phi_v0_2 = arg0->unk7C >> 0x10; if (arg1 == 0) { phi_v0_2 = 0; } arg0->unk78 = phi_v0_2 * phi_f0_2; } temp_v0_3 = arg0->unkBC; if ((((temp_v0_3 & 2) != 2) && (temp_v1_2 = arg0->unkC0, ((temp_v1_2 < 0x3D) != 0)) && (temp_v1_2 >= -0x3C)) || (((arg0->unk94 / 18.0f) * 216.0f) <= 20.0f) || ((temp_v0_3 & 0x8000) == 0x8000)) { func_80036CB4(216.0f, arg0, 2); } } } } } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8003680C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80036C5C(void *arg0) { if (((arg0->unk94 / 18.0f) * 216.0f) > 20.0f) { arg0->unk204 = 0; arg0->unkBC = arg0->unkBC | 0x10; arg0->unkB6 = arg0->unkB6 | 0x800; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80036C5C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80036CB4(void *arg0) { s32 temp_lo; s32 temp_v0; s32 temp_v0_2; s32 temp_v1; s32 phi_v0; s32 phi_v1; s32 phi_v0_2; temp_v0 = arg0->unkBC; temp_v1 = temp_v0 & 0x10; phi_v1 = temp_v1; phi_v0_2 = temp_v0; if ((temp_v1 == 0x10) && ((arg0->unk0 & 0x4000) == 0x4000)) { temp_lo = arg0->unkC0 / 0xB6; phi_v0 = temp_lo; if (temp_lo > 0) { arg0->unk7C = (((((arg0->unk7C >> 0x10) * 0xD) + 0x2B1) / 0x6A) + 0x28) << 0x10; phi_v0 = arg0->unkC0 / 0xB6; } if (phi_v0 < 0) { arg0->unk7C = (((((arg0->unk7C >> 0x10) * 0xD) + 0x2B1) / 0x6A) - 0x35) << 0x10; } temp_v0_2 = arg0->unkBC & ~0x10; arg0->unkBC = temp_v0_2; phi_v1 = temp_v0_2 & 0x10; phi_v0_2 = temp_v0_2; } if ((phi_v1 == 0x10) && ((arg0->unk0 & 0x4000) != 0x4000)) { arg0->unkBC = phi_v0_2 & ~0x10; } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80036CB4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_802B63B8(f32, f32, void *, void *, void *); // extern extern f64 D_800EDD90; extern f64 D_800EDD98; extern f64 D_800EDDA0; extern f64 D_800EDDA8; extern f64 D_800EDDB0; extern f64 D_800EDDB8; extern f64 D_800EDDC0; void func_80036DB4(void *arg0, void *arg1, void *arg2) { f32 sp20; f32 temp_f0; f32 temp_f0_2; f32 temp_f0_3; f32 temp_f12; f32 temp_f12_2; f32 temp_f12_3; f32 temp_f14; f32 temp_f14_2; f32 temp_f14_3; f32 temp_f14_4; f32 temp_f14_5; f32 temp_f2; f32 temp_f2_2; f32 temp_f2_3; f32 temp_f2_4; f32 temp_f2_5; s16 temp_v0; s32 temp_a0; s32 temp_t0; s32 temp_t6; s32 phi_v0; f32 phi_f18; f32 phi_f12; f32 phi_f14; f32 phi_f0; f32 phi_f2; f64 phi_f10; temp_t0 = arg0->unkBC; if (((temp_t0 & 0x1000) == 0x1000) || ((temp_t0 & 0x20) == 0x20)) { arg1->unk0 = 0.0f; arg1->unk4 = 0.0f; arg1->unk8 = 0.0f; func_802B63B8((bitwise f32) arg1, (bitwise f32) (arg0 + 0x174), arg0); } else { temp_a0 = temp_t0 & 0x10; if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) { temp_f12 = arg0->unk94; temp_f0 = arg0->unk208; temp_f14 = -arg0->unk20C; temp_f2 = -(temp_f12 / 18.0f) * 216.0f; sp20 = arg0->unk84 * 3.0f; phi_f12 = temp_f12; phi_f14 = temp_f14; phi_f18 = temp_f0 + (temp_f2 * 3.0f) + (temp_f14 * 10.0f); phi_f0 = temp_f0; phi_f2 = temp_f2; } else if (((temp_t0 & 0x800) == 0) && ((arg0->unk44 & 0x4000) == 0)) { temp_v0 = arg0->unkFA; phi_v0 = temp_v0; if (temp_v0 > 0) { phi_v0 = temp_v0 * -1; } temp_t6 = arg0->unk7C >> 0x10; if ((temp_t6 < 0x15) && (temp_t6 >= -0x14)) { if (phi_v0 < 0x14) { temp_f14_2 = -arg0->unk20C; temp_f2_2 = -(arg0->unk94 / 18.0f) * 216.0f; phi_f14 = temp_f14_2; phi_f10 = (arg0->unk208 + (temp_f2_2 / 3.0f)) + (-arg0->unk9C * D_800EDD90) + (temp_f14_2 * 50.0f); phi_f2 = temp_f2_2; goto block_16; } temp_f12_2 = arg0->unk94; temp_f0_2 = arg0->unk208; temp_f14_3 = -arg0->unk20C; temp_f2_3 = -(temp_f12_2 / 18.0f) * 216.0f; phi_f12 = temp_f12_2; phi_f14 = temp_f14_3; phi_f18 = (temp_f0_2 + (temp_f2_3 / 3.0f)) + ((temp_t6 * D_800EDD98) + (-arg0->unk9C * D_800EDDA0)) + (temp_f14_3 * 50.0f); phi_f0 = temp_f0_2; phi_f2 = temp_f2_3; } else { temp_f14_4 = -arg0->unk20C; temp_f2_4 = -(arg0->unk94 / 18.0f) * 216.0f; phi_f14 = temp_f14_4; phi_f10 = (arg0->unk208 + (temp_f2_4 / 3.0f)) + ((temp_t6 * D_800EDDA8) + (-arg0->unk9C * D_800EDDB0)) + (temp_f14_4 * 50.0f); phi_f2 = temp_f2_4; block_16: phi_f12 = arg0->unk94; phi_f18 = phi_f10; phi_f0 = arg0->unk208; } sp20 = arg0->unk84; } else { temp_f12_3 = arg0->unk94; temp_f0_3 = arg0->unk208; temp_f14_5 = -arg0->unk20C; temp_f2_5 = -(temp_f12_3 / 18.0f) * 216.0f; sp20 = arg0->unk84; phi_f12 = temp_f12_3; phi_f14 = temp_f14_5; phi_f18 = temp_f0_3 + (temp_f2_5 * 1.5) + (((arg0->unk7C >> 0x10) * D_800EDDB8) + (-arg0->unk9C * D_800EDDC0)) + (temp_f14_5 * 50.0f); phi_f0 = temp_f0_3; phi_f2 = temp_f2_5; } if ((temp_t0 & 0x200) == 0x200) { if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) { sp20 = arg0->unk84 * 3.0f; phi_f18 = phi_f0 + (phi_f2 * 3.0f) + (phi_f14 * 10.0f); } else { sp20 = arg0->unk84; phi_f18 = phi_f0 + (phi_f2 / 3.0f); } } arg1->unk4 = 0.0f; arg1->unk0 = (arg0->unk90 + phi_f18) * phi_f12; arg1->unk8 = arg0->unk94 * sp20; func_802B63B8(phi_f12, phi_f14, arg1, arg0 + 0x174, arg0); } arg2->unk0 = arg1->unk0; arg2->unk4 = arg1->unk4; arg2->unk8 = arg1->unk8; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80036DB4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_802B63B8(f32, f32, void *, void *, void *); // extern extern f64 D_800EDDC8; extern f64 D_800EDDD0; extern f64 D_800EDDD8; extern f64 D_800EDDE0; extern f64 D_800EDDE8; extern f64 D_800EDDF0; extern f64 D_800EDDF8; void func_800371F4(void *arg0, void *arg1, void *arg2) { f32 sp20; f32 temp_f0; f32 temp_f0_2; f32 temp_f12; f32 temp_f12_2; f32 temp_f14; f32 temp_f14_2; f32 temp_f14_3; f32 temp_f14_4; f32 temp_f14_5; f32 temp_f2; f32 temp_f2_2; f32 temp_f2_3; f32 temp_f2_4; f32 temp_f2_5; s16 temp_v0; s32 temp_a0; s32 temp_t0; s32 temp_t6; s32 phi_v0; f32 phi_f18; f32 phi_f12; f32 phi_f14; f32 phi_f0; f32 phi_f2; temp_t0 = arg0->unkBC; if (((temp_t0 & 0x1000) == 0x1000) || ((temp_t0 & 0x20) == 0x20)) { arg1->unk0 = 0.0f; arg1->unk4 = 0.0f; arg1->unk8 = 0.0f; func_802B63B8((bitwise f32) arg1, (bitwise f32) (arg0 + 0x174), arg0); } else { temp_a0 = temp_t0 & 0x10; if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) { temp_f12 = arg0->unk94; temp_f0 = arg0->unk208; temp_f2 = -(temp_f12 / 18.0f) * 216.0f; temp_f14 = -arg0->unk20C * 50.0f; sp20 = arg0->unk84 * 3.0f; phi_f12 = temp_f12; phi_f14 = temp_f14; phi_f18 = temp_f0 + (temp_f2 * 3.0f) + temp_f14; phi_f0 = temp_f0; phi_f2 = temp_f2; } else if (((temp_t0 & 0x800) == 0) && ((arg0->unk44 & 0x4000) == 0)) { temp_v0 = arg0->unkFA; phi_v0 = temp_v0; if (temp_v0 > 0) { phi_v0 = temp_v0 * -1; } temp_t6 = arg0->unk7C >> 0x10; if ((temp_t6 < 0x15) && (temp_t6 >= -0x14)) { if (phi_v0 < 0x14) { temp_f2_2 = -(arg0->unk94 / 18.0f) * 216.0f; temp_f14_2 = -arg0->unk20C * 50.0f; phi_f14 = temp_f14_2; phi_f18 = (arg0->unk208 + (temp_f2_2 / 3.0f)) + (-arg0->unk9C * D_800EDDC8) + temp_f14_2; phi_f2 = temp_f2_2; } else { temp_f2_3 = -(arg0->unk94 / 18.0f) * 216.0f; temp_f14_3 = -arg0->unk20C * 50.0f; phi_f14 = temp_f14_3; phi_f18 = ((arg0->unk208 + (temp_f2_3 / 3.0f)) - ((temp_t6 * D_800EDDD0) + (arg0->unk9C * D_800EDDD8))) + temp_f14_3; phi_f2 = temp_f2_3; } } else { temp_f2_4 = -(arg0->unk94 / 18.0f) * 216.0f; temp_f14_4 = -arg0->unk20C * 50.0f; phi_f14 = temp_f14_4; phi_f18 = ((arg0->unk208 + (temp_f2_4 / 3.0f)) - ((temp_t6 * D_800EDDE0) + (arg0->unk9C * D_800EDDE8))) + temp_f14_4; phi_f2 = temp_f2_4; } sp20 = arg0->unk84; phi_f12 = arg0->unk94; phi_f0 = arg0->unk208; } else { temp_f12_2 = arg0->unk94; temp_f0_2 = arg0->unk208; temp_f2_5 = -(temp_f12_2 / 18.0f) * 216.0f; temp_f14_5 = -arg0->unk20C * 50.0f; sp20 = arg0->unk84; phi_f12 = temp_f12_2; phi_f14 = temp_f14_5; phi_f18 = ((temp_f0_2 + (temp_f2_5 * 1.5)) - (((arg0->unk7C >> 0x10) * D_800EDDF0) + (arg0->unk9C * D_800EDDF8))) + temp_f14_5; phi_f0 = temp_f0_2; phi_f2 = temp_f2_5; } if ((temp_t0 & 0x200) == 0x200) { if ((temp_a0 == 0x10) && ((temp_t0 & 2) != 2)) { sp20 = arg0->unk84 * 3.0f; phi_f18 = phi_f0 + (phi_f2 * 3.0f) + phi_f14; } else { sp20 = arg0->unk84; phi_f18 = phi_f0 + (phi_f2 / 3.0f); } } arg1->unk4 = 0.0f; arg1->unk0 = -(arg0->unk90 + phi_f18) * phi_f12; arg1->unk8 = arg0->unk94 * sp20; func_802B63B8(phi_f12, phi_f14, arg1, arg0 + 0x174, arg0); } arg2->unk0 = arg1->unk0; arg2->unk4 = arg1->unk4; arg2->unk8 = arg1->unk8; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_800371F4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_802B63B8(f32, void *, void *, void *, void *); // extern void func_80037614(void *arg0, void *arg1, void *arg2) { s32 temp_v0; void *temp_a0; void *temp_a3; f32 phi_f2; f32 phi_f12; temp_v0 = arg0->unkBC; temp_a3 = arg1; if (((temp_v0 & 0x1000) == 0x1000) || ((temp_v0 & 0x20) == 0x20)) { temp_a3->unk0 = 0.0f; temp_a3->unk4 = 0.0f; temp_a3->unk8 = 0.0f; arg1 = temp_a3; func_802B63B8(0.0f, temp_a3, arg0 + 0x174, temp_a3); } else { if (((temp_v0 & 0x10) == 0x10) && ((temp_v0 & 2) != 2)) { phi_f2 = (-(arg0->unk94 / 18.0f) * 216.0f * 2.0f) + -80.0f; phi_f12 = -80.0f; } else { phi_f2 = ((-(arg0->unk94 / 18.0f) * 216.0f) / 2.0f) + -20.0f; phi_f12 = -40.0f; } temp_a0 = temp_a3; temp_a3->unk4 = NULL; temp_a3->unk0 = (phi_f2 + 28.0f) * arg0->unk94; temp_a3->unk8 = arg0->unk94 * phi_f12; arg1 = temp_a3; func_802B63B8(phi_f12, NULL, temp_a0, arg0 + 0x174, temp_a3); } *arg2 = arg1->unk0; arg2->unk4 = arg1->unk4; arg2->unk8 = arg1->unk8; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80037614.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_802B63B8(f32, void *, void *, void *, void *); // extern void func_8003777C(void *arg0, void *arg1, void *arg2) { s32 temp_v0; void *temp_a0; void *temp_a3; f32 phi_f2; f32 phi_f12; temp_v0 = arg0->unkBC; temp_a3 = arg1; if (((temp_v0 & 0x1000) == 0x1000) || ((temp_v0 & 0x20) == 0x20)) { temp_a3->unk0 = 0.0f; temp_a3->unk4 = 0.0f; temp_a3->unk8 = 0.0f; arg1 = temp_a3; func_802B63B8(0.0f, temp_a3, arg0 + 0x174, temp_a3); } else { if (((temp_v0 & 0x10) == 0x10) && ((temp_v0 & 2) != 2)) { phi_f2 = (-(arg0->unk94 / 18.0f) * 216.0f * 2.0f) + -80.0f; phi_f12 = -80.0f; } else { phi_f2 = ((-(arg0->unk94 / 18.0f) * 216.0f) / 2.0f) + -20.0f; phi_f12 = -40.0f; } temp_a0 = temp_a3; temp_a3->unk4 = NULL; temp_a3->unk0 = -(phi_f2 + 28.0f) * arg0->unk94; temp_a3->unk8 = arg0->unk94 * phi_f12; arg1 = temp_a3; func_802B63B8(phi_f12, NULL, temp_a0, arg0 + 0x174, temp_a3); } *arg2 = arg1->unk0; arg2->unk4 = arg1->unk4; arg2->unk8 = arg1->unk8; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_8003777C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_802B63B8(f32, void *, void *, void *, void *); // extern void func_800378E8(void *arg0, void *arg1, void *arg2) { s32 temp_v0; f32 phi_f2; f32 phi_f12; temp_v0 = arg0->unkBC; if ((temp_v0 & 0x20) == 0x20) { arg1->unk0 = 0.0f; arg1->unk4 = 0.0f; arg1->unk8 = 0.0f; func_802B63B8(0.0f, arg1, arg0 + 0x174, arg0); } else { if ((temp_v0 & 0x10) == 0x10) { phi_f2 = arg0->unk208 + (-(arg0->unk94 / 18.0f) * 216.0f * 5.0f) + (-arg0->unk20C * 10.0f); phi_f12 = -100.0f; } else { phi_f2 = arg0->unk208 + ((-(arg0->unk94 / 18.0f) * 216.0f) / 40.0f) + (-arg0->unk20C * 50.0f); phi_f12 = arg0->unk84; } arg1->unk4 = 0.0f; arg1->unk0 = (arg0->unk90 + phi_f2) * arg0->unk94; arg1->unk8 = arg0->unk94 * phi_f12; func_802B63B8(phi_f12, (bitwise void *) 0.0f, arg1, arg0 + 0x174, arg0); } arg2->unk0 = arg1->unk0; arg2->unk4 = arg1->unk4; arg2->unk8 = arg1->unk8; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_800378E8.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_802B63B8(f32, void *, void *, void *, void *); // extern void func_80037A4C(void *arg0, void *arg1, void *arg2) { s32 temp_v0; f32 phi_f2; f32 phi_f12; temp_v0 = arg0->unkBC; if ((temp_v0 & 0x20) == 0x20) { arg1->unk0 = 0.0f; arg1->unk4 = 0.0f; arg1->unk8 = 0.0f; func_802B63B8(0.0f, arg1, arg0 + 0x174, arg0); } else { if ((temp_v0 & 0x10) == 0x10) { phi_f2 = arg0->unk208 + (-(arg0->unk94 / 18.0f) * 216.0f * 5.0f) + (-arg0->unk20C * 50.0f); phi_f12 = -100.0f; } else { phi_f2 = arg0->unk208 + ((-(arg0->unk94 / 18.0f) * 216.0f) / 40.0f) + (-arg0->unk20C * 50.0f); phi_f12 = arg0->unk84; } arg1->unk4 = 0.0f; arg1->unk0 = -(arg0->unk90 + phi_f2) * arg0->unk94; arg1->unk8 = arg0->unk94 * phi_f12; func_802B63B8(phi_f12, (bitwise void *) 0.0f, arg1, arg0 + 0x174, arg0); } arg2->unk0 = arg1->unk0; arg2->unk4 = arg1->unk4; arg2->unk8 = arg1->unk8; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80037A4C.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80036DB4(? *, void *); // extern ? func_800371F4(? *, void *); // extern ? func_80037614(? *, void *); // extern ? func_8003777C(? *, void *); // extern ? func_800378E8(? *, void *); // extern ? func_80037A4C(? *, void *); // extern void func_80037BB4(void *arg0, void *arg1) { ? sp20; s16 temp_v0; temp_v0 = arg0->unk78; if (temp_v0 == 0) { arg1->unk0 = 0.0f; arg1->unk4 = 0.0f; arg1->unk8 = 0.0f; return; } if (temp_v0 < 0) { if (((arg0->unkBC & 0x20000000) != 0x20000000) || (arg0->unk228 >= 0x64)) { arg0->unk2E = arg0->unk2E + temp_v0; } if ((arg0->unk0 & 0x1000) == 0) { if (gModeSelection == BATTLE) { func_800378E8(&sp20, arg1); return; } func_80036DB4(&sp20, arg1); return; } func_80037614(&sp20, arg1); return; } if (((arg0->unkBC & 0x20000000) != 0x20000000) || (arg0->unk228 >= 0x64)) { arg0->unk2E = arg0->unk2E + temp_v0; } if ((arg0->unk0 & 0x1000) == 0) { if (gModeSelection == BATTLE) { func_80037A4C(&sp20, arg1); return; } func_800371F4(&sp20, arg1); return; } func_8003777C(&sp20, arg1); } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80037BB4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_8002AA50(void *, s32, s32); // extern ? func_80030C34(void *); // extern ? func_80030E00(void *); // extern ? func_80030FC8(void *, s32, s32); // extern ? func_80031F48(void *, ?, s32, s32); // extern ? func_80032050(void *); // extern ? func_8003221C(void *); // extern ? func_800323E4(void *); // extern ? func_800332E8(void *, s8); // extern ? func_800337CC(void *, ?, s8); // extern ? func_80033AE0(void *, void *, s8); // extern s32 func_800388B0(void *); // extern ? func_800C9060(u8, ?); // extern void func_80037CFC(void *arg0, void *arg1, u8 arg2) { s16 temp_v0_5; s32 temp_t0; s32 temp_t4; s32 temp_v0; s32 temp_v0_3; s32 temp_v0_4; s32 temp_v1; u16 temp_v0_2; u16 temp_v1_2; u16 temp_v1_3; s32 phi_v0; s32 phi_v1; s32 phi_v0_2; s32 phi_a2; s32 phi_a3; temp_v0 = arg0->unkBC; temp_v1 = temp_v0 & 0x80; phi_v1 = temp_v1; phi_v0_2 = temp_v0; if ((temp_v1 != 0x80) && ((temp_v0 & 0x40) != 0x40) && ((temp_v0 & 0x400) != 0x400) && ((temp_v0 & 0x4000) != 0x4000) && ((temp_v0 & 0x1000000) != 0x1000000) && ((temp_v0 & 0x2000000) != 0x2000000) && ((temp_v0 & 0x10000) != 0x10000) && ((temp_v0 & 0x20000) != 0x20000)) { if (((temp_v0 & 0x4000000) != 0x4000000) && ((temp_v0 & 8) != 8) && ((temp_v0 & 2) != 2) && ((temp_v0 & 0x10) != 0x10) && ((arg1->unk6 & 0x10) != 0)) { func_8002AA50(arg0, 0x1000000, 0x2000000); temp_v0_2 = arg0->unk0; if (((temp_v0_2 & 0x4000) == 0x4000) && ((temp_v0_2 & 0x100) != 0x100)) { func_800C9060(arg2, 0x19008000); } } temp_v0_3 = arg0->unkBC; if ((temp_v0_3 & 8) != 8) { func_80033AE0(arg0, arg1, arg2); goto block_21; } if (((temp_v0_3 & 2) == 2) && (arg0->unk124 <= 5.0f)) { func_80033AE0(arg0, arg1, arg2); block_21: } temp_t4 = arg0->unkBC & ~1; arg0->unkBC = temp_t4; phi_v0 = temp_t4; if (((temp_t4 << 0xB) >= 0) && ((temp_t4 & 4) == 0)) { if (((arg0->unk94 / 18.0f) * 216.0f) <= 12.0f) { temp_v1_2 = arg1->unk4; if ((temp_v1_2 & 0x8000) != 0) { temp_t0 = temp_t4 | 0x20; if ((temp_v1_2 & 0x4000) != 0) { arg0->unkBC = temp_t0; phi_v0 = temp_t0; if ((temp_t0 & 0x20) != 0x20) { arg0->unk9C = arg0->unk9C + 100.0f; phi_v0 = temp_t0; } } } } if (((phi_v0 & 0x20) == 0x20) && ((temp_v1_3 = arg1->unk4, ((temp_v1_3 & 0x4000) == 0)) || ((temp_v1_3 & 0x8000) == 0))) { arg0->unkBC = phi_v0 & ~0x20; } } if ((arg0->unk44 & 1) != 1) { if ((arg1->unk4 & 0x8000) != 0) { func_80030FC8(arg0); func_80030E00(arg0); } else { if (gModeSelection == BATTLE) { func_80031F48(arg0, 0x40000000); } else { func_80031F48(arg0, 0x3F800000); } func_80030C34(arg0); } if ((arg1->unk4 & 0x4000) != 0) { func_800323E4(arg0); func_8003221C(arg0); } else { arg0->unk20C = 0.0f; func_80032050(arg0); } } temp_v0_4 = arg0->unkBC; if (((temp_v0_4 << 0xB) >= 0) && ((temp_v0_4 & 4) == 0)) { if ((func_800388B0(arg1) < -0x31) && (((arg0->unk94 / 18.0f) * 216.0f) <= 5.0f) && ((arg1->unk4 & 0x4000) != 0)) { arg0->unk9C = 140.0f; arg0->unk44 = arg0->unk44 | 1; arg0->unk20C = 0.0f; arg0->unk8C = (140.0f * 140.0f) / 25.0f; } if (((func_800388B0(arg1) >= -0x1D) || ((arg1->unk4 & 0x4000) == 0)) && (temp_v0_5 = arg0->unk44, ((temp_v0_5 & 1) == 1))) { arg0->unk44 = temp_v0_5 & 0xFFFE; arg0->unk9C = 0.0f; return; } // Duplicate return node #65. Try simplifying control flow for better match return; } // Duplicate return node #65. Try simplifying control flow for better match return; } phi_a2 = 0x1000000; phi_a3 = 0x2000000; if ((temp_v0 & 0x4000) == 0x4000) { if ((arg1->unk4 & 0x8000) != 0) { func_80030FC8(arg0, 0x1000000, 0x2000000); } else { func_80031F48(arg0, 0x40A00000, 0x1000000, 0x2000000); } phi_v1 = arg0->unkBC & 0x80; phi_v0_2 = arg0->unkBC; phi_a2 = 0x1000000; phi_a3 = 0x2000000; } if ((phi_v1 == 0x80) || ((phi_v0_2 & 0x40) == 0x40) || (phi_a2 == (phi_v0_2 & phi_a2)) || (phi_a3 == (phi_v0_2 & phi_a3))) { if ((arg1->unk4 & 0x8000) != 0) { func_80030E00(arg0); func_800332E8(arg0, arg2); return; } func_80030C34(arg0); func_800337CC(arg0, 0x40A00000, arg2); // Duplicate return node #65. Try simplifying control flow for better match } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80037CFC.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80032700(s8); // extern ? func_80032CB0(?, s8); // extern ? func_80032D94(s8); // extern ? func_80033280(?, s8); // extern ? func_80037CFC(s8); // extern extern s8 D_80164A89; extern s16 D_801656F0; extern s32 D_8018D168; extern s32 gRaceFrameCounter; void func_800381AC(void *arg0, void *arg1, s8 arg2) { s16 temp_v0_2; s32 *temp_v0_3; u16 temp_v0; temp_v0 = arg0->unk0; if (((temp_v0 & 0x8000) == 0x8000) && ((temp_v0 & 0x4000) == 0x4000) && ((temp_v0 & 0x1000) != 0x1000)) { if ((temp_v0 & 0x2000) != 0x2000) { temp_v0_2 = arg0->unkCA; if (((temp_v0_2 & 2) == 2) || ((temp_v0_2 & 8) == 8)) { if ((arg1->unk4 & 0x8000) != 0) { func_80032D94(arg2); } else { func_80033280(0x40A00000, arg2); } } else { func_80037CFC(arg2); } D_80164A89 = 1; return; } if (D_8018D168 == 1) { if (D_801656F0 == 1) { temp_v0_3 = &D_801652E0[arg2]; if (*temp_v0_3 == 0) { *temp_v0_3 = gRaceFrameCounter; } } if ((arg1->unk4 & 0x8000) != 0) { func_80032700(arg2); return; } func_80032CB0(0x40A00000, arg2); // Duplicate return node #18. Try simplifying control flow for better match return; } // Duplicate return node #18. Try simplifying control flow for better match } } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_800381AC.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_800381AC(Player *, struct Controller *, ?); // extern extern struct Controller *D_800DC4C0; extern struct Controller *D_800DC4C4; extern struct Controller *D_800DC4C8; extern struct Controller *D_800DC4D0; extern struct Controller *D_800DC4D4; extern struct Controller *D_800DC4D8; void func_800382DC(void) { Player *temp_a0; Player *temp_a0_2; Player *temp_a0_3; Player *temp_a0_4; Player *temp_a0_5; s32 temp_v0; s32 temp_v0_2; u16 temp_v0_3; u16 temp_v0_4; u16 temp_v0_5; u16 temp_v0_6; temp_v0 = D_800DC52C; if (temp_v0 != 0) { if ((temp_v0 != 1) && (temp_v0 != 2)) { if (temp_v0 != 3) { return; } func_800381AC(D_800DC4DC, D_800DC4BC, 0); func_800381AC(D_800DC4E0, D_800DC4C0, 1); func_800381AC(D_800DC4E4, D_800DC4C4, 2); if (gPlayerCountSelection1 == 4) { func_800381AC(D_800DC4E8, D_800DC4C8, 3); } // Duplicate return node #27. Try simplifying control flow for better match return; } func_800381AC(D_800DC4DC, D_800DC4BC, 0); func_800381AC(D_800DC4E0, D_800DC4C0, 1); return; } temp_v0_2 = gModeSelection; if (temp_v0_2 != GRAND_PRIX) { if (temp_v0_2 != TIME_TRIALS) { return; } if (D_8015F890 != 1) { func_800381AC(D_800DC4DC, D_800DC4BC, 0); temp_a0 = D_800DC4E0; temp_v0_3 = temp_a0->unk_000; if (((temp_v0_3 & 0x100) == 0x100) && ((temp_v0_3 & 0x800) != 0x800)) { func_800381AC(temp_a0, D_800DC4D0, 1); } temp_a0_2 = D_800DC4E4; temp_v0_4 = temp_a0_2->unk_000; if (((temp_v0_4 & 0x100) == 0x100) && ((temp_v0_4 & 0x800) != 0x800)) { func_800381AC(temp_a0_2, D_800DC4D4, 2); return; } // Duplicate return node #27. Try simplifying control flow for better match return; } temp_a0_3 = D_800DC4DC; if ((temp_a0_3->unk_000 & 0x800) != 0x800) { func_800381AC(temp_a0_3, D_800DC4D8, 0); } temp_a0_4 = D_800DC4E0; temp_v0_5 = temp_a0_4->unk_000; if (((temp_v0_5 & 0x100) == 0x100) && ((temp_v0_5 & 0x800) != 0x800)) { func_800381AC(temp_a0_4, D_800DC4D0, 1); } temp_a0_5 = D_800DC4E4; temp_v0_6 = temp_a0_5->unk_000; if (((temp_v0_6 & 0x100) == 0x100) && ((temp_v0_6 & 0x800) != 0x800)) { func_800381AC(temp_a0_5, D_800DC4D4, 2); return; } return; } func_800381AC(D_800DC4DC, D_800DC4BC, 0); } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_800382DC.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s16 func_80038534(void *arg0) { s16 temp_a2; s16 temp_v0; s32 phi_a3; s32 phi_t0; s32 phi_t0_2; s32 phi_v1; s32 phi_v1_2; s32 phi_a1; s32 phi_a1_2; s16 phi_v1_3; s32 phi_t0_3; s16 phi_a3_2; s32 phi_a1_3; s16 phi_v1_4; s16 phi_a3_3; s32 phi_a1_4; s16 phi_v1_5; s16 phi_a3_4; s32 phi_t0_4; temp_v0 = arg0->unk0; temp_a2 = arg0->unk2; phi_a3 = temp_v0; phi_t0_3 = temp_a2; if (temp_v0 >= 0xD) { phi_a3 = 0xC; phi_t0_3 = (temp_a2 * 0xC) / temp_v0; } phi_t0 = phi_t0_3; phi_a3_4 = phi_a3; if (phi_a3 < -0xC) { phi_t0 = (phi_t0_3 * 0xC) / -phi_a3; phi_a3_4 = -0xC; } phi_t0_2 = phi_t0; phi_a3_3 = phi_a3_4; if (phi_t0 >= 0xD) { phi_t0_2 = 0xC; phi_a3_3 = (phi_a3_4 * 0xC) / phi_t0; } phi_a3_2 = phi_a3_3; phi_t0_4 = phi_t0_2; if (phi_t0_2 < -0xC) { phi_a3_2 = (phi_a3_3 * 0xC) / -phi_t0_2; phi_t0_4 = -0xC; } if ((temp_v0 >= -0xC) && (temp_v0 < 0xD) && (temp_a2 >= -0xC) && (temp_a2 < 0xD)) { phi_v1 = 0; phi_a1_4 = 0; } else { phi_v1 = temp_v0 - phi_a3_2; phi_a1_4 = temp_a2 - phi_t0_4; } phi_v1_2 = phi_v1; phi_a1_3 = phi_a1_4; if (phi_v1 >= 0x36) { phi_v1_2 = 0x35; phi_a1_3 = (phi_a1_4 * 0x35) / phi_v1; } phi_a1 = phi_a1_3; phi_v1_5 = phi_v1_2; if (phi_v1_2 < -0x35) { phi_a1 = (phi_a1_3 * 0x35) / -phi_v1_2; phi_v1_5 = -0x35; } phi_a1_2 = phi_a1; phi_v1_4 = phi_v1_5; if (phi_a1 >= 0x36) { phi_a1_2 = 0x35; phi_v1_4 = (phi_v1_5 * 0x35) / phi_a1; } phi_v1_3 = phi_v1_4; if (phi_a1_2 < -0x35) { phi_v1_3 = (phi_v1_4 * 0x35) / -phi_a1_2; } return phi_v1_3; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80038534.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 s32 func_800388B0(void *arg0) { s16 temp_a2; s16 temp_v1; s32 phi_a3; s32 phi_t0; s32 phi_t0_2; s32 phi_v0; s32 phi_v0_2; s32 phi_a1; s32 phi_a1_2; s32 phi_a1_3; s32 phi_t0_3; s16 phi_a3_2; s32 phi_a1_4; s16 phi_a3_3; s32 phi_a1_5; s16 phi_a3_4; s32 phi_t0_4; temp_v1 = arg0->unk0; temp_a2 = arg0->unk2; phi_a3 = temp_v1; phi_t0_3 = temp_a2; if (temp_v1 >= 0xD) { phi_a3 = 0xC; phi_t0_3 = (temp_a2 * 0xC) / temp_v1; } phi_t0 = phi_t0_3; phi_a3_4 = phi_a3; if (phi_a3 < -0xC) { phi_t0 = (phi_t0_3 * 0xC) / -phi_a3; phi_a3_4 = -0xC; } phi_t0_2 = phi_t0; phi_a3_3 = phi_a3_4; if (phi_t0 >= 0xD) { phi_t0_2 = 0xC; phi_a3_3 = (phi_a3_4 * 0xC) / phi_t0; } phi_a3_2 = phi_a3_3; phi_t0_4 = phi_t0_2; if (phi_t0_2 < -0xC) { phi_a3_2 = (phi_a3_3 * 0xC) / -phi_t0_2; phi_t0_4 = -0xC; } if ((temp_v1 >= -0xC) && (temp_v1 < 0xD) && (temp_a2 >= -0xC) && (temp_a2 < 0xD)) { phi_v0 = 0; phi_a1_5 = 0; } else { phi_v0 = temp_v1 - phi_a3_2; phi_a1_5 = temp_a2 - phi_t0_4; } phi_v0_2 = phi_v0; phi_a1_4 = phi_a1_5; if (phi_v0 >= 0x36) { phi_v0_2 = 0x35; phi_a1_4 = (phi_a1_5 * 0x35) / phi_v0; } phi_a1 = phi_a1_4; if (phi_v0_2 < -0x35) { phi_a1 = (phi_a1_4 * 0x35) / -phi_v0_2; } phi_a1_2 = phi_a1; if (phi_a1 >= 0x36) { phi_a1_2 = 0x35; } phi_a1_3 = phi_a1_2; if (phi_a1_2 < -0x35) { phi_a1_3 = -0x35; } return phi_a1_3; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_800388B0.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 void func_80038BE4(void *arg0, s16 arg1) { f32 phi_f0; arg0->unk9C = arg0->unk9C + arg1; if (arg0->unk9C < 0.0f) { arg0->unk9C = 0.0f; } phi_f0 = arg0->unk9C; if (arg0->unk9C >= 250.0f) { arg0->unk9C = 250.0f; phi_f0 = arg0->unk9C; } arg0->unk44 = arg0->unk44 | 0x20; arg0->unk8C = (phi_f0 * phi_f0) / 25.0f; } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80038BE4.s") #endif #ifdef MIPS_TO_C //generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307 ? func_80029B4C(void *, f32, f32, f32); // extern ? func_8002AAC0(f64, f64, void *); // extern ? func_8002AB70(void *); // extern ? func_8002AE38(void *, s8, f32, f32, f32, f32); // extern ? func_8002B830(s8, s8); // extern ? func_8002C4F8(void *, s8); // extern ? func_8002C954(void *, s8, f32 *); // extern ? func_8002CD48(void *, s8, s8); // extern ? func_8003F46C(void *, ? *, f32 *, f32 *, f32 *, f32 *, f32 *, f32 *); // extern ? func_8003F734(void *, ? *, f32 *, f32 *, f32 *, f32 *, f32 *); // extern ? func_8003FBAC(void *, ? *, f32 *, f32 *, f32 *, f32 *, f32 *); // extern f32 func_802ABE30(f32, f32, f32, u16); // extern ? func_802AD950(void *, s32, f32, f32, f32, f32, f32, f32); // extern ? func_802B63B8(f32 *, f32 *); // extern extern ? D_800E4328; extern ? D_800E4334; extern ? D_800E4340; extern ? D_800E434C; extern f64 D_800EDE00; extern f64 D_800EDE08; extern f64 D_800EDE10; extern ? gKartTopSpeedTable; void func_80038C6C(void *arg0, ? arg1, s8 arg2, s8 arg3) { f32 sp11C; f32 sp114; f32 sp110; f32 sp10C; f32 sp108; f32 spFC; f32 spF8; f32 spF4; f32 spF0; f32 spEC; f32 spE8; f32 spE4; f32 spE0; f32 spD8; f32 spA4; f32 spA0; f32 sp9C; f32 sp98; f32 sp90; f32 sp8C; f32 sp88; ? sp7C; f32 *sp50; f32 (*temp_v0_2)[3]; f32 *temp_a0; f32 *temp_a1; f32 *temp_v0_3; f32 temp_f0_2; f32 temp_f0_3; f32 temp_f0_4; f32 temp_f10; f32 temp_f10_2; f32 temp_f10_3; f32 temp_f12_2; f32 temp_f16_2; f32 temp_f2_2; f32 temp_f2_3; f32 temp_f2_4; f32 temp_f4; f32 temp_f6; f32 temp_f8; f32 temp_f8_2; f64 temp_f0; f64 temp_f12; f64 temp_f14; f64 temp_f16; f64 temp_f2; f64 temp_f4_2; s16 temp_v0; s32 temp_t6; sp114.unk0 = D_800E4328.unk0; sp114.unk4 = D_800E4328.unk4; sp114.unk8 = D_800E4328.unk8; sp108.unk0 = D_800E4334.unk0; sp108.unk4 = D_800E4334.unk4; sp108.unk8 = D_800E4334.unk8; spFC.unk0 = D_800E4340.unk0; spFC.unk4 = D_800E4340.unk4; spFC.unk8 = D_800E4340.unk8; spF0.unk0 = D_800E434C.unk0; spF0.unk4 = D_800E434C.unk4; spF0.unk8 = D_800E434C.unk8; arg0->unk84 = -10.0f; arg0->unk88 = 28.0f; arg0->unk214 = 250.0f; func_8002B830(arg3, arg2); func_8002CD48(arg0, arg3, arg2); arg0->unk2E = arg0->unk2E + arg0->unk78; spF0 = 0.0f; spF4 = 0.0f; spF8 = 0.0f; func_8002AB70(arg0); temp_a1 = arg0 + 0x174; temp_a0 = &sp108; temp_f8 = (spFC + arg0->unk64) * 0.0f; spA4 = temp_f8; spA0 = arg0->unk100 * -1.0f; sp110 = 0.0f; sp10C = 0.0f; sp108 = 0.0f; sp50 = temp_a1; temp_f6 = (sp104 + arg0->unk6C) * 0.0f; sp9C = temp_f6; func_802B63B8(temp_a0, temp_a1); temp_f10 = temp_f6 + sp110; spA4 = temp_f8 + sp108; sp9C = temp_f10; sp11C = arg0->unk8C; func_802B63B8(&sp114, temp_a1); temp_f14 = D_800EDE00; sp88 = arg0->unk34; temp_f8_2 = arg0->unk38; sp8C = temp_f8_2; temp_f0 = sp88; sp90 = arg0->unk3C; temp_f16 = D_800EDE08; temp_f2 = sp90; sp88 = temp_f0 + ((((sp114 + spA4 + spF0) - (temp_f0 * (temp_f14 * arg0->unkFC))) / temp_f16) / 1.0); temp_f12 = temp_f8_2; sp90 = temp_f2 + ((((sp11C + temp_f10 + spF8) - (temp_f2 * (temp_f14 * arg0->unkFC))) / temp_f16) / 1.0); sp8C = temp_f12 + ((((sp118 + spA0 + spF4) - (temp_f12 * (temp_f14 * arg0->unkFC))) / temp_f16) / 1.0); temp_v0 = arg0->unk44; if ((temp_v0 & 0x10) == 0x10) { arg0->unk44 = temp_v0 & 0xFFEF; } temp_f0_2 = arg0->unk14; spE0 = temp_f0_2; temp_f2_2 = arg0->unk18; temp_f16_2 = arg0->unk1C; arg0->unk20 = temp_f0_2; arg0->unk24 = temp_f2_2; arg0->unk28 = temp_f16_2; spEC = arg0->unk34 + temp_f0_2; spE8 = arg0->unk38 + temp_f2_2; spD8 = temp_f16_2; temp_f4 = arg0->unk3C + temp_f16_2; spE4 = temp_f4; func_8002AAC0(temp_f12, temp_f14, arg0); temp_f10_2 = spE8 + arg0->unkEC; temp_f4_2 = temp_f10_2; spE8 = temp_f10_2; temp_f10_3 = temp_f4_2 - D_800EDE10; spE8 = temp_f10_3; func_802AD950(arg0 + 0x110, arg0->unk70, spEC, temp_f10_3, temp_f4, arg0->unk20, arg0->unk24, arg0->unk28); arg0->unk58 = 0.0f; arg0->unk60 = 0.0f; arg0->unk5C = 1.0f; func_802B6540(sp50, 0.0f, 1.0f, 0.0f, arg0->unk2E); arg0->unkBC = arg0->unkBC | 8; arg0->unkC2 = arg0->unkC2 + 1; sp98 = arg0->unk124; if (sp98 <= 0.0f) { arg0->unkC2 = 0; temp_t6 = arg0->unkBC & ~2; arg0->unkBC = temp_t6; arg0->unkBC = temp_t6 & ~8; arg0->unkEC = arg0->unkC2; } sp98 = arg0->unk124; if (sp98 <= 0.0f) { func_8003F46C(arg0, &sp7C, &sp88, &sp108, &sp98, &spEC, &spE8, &spE4); } sp98 = arg0->unk11C; if (sp98 < 0.0f) { func_8003F734(arg0, &sp7C, &sp88, &sp98, &spEC, &spE8, &spE4); func_8002C954(arg0, arg3, &sp88); } sp98 = arg0->unk120; if (sp98 < 0.0f) { func_8003FBAC(arg0, &sp7C, &sp88, &sp98, &spEC, &spE8, &spE4); func_8002C954(arg0, arg3, &sp88); } sp98 = arg0->unk11C; if (sp98 >= 0.0f) { sp98 = arg0->unk120; if (sp98 >= 0.0f) { arg0->unk46 = arg0->unk46 & 0xFFDF; } } arg0->unk74 = func_802ABE30(spEC, spE8, spE4, arg0->unk11A); func_80029B4C(arg0, spEC, spE8, spE4); func_8002AE38(arg0, arg3, spE0, spD8, spEC, spE4); arg0->unk22C = arg0->unk94; arg0->unk94 = sqrtf((sp90 * sp90) + (sp88 * sp88)); arg0->unk14 = spEC; arg0->unk1C = spE4; arg0->unk18 = spE8; arg0->unk64 = sp108; arg0->unk6C = sp110; arg0->unk34 = sp88; arg0->unk38 = sp8C; arg0->unk3C = sp90; temp_v0_2 = &D_80165070[arg3]; temp_v0_2->unk0 = sp88; temp_v0_2->unk4 = sp8C; temp_v0_2->unk8 = sp90; if ((arg0->unk0 & 0x4000) == 0x4000) { temp_f2_3 = arg0->unk94; temp_v0_3 = (arg0->unk254 * 4) + &gKartTopSpeedTable; temp_f12_2 = *temp_v0_3; if (temp_f12_2 < temp_f2_3) { temp_f0_3 = temp_f12_2 / temp_f2_3; arg0->unk34 = arg0->unk34 * temp_f0_3; arg0->unk38 = arg0->unk38 * temp_f0_3; arg0->unk3C = arg0->unk3C * temp_f0_3; arg0->unk94 = *temp_v0_3; } } if ((arg0->unk44 & 1) == 1) { temp_f2_4 = arg0->unk94; if (temp_f2_4 > 1.0f) { temp_f0_4 = 1.0f / temp_f2_4; arg0->unk94 = 1.0f; arg0->unk34 = arg0->unk34 * temp_f0_4; arg0->unk38 = arg0->unk38 * temp_f0_4; arg0->unk3C = arg0->unk3C * temp_f0_4; } } if (arg0->unk124 >= 500.0f) { arg0->unk78 = arg0->unk78 / 2; } func_8002C4F8(arg0, arg3); } #else GLOBAL_ASM("asm/non_matchings/code_80027D00/func_80038C6C.s") #endif