Main BATTLE.BIN Loop

From Final Fantasy Hacktics Wiki
Revision as of 18:28, 7 January 2017 by Glain (talk | contribs)
Jump to navigation Jump to search
80079a98: 27bdffe0 addiu r29,r29,-0x0020
80079a9c: afbf001c sw r31,0x001c(r29)
80079aa0: afb20018 sw r18,0x0018(r29)
80079aa4: afb10014 sw r17,0x0014(r29)
80079aa8: 0c03b841 jal 0x800ee104               #   ? 0xee104 ();
80079aac: afb00010 sw r16,0x0010(r29)
80079ab0: 0c01eaf4 jal 0x8007abd0               #   ? 0x7abd0 ();
80079ab4: 00000000 nop
80079ab8: 0c06b58b jal 0x801ad62c               #   ? 0x1ad62c ();
80079abc: 00000000 nop
80079ac0: 3c020001 lui r2,0x0001
80079ac4: 344296b0 ori r2,r2,0x96b0             #   value = 0x196b0
                                                #   do {
80079ac8: 3c01800c lui r1,0x800c
80079acc: 00220821 addu r1,r1,r2
80079ad0: a0207ce9 sb r0,0x7ce9(r1)             #       *(0x800c7c39 + value) = 0
80079ad4: 2442cd2a addiu r2,r2,-0x32d6          #       value = value - 0x32d6
80079ad8: 0441fffb bgez r2,0x80079ac8
80079adc: 00000000 nop                          #   } while (value >= 0)   
80079ae0: 3c12800f lui r18,0x800f
80079ae4: 26525b9c addiu r18,r18,0x5b9c         #   0x800f5b9c
80079ae8: 3c11800e lui r17,0x800e
80079aec: 26314e74 addiu r17,r17,0x4e74         #   0x800e4e74
                                                #   do {
80079af0: 0c01e4a8 jal 0x800792a0               #       ? 0x792a0 ();
80079af4: 00000000 nop
80079af8: 3c028004 lui r2,0x8004
80079afc: 8c4273ac lw r2,0x73ac(r2)             #       *0x800473ac
80079b00: 3c01800e lui r1,0x800e
80079b04: ac204e8c sw r0,0x4e8c(r1)             #       *0x800e4e8c = 0
80079b08: 30420007 andi r2,r2,0x0007            #       *0x800473ac & 0x07
80079b0c: 3c018009 lui r1,0x8009
80079b10: ac2260c0 sw r2,0x60c0(r1)             #       *0x800960c0 = *0x800473ac & 0x07
                                                #       while (true) {
80079b14: 0c024d95 jal 0x80093654               #           ? 0x93654 ();
80079b18: 00000000 nop
80079b1c: 0c01ebb5 jal 0x8007aed4               #           ? 0x7aed4 ();
80079b20: 00000000 nop
80079b24: 0c007472 jal 0x8001d1c8               #           ? 0x1d1c8 (0x200);
80079b28: 34040200 ori r4,r0,0x0200
80079b2c: 0c01129f jal 0x80044a7c               #           ? 0x44a7c ();
80079b30: 00000000 nop
80079b34: 0c01c0b9 jal 0x800702e4               #           ? 0x702e4 ();
80079b38: 00000000 nop
80079b3c: 8e220000 lw r2,0x0000(r17)            #           *0x800e4e74
80079b40: 00000000 nop
80079b44: 00021023 subu r2,r0,r2                #           value = -*0x800e4e74
80079b48: 04410002 bgez r2,0x80079b54           #           if (value < 0) {
80079b4c: 00000000 nop
80079b50: 24420fff addiu r2,r2,0x0fff           #               value = value + 0xfff
                                                #           }
80079b54: 8e230004 lw r3,0x0004(r17)            #           *0x800e4e78
80079b58: 00021303 sra r2,r2,0x0c               #           value >> 12
80079b5c: a6420000 sh r2,0x0000(r18)            #           *0x800f5b9c = value >> 12
80079b60: 00031023 subu r2,r0,r3                #           value = -*0x800e4e78
80079b64: 04410002 bgez r2,0x80079b70           #           if (value < 0) {
80079b68: 00000000 nop
80079b6c: 24420fff addiu r2,r2,0x0fff           #               value = value + 0xfff
                                                #           }
