// File: /workspace/github_cpp_makefile_star2_O3/ipatix[P]wav2agb/wav_file.cpp
// Function: wav_file::wav_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
wav_file::wav_file(const std::string& path) : loadBuffer(loadChunkSize)
{
    ifs.exceptions(std::ios::badbit | std::ios::eofbit);
    ifs.open(path, std::ios::binary);
    if (!ifs.good())
        throw std::runtime_error("failed to open file: " + path + ", reason: " + strerror(errno));
    if (!ifs.is_open())
        throw std::runtime_error("failed to open file: " + path + ", reason: " + strerror(errno));

    ifs.seekg(0, ifs.end);
    std::streampos len = ifs.tellg();
    ifs.seekg(0, ifs.beg);

    std::string chunkId = read_str(ifs, 4);
    if (chunkId != "RIFF")
        throw std::runtime_error("RIFF ID invalid");
    uint32_t mainChunkLen = read_u32(ifs);
    if (mainChunkLen + 8 != len)
        throw std::runtime_error("RIFF chunk len (=" +
                std::to_string(mainChunkLen) +
                ") doesn't match file len (=" +
                std::to_string(len) +
                ")");
    std::string riffType = read_str(ifs, 4);
    if (riffType != "WAVE")
        throw std::runtime_error("WAVE ID invalid");

    bool dataChunkFound = false;
    bool fmtChunkFound = false;
    // search all chunks
    std::streampos curPos;
    while ((curPos = ifs.tellg()) + std::streampos(8) <= len) {
        chunkId = read_str(ifs, 4);
        uint32_t chunkLen = read_u32(ifs);
        if (curPos + std::streampos(8) + std::streampos(chunkLen) > len)
            throw std::runtime_error("ERROR: chunk goes beyond end of file: offset=" + std::to_string(curPos));

        if (chunkId == "fmt ") {
            fmtChunkFound = true;
            std::vector<uint8_t> fmtChunk = read_arr(ifs, chunkLen);
            uint16_t fmtTag = arr_u16(fmtChunk, 0);
            uint16_t numChannels = arr_u16(fmtChunk, 2);
            if (numChannels != 1)
                throw std::runtime_error("ERROR: input file is NOT mono");
            this->sampleRate = arr_u32(fmtChunk, 4);
            uint16_t block_align = arr_u16(fmtChunk, 12);
            uint16_t bits_per_sample = arr_u16(fmtChunk, 14);
            if (fmtTag == 1) {
                // integer
                if (block_align == 1 && bits_per_sample == 8)
                    this->fmt = format_type::u8;
                else if (block_align == 2 && bits_per_sample == 16)
                    this->fmt = format_type::s16;
                else if (block_align == 3 && bits_per_sample == 24)
                    this->fmt = format_type::s24;
                else if (block_align == 4 && bits_per_sample == 32)
                    this->fmt = format_type::s32;
                else
                    throw std::runtime_error("ERROR: unsupported integer format combination");
            } else if (fmtTag == 3) {
                // float
                if (block_align == 4 && bits_per_sample == 32)
                    this->fmt = format_type::f32;
                else if (block_align == 8 && bits_per_sample == 64)
                    this->fmt = format_type::f64;
                else
                    throw std::runtime_error("ERROR: unsupported float format combination");
            } else {
                throw std::runtime_error("ERROR: unsupported format code: " + std::to_string(fmtTag));
            }
        } else if (chunkId == "data") {
            dataChunkFound = true;
            dataChunkPos = ifs.tellg();
            dataChunkEndPos = dataChunkPos + std::streampos(chunkLen);
            ifs.seekg(chunkLen, ifs.cur);
        } else if (chunkId == "smpl") {
            std::vector<uint8_t> smplChunk = read_arr(ifs, chunkLen);
            uint32_t midiUnityNote = arr_u32(smplChunk, 12);
            this->midiKey = static_cast<uint8_t>(std::min(midiUnityNote, 127u));
            uint32_t midiPitchFraction = arr_u32(smplChunk, 16);
            // the values below convert the uint32_t range to 0.0 to 100.0 range
            this->tuning = static_cast<double>(midiPitchFraction) / (4294967296.0 * 100.0);
            uint32_t numLoops = arr_u32(smplChunk, 28);
            if (numLoops > 1)
                throw std::runtime_error("ERROR: too many loops in smpl chunk");
            if (numLoops == 1) {
                uint32_t loopType = arr_u32(smplChunk, 36 + 4);
                if (loopType != 0)
                    throw std::runtime_error("ERROR: loop type not supported: " + std::to_string(loopType));
                this->loopStart = arr_u32(smplChunk, 36 + 8);
                // sampler chunks tell the last sample to be played (so including rather than excluding), thus +1
                this->loopEnd = arr_u32(smplChunk, 36 + 12) + 1;
                this->loopEnabled = true;
            }
        } else {
            //fprintf(stderr, "WARNING: ignoring unknown chunk type: <%s>\n", chunkId.c_str());
            ifs.seekg(chunkLen, ifs.cur);
        }

        /* https://en.wikipedia.org/wiki/Resource_Interchange_File_Format#Explanation
         * If chunk size is odd, skip the pad byte */
        if ((chunkLen % 2) == 1)
            ifs.seekg(1, ifs.cur);
    }

    if (!fmtChunkFound)
        throw std::runtime_error("ERROR: fmt chunk not found");
    if (!dataChunkFound)
        throw std::runtime_error("ERROR: data chunk not found");

    uint32_t numSamples = static_cast<uint32_t>(dataChunkEndPos - dataChunkPos) / fmt_size();
    this->loopEnd = std::min(this->loopEnd, numSamples);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2250
xorpd %xmm0, %xmm0
movupd %xmm0, 0x218(%rbx)
movupd %xmm0, 0x208(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x228(%rbx)
movupd %xmm0, 0x230(%rbx)
movq $0x0, 0x240(%rbx)
movl $0x4000, %edi           # imm = 0x4000
callq 0x2210
movq %rax, 0x230(%rbx)
movq %rax, %r15
addq $0x4000, %r15           # imm = 0x4000
movq %r15, 0x240(%rbx)
movl $0x4000, %edx           # imm = 0x4000
movq %rax, %rdi
xorl %esi, %esi
callq 0x2140
movq %r15, 0x238(%rbx)
movq $-0x1, 0x248(%rbx)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x254(%rbx)
movb $0x0, 0x25c(%rbx)
movq $0x0, 0x260(%rbx)
movb $0x3c, 0x268(%rbx)
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl $0x3, 0x1c(%rbx,%rax)
movl 0x20(%rbx,%rax), %esi
callq 0x2390
movq %rbx, %rdi
movq %r14, %rsi
movl $0x4, %edx
callq 0x21e0
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%rbx,%rax)
jne 0x46a1
leaq 0x78(%rbx), %rdi
callq 0x2060
testb %al, %al
je 0x46ff
movq %rbx, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x22d0
movq %rbx, %rdi
callq 0x23b0
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22d0
leaq 0x88(%rsp), %rdi
movq %rbx, %rsi
callq 0x4f2b
leaq 0x26c9(%rip), %rsi      # 0x6725
leaq 0x88(%rsp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x475d
leaq 0x48(%rsp), %rsi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x22b0
movl 0x48(%rsp), %r12d
leal 0x8(%r12), %eax
cmpq %rax, %r14
jne 0x4794
leaq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0x4f2b
leaq 0x26be(%rip), %rsi      # 0x6768
leaq 0x48(%rsp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x4807
movq $0x0, 0xb0(%rsp)
leaq 0x88(%rsp), %r12
movq $0x0, 0xa8(%rsp)
movq %rbx, %rdi
callq 0x23b0
movq %rax, %r13
leaq 0x8(%rax), %r15
cmpq %r14, %r15
jg 0x445e
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x4f2b
movq %r12, %rdi
movq %rbp, %rsi
callq 0x2290
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x412b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2220
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x22b0
movl 0x8(%rsp), %ebp
addq %rbp, %r15
cmpq %r14, %r15
jg 0x44fb
movq %r12, %rdi
leaq 0x2654(%rip), %rsi      # 0x67ab
callq 0x2090
testl %eax, %eax
je 0x41a3
movq %r12, %rdi
leaq 0x26df(%rip), %rsi      # 0x6849
callq 0x2090
testl %eax, %eax
je 0x42a6
movq %r12, %rdi
leaq 0x26cd(%rip), %rsi      # 0x684e
callq 0x2090
testl %eax, %eax
je 0x4360
movq %rbx, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0x22d0
jmp 0x433f
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x4f9e
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
xorl %edx, %edx
callq 0x4ff1
movl %eax, %r15d
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl $0x2, %edx
callq 0x4ff1
cmpw $0x1, %ax
jne 0x4558
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl $0x4, %edx
callq 0x5029
movl %eax, 0x26c(%rbx)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl $0xc, %edx
callq 0x4ff1
movl %eax, %r13d
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl $0xe, %edx
callq 0x4ff1
cmpw $0x3, %r15w
je 0x42e9
movzwl %r15w, %r15d
cmpl $0x1, %r15d
jne 0x458f
movl %r13d, %edx
xorl $0x1, %edx
movl %eax, %esi
xorl $0x8, %esi
xorl %ecx, %ecx
orw %dx, %si
je 0x4318
movl %r13d, %edx
xorl $0x2, %edx
movl %eax, %esi
xorl $0x10, %esi
movl $0x1, %ecx
orw %dx, %si
je 0x4318
movl %r13d, %edx
xorl $0x3, %edx
movl %eax, %esi
xorl $0x18, %esi
movl $0x2, %ecx
orw %dx, %si
je 0x4318
cmpw $0x4, %r13w
jne 0x488e
movl $0x3, %ecx
cmpw $0x20, %ax
je 0x4318
jmp 0x488e
movq %rbx, %rdi
callq 0x23b0
movq %rax, 0x208(%rbx)
movq %rdx, 0x210(%rbx)
addq %rbp, %rax
movq %rax, 0x218(%rbx)
movq %rdx, 0x220(%rbx)
movb $0x1, %al
movq %rax, 0xa8(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movl $0x1, %edx
callq 0x22d0
jmp 0x433f
movl %r13d, %edx
xorl $0x4, %edx
movl %eax, %esi
xorl $0x20, %esi
movl $0x4, %ecx
orw %dx, %si
je 0x4318
cmpw $0x8, %r13w
jne 0x4623
movl $0x5, %ecx
cmpw $0x40, %ax
jne 0x4623
movl %ecx, 0x250(%rbx)
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4335
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2220
movb $0x1, %al
movq %rax, 0xb0(%rsp)
testb $0x1, %bpl
je 0x40dc
movl $0x1, %esi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x22d0
jmp 0x40dc
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x4f9e
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl $0xc, %edx
callq 0x5029
cmpl $0x7f, %eax
movl $0x7f, %ecx
cmovael %ecx, %eax
movb %al, 0x268(%rbx)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl $0x10, %edx
callq 0x5029
movl %eax, %eax
cvtsi2sd %rax, %xmm0
divsd 0x22d0(%rip), %xmm0     # 0x6688
movsd %xmm0, 0x260(%rbx)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl $0x1c, %edx
callq 0x5029
cmpl $0x2, %eax
jae 0x45ec
cmpl $0x1, %eax
jne 0x443e
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl $0x28, %edx
callq 0x5029
movl %eax, %r13d
testl %eax, %eax
jne 0x4644
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl $0x2c, %edx
callq 0x5029
movl %eax, 0x254(%rbx)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl $0x30, %edx
callq 0x5029
incl %eax
movl %eax, 0x258(%rbx)
movb $0x1, 0x25c(%rbx)
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x433f
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2220
jmp 0x433f
testb $0x1, 0xb0(%rsp)
je 0x483e
testb $0x1, 0xa8(%rsp)
je 0x485c
movq 0x208(%rbx), %r15
movq 0x218(%rbx), %r14
movq %rbx, %rdi
callq 0x3eac
movl %eax, %ecx
subl %r15d, %r14d
movl %r14d, %eax
xorl %edx, %edx
divl %ecx
movl 0x258(%rbx), %ecx
cmpl %ecx, %eax
cmovbl %eax, %ecx
movl %ecx, 0x258(%rbx)
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x44c8
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2220
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x44e9
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2220
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x68(%rsp), %rdi
movq %r13, %rsi
callq 0x597f
leaq 0x2261(%rip), %rsi      # 0x677d
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x588f
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x2360
xorl %ebp, %ebp
movq 0x4ab4(%rip), %rsi      # 0x8ff8
movq 0x4a85(%rip), %rdx      # 0x8fd0
movq %r15, %rdi
callq 0x23a0
jmp 0x4b0f
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x2244(%rip), %rsi      # 0x67b0
movq %rax, %rdi
callq 0x20f0
movq 0x4a7d(%rip), %rsi      # 0x8ff8
movq 0x4a4e(%rip), %rdx      # 0x8fd0
movq %r15, %rdi
callq 0x23a0
jmp 0x4b0f
movl $0x10, %edi
callq 0x2120
movq %rax, %r12
leaq 0x68(%rsp), %rdi
movl %r15d, %esi
callq 0x5a33
leaq 0x2278(%rip), %rsi      # 0x6828
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x588f
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
callq 0x2360
xorl %ebp, %ebp
movq 0x4a20(%rip), %rsi      # 0x8ff8
movq 0x49f1(%rip), %rdx      # 0x8fd0
movq %r12, %rdi
callq 0x23a0
jmp 0x4b0f
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x2253(%rip), %rsi      # 0x6853
movq %rax, %rdi
callq 0x20f0
movq 0x49e9(%rip), %rsi      # 0x8ff8
movq 0x49ba(%rip), %rdx      # 0x8fd0
movq %r15, %rdi
callq 0x23a0
jmp 0x4b0f
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x21c5(%rip), %rsi      # 0x67fc
movq %rax, %rdi
callq 0x20f0
jmp 0x48aa
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x68(%rsp), %rdi
movl %r13d, %esi
callq 0x58ff
leaq 0x2212(%rip), %rsi      # 0x6877
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rdx
callq 0x588f
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x2360
xorl %ebp, %ebp
movq 0x496b(%rip), %rsi      # 0x8ff8
movq 0x493c(%rip), %rdx      # 0x8fd0
movq %r15, %rdi
callq 0x23a0
jmp 0x4b0f
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x204f(%rip), %rsi      # 0x6704
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x575f
leaq 0x2051(%rip), %rsi      # 0x671a
leaq 0x8(%rsp), %rdi
callq 0x23e0
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x48c0
movupd (%rcx), %xmm0
movupd %xmm0, (%r12)
jmp 0x48cd
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x1ff1(%rip), %rsi      # 0x6704
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0x575f
leaq 0x1ff3(%rip), %rsi      # 0x671a
leaq 0x8(%rsp), %rdi
callq 0x23e0
leaq 0x58(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x4927
movupd (%rcx), %xmm0
movupd %xmm0, (%r12)
jmp 0x4934
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x1fb9(%rip), %rsi      # 0x672a
movq %rax, %rdi
callq 0x20f0
movq 0x4878(%rip), %rsi      # 0x8ff8
movq 0x4849(%rip), %rdx      # 0x8fd0
movq %r15, %rdi
callq 0x23a0
jmp 0x4b0f
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0xb8(%rsp), %rdi
movl %r12d, %esi
callq 0x58ff
leaq 0x1f82(%rip), %rsi      # 0x673a
leaq 0x28(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0x588f
leaq 0x1f7b(%rip), %rsi      # 0x674c
leaq 0x28(%rsp), %rdi
callq 0x23e0
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x4a42
movupd (%rcx), %xmm0
movupd %xmm0, (%r12)
jmp 0x4a4f
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x1f52(%rip), %rsi      # 0x676d
movq %rax, %rdi
callq 0x20f0
movq 0x47ce(%rip), %rsi      # 0x8ff8
movq 0x479f(%rip), %rdx      # 0x8fd0
movq %r15, %rdi
callq 0x23a0
jmp 0x4b0f
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x2046(%rip), %rsi      # 0x6898
movq %rax, %rdi
callq 0x20f0
jmp 0x4878
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x2043(%rip), %rsi      # 0x68b3
movq %rax, %rdi
callq 0x20f0
movq 0x4779(%rip), %rsi      # 0x8ff8
movq 0x474a(%rip), %rdx      # 0x8fd0
movq %r15, %rdi
callq 0x23a0
movl $0x10, %edi
callq 0x2120
movq %rax, %r15
leaq 0x1f2c(%rip), %rsi      # 0x67ce
movq %rax, %rdi
callq 0x20f0
movq 0x4747(%rip), %rsi      # 0x8ff8
movq 0x4718(%rip), %rdx      # 0x8fd0
movq %r15, %rdi
callq 0x23a0
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x2030
movl (%rax), %edi
callq 0x20d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x23e0
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x498e
movupd (%rcx), %xmm0
movupd %xmm0, (%r13)
jmp 0x49a1
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x2030
movl (%rax), %edi
callq 0x20d0
movq %r14, %rdi
movq %rax, %rsi
callq 0x23e0
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x49e8
movupd (%rcx), %xmm0
movupd %xmm0, (%r13)
jmp 0x49fb
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
movq 0x8(%rax), %rdx
leaq 0x88(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %r15, %rdi
callq 0x2360
xorl %ebp, %ebp
movq 0x4624(%rip), %rsi      # 0x8ff8
movq 0x45f5(%rip), %rdx      # 0x8fd0
movq %r15, %rdi
callq 0x23a0
jmp 0x4b0f
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
movq 0x8(%rax), %rdx
leaq 0x88(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %r15, %rdi
callq 0x2360
xorl %ebp, %ebp
movq 0x45ca(%rip), %rsi      # 0x8ff8
movq 0x459b(%rip), %rdx      # 0x8fd0
movq %r15, %rdi
callq 0x23a0
jmp 0x4b0f
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xd8(%rsp), %rdi
movq %r14, %rsi
callq 0x597f
leaq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0x57e7
leaq 0x1baa(%rip), %rsi      # 0x663f
leaq 0x8(%rsp), %rdi
callq 0x23e0
leaq 0x58(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x4ac3
movupd (%rcx), %xmm0
movupd %xmm0, (%r13)
jmp 0x4ad0
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
leaq 0x48(%rsp), %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movb $0x1, %bpl
movq %r15, %rdi
callq 0x2360
xorl %ebp, %ebp
movq 0x44f8(%rip), %rsi      # 0x8ff8
movq 0x44c9(%rip), %rdx      # 0x8fd0
movq %r15, %rdi
callq 0x23a0
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0x4b31
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4b31
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b54
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4b54
movq %rax, %r14
movb $0x1, %bpl
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b7d
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4b7d
movq %rax, %r14
movb $0x1, %bpl
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x4b9c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4b9c
movq %rax, %r14
movb $0x1, %bpl
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4bb7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2220
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4bd8
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x2220
testb %bpl, %bpl
jne 0x4cbd
jmp 0x4edc
jmp 0x4bea
jmp 0x4c0c
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x4c12
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4c12
movq %rax, %r14
movb $0x1, %bpl
movq 0x48(%rsp), %rdi
cmpq %r12, %rdi
je 0x4c29
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2220
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4c44
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2220
testb %bpl, %bpl
jne 0x4ccf
jmp 0x4efd
movq %rax, %r14
leaq 0xc8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4cbd
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4cbd
jmp 0x4c7a
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4ccf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4ccf
jmp 0x4e11
jmp 0x4e91
jmp 0x4e91
jmp 0x4ebe
jmp 0x4e91
jmp 0x4cba
jmp 0x4d57
movq %rax, %r14
movq %r15, %rdi
callq 0x2190
jmp 0x4edc
jmp 0x4ccc
movq %rax, %r14
movq %r15, %rdi
callq 0x2190
jmp 0x4efd
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4cfb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2220
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d16
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2220
testb %bpl, %bpl
jne 0x4e14
jmp 0x4ea1
movq %rax, %r14
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e14
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4e14
jmp 0x4ebe
jmp 0x4ebe
jmp 0x4d57
movq %rax, %r14
jmp 0x4edc
jmp 0x4df0
movq %rax, %r14
jmp 0x4f1b
jmp 0x4e11
jmp 0x4e11
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4d95
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2220
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4db0
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2220
testb %bpl, %bpl
jne 0x4deb
jmp 0x4ea1
movq %rax, %r14
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4deb
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4deb
jmp 0x4e9e
jmp 0x4df0
jmp 0x4e9e
jmp 0x4e11
movq %rax, %r14
movq %r12, %rdi
jmp 0x4e17
movq %rax, %r14
jmp 0x4efd
jmp 0x4e9e
jmp 0x4e9e
jmp 0x4e9e
jmp 0x4ebe
jmp 0x4e9e
movq %rax, %r14
movq %r15, %rdi
callq 0x2190
jmp 0x4ea1
jmp 0x4e9e
jmp 0x4ebe
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4e47
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2220
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e62
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2220
testb %bpl, %bpl
jne 0x4e94
jmp 0x4ec1
movq %rax, %r14
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4e94
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2220
jmp 0x4e94
jmp 0x4e9e
jmp 0x4e9e
jmp 0x4e9e
jmp 0x4ebe
movq %rax, %r14
movq %r15, %rdi
callq 0x2190
jmp 0x4ec1
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4ec1
movq 0x38(%rsp), %rsi
subq %rdi, %rsi
callq 0x2220
jmp 0x4ec1
jmp 0x4ebe
jmp 0x4ebe
movq %rax, %r14
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4edc
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2220
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4efd
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2220
leaq 0x230(%rbx), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x4f1b
movq 0x240(%rbx), %rsi
subq %rdi, %rsi
callq 0x2220
movq %rbx, %rdi
callq 0x2070
movq %r14, %rdi
callq 0x23c0