perfect_dark/src/lib/lib_47ef0.c

164 lines
5.6 KiB
C

#include <ultra64.h>
#include "constants.h"
#include "bss.h"
#include "data.h"
#include "types.h"
GLOBAL_ASM(
glabel func00047ef0
.late_rodata
glabel var70059e20
.word 0x3f317218
glabel var70059e24
.word 0x3f317218
.text
/* 47ef0: 27bdffe8 */ addiu $sp,$sp,-24
/* 47ef4: 44802000 */ mtc1 $zero,$f4
/* 47ef8: 00000000 */ nop
/* 47efc: 4604603c */ c.lt.s $f12,$f4
/* 47f00: 00000000 */ nop
/* 47f04: 45000004 */ bc1f .L00047f18
/* 47f08: 00000000 */ nop
/* 47f0c: 44800000 */ mtc1 $zero,$f0
/* 47f10: 10000069 */ b .L000480b8
/* 47f14: 00000000 */ nop
.L00047f18:
/* 47f18: 44803000 */ mtc1 $zero,$f6
/* 47f1c: 00000000 */ nop
/* 47f20: 46066032 */ c.eq.s $f12,$f6
/* 47f24: 00000000 */ nop
/* 47f28: 45000004 */ bc1f .L00047f3c
/* 47f2c: 00000000 */ nop
/* 47f30: 44800000 */ mtc1 $zero,$f0
/* 47f34: 10000060 */ b .L000480b8
/* 47f38: 00000000 */ nop
.L00047f3c:
/* 47f3c: 44804000 */ mtc1 $zero,$f8
/* 47f40: 00000000 */ nop
/* 47f44: e7a80008 */ swc1 $f8,0x8($sp)
/* 47f48: 3c014000 */ lui $at,0x4000
/* 47f4c: 44815000 */ mtc1 $at,$f10
/* 47f50: 00000000 */ nop
/* 47f54: 460c503e */ c.le.s $f10,$f12
/* 47f58: 00000000 */ nop
/* 47f5c: 45000011 */ bc1f .L00047fa4
/* 47f60: 00000000 */ nop
.L00047f64:
/* 47f64: 3c014000 */ lui $at,0x4000
/* 47f68: 44818000 */ mtc1 $at,$f16
/* 47f6c: 00000000 */ nop
/* 47f70: 46106303 */ div.s $f12,$f12,$f16
/* 47f74: 3c017006 */ lui $at,%hi(var70059e20)
/* 47f78: c4249e20 */ lwc1 $f4,%lo(var70059e20)($at)
/* 47f7c: c7b20008 */ lwc1 $f18,0x8($sp)
/* 47f80: 46049180 */ add.s $f6,$f18,$f4
/* 47f84: e7a60008 */ swc1 $f6,0x8($sp)
/* 47f88: 3c014000 */ lui $at,0x4000
/* 47f8c: 44814000 */ mtc1 $at,$f8
/* 47f90: 00000000 */ nop
/* 47f94: 460c403e */ c.le.s $f8,$f12
/* 47f98: 00000000 */ nop
/* 47f9c: 4501fff1 */ bc1t .L00047f64
/* 47fa0: 00000000 */ nop
.L00047fa4:
/* 47fa4: 3c013f80 */ lui $at,0x3f80
/* 47fa8: 44815000 */ mtc1 $at,$f10
/* 47fac: 00000000 */ nop
/* 47fb0: 460a603c */ c.lt.s $f12,$f10
/* 47fb4: 00000000 */ nop
/* 47fb8: 45000012 */ bc1f .L00048004
/* 47fbc: 00000000 */ nop
.L00047fc0:
/* 47fc0: 3c014000 */ lui $at,0x4000
/* 47fc4: 44818000 */ mtc1 $at,$f16
/* 47fc8: 00000000 */ nop
/* 47fcc: 46106302 */ mul.s $f12,$f12,$f16
/* 47fd0: 00000000 */ nop
/* 47fd4: 3c017006 */ lui $at,%hi(var70059e24)
/* 47fd8: c4249e24 */ lwc1 $f4,%lo(var70059e24)($at)
/* 47fdc: c7b20008 */ lwc1 $f18,0x8($sp)
/* 47fe0: 46049181 */ sub.s $f6,$f18,$f4
/* 47fe4: e7a60008 */ swc1 $f6,0x8($sp)
/* 47fe8: 3c013f80 */ lui $at,0x3f80
/* 47fec: 44814000 */ mtc1 $at,$f8
/* 47ff0: 00000000 */ nop
/* 47ff4: 4608603c */ c.lt.s $f12,$f8
/* 47ff8: 00000000 */ nop
/* 47ffc: 4501fff0 */ bc1t .L00047fc0
/* 48000: 00000000 */ nop
.L00048004:
/* 48004: 240e0001 */ addiu $t6,$zero,0x1
/* 48008: afae0014 */ sw $t6,0x14($sp)
/* 4800c: 3c013f80 */ lui $at,0x3f80
/* 48010: 44815000 */ mtc1 $at,$f10
/* 48014: 44819000 */ mtc1 $at,$f18
/* 48018: 460a6401 */ sub.s $f16,$f12,$f10
/* 4801c: 46126100 */ add.s $f4,$f12,$f18
/* 48020: 46048183 */ div.s $f6,$f16,$f4
/* 48024: e7a60010 */ swc1 $f6,0x10($sp)
/* 48028: 3c014000 */ lui $at,0x4000
/* 4802c: 44814000 */ mtc1 $at,$f8
/* 48030: c7aa0010 */ lwc1 $f10,0x10($sp)
/* 48034: 460a4482 */ mul.s $f18,$f8,$f10
/* 48038: e7b2000c */ swc1 $f18,0xc($sp)
/* 4803c: c7b00010 */ lwc1 $f16,0x10($sp)
/* 48040: 46108102 */ mul.s $f4,$f16,$f16
/* 48044: e7a40010 */ swc1 $f4,0x10($sp)
.L00048048:
/* 48048: c7a60008 */ lwc1 $f6,0x8($sp)
/* 4804c: e7a60004 */ swc1 $f6,0x4($sp)
/* 48050: 8faf0014 */ lw $t7,0x14($sp)
/* 48054: c7a8000c */ lwc1 $f8,0xc($sp)
/* 48058: c7a40008 */ lwc1 $f4,0x8($sp)
/* 4805c: 448f5000 */ mtc1 $t7,$f10
/* 48060: 00000000 */ nop
/* 48064: 468054a0 */ cvt.s.w $f18,$f10
/* 48068: 46124403 */ div.s $f16,$f8,$f18
/* 4806c: 46102180 */ add.s $f6,$f4,$f16
/* 48070: e7a60008 */ swc1 $f6,0x8($sp)
/* 48074: c7aa000c */ lwc1 $f10,0xc($sp)
/* 48078: c7a80010 */ lwc1 $f8,0x10($sp)
/* 4807c: 46085482 */ mul.s $f18,$f10,$f8
/* 48080: e7b2000c */ swc1 $f18,0xc($sp)
/* 48084: 8fb80014 */ lw $t8,0x14($sp)
/* 48088: 27190002 */ addiu $t9,$t8,0x2
/* 4808c: afb90014 */ sw $t9,0x14($sp)
/* 48090: c7a40008 */ lwc1 $f4,0x8($sp)
/* 48094: c7b00004 */ lwc1 $f16,0x4($sp)
/* 48098: 46102032 */ c.eq.s $f4,$f16
/* 4809c: 00000000 */ nop
/* 480a0: 4500ffe9 */ bc1f .L00048048
/* 480a4: 00000000 */ nop
/* 480a8: 10000003 */ b .L000480b8
/* 480ac: c7a00008 */ lwc1 $f0,0x8($sp)
/* 480b0: 10000001 */ b .L000480b8
/* 480b4: 00000000 */ nop
.L000480b8:
/* 480b8: 03e00008 */ jr $ra
/* 480bc: 27bd0018 */ addiu $sp,$sp,0x18
/* 480c0: 00000000 */ nop
/* 480c4: 00000000 */ nop
/* 480c8: 00000000 */ nop
/* 480cc: 00000000 */ nop
/* 480d0: 00000000 */ nop
/* 480d4: 00000000 */ nop
/* 480d8: 00000000 */ nop
/* 480dc: 00000000 */ nop
/* 480e0: 00000000 */ nop
/* 480e4: 00000000 */ nop
/* 480e8: 00000000 */ nop
/* 480ec: 00000000 */ nop
/* 480f0: 00000000 */ nop
/* 480f4: 00000000 */ nop
/* 480f8: 00000000 */ nop
/* 480fc: 00000000 */ nop
/* 48100: 00000000 */ nop
/* 48104: 00000000 */ nop
/* 48108: 00000000 */ nop
/* 4810c: 00000000 */ nop
/* 48110: 00000000 */ nop
/* 48114: 00000000 */ nop
/* 48118: 00000000 */ nop
/* 4811c: 00000000 */ nop
);