80079b70: 8e230008 lw r3,0x0008(r17)            #           *0x800e4e7c
80079b74: 00021303 sra r2,r2,0x0c               #           value >> 12
80079b78: a6420002 sh r2,0x0002(r18)            #           *0x800f5b9e = value >> 12
80079b7c: 00031023 subu r2,r0,r3                #           value = -*0x800e4e7c
80079b80: 04410002 bgez r2,0x80079b8c           #           if (value < 0) {
80079b84: 00000000 nop
80079b88: 24420fff addiu r2,r2,0x0fff           #               value = value + 0xfff
                                                #           }
80079b8c: 00021303 sra r2,r2,0x0c               #           value >> 12
80079b90: a6420004 sh r2,0x0004(r18)            #           *0x800f5ba0 = value >> 12
80079b94: 3c10800a lui r16,0x800a
80079b98: 26108a24 addiu r16,r16,-0x75dc        #           0x80098a24
80079b9c: 3c05800a lui r5,0x800a
80079ba0: 24a57784 addiu r5,r5,0x7784           #           0x800a7784
80079ba4: 3c06800a lui r6,0x800a
80079ba8: 24c677b0 addiu r6,r6,0x77b0           #           0x800a77b0
80079bac: 3c07800c lui r7,0x800c
80079bb0: 24e77ca0 addiu r7,r7,0x7ca0           #           0x800c7ca0
80079bb4: 0c03ba57 jal 0x800ee95c               #           ? 0xee95c (0x80098a24, 0x800a7784, 0x800a77b0, 0x800c7ca0);
80079bb8: 02002021 addu r4,r16,r0
80079bbc: 0c03a103 jal 0x800e840c               #           ? 0xe840c (0x80098a24);
80079bc0: 02002021 addu r4,r16,r0
80079bc4: 0c068710 jal 0x801a1c40               #           effectResult = Effect Cycle Processing ();
80079bc8: 00000000 nop
80079bcc: 10400005 beq r2,r0,0x80079be4
80079bd0: 34020002 ori r2,r0,0x0002             #           2
                                                #           if (effectResult != 0) {
80079bd4: 3c018009 lui r1,0x8009
80079bd8: ac22612c sw r2,0x612c(r1)             #               *0x8009612c = 2
80079bdc: 0801e6fb j 0x80079bec
80079be0: 00000000 nop
                                                #           } else {
80079be4: 3c018009 lui r1,0x8009
80079be8: ac20612c sw r0,0x612c(r1)             #               *0x8009612c = 0
                                                #           }
80079bec: 3c038009 lui r3,0x8009
80079bf0: 8c6360e4 lw r3,0x60e4(r3)             #           *0x800960e4
80079bf4: 00000000 nop
80079bf8: 2c62003c sltiu r2,r3,0x003c
80079bfc: 10400007 beq r2,r0,0x80079c1c
80079c00: 00031080 sll r2,r3,0x02               #           *0x800960e4 * 4
80079c04: 3c018006 lui r1,0x8006
80079c08: 00220821 addu r1,r1,r2
80079c0c: 8c2276a8 lw r2,0x76a8(r1)             #           (Code pointer) = *0x800676a8 + (*0x800960e4 * 4)
80079c10: 00000000 nop
80079c14: 00400008 jr r2                        #           Jump to (Code pointer) - see table and switch statement below
80079c18: 00000000 nop

#   *0x800960e4     RAM Address     Code Pointer
#   0x00            800676a8        80079c1c
#   0x01            800676ac        80079c2c
#   0x02            800676b0        80079c3c
#   0x03            800676b4        80079c4c
#   0x04            800676b8        80079c5c
#   0x05            800676bc        80079c6c
#   0x06            800676c0        80079c7c
#   0x07            800676c4        80079c8c
#   0x08            800676c8        80079c9c
#   0x09            800676cc        80079cac
#   0x0a            800676d0        80079cbc
#   0x0b            800676d4        80079cfc
#   0x0c            800676d8        80079d0c
#   0x0d            800676dc        80079d1c
#   0x0e            800676e0        80079d2c
#   0x0f            800676e4        80079d3c
#   0x10            800676e8        80079d4c
#   0x11            800676ec        80079d5c
#   0x12            800676f0        80079d6c
#   0x13            800676f4        80079d7c
#   0x14            800676f8        80079d8c
#   0x15            800676fc        80079d9c
#   0x16            80067700        80079dac
#   0x17            80067704        80079dbc
#   0x18            80067708        80079dcc
#   0x19            8006770c        80079ddc
#   0x1a            80067710        80079dec
#   0x1b            80067714        80079dfc
#   0x1c            80067718        80079e0c
#   0x1d            8006771c        80079e1c
#   0x1e            80067720        80079e2c
#   0x1f            80067724        80079edc
#   0x20            80067728        80079eec
#   0x21            8006772c        80079efc
#   0x22            80067730        80079f0c
#   0x23            80067734        80079f1c
#   0x24            80067738        80079f2c
#   0x25            8006773c        80079ccc
#   0x26            80067740        80079cdc
#   0x27            80067744        80079cec
#   0x28            80067748        80079eac
#   0x29            8006774c        80079e3c
#   0x2a            80067750        80079e4c
#   0x2b            80067754        80079e5c
#   0x2c            80067758        80079e6c
#   0x2d            8006775c        80079e7c
#   0x2e            80067760        80079e8c
#   0x2f            80067764        80079e9c
#   0x30            80067768        80079ebc
#   0x31            8006776c        80079ecc
#   0x32            80067770        80079c1c
#   0x33            80067774        80079f3c
#   0x34            80067778        80079f4c
#   0x35            8006777c        80079f5c
#   0x36            80067780        80079f6c
#   0x37            80067784        80079f7c
#   0x38            80067788        80079f8c
#   0x39            8006778c        80079f9c
#   0x3a            80067790        80079fac
#   0x3b            80067794        80079fbc


                                                #           switch (*0x800960e4) {
                                                #               case 0x00:
                                                #               case 0x32:
                                                #               case >= 0x3c:
