mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-07-01 04:20:13 -04:00
8ab4557b39
* Split asm using autodecompiler * Placed libultra bss and linked more C
220 lines
11 KiB
ArmAsm
220 lines
11 KiB
ArmAsm
glabel func_80077700
|
|
/* 078300 80077700 27BDFFB8 */ addiu $sp, $sp, -0x48
|
|
/* 078304 80077704 AFB00024 */ sw $s0, 0x24($sp)
|
|
/* 078308 80077708 00A08025 */ move $s0, $a1
|
|
/* 07830C 8007770C AFBF002C */ sw $ra, 0x2c($sp)
|
|
/* 078310 80077710 AFB10028 */ sw $s1, 0x28($sp)
|
|
/* 078314 80077714 00808825 */ move $s1, $a0
|
|
/* 078318 80077718 AFA60050 */ sw $a2, 0x50($sp)
|
|
/* 07831C 8007771C 0C01C8E9 */ jal func_800723A4
|
|
/* 078320 80077720 00002825 */ move $a1, $zero
|
|
/* 078324 80077724 001170C0 */ sll $t6, $s1, 3
|
|
/* 078328 80077728 01D17023 */ subu $t6, $t6, $s1
|
|
/* 07832C 8007772C 3C0F8016 */ lui $t7, %hi(D_80165C18) # $t7, 0x8016
|
|
/* 078330 80077730 25EF5C18 */ addiu $t7, %lo(D_80165C18) # addiu $t7, $t7, 0x5c18
|
|
/* 078334 80077734 000E7140 */ sll $t6, $t6, 5
|
|
/* 078338 80077738 3C040D03 */ lui $a0, %hi(D_0D028DD8) # $a0, 0xd03
|
|
/* 07833C 8007773C 01CF1021 */ addu $v0, $t6, $t7
|
|
/* 078340 80077740 24848DD8 */ addiu $a0, %lo(D_0D028DD8) # addiu $a0, $a0, -0x7228
|
|
/* 078344 80077744 24180007 */ li $t8, 7
|
|
/* 078348 80077748 A05800D5 */ sb $t8, 0xd5($v0)
|
|
/* 07834C 8007774C AC440060 */ sw $a0, 0x60($v0)
|
|
/* 078350 80077750 AC440068 */ sw $a0, 0x68($v0)
|
|
/* 078354 80077754 3C01800F */ lui $at, %hi(D_800EEB38) # $at, 0x800f
|
|
/* 078358 80077758 C424EB38 */ lwc1 $f4, %lo(D_800EEB38)($at)
|
|
/* 07835C 8007775C 3C03800E */ lui $v1, %hi(gCurrentCourseId) # $v1, 0x800e
|
|
/* 078360 80077760 3C014039 */ li $at, 0x40390000 # 2.890625
|
|
/* 078364 80077764 E4440000 */ swc1 $f4, ($v0)
|
|
/* 078368 80077768 C6060004 */ lwc1 $f6, 4($s0)
|
|
/* 07836C 8007776C 02202025 */ move $a0, $s1
|
|
/* 078370 80077770 24180014 */ li $t8, 20
|
|
/* 078374 80077774 E4460044 */ swc1 $f6, 0x44($v0)
|
|
/* 078378 80077778 8463C5A0 */ lh $v1, %lo(gCurrentCourseId)($v1)
|
|
/* 07837C 8007777C 5060000D */ beql $v1, $zero, .L800777B4
|
|
/* 078380 80077780 C6080000 */ lwc1 $f8, ($s0)
|
|
/* 078384 80077784 24010004 */ li $at, 4
|
|
/* 078388 80077788 10610029 */ beq $v1, $at, .L80077830
|
|
/* 07838C 8007778C 02202025 */ move $a0, $s1
|
|
/* 078390 80077790 24010007 */ li $at, 7
|
|
/* 078394 80077794 10610048 */ beq $v1, $at, .L800778B8
|
|
/* 078398 80077798 02202025 */ move $a0, $s1
|
|
/* 07839C 8007779C 24010008 */ li $at, 8
|
|
/* 0783A0 800777A0 10610067 */ beq $v1, $at, .L80077940
|
|
/* 0783A4 800777A4 02202025 */ move $a0, $s1
|
|
/* 0783A8 800777A8 10000088 */ b .L800779CC
|
|
/* 0783AC 800777AC 00000000 */ nop
|
|
/* 0783B0 800777B0 C6080000 */ lwc1 $f8, ($s0)
|
|
.L800777B4:
|
|
/* 0783B4 800777B4 C6100004 */ lwc1 $f16, 4($s0)
|
|
/* 0783B8 800777B8 44812800 */ mtc1 $at, $f5
|
|
/* 0783BC 800777BC 4600428D */ trunc.w.s $f10, $f8
|
|
/* 0783C0 800777C0 44802000 */ mtc1 $zero, $f4
|
|
/* 0783C4 800777C4 2419001E */ li $t9, 30
|
|
/* 0783C8 800777C8 460084A1 */ cvt.d.s $f18, $f16
|
|
/* 0783CC 800777CC 44055000 */ mfc1 $a1, $f10
|
|
/* 0783D0 800777D0 46249180 */ add.d $f6, $f18, $f4
|
|
/* 0783D4 800777D4 C60A0008 */ lwc1 $f10, 8($s0)
|
|
/* 0783D8 800777D8 00054400 */ sll $t0, $a1, 0x10
|
|
/* 0783DC 800777DC 00082C03 */ sra $a1, $t0, 0x10
|
|
/* 0783E0 800777E0 4620320D */ trunc.w.d $f8, $f6
|
|
/* 0783E4 800777E4 24080014 */ li $t0, 20
|
|
/* 0783E8 800777E8 AFA80018 */ sw $t0, 0x18($sp)
|
|
/* 0783EC 800777EC 4600540D */ trunc.w.s $f16, $f10
|
|
/* 0783F0 800777F0 44064000 */ mfc1 $a2, $f8
|
|
/* 0783F4 800777F4 AFA20034 */ sw $v0, 0x34($sp)
|
|
/* 0783F8 800777F8 AFB90014 */ sw $t9, 0x14($sp)
|
|
/* 0783FC 800777FC 44078000 */ mfc1 $a3, $f16
|
|
/* 078400 80077800 00065C00 */ sll $t3, $a2, 0x10
|
|
/* 078404 80077804 000B3403 */ sra $a2, $t3, 0x10
|
|
/* 078408 80077808 00077400 */ sll $t6, $a3, 0x10
|
|
/* 07840C 8007780C 000E3C03 */ sra $a3, $t6, 0x10
|
|
/* 078410 80077810 0C022F45 */ jal func_8008BD14
|
|
/* 078414 80077814 AFB80010 */ sw $t8, 0x10($sp)
|
|
/* 078418 80077818 3C013FC0 */ li $at, 0x3FC00000 # 1.500000
|
|
/* 07841C 8007781C 44810000 */ mtc1 $at, $f0
|
|
/* 078420 80077820 8FA20034 */ lw $v0, 0x34($sp)
|
|
/* 078424 80077824 E4400034 */ swc1 $f0, 0x34($v0)
|
|
/* 078428 80077828 10000068 */ b .L800779CC
|
|
/* 07842C 8007782C E440003C */ swc1 $f0, 0x3c($v0)
|
|
.L80077830:
|
|
/* 078430 80077830 C6120000 */ lwc1 $f18, ($s0)
|
|
/* 078434 80077834 C6060004 */ lwc1 $f6, 4($s0)
|
|
/* 078438 80077838 3C014039 */ li $at, 0x40390000 # 2.890625
|
|
/* 07843C 8007783C 4600910D */ trunc.w.s $f4, $f18
|
|
/* 078440 80077840 44815800 */ mtc1 $at, $f11
|
|
/* 078444 80077844 44805000 */ mtc1 $zero, $f10
|
|
/* 078448 80077848 46003221 */ cvt.d.s $f8, $f6
|
|
/* 07844C 8007784C 44052000 */ mfc1 $a1, $f4
|
|
/* 078450 80077850 462A4400 */ add.d $f16, $f8, $f10
|
|
/* 078454 80077854 C6040008 */ lwc1 $f4, 8($s0)
|
|
/* 078458 80077858 00055400 */ sll $t2, $a1, 0x10
|
|
/* 07845C 8007785C 000A2C03 */ sra $a1, $t2, 0x10
|
|
/* 078460 80077860 4620848D */ trunc.w.d $f18, $f16
|
|
/* 078464 80077864 240A0014 */ li $t2, 20
|
|
/* 078468 80077868 24080014 */ li $t0, 20
|
|
/* 07846C 8007786C 4600218D */ trunc.w.s $f6, $f4
|
|
/* 078470 80077870 44069000 */ mfc1 $a2, $f18
|
|
/* 078474 80077874 2409001E */ li $t1, 30
|
|
/* 078478 80077878 AFA90014 */ sw $t1, 0x14($sp)
|
|
/* 07847C 8007787C 44073000 */ mfc1 $a3, $f6
|
|
/* 078480 80077880 00066C00 */ sll $t5, $a2, 0x10
|
|
/* 078484 80077884 000D3403 */ sra $a2, $t5, 0x10
|
|
/* 078488 80077888 0007C400 */ sll $t8, $a3, 0x10
|
|
/* 07848C 8007788C 00183C03 */ sra $a3, $t8, 0x10
|
|
/* 078490 80077890 AFA80010 */ sw $t0, 0x10($sp)
|
|
/* 078494 80077894 AFAA0018 */ sw $t2, 0x18($sp)
|
|
/* 078498 80077898 0C022F45 */ jal func_8008BD14
|
|
/* 07849C 8007789C AFA20034 */ sw $v0, 0x34($sp)
|
|
/* 0784A0 800778A0 3C014000 */ li $at, 0x40000000 # 2.000000
|
|
/* 0784A4 800778A4 44810000 */ mtc1 $at, $f0
|
|
/* 0784A8 800778A8 8FA20034 */ lw $v0, 0x34($sp)
|
|
/* 0784AC 800778AC E4400034 */ swc1 $f0, 0x34($v0)
|
|
/* 0784B0 800778B0 10000046 */ b .L800779CC
|
|
/* 0784B4 800778B4 E440003C */ swc1 $f0, 0x3c($v0)
|
|
.L800778B8:
|
|
/* 0784B8 800778B8 C6080000 */ lwc1 $f8, ($s0)
|
|
/* 0784BC 800778BC C6100004 */ lwc1 $f16, 4($s0)
|
|
/* 0784C0 800778C0 3C01403E */ li $at, 0x403E0000 # 2.968750
|
|
/* 0784C4 800778C4 4600428D */ trunc.w.s $f10, $f8
|
|
/* 0784C8 800778C8 44812800 */ mtc1 $at, $f5
|
|
/* 0784CC 800778CC 44802000 */ mtc1 $zero, $f4
|
|
/* 0784D0 800778D0 460084A1 */ cvt.d.s $f18, $f16
|
|
/* 0784D4 800778D4 44055000 */ mfc1 $a1, $f10
|
|
/* 0784D8 800778D8 46249180 */ add.d $f6, $f18, $f4
|
|
/* 0784DC 800778DC C60A0008 */ lwc1 $f10, 8($s0)
|
|
/* 0784E0 800778E0 00056400 */ sll $t4, $a1, 0x10
|
|
/* 0784E4 800778E4 000C2C03 */ sra $a1, $t4, 0x10
|
|
/* 0784E8 800778E8 4620320D */ trunc.w.d $f8, $f6
|
|
/* 0784EC 800778EC 240C0010 */ li $t4, 16
|
|
/* 0784F0 800778F0 240A0010 */ li $t2, 16
|
|
/* 0784F4 800778F4 4600540D */ trunc.w.s $f16, $f10
|
|
/* 0784F8 800778F8 44064000 */ mfc1 $a2, $f8
|
|
/* 0784FC 800778FC 240B0028 */ li $t3, 40
|
|
/* 078500 80077900 AFAB0014 */ sw $t3, 0x14($sp)
|
|
/* 078504 80077904 44078000 */ mfc1 $a3, $f16
|
|
/* 078508 80077908 00067C00 */ sll $t7, $a2, 0x10
|
|
/* 07850C 8007790C 000F3403 */ sra $a2, $t7, 0x10
|
|
/* 078510 80077910 00074400 */ sll $t0, $a3, 0x10
|
|
/* 078514 80077914 00083C03 */ sra $a3, $t0, 0x10
|
|
/* 078518 80077918 AFAA0010 */ sw $t2, 0x10($sp)
|
|
/* 07851C 8007791C AFAC0018 */ sw $t4, 0x18($sp)
|
|
/* 078520 80077920 0C022F45 */ jal func_8008BD14
|
|
/* 078524 80077924 AFA20034 */ sw $v0, 0x34($sp)
|
|
/* 078528 80077928 3C014000 */ li $at, 0x40000000 # 2.000000
|
|
/* 07852C 8007792C 44810000 */ mtc1 $at, $f0
|
|
/* 078530 80077930 8FA20034 */ lw $v0, 0x34($sp)
|
|
/* 078534 80077934 E4400034 */ swc1 $f0, 0x34($v0)
|
|
/* 078538 80077938 10000024 */ b .L800779CC
|
|
/* 07853C 8007793C E440003C */ swc1 $f0, 0x3c($v0)
|
|
.L80077940:
|
|
/* 078540 80077940 C6120000 */ lwc1 $f18, ($s0)
|
|
/* 078544 80077944 C6060004 */ lwc1 $f6, 4($s0)
|
|
/* 078548 80077948 3C014039 */ li $at, 0x40390000 # 2.890625
|
|
/* 07854C 8007794C 4600910D */ trunc.w.s $f4, $f18
|
|
/* 078550 80077950 44815800 */ mtc1 $at, $f11
|
|
/* 078554 80077954 44805000 */ mtc1 $zero, $f10
|
|
/* 078558 80077958 46003221 */ cvt.d.s $f8, $f6
|
|
/* 07855C 8007795C 44052000 */ mfc1 $a1, $f4
|
|
/* 078560 80077960 462A4400 */ add.d $f16, $f8, $f10
|
|
/* 078564 80077964 C6040008 */ lwc1 $f4, 8($s0)
|
|
/* 078568 80077968 00057400 */ sll $t6, $a1, 0x10
|
|
/* 07856C 8007796C 000E2C03 */ sra $a1, $t6, 0x10
|
|
/* 078570 80077970 4620848D */ trunc.w.d $f18, $f16
|
|
/* 078574 80077974 240E0014 */ li $t6, 20
|
|
/* 078578 80077978 240C0014 */ li $t4, 20
|
|
/* 07857C 8007797C 4600218D */ trunc.w.s $f6, $f4
|
|
/* 078580 80077980 44069000 */ mfc1 $a2, $f18
|
|
/* 078584 80077984 240D001E */ li $t5, 30
|
|
/* 078588 80077988 AFAD0014 */ sw $t5, 0x14($sp)
|
|
/* 07858C 8007798C 44073000 */ mfc1 $a3, $f6
|
|
/* 078590 80077990 0006CC00 */ sll $t9, $a2, 0x10
|
|
/* 078594 80077994 00193403 */ sra $a2, $t9, 0x10
|
|
/* 078598 80077998 00075400 */ sll $t2, $a3, 0x10
|
|
/* 07859C 8007799C 000A3C03 */ sra $a3, $t2, 0x10
|
|
/* 0785A0 800779A0 AFAC0010 */ sw $t4, 0x10($sp)
|
|
/* 0785A4 800779A4 AFAE0018 */ sw $t6, 0x18($sp)
|
|
/* 0785A8 800779A8 0C022F45 */ jal func_8008BD14
|
|
/* 0785AC 800779AC AFA20034 */ sw $v0, 0x34($sp)
|
|
/* 0785B0 800779B0 3C013FC0 */ li $at, 0x3FC00000 # 1.500000
|
|
/* 0785B4 800779B4 44810000 */ mtc1 $at, $f0
|
|
/* 0785B8 800779B8 8FA20034 */ lw $v0, 0x34($sp)
|
|
/* 0785BC 800779BC 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
|
/* 0785C0 800779C0 44814000 */ mtc1 $at, $f8
|
|
/* 0785C4 800779C4 E4400034 */ swc1 $f0, 0x34($v0)
|
|
/* 0785C8 800779C8 E448003C */ swc1 $f8, 0x3c($v0)
|
|
.L800779CC:
|
|
/* 0785CC 800779CC 0C0ADF8D */ jal random_int
|
|
/* 0785D0 800779D0 24040010 */ li $a0, 16
|
|
/* 0785D4 800779D4 00028300 */ sll $s0, $v0, 0xc
|
|
/* 0785D8 800779D8 320FFFFF */ andi $t7, $s0, 0xffff
|
|
/* 0785DC 800779DC 01E08025 */ move $s0, $t7
|
|
/* 0785E0 800779E0 0C0ADF8D */ jal random_int
|
|
/* 0785E4 800779E4 24040010 */ li $a0, 16
|
|
/* 0785E8 800779E8 0002C300 */ sll $t8, $v0, 0xc
|
|
/* 0785EC 800779EC A7B8003E */ sh $t8, 0x3e($sp)
|
|
/* 0785F0 800779F0 0C0ADF8D */ jal random_int
|
|
/* 0785F4 800779F4 24040010 */ li $a0, 16
|
|
/* 0785F8 800779F8 8FA60050 */ lw $a2, 0x50($sp)
|
|
/* 0785FC 800779FC 24010014 */ li $at, 20
|
|
/* 078600 80077A00 0002CB00 */ sll $t9, $v0, 0xc
|
|
/* 078604 80077A04 00064400 */ sll $t0, $a2, 0x10
|
|
/* 078608 80077A08 01064023 */ subu $t0, $t0, $a2
|
|
/* 07860C 80077A0C 0101001A */ div $zero, $t0, $at
|
|
/* 078610 80077A10 00004812 */ mflo $t1
|
|
/* 078614 80077A14 A7B9003C */ sh $t9, 0x3c($sp)
|
|
/* 078618 80077A18 3126FFFF */ andi $a2, $t1, 0xffff
|
|
/* 07861C 80077A1C 02202025 */ move $a0, $s1
|
|
/* 078620 80077A20 00002825 */ move $a1, $zero
|
|
/* 078624 80077A24 0C022E22 */ jal func_8008B888
|
|
/* 078628 80077A28 00003825 */ move $a3, $zero
|
|
/* 07862C 80077A2C 02202025 */ move $a0, $s1
|
|
/* 078630 80077A30 3205FFFF */ andi $a1, $s0, 0xffff
|
|
/* 078634 80077A34 97A6003E */ lhu $a2, 0x3e($sp)
|
|
/* 078638 80077A38 0C022E2F */ jal func_8008B8BC
|
|
/* 07863C 80077A3C 97A7003C */ lhu $a3, 0x3c($sp)
|
|
/* 078640 80077A40 8FBF002C */ lw $ra, 0x2c($sp)
|
|
/* 078644 80077A44 8FB00024 */ lw $s0, 0x24($sp)
|
|
/* 078648 80077A48 8FB10028 */ lw $s1, 0x28($sp)
|
|
/* 07864C 80077A4C 03E00008 */ jr $ra
|
|
/* 078650 80077A50 27BD0048 */ addiu $sp, $sp, 0x48
|