.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel func_80050538 /* 2B938 80050538 10C00002 */ beqz $a2, .L80050544 /* 2B93C 8005053C 00061200 */ sll $v0, $a2, 8 /* 2B940 80050540 344600FF */ ori $a2, $v0, 0xff .L80050544: /* 2B944 80050544 1CE00003 */ bgtz $a3, .L80050554 /* 2B948 80050548 28E203E9 */ slti $v0, $a3, 0x3e9 /* 2B94C 8005054C 08014157 */ j .L8005055C /* 2B950 80050550 24070001 */ addiu $a3, $zero, 1 .L80050554: /* 2B954 80050554 50400001 */ beql $v0, $zero, .L8005055C /* 2B958 80050558 240703E8 */ addiu $a3, $zero, 0x3e8 .L8005055C: /* 2B95C 8005055C 8CA2002C */ lw $v0, 0x2c($a1) /* 2B960 80050560 14C20003 */ bne $a2, $v0, .L80050570 /* 2B964 80050564 00061400 */ sll $v0, $a2, 0x10 /* 2B968 80050568 03E00008 */ jr $ra /* 2B96C 8005056C A4A00036 */ sh $zero, 0x36($a1) .L80050570: /* 2B970 80050570 8CA3002C */ lw $v1, 0x2c($a1) /* 2B974 80050574 00431023 */ subu $v0, $v0, $v1 /* 2B978 80050578 14E00002 */ bnez $a3, .L80050584 /* 2B97C 8005057C 0047001A */ div $zero, $v0, $a3 /* 2B980 80050580 0007000D */ break 7 .L80050584: /* 2B984 80050584 2401FFFF */ addiu $at, $zero, -1 /* 2B988 80050588 14E10004 */ bne $a3, $at, .L8005059C /* 2B98C 8005058C 3C018000 */ lui $at, 0x8000 /* 2B990 80050590 14410002 */ bne $v0, $at, .L8005059C /* 2B994 80050594 00000000 */ nop /* 2B998 80050598 0006000D */ break 6 .L8005059C: /* 2B99C 8005059C 00001012 */ mflo $v0 /* 2B9A0 800505A0 A4A70036 */ sh $a3, 0x36($a1) /* 2B9A4 800505A4 A4A60034 */ sh $a2, 0x34($a1) /* 2B9A8 800505A8 03E00008 */ jr $ra /* 2B9AC 800505AC ACA20030 */ sw $v0, 0x30($a1)