80079c1c: 0c01d2fe jal 0x80074bf8               #                   ? 0x74bf8 ();
80079c20: 00000000 nop
80079c24: 0801e7f1 j 0x80079fc4                 #                   break;
80079c28: 00000000 nop                          
                                                #               case 0x01:
80079c2c: 0c01d374 jal 0x80074dd0               #                   ? 0x74dd0 ();
80079c30: 00000000 nop
80079c34: 0801e7f1 j 0x80079fc4                 #                   break;
80079c38: 00000000 nop
                                                #               case 0x02:
80079c3c: 0c01d38b jal 0x80074e2c               #                   ? 0x74e2c ();
80079c40: 00000000 nop
80079c44: 0801e7f1 j 0x80079fc4                 #                   break;
80079c48: 00000000 nop
                                                #               case 0x03:
80079c4c: 0c01d3a5 jal 0x80074e94               #                   ? 0x74e94 ();
80079c50: 00000000 nop
80079c54: 0801e7f1 j 0x80079fc4                 #                   break;
80079c58: 00000000 nop
                                                #               case 0x04:
80079c5c: 0c01d3d7 jal 0x80074f5c               #                   ? 0x74f5c ();
80079c60: 00000000 nop
80079c64: 0801e7f1 j 0x80079fc4                 #                   break;
80079c68: 00000000 nop
                                                #               case 0x05:
80079c6c: 0c01d4c4 jal 0x80075310               #                   ? 0x75310 ();
80079c70: 00000000 nop
80079c74: 0801e7f1 j 0x80079fc4                 #                   break;
80079c78: 00000000 nop
                                                #               case 0x06:
80079c7c: 0c01d57f jal 0x800755fc               #                   ? 0x755fc ();
80079c80: 00000000 nop
80079c84: 0801e7f1 j 0x80079fc4                 #                   break;
80079c88: 00000000 nop
                                                #               case 0x07:
80079c8c: 0c01d5a4 jal 0x80075690               #                   ? 0x75690 ();
80079c90: 00000000 nop
80079c94: 0801e7f1 j 0x80079fc4                 #                   break;
80079c98: 00000000 nop
                                                #               case 0x08:
80079c9c: 0c01d5c7 jal 0x8007571c               #                   ? 0x7571c ();
80079ca0: 00000000 nop
80079ca4: 0801e7f1 j 0x80079fc4                 #                   break;
80079ca8: 00000000 nop
                                                #               case 0x09:
80079cac: 0c01d5f1 jal 0x800757c4               #                   ? 0x757c4 ();
80079cb0: 00000000 nop
80079cb4: 0801e7f1 j 0x80079fc4                 #                   break;
80079cb8: 00000000 nop
                                                #               case 0x0a:
80079cbc: 0c01d608 jal 0x80075820               #                   ? 0x75820 ();
80079cc0: 00000000 nop
80079cc4: 0801e7f1 j 0x80079fc4                 #                   break;
80079cc8: 00000000 nop
                                                #               case 0x25:
80079ccc: 0c01e028 jal 0x800780a0               #                   ? 0x780a0 ();
80079cd0: 00000000 nop
80079cd4: 0801e7f1 j 0x80079fc4                 #                   break;
80079cd8: 00000000 nop
                                                #               case 0x26:
