papermario/asm/nonmatchings/code_ad90_len_2880/func_8003034C.s
2020-08-12 22:37:16 -04:00

81 lines
3.4 KiB
ArmAsm

.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8003034C
/* 00B74C 8003034C 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 00B750 80030350 AFB00010 */ sw $s0, 0x10($sp)
/* 00B754 80030354 0080802D */ daddu $s0, $a0, $zero
/* 00B758 80030358 3C028011 */ lui $v0, 0x8011
/* 00B75C 8003035C 2442EFC8 */ addiu $v0, $v0, -0x1038
/* 00B760 80030360 AFBF0018 */ sw $ra, 0x18($sp)
/* 00B764 80030364 AFB10014 */ sw $s1, 0x14($sp)
/* 00B768 80030368 F7B40020 */ sdc1 $f20, 0x20($sp)
/* 00B76C 8003036C C44C0084 */ lwc1 $f12, 0x84($v0)
/* 00B770 80030370 3C0142B4 */ lui $at, 0x42b4
/* 00B774 80030374 44817000 */ mtc1 $at, $f14
/* 00B778 80030378 0C00A70A */ jal get_clamped_angle_diff
/* 00B77C 8003037C 0040882D */ daddu $s1, $v0, $zero
/* 00B780 80030380 3C014234 */ lui $at, 0x4234
/* 00B784 80030384 4481A000 */ mtc1 $at, $f20
/* 00B788 80030388 46000005 */ abs.s $f0, $f0
/* 00B78C 8003038C 4614003C */ c.lt.s $f0, $f20
/* 00B790 80030390 00000000 */ nop
/* 00B794 80030394 4500000F */ bc1f .L800303D4
/* 00B798 80030398 00000000 */ nop
/* 00B79C 8003039C 86020556 */ lh $v0, 0x556($s0)
/* 00B7A0 800303A0 14400009 */ bnez $v0, .L800303C8
/* 00B7A4 800303A4 2402000F */ addiu $v0, $zero, 0xf
/* 00B7A8 800303A8 86020554 */ lh $v0, 0x554($s0)
/* 00B7AC 800303AC 96030554 */ lhu $v1, 0x554($s0)
/* 00B7B0 800303B0 1C40001D */ bgtz $v0, .L80030428
/* 00B7B4 800303B4 2462FFFF */ addiu $v0, $v1, -1
/* 00B7B8 800303B8 3C01420C */ lui $at, 0x420c
/* 00B7BC 800303BC 44810000 */ mtc1 $at, $f0
/* 00B7C0 800303C0 0800C10E */ j .L80030438
/* 00B7C4 800303C4 E6000550 */ swc1 $f0, 0x550($s0)
.L800303C8:
/* 00B7C8 800303C8 A6020554 */ sh $v0, 0x554($s0)
/* 00B7CC 800303CC 0800C10E */ j .L80030438
/* 00B7D0 800303D0 A6000556 */ sh $zero, 0x556($s0)
.L800303D4:
/* 00B7D4 800303D4 C62C0084 */ lwc1 $f12, 0x84($s1)
/* 00B7D8 800303D8 3C014387 */ lui $at, 0x4387
/* 00B7DC 800303DC 44817000 */ mtc1 $at, $f14
/* 00B7E0 800303E0 0C00A70A */ jal get_clamped_angle_diff
/* 00B7E4 800303E4 00000000 */ nop
/* 00B7E8 800303E8 46000005 */ abs.s $f0, $f0
/* 00B7EC 800303EC 4614003C */ c.lt.s $f0, $f20
/* 00B7F0 800303F0 00000000 */ nop
/* 00B7F4 800303F4 45000010 */ bc1f .L80030438
/* 00B7F8 800303F8 24030001 */ addiu $v1, $zero, 1
/* 00B7FC 800303FC 86020556 */ lh $v0, 0x556($s0)
/* 00B800 80030400 1443000B */ bne $v0, $v1, .L80030430
/* 00B804 80030404 2402000F */ addiu $v0, $zero, 0xf
/* 00B808 80030408 86020554 */ lh $v0, 0x554($s0)
/* 00B80C 8003040C 96030554 */ lhu $v1, 0x554($s0)
/* 00B810 80030410 1C400005 */ bgtz $v0, .L80030428
/* 00B814 80030414 2462FFFF */ addiu $v0, $v1, -1
/* 00B818 80030418 3C01C20C */ lui $at, 0xc20c
/* 00B81C 8003041C 44810000 */ mtc1 $at, $f0
/* 00B820 80030420 0800C10E */ j .L80030438
/* 00B824 80030424 E6000550 */ swc1 $f0, 0x550($s0)
.L80030428:
/* 00B828 80030428 0800C10E */ j .L80030438
/* 00B82C 8003042C A6020554 */ sh $v0, 0x554($s0)
.L80030430:
/* 00B830 80030430 A6020554 */ sh $v0, 0x554($s0)
/* 00B834 80030434 A6030556 */ sh $v1, 0x556($s0)
.L80030438:
/* 00B838 80030438 8FBF0018 */ lw $ra, 0x18($sp)
/* 00B83C 8003043C 8FB10014 */ lw $s1, 0x14($sp)
/* 00B840 80030440 8FB00010 */ lw $s0, 0x10($sp)
/* 00B844 80030444 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 00B848 80030448 03E00008 */ jr $ra
/* 00B84C 8003044C 27BD0028 */ addiu $sp, $sp, 0x28