// File: ipatix[P]wav2agb/wav_file.cpp
// Function: wav_file::readData(unsigned long, double*, unsigned long)
void wav_file::readData(size_t location, double *data, size_t len)
{
    while (len-- > 0) {
        if (loadedChunk != location - (location % loadChunkSize)) {
            loadedChunk = location - (location % loadChunkSize);

            std::streampos blockpos = this->dataChunkPos + std::streampos(loadedChunk * fmt_size());
            std::streampos endblockpos = this->dataChunkEndPos;
            size_t actualChunkSize = std::min(loadChunkSize, static_cast<size_t>(endblockpos - blockpos) / fmt_size());

            if (actualChunkSize == 0) {
                std::fill(loadBuffer.begin(), loadBuffer.end(), 0.0);
                goto load_sample;
            }

            ifs.seekg(blockpos, ifs.beg);
            std::vector<uint8_t> ld(actualChunkSize * fmt_size());
            ifs.read(reinterpret_cast<char *>(ld.data()), ld.size());

            if (fmt == format_type::u8) {
                for (size_t i = 0; i < actualChunkSize; i++) {
                    loadBuffer[i] = (double(ld[i]) - 128.0) / 128.0;
                }
            } else if (fmt == format_type::s16) {
                for (size_t i = 0; i < actualChunkSize; i++) {
                    int32_t s =
                        (ld[i * fmt_size() + 0] << 0) |
                        (ld[i * fmt_size() + 1] << 8);
                    s <<= 16;
                    s >>= 16;
                    loadBuffer[i] = double(s) / 32768.0;
                }
            } else if (fmt == format_type::s24) {
                for (size_t i = 0; i < actualChunkSize; i++) {
                    int32_t s =
                        (ld[i * fmt_size() + 0] << 0) |
                        (ld[i * fmt_size() + 1] << 8) |
                        (ld[i * fmt_size() + 2] << 16);
                    s <<= 8;
                    s >>= 8;
                    loadBuffer[i] = double(s) / 8388608.0;
                }
            } else if (fmt == format_type::s32) {
                for (size_t i = 0; i < actualChunkSize; i++) {
                    int32_t s =
                        (ld[i * fmt_size() + 0] << 0) |
                        (ld[i * fmt_size() + 1] << 8) |
                        (ld[i * fmt_size() + 2] << 16) |
                        (ld[i * fmt_size() + 3] << 24);
                    loadBuffer[i] = double(s) / 2147483648.0;
                }
            } else if (fmt == format_type::f32) {
                for (size_t i = 0; i < actualChunkSize; i++) {
                    union {
                        uint32_t s;
                        float f;
                    } u;
                    u.s = 
                        (ld[i * fmt_size() + 0] << 0) |
                        (ld[i * fmt_size() + 1] << 8) |
                        (ld[i * fmt_size() + 2] << 16) |
                        (ld[i * fmt_size() + 3] << 24);
                    loadBuffer[i] = u.f;
                }
            } else if (fmt == format_type::f64) {
                for (size_t i = 0; i < actualChunkSize; i++) {
                    union {
                        uint64_t s;
                        double d;
                    } u;
                    u.s = 
                        (uint64_t(ld[i * fmt_size() + 0]) << 0) |
                        (uint64_t(ld[i * fmt_size() + 1]) << 8) |
                        (uint64_t(ld[i * fmt_size() + 2]) << 16) |
                        (uint64_t(ld[i * fmt_size() + 3]) << 24) |
                        (uint64_t(ld[i * fmt_size() + 4]) << 32) |
                        (uint64_t(ld[i * fmt_size() + 5]) << 40) |
                        (uint64_t(ld[i * fmt_size() + 6]) << 48) |
                        (uint64_t(ld[i * fmt_size() + 7]) << 56);
                    loadBuffer[i] = u.d;
                }
            }
            for (size_t i = actualChunkSize; i < loadChunkSize; i++) {
                loadBuffer[i] = 0.0;
            }
        }
load_sample:
        *data++ = loadBuffer[location % loadChunkSize];
        location++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x330, %rsp            # imm = 0x330
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x20(%rbp)
cmpq $0x0, %rax
jbe 0x92ff
movq -0x110(%rbp), %rax
movq 0x228(%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x10(%rbp), %rdx
andq $0x7ff, %rdx            # imm = 0x7FF
subq %rdx, %rcx
cmpq %rcx, %rax
je 0x92b7
movq -0x110(%rbp), %rdi
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
andq $0x7ff, %rcx            # imm = 0x7FF
subq %rcx, %rax
movq %rax, 0x228(%rdi)
movq %rdi, %rax
addq $0x208, %rax            # imm = 0x208
movq %rax, -0x120(%rbp)
movq 0x228(%rdi), %rax
movq %rax, -0x128(%rbp)
callq 0x69a0
movq -0x128(%rbp), %rsi
movl %eax, %eax
imulq %rax, %rsi
leaq -0x40(%rbp), %rdi
callq 0x9910
leaq -0x40(%rbp), %rdi
callq 0x9580
movq -0x120(%rbp), %rdi
movq %rax, %rsi
callq 0x98d0
movq %rax, %rcx
movq -0x110(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq %rdx, -0x28(%rbp)
movq 0x218(%rax), %rcx
movq %rcx, -0x50(%rbp)
movq 0x220(%rax), %rax
movq %rax, -0x48(%rbp)
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x9ad0
movq -0x110(%rbp), %rdi
movq %rax, -0x118(%rbp)
callq 0x69a0
movl %eax, %ecx
movq -0x118(%rbp), %rax
movl %ecx, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0x60(%rbp)
leaq 0x42cc(%rip), %rdi      # 0xc8d8
leaq -0x60(%rbp), %rsi
callq 0x46b0
movq (%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x866f
movq -0x110(%rbp), %rdi
addq $0x230, %rdi            # imm = 0x230
callq 0x9b90
movq -0x110(%rbp), %rdi
movq %rax, -0x68(%rbp)
addq $0x230, %rdi            # imm = 0x230
callq 0x9bc0
movq %rax, -0x70(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
leaq -0x78(%rbp), %rdx
callq 0x9b50
jmp 0x92b9
leaq -0x30(%rbp), %rdi
callq 0x9580
movq -0x110(%rbp), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x3390
movq -0x110(%rbp), %rdi
movq -0x58(%rbp), %rax
movq %rax, -0x140(%rbp)
callq 0x69a0
movl %eax, %ecx
movq -0x140(%rbp), %rax
movl %ecx, %ecx
imulq %rcx, %rax
movq %rax, -0x138(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x9bf0
movq -0x138(%rbp), %rsi
movq -0x130(%rbp), %rdx
leaq -0x90(%rbp), %rdi
callq 0x9c10
jmp 0x86e5
leaq -0x91(%rbp), %rdi
callq 0x9c80
leaq -0x90(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x9ca0
movq -0x150(%rbp), %rdi
movq %rax, -0x148(%rbp)
callq 0x9cc0
movq -0x110(%rbp), %rdi
movq -0x148(%rbp), %rsi
movq %rax, %rdx
callq 0x3370
jmp 0x872f
movq -0x110(%rbp), %rax
cmpl $0x0, 0x250(%rax)
jne 0x8821
movq $0x0, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x881c
movq -0xb0(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movzbl (%rax), %eax
cvtsi2sd %eax, %xmm0
movsd 0x38a8(%rip), %xmm1     # 0xc030
subsd %xmm1, %xmm0
movsd 0x389c(%rip), %xmm1     # 0xc030
divsd %xmm1, %xmm0
movsd %xmm0, -0x158(%rbp)
addq $0x230, %rdi            # imm = 0x230
movq -0xb0(%rbp), %rsi
callq 0x9d00
movsd -0x158(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
jmp 0x874e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x9c80
jmp 0x9308
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x9a70
jmp 0x9308
jmp 0x925e
movq -0x110(%rbp), %rax
cmpl $0x1, 0x250(%rax)
jne 0x8973
movq $0x0, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x896e
movq -0x110(%rbp), %rdi
movq -0xb8(%rbp), %rax
movq %rax, -0x168(%rbp)
callq 0x69a0
movl %eax, -0x15c(%rbp)
jmp 0x8873
movq -0x168(%rbp), %rsi
movl -0x15c(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movzbl (%rax), %eax
movl %eax, -0x17c(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x178(%rbp)
callq 0x69a0
movl %eax, -0x16c(%rbp)
jmp 0x88bd
movq -0x178(%rbp), %rsi
movl -0x16c(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x1, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl -0x17c(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
shll $0x10, %eax
movl %eax, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
sarl $0x10, %eax
movl %eax, -0xbc(%rbp)
cvtsi2sdl -0xbc(%rbp), %xmm0
movsd 0x3d64(%rip), %xmm1     # 0xc690
divsd %xmm1, %xmm0
movsd %xmm0, -0x188(%rbp)
addq $0x230, %rdi            # imm = 0x230
movq -0xb8(%rbp), %rsi
callq 0x9d00
movsd -0x188(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0xb8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xb8(%rbp)
jmp 0x8840
jmp 0x925c
movq -0x110(%rbp), %rax
cmpl $0x2, 0x250(%rax)
jne 0x8b20
movq $0x0, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x8b1b
movq -0x110(%rbp), %rdi
movq -0xc8(%rbp), %rax
movq %rax, -0x198(%rbp)
callq 0x69a0
movl %eax, -0x18c(%rbp)
jmp 0x89c5
movq -0x198(%rbp), %rsi
movl -0x18c(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movzbl (%rax), %eax
movl %eax, -0x1ac(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x1a8(%rbp)
callq 0x69a0
movl %eax, -0x19c(%rbp)
jmp 0x8a0f
movq -0x1a8(%rbp), %rsi
movl -0x19c(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
incq %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl -0x1ac(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0x1bc(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
callq 0x69a0
movl %eax, -0x1b0(%rbp)
jmp 0x8a6a
movq -0x1b8(%rbp), %rsi
movl -0x1b0(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x2, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl -0x1bc(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
shll $0x8, %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
sarl $0x8, %eax
movl %eax, -0xcc(%rbp)
cvtsi2sdl -0xcc(%rbp), %xmm0
movsd 0x3baf(%rip), %xmm1     # 0xc688
divsd %xmm1, %xmm0
movsd %xmm0, -0x1c8(%rbp)
addq $0x230, %rdi            # imm = 0x230
movq -0xc8(%rbp), %rsi
callq 0x9d00
movsd -0x1c8(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0xc8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xc8(%rbp)
jmp 0x8992
jmp 0x925a
movq -0x110(%rbp), %rax
cmpl $0x3, 0x250(%rax)
jne 0x8d0b
movq $0x0, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x8d06
movq -0x110(%rbp), %rdi
movq -0xd8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
callq 0x69a0
movl %eax, -0x1cc(%rbp)
jmp 0x8b72
movq -0x1d8(%rbp), %rsi
movl -0x1cc(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movzbl (%rax), %eax
movl %eax, -0x1ec(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x1e8(%rbp)
callq 0x69a0
movl %eax, -0x1dc(%rbp)
jmp 0x8bbc
movq -0x1e8(%rbp), %rsi
movl -0x1dc(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
incq %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl -0x1ec(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0x1fc(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x1f8(%rbp)
callq 0x69a0
movl %eax, -0x1f0(%rbp)
jmp 0x8c17
movq -0x1f8(%rbp), %rsi
movl -0x1f0(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x2, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl -0x1fc(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0x20c(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x208(%rbp)
callq 0x69a0
movl %eax, -0x200(%rbp)
jmp 0x8c73
movq -0x208(%rbp), %rsi
movl -0x200(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x3, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl -0x20c(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, -0xdc(%rbp)
cvtsi2sdl -0xdc(%rbp), %xmm0
movsd 0x39bc(%rip), %xmm1     # 0xc680
divsd %xmm1, %xmm0
movsd %xmm0, -0x218(%rbp)
addq $0x230, %rdi            # imm = 0x230
movq -0xd8(%rbp), %rsi
callq 0x9d00
movsd -0x218(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0xd8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd8(%rbp)
jmp 0x8b3f
jmp 0x9258
movq -0x110(%rbp), %rax
cmpl $0x4, 0x250(%rax)
jne 0x8eee
movq $0x0, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x8ee9
movq -0x110(%rbp), %rdi
movq -0xe8(%rbp), %rax
movq %rax, -0x228(%rbp)
callq 0x69a0
movl %eax, -0x21c(%rbp)
jmp 0x8d5d
movq -0x228(%rbp), %rsi
movl -0x21c(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movzbl (%rax), %eax
movl %eax, -0x23c(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x238(%rbp)
callq 0x69a0
movl %eax, -0x22c(%rbp)
jmp 0x8da7
movq -0x238(%rbp), %rsi
movl -0x22c(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
incq %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl -0x23c(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0x24c(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x248(%rbp)
callq 0x69a0
movl %eax, -0x240(%rbp)
jmp 0x8e02
movq -0x248(%rbp), %rsi
movl -0x240(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x2, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl -0x24c(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movl %eax, -0x25c(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x258(%rbp)
callq 0x69a0
movl %eax, -0x250(%rbp)
jmp 0x8e5e
movq -0x258(%rbp), %rsi
movl -0x250(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x3, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl -0x25c(%rbp), %eax
movzbl (%rcx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, -0xec(%rbp)
movss -0xec(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x268(%rbp)
addq $0x230, %rdi            # imm = 0x230
movq -0xe8(%rbp), %rsi
callq 0x9d00
movsd -0x268(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0xe8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe8(%rbp)
jmp 0x8d2a
jmp 0x9256
movq -0x110(%rbp), %rax
cmpl $0x5, 0x250(%rax)
jne 0x9254
movq $0x0, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
cmpq -0x58(%rbp), %rax
jae 0x9252
movq -0x110(%rbp), %rdi
movq -0xf8(%rbp), %rax
movq %rax, -0x278(%rbp)
callq 0x69a0
movl %eax, -0x26c(%rbp)
jmp 0x8f40
movq -0x278(%rbp), %rsi
movl -0x26c(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movzbl (%rax), %eax
movq %rax, -0x290(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x288(%rbp)
callq 0x69a0
movl %eax, -0x27c(%rbp)
jmp 0x8f8b
movq -0x288(%rbp), %rsi
movl -0x27c(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
incq %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movq -0x290(%rbp), %rax
movzbl (%rcx), %ecx
shll $0x8, %ecx
orq %rcx, %rax
movq %rax, -0x2a8(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x2a0(%rbp)
callq 0x69a0
movl %eax, -0x294(%rbp)
jmp 0x8fe9
movq -0x2a0(%rbp), %rsi
movl -0x294(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x2, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movq -0x2a8(%rbp), %rax
movzbl (%rcx), %ecx
shll $0x10, %ecx
orq %rcx, %rax
movq %rax, -0x2c0(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x2b8(%rbp)
callq 0x69a0
movl %eax, -0x2ac(%rbp)
jmp 0x9048
movq -0x2b8(%rbp), %rsi
movl -0x2ac(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x3, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movq -0x2c0(%rbp), %rax
movzbl (%rcx), %ecx
shll $0x18, %ecx
orq %rcx, %rax
movq %rax, -0x2d8(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x2d0(%rbp)
callq 0x69a0
movl %eax, -0x2c4(%rbp)
jmp 0x90a7
movq -0x2d0(%rbp), %rsi
movl -0x2c4(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x4, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movq -0x2d8(%rbp), %rax
movzbl (%rcx), %ecx
shlq $0x20, %rcx
orq %rcx, %rax
movq %rax, -0x2f0(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x2e8(%rbp)
callq 0x69a0
movl %eax, -0x2dc(%rbp)
jmp 0x9107
movq -0x2e8(%rbp), %rsi
movl -0x2dc(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x5, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movq -0x2f0(%rbp), %rax
movzbl (%rcx), %ecx
shlq $0x28, %rcx
orq %rcx, %rax
movq %rax, -0x308(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x300(%rbp)
callq 0x69a0
movl %eax, -0x2f4(%rbp)
jmp 0x9167
movq -0x300(%rbp), %rsi
movl -0x2f4(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x6, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movq -0x308(%rbp), %rax
movzbl (%rcx), %ecx
shlq $0x30, %rcx
orq %rcx, %rax
movq %rax, -0x320(%rbp)
movq -0xf8(%rbp), %rax
movq %rax, -0x318(%rbp)
callq 0x69a0
movl %eax, -0x30c(%rbp)
jmp 0x91c7
movq -0x318(%rbp), %rsi
movl -0x30c(%rbp), %eax
movl %eax, %eax
imulq %rax, %rsi
addq $0x7, %rsi
leaq -0x90(%rbp), %rdi
callq 0x9ce0
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movq -0x320(%rbp), %rax
movzbl (%rcx), %ecx
shlq $0x38, %rcx
orq %rcx, %rax
movq %rax, -0x100(%rbp)
movsd -0x100(%rbp), %xmm0
movsd %xmm0, -0x328(%rbp)
addq $0x230, %rdi            # imm = 0x230
movq -0xf8(%rbp), %rsi
callq 0x9d00
movsd -0x328(%rbp), %xmm0
movsd %xmm0, (%rax)
movq -0xf8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
jmp 0x8f0d
jmp 0x9254
jmp 0x9256
jmp 0x9258
jmp 0x925a
jmp 0x925c
jmp 0x925e
movq -0x58(%rbp), %rax
movq %rax, -0x108(%rbp)
cmpq $0x800, -0x108(%rbp) # imm = 0x800
jae 0x92ab
movq -0x110(%rbp), %rdi
addq $0x230, %rdi            # imm = 0x230
movq -0x108(%rbp), %rsi
callq 0x9d00
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0x9269
leaq -0x90(%rbp), %rdi
callq 0x9a70
jmp 0x92b9
movq -0x110(%rbp), %rdi
addq $0x230, %rdi            # imm = 0x230
movq -0x10(%rbp), %rsi
andq $0x7ff, %rsi            # imm = 0x7FF
callq 0x9d00
movsd (%rax), %xmm0
movq -0x18(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x18(%rbp)
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x84f6
addq $0x330, %rsp            # imm = 0x330
popq %rbp
retq
movq -0xa0(%rbp), %rdi
callq 0x34e0
nopw %cs:(%rax,%rax)
nop