80079cdc: 0c01e052 jal 0x80078148               #                   ? 0x78148 ();
80079ce0: 00000000 nop
80079ce4: 0801e7f1 j 0x80079fc4                 #                   break;
80079ce8: 00000000 nop
                                                #               case 0x27:
80079cec: 0c01e0ca jal 0x80078328               #                   ? 0x78328 ();
80079cf0: 00000000 nop
80079cf4: 0801e7f1 j 0x80079fc4                 #                   break;
80079cf8: 00000000 nop
                                                #               case 0x0b:
80079cfc: 0c01e10f jal 0x8007843c               #                   ? 0x7843c ();
80079d00: 00000000 nop
80079d04: 0801e7f1 j 0x80079fc4                 #                   break;
80079d08: 00000000 nop
                                                #               case 0x0c:
80079d0c: 0c01d61f jal 0x8007587c               #                   ? 0x7587c ();
80079d10: 00000000 nop
80079d14: 0801e7f1 j 0x80079fc4                 #                   break;
80079d18: 00000000 nop
                                                #               case 0x0d:
80079d1c: 0c01d644 jal 0x80075910               #                   ? 0x75910 ();
80079d20: 00000000 nop
80079d24: 0801e7f1 j 0x80079fc4                 #                   break;
80079d28: 00000000 nop
                                                #               case 0x0e:
80079d2c: 0c01d70d jal 0x80075c34               #                   ? 0x75c34 ();
80079d30: 00000000 nop
80079d34: 0801e7f1 j 0x80079fc4                 #                   break;
80079d38: 00000000 nop
                                                #               case 0x0f:
80079d3c: 0c01d728 jal 0x80075ca0               #                   ? 0x75ca0 ();
80079d40: 00000000 nop
80079d44: 0801e7f1 j 0x80079fc4                 #                   break;
80079d48: 00000000 nop
                                                #               case 0x10:
80079d4c: 0c01d743 jal 0x80075d0c               #                   ? 0x75d0c ();
80079d50: 00000000 nop
80079d54: 0801e7f1 j 0x80079fc4                 #                   break;
80079d58: 00000000 nop
                                                #               case 0x11:
80079d5c: 0c01d76c jal 0x80075db0               #                   ? 0x75db0 ();
80079d60: 00000000 nop
80079d64: 0801e7f1 j 0x80079fc4                 #                   break;
80079d68: 00000000 nop
                                                #               case 0x12:
80079d6c: 0c01d873 jal 0x800761cc               #                   ? 0x761cc ();
80079d70: 00000000 nop
80079d74: 0801e7f1 j 0x80079fc4                 #                   break;
80079d78: 00000000 nop
                                                #               case 0x13:
80079d7c: 0c01d90c jal 0x80076430               #                   ? 0x76430 ();
80079d80: 00000000 nop
80079d84: 0801e7f1 j 0x80079fc4                 #                   break;
80079d88: 00000000 nop
                                                #               case 0x14:
80079d8c: 0c01d8a7 jal 0x8007629c               #                   ? 0x7629c ();
80079d90: 00000000 nop
80079d94: 0801e7f1 j 0x80079fc4                 #                   break;
80079d98: 00000000 nop
                                                #               case 0x15:
80079d9c: 0c01d996 jal 0x80076658               #                   ? 0x76658 ();
80079da0: 00000000 nop
80079da4: 0801e7f1 j 0x80079fc4                 #                   break;
80079da8: 00000000 nop
                                                #               case 0x16:
80079dac: 0c01da47 jal 0x8007691c               #                   ? 0x7691c ();
80079db0: 00000000 nop
80079db4: 0801e7f1 j 0x80079fc4                 #                   break;
80079db8: 00000000 nop
                                                #               case 0x17:
80079dbc: 0c01da6c jal 0x800769b0               #                   ? 0x769b0 ();
80079dc0: 00000000 nop
80079dc4: 0801e7f1 j 0x80079fc4                 #                   break;
80079dc8: 00000000 nop
                                                #               case 0x18:
80079dcc: 0c01dadf jal 0x80076b7c               #                   ? 0x76b7c ();
80079dd0: 00000000 nop
80079dd4: 0801e7f1 j 0x80079fc4                 #                   break;
80079dd8: 00000000 nop
                                                #               case 0x19:
80079ddc: 0c01db14 jal 0x80076c50               #                   ? 0x76c50 ();
80079de0: 00000000 nop
80079de4: 0801e7f1 j 0x80079fc4                 #                   break;
80079de8: 00000000 nop
                                                #               case 0x1a:
80079dec: 0c01dafa jal 0x80076be8               #                   ? 0x76be8 ();
80079df0: 00000000 nop
80079df4: 0801e7f1 j 0x80079fc4                 #                   break;
80079df8: 00000000 nop
                                                #               case 0x1b:
80079dfc: 0c01db61 jal 0x80076d84               #                   ? 0x76d84 ();
80079e00: 00000000 nop
80079e04: 0801e7f1 j 0x80079fc4                 #                   break;
80079e08: 00000000 nop
                                                #               case 0x1c:
80079e0c: 0c01dbc5 jal 0x80076f14               #                   ? 0x76f14 ();
80079e10: 00000000 nop
80079e14: 0801e7f1 j 0x80079fc4                 #                   break;
80079e18: 00000000 nop
                                                #               case 0x1d:
80079e1c: 0c01dbf4 jal 0x80076fd0               #                   ? 0x76fd0 ();
80079e20: 00000000 nop
80079e24: 0801e7f1 j 0x80079fc4                 #                   break;
80079e28: 00000000 nop
                                                #               case 0x1e:
80079e2c: 0c01dc26 jal 0x80077098               #                   ? 0x77098 ();
80079e30: 00000000 nop
80079e34: 0801e7f1 j 0x80079fc4                 #                   break;
80079e38: 00000000 nop
                                                #               case 0x29:
80079e3c: 0c01dc4d jal 0x80077134               #                   ? 0x77134 ();
80079e40: 00000000 nop
80079e44: 0801e7f1 j 0x80079fc4                 #                   break;
80079e48: 00000000 nop
                                                #               case 0x2a:
80079e4c: 0c01dc68 jal 0x800771a0               #                   ? 0x771a0 ();
80079e50: 00000000 nop
80079e54: 0801e7f1 j 0x80079fc4                 #                   break;
80079e58: 00000000 nop
                                                #               case 0x2b:
80079e5c: 0c01dcc5 jal 0x80077314               #                   ? 0x77314 ();
80079e60: 00000000 nop
80079e64: 0801e7f1 j 0x80079fc4                 #                   break;
80079e68: 00000000 nop
                                                #               case 0x2c:
80079e6c: 0c01dcde jal 0x80077378               #                   ? 0x77378 ();
80079e70: 00000000 nop
80079e74: 0801e7f1 j 0x80079fc4                 #                   break;
80079e78: 00000000 nop
                                                #               case 0x2d:
80079e7c: 0c01dcfe jal 0x800773f8               #                   ? 0x773f8 ();
80079e80: 00000000 nop
80079e84: 0801e7f1 j 0x80079fc4                 #                   break;
80079e88: 00000000 nop
                                                #               case 0x2e:
80079e8c: 0c01ddd8 jal 0x80077760               #                   ? 0x77760 ();
80079e90: 00000000 nop
80079e94: 0801e7f1 j 0x80079fc4                 #                   break;
80079e98: 00000000 nop
                                                #               case 0x2f:
80079e9c: 0c01ddfb jal 0x800777ec               #                   ? 0x777ec ();               
80079ea0: 00000000 nop
80079ea4: 0801e7f1 j 0x80079fc4                 #                   break;
80079ea8: 00000000 nop
                                                #               case 0x28:
80079eac: 0c01de68 jal 0x800779a0               #                   ? 0x779a0 ();
80079eb0: 00000000 nop
80079eb4: 0801e7f1 j 0x80079fc4                 #                   break;
80079eb8: 00000000 nop
                                                #               case 0x30:
80079ebc: 0c01def6 jal 0x80077bd8               #                   ? 0x77bd8 ();
80079ec0: 00000000 nop
80079ec4: 0801e7f1 j 0x80079fc4                 #                   break;
80079ec8: 00000000 nop
                                                #               case 0x31:
80079ecc: 0c01df02 jal 0x80077c08               #                   ? 0x77c08 ();
80079ed0: 00000000 nop
80079ed4: 0801e7f1 j 0x80079fc4                 #                   break;
80079ed8: 00000000 nop
                                                #               case 0x1f:
80079edc: 0c01df0e jal 0x80077c38               #                   ? 0x77c38 ();
80079ee0: 00000000 nop
80079ee4: 0801e7f1 j 0x80079fc4                 #                   break;
80079ee8: 00000000 nop
                                                #               case 0x20:
80079eec: 0c01df29 jal 0x80077ca4               #                   ? 0x77ca4 ();
80079ef0: 00000000 nop
80079ef4: 0801e7f1 j 0x80079fc4                 #                   break;
80079ef8: 00000000 nop
                                                #               case 0x21:
80079efc: 0c01df87 jal 0x80077e1c               #                   ? 0x77e1c ();
80079f00: 00000000 nop
80079f04: 0801e7f1 j 0x80079fc4                 #                   break;
80079f08: 00000000 nop
                                                #               case 0x22:
80079f0c: 0c01dfa2 jal 0x80077e88               #                   ? 0x77e88 ();
80079f10: 00000000 nop
80079f14: 0801e7f1 j 0x80079fc4                 #                   break;
80079f18: 00000000 nop
                                                #               case 0x23:
80079f1c: 0c01dfda jal 0x80077f68               #                   ? 0x77f68 ();
80079f20: 00000000 nop
80079f24: 0801e7f1 j 0x80079fc4                 #                   break;
80079f28: 00000000 nop
                                                #               case 0x24:
80079f2c: 0c01e00c jal 0x80078030               #                   ? 0x78030 ();
80079f30: 00000000 nop
80079f34: 0801e7f1 j 0x80079fc4                 #                   break;
80079f38: 00000000 nop
                                                #               case 0x33:
80079f3c: 0c01e141 jal 0x80078504               #                   ? 0x78504 ();
80079f40: 00000000 nop
80079f44: 0801e7f1 j 0x80079fc4                 #                   break;
80079f48: 00000000 nop
                                                #               case 0x34:
80079f4c: 0c01e16b jal 0x800785ac               #                   ? 0x785ac ();
80079f50: 00000000 nop
80079f54: 0801e7f1 j 0x80079fc4                 #                   break;
80079f58: 00000000 nop
                                                #               case 0x35:
80079f5c: 0c01e1ff jal 0x800787fc               #                   ? 0x787fc ();
80079f60: 00000000 nop
80079f64: 0801e7f1 j 0x80079fc4                 #                   break;
80079f68: 00000000 nop
                                                #               case 0x36:
80079f6c: 0c01e2fd jal 0x80078bf4               #                   ? 0x78bf4 ();
80079f70: 00000000 nop
80079f74: 0801e7f1 j 0x80079fc4                 #                   break;
80079f78: 00000000 nop
                                                #               case 0x37:
80079f7c: 0c01e396 jal 0x80078e58               #                   ? 0x78e58 ();
80079f80: 00000000 nop
80079f84: 0801e7f1 j 0x80079fc4                 #                   break;
80079f88: 00000000 nop
                                                #               case 0x38:
80079f8c: 0c01e259 jal 0x80078964               #                   ? 0x78964 ();
80079f90: 00000000 nop
80079f94: 0801e7f1 j 0x80079fc4                 #                   break;
80079f98: 00000000 nop
                                                #               case 0x39:
80079f9c: 0c01e348 jal 0x80078d20               #                   ? 0x78d20 ();
80079fa0: 00000000 nop
80079fa4: 0801e7f1 j 0x80079fc4                 #                   break;
80079fa8: 00000000 nop
                                                #               case 0x3a:
80079fac: 0c01e3ed jal 0x80078fb4               #                   ? 0x78fb4 ();
80079fb0: 00000000 nop
80079fb4: 0801e7f1 j 0x80079fc4                 #                   break;
80079fb8: 00000000 nop
                                                #               case 0x3b:
80079fbc: 0c01e2b3 jal 0x80078acc               #                   ? 0x78acc ();
80079fc0: 00000000 nop                          #                   break;
                                                #           }
80079fc4: 0c01bbc0 jal 0x8006ef00               #           ? 0x6ef00 ();
80079fc8: 00000000 nop
80079fcc: 0c01bcc8 jal 0x8006f320               #           ? 0x6f320 ();
80079fd0: 00000000 nop
80079fd4: 0c01bd9e jal 0x8006f678               #           ? 0x6f678 ();
80079fd8: 00000000 nop
80079fdc: 0c01be6b jal 0x8006f9ac               #           ? 0x6f9ac ();
80079fe0: 00000000 nop
80079fe4: 0c0244a9 jal 0x800912a4               #           ? 0x912a4 ();
80079fe8: 00000000 nop
80079fec: 0c010f78 jal 0x80043de0               #           ? 0x43de0 ();
80079ff0: 00000000 nop
80079ff4: 3c038009 lui r3,0x8009
80079ff8: 8c6360e4 lw r3,0x60e4(r3)             #           *0x800960e4
80079ffc: 3402003b ori r2,r0,0x003b             #           0x3b
8007a000: 1062005c beq r3,r2,0x8007a174         #           if (*0x800960e4 == 0x3b) break;
8007a004: 00000000 nop
8007a008: 3c048005 lui r4,0x8005
8007a00c: 2484eaf4 addiu r4,r4,-0x150c          #           0x8004eaf4
8007a010: 0c00478e jal 0x80011e38               #           ? 0x11e38 (0x8004eaf4);
8007a014: 00000000 nop
8007a018: 3c028004 lui r2,0x8004
8007a01c: 8c42597c lw r2,0x597c(r2)             #           *0x8004597c
8007a020: 3c038004 lui r3,0x8004
8007a024: 8c635994 lw r3,0x5994(r3)             #           *0x80045994
8007a028: 2c420001 sltiu r2,r2,0x0001           #           !(*0x8004597c)
8007a02c: 24630001 addiu r3,r3,0x0001           #           *0x80045994 + 1
8007a030: 3c018004 lui r1,0x8004
8007a034: ac22597c sw r2,0x597c(r1)             #           *0x8004597c = !(*0x8004597c)
8007a038: 3c018004 lui r1,0x8004
8007a03c: ac235994 sw r3,0x5994(r1)             #           *0x80045994 = *0x80045994 + 1
8007a040: 0c024be6 jal 0x80092f98               #           ? 0x92f98 ();                                   // No lighting up if removed!
8007a044: 00000000 nop
8007a048: 0c011298 jal 0x80044a60               #           result_0x44a60 = ? 0x44a60 ();                  // No graphical updates if removed!
8007a04c: 00000000 nop
8007a050: 0c024ea6 jal 0x80093a98               #           ? 0x93a98 (result_0x44a60 + 0x5fc);             // No graphical updates if removed!
8007a054: 244405fc addiu r4,r2,0x05fc
8007a058: 3c038004 lui r3,0x8004
8007a05c: 8c635988 lw r3,0x5988(r3)             #           *0x80045988
8007a060: 3c018004 lui r1,0x8004
8007a064: ac225984 sw r2,0x5984(r1)             #           *0x80045984 = result_0x44a60
8007a068: 0062182a slt r3,r3,r2
8007a06c: 10600003 beq r3,r0,0x8007a07c
8007a070: 00002821 addu r5,r0,r0                #           count = 0
                                                #           if (*0x80045988 < result_0x44a60) {
8007a074: 3c018004 lui r1,0x8004
8007a078: ac225988 sw r2,0x5988(r1)             #               *0x80045988 = result_0x44a60
                                                #           }
8007a07c: 340600fe ori r6,r0,0x00fe             #           0xfe
8007a080: 3c04800a lui r4,0x800a
8007a084: 248477c4 addiu r4,r4,0x77c4           #           ptr = 0x800a77c4
8007a088: 00001821 addu r3,r0,r0                #           value = 0
                                                #           do {
8007a08c: 3c01800a lui r1,0x800a
8007a090: 00230821 addu r1,r1,r3
8007a094: 8c2277c8 lw r2,0x77c8(r1)             #               *(0x800a77c8 + value)
8007a098: 00000000 nop
8007a09c: 10400004 beq r2,r0,0x8007a0b0
8007a0a0: 24637564 addiu r3,r3,0x7564           #               value = value + 0x7564
                                                #               if (*(0x800a77c8 + value) != 0) {
8007a0a4: 10460002 beq r2,r6,0x8007a0b0
8007a0a8: 2442ffff addiu r2,r2,-0x0001          #                   *(0x800a77c8 + value) - 1
                                                #                   if (*(0x800a77c8 + value) != 0xfe) {
8007a0ac: ac820004 sw r2,0x0004(r4)             #                       *(ptr + 4) = *(0x800a77c8 + value) - 1
                                                #                   }
                                                #               }
8007a0b0: 24a50001 addiu r5,r5,0x0001           #               count = count + 1
8007a0b4: 28a20002 slti r2,r5,0x0002
8007a0b8: 1440fff4 bne r2,r0,0x8007a08c
8007a0bc: 24847564 addiu r4,r4,0x7564           #               ptr = ptr + 0x7564
                                                #           } while (count < 2)
8007a0c0: 3c038009 lui r3,0x8009
8007a0c4: 8c6360e4 lw r3,0x60e4(r3)             #           *0x800960e4
8007a0c8: 34020033 ori r2,r0,0x0033             #           0x33
8007a0cc: 10620003 beq r3,r2,0x8007a0dc
8007a0d0: 3402002d ori r2,r0,0x002d             #           0x2d
                                                #           if ((*0x800960e4 == 0x33)
8007a0d4: 14620021 bne r3,r2,0x8007a15c         #               or (*0x800960e4 == 0x2c))
8007a0d8: 00000000 nop                          #           {
8007a0dc: 3c038004 lui r3,0x8004
8007a0e0: 8c635980 lw r3,0x5980(r3)             #               *0x80045980
8007a0e4: 34020001 ori r2,r0,0x0001             #               1
8007a0e8: 14620005 bne r3,r2,0x8007a100         #               if (*0x80045980 == 1) {
8007a0ec: 00000000 nop
8007a0f0: 3c018004 lui r1,0x8004
8007a0f4: ac20598c sw r0,0x598c(r1)             #                   *0x8004598c = 0
8007a0f8: 0801e857 j 0x8007a15c
8007a0fc: 00000000 nop
                                                #               } else {
8007a100: 3c028004 lui r2,0x8004
8007a104: 8c425990 lw r2,0x5990(r2)             #                   *0x80045990
8007a108: 00000000 nop
8007a10c: 14400013 bne r2,r0,0x8007a15c         #                   if (*0x80045990 == 0) {
8007a110: 00000000 nop
8007a114: 3c038004 lui r3,0x8004
8007a118: 8c635984 lw r3,0x5984(r3)             #                       *0x80045984
8007a11c: 00000000 nop
8007a120: 28620301 slti r2,r3,0x0301            
8007a124: 14400003 bne r2,r0,0x8007a134
8007a128: 28620201 slti r2,r3,0x0201
                                                #                       if (*0x80045984 >= 0x301) {
8007a12c: 0801e855 j 0x8007a154
8007a130: 3402001e ori r2,r0,0x001e             #                           *0x8004598c = 0x1e;
8007a134: 14400009 bne r2,r0,0x8007a15c         #                       } else if (*0x80045984 >= 0x201) {
8007a138: 00000000 nop
8007a13c: 3c028004 lui r2,0x8004
8007a140: 8c42598c lw r2,0x598c(r2)             #                           *0x8004598c
8007a144: 00000000 nop
8007a148: 2842000f slti r2,r2,0x000f
8007a14c: 10400003 beq r2,r0,0x8007a15c         
8007a150: 3402000f ori r2,r0,0x000f             #                           15
                                                #                           if (*0x8004598c < 15) {
8007a154: 3c018004 lui r1,0x8004
8007a158: ac22598c sw r2,0x598c(r1)             #                               *0x8004598c = 15
                                                #                           }
                                                #                       }
                                                #                   }
                                                #               }
                                                #           }
8007a15c: 3c018004 lui r1,0x8004
8007a160: ac205990 sw r0,0x5990(r1)             #           *0x80045990 = 0
8007a164: 0c01127b jal 0x800449ec               #           ? 0x449ec ();
8007a168: 00000000 nop
8007a16c: 0801e6c5 j 0x80079b14                 #       }
8007a170: 00000000 nop
8007a174: 0c01e1f7 jal 0x800787dc               #       ? 0x787dc ();
8007a178: 00000000 nop
8007a17c: 0c021c19 jal 0x80087064               #       ? 0x87064 ();
8007a180: 00000000 nop
8007a184: 3c02800a lui r2,0x800a
8007a188: 8c42778c lw r2,0x778c(r2)             #       *0x800a778c
8007a18c: 00000000 nop
8007a190: 1040fe57 beq r2,r0,0x80079af0         #   } while (*0x800a778c == 0)
8007a194: 00000000 nop
8007a198: 0c0091b5 jal 0x800246d4               #   ? 0x246d4 (0);
8007a19c: 00002021 addu r4,r0,r0
8007a1a0: 0c0076ea jal 0x8001dba8               #   ? 0x1dba8 (0);
8007a1a4: 00002021 addu r4,r0,r0
8007a1a8: 0c0091b5 jal 0x800246d4               #   ? 0x246d4 (0);
8007a1ac: 00002021 addu r4,r0,r0
8007a1b0: 0c0076ea jal 0x8001dba8               #   ? 0x1dba8 (0);
8007a1b4: 00002021 addu r4,r0,r0
8007a1b8: 8fbf001c lw r31,0x001c(r29)
8007a1bc: 8fb20018 lw r18,0x0018(r29)
8007a1c0: 8fb10014 lw r17,0x0014(r29)
8007a1c4: 8fb00010 lw r16,0x0010(r29)
8007a1c8: 27bd0020 addiu r29,r29,0x0020
8007a1cc: 03e00008 jr r31
8007a1d0: 00000000 nop