// File: /workspace/github_cpp_makefile_star2_O1/gulamf[P]NRF24LE1Flash/src/HexUtils.cpp
// Function: HexUtils::ParseHexFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
vector<HexRecord> *HexUtils::ParseHexFile(string fileName, string &debugInfo)
{
    ifstream *streamReader;
    uint numHexRecords = 0;
    HexRecord curHexRecord;
    vector<HexRecord> *hexRecords = new vector<HexRecord>();

    try
    {
        streamReader = new ifstream(fileName.c_str());
    }
    catch (...)
    {
        return NULL;
    }

    debugInfo = "";

    if (!streamReader->is_open()) return NULL;

    while (!streamReader->eof())
    {
        char line[4096];
        debugInfo += ToString(numHexRecords + 1) + ") ";
        line[0]=0;
        streamReader->getline(line,4096);
        if(streamReader->eof() && line[0]==0)
            break;
        if(strcmp(line,":00000001FF")==0) {
            int y;
            y++;
        }
        curHexRecord.rawStr =  line;
        debugInfo += curHexRecord.rawStr;
        debugInfo += "\r\n";

        if (curHexRecord.rawStr[0] != ':')
        {
            debugInfo += "\tInvalid Record\r\n";
        }
        else
        {
            debugInfo += "\tValid Record\r\n";
        }

        curHexRecord.len = ParseHex<int>(curHexRecord.rawStr.substr(1, 2));
        debugInfo += "\tLength: 0x" + ToHexString(curHexRecord.len) + "\r\n";

        curHexRecord.address = ParseHex<int>(curHexRecord.rawStr.substr(3, 4));
        debugInfo += "\tAddress: 0x" + ToHexString(curHexRecord.address) + "\r\n";

        curHexRecord.type = ParseHex<int>(curHexRecord.rawStr.substr(7, 2));

        debugInfo += "\tType: 0x" + ToHexString(curHexRecord.type);

        switch (curHexRecord.type)
        {
            case 0:
                debugInfo += " (Data record)\r\n";
                break;
            case 1:
                debugInfo += " (End of file record)\r\n";
                break;
            case 2:
                debugInfo += " (Extended segment address record)\r\n";
                break;
            case 3:
                debugInfo += " (Start segment address record)\r\n";
                break;
            case 4:
                debugInfo += " (Extended linear address record)\r\n";
                break;
            case 5:
                debugInfo += " (Start linear address record)\r\n";
                break;
            default:
                debugInfo += " (Unknown record type)\r\n";
                break;
        }

        if (curHexRecord.len > 0)
        {
            curHexRecord.data = new uint8_t[curHexRecord.len];
            debugInfo += "\tData: 0x";

            for (uint x = 0; x < curHexRecord.len; x++)
            {
                string s = curHexRecord.rawStr.substr(9 + (x * 2), 2);
                uint8_t t = ParseHex<uint8_t>(s);
                curHexRecord.data[x]=t;

                if (curHexRecord.data[x] < 0x10)
                    debugInfo += "0";

                debugInfo += ToHexString(curHexRecord.data[x]);
            }

            debugInfo += "\r\n";
        }
        else
        {
            debugInfo += "\tNo data\r\n";
        }

        curHexRecord.checkSum = ParseHex<int>(curHexRecord.rawStr.substr(9 + (curHexRecord.len * 2), 2));
        debugInfo += "\tRecord checksum: 0x" + ToHexString(curHexRecord.checkSum) + "\r\n";

        curHexRecord.calcSum = 0;

        for (uint x = 1; x < 9 + (curHexRecord.len * 2); x += 2)
        {
            curHexRecord.calcSum += ParseHex<int>(curHexRecord.rawStr.substr(x, 2));
        }

        curHexRecord.calcSum = -curHexRecord.calcSum;
        curHexRecord.calcSum &= 0xFF;

        debugInfo += "\tCalculated checksum: 0x" + ToHexString(curHexRecord.calcSum) + "\r\n";

        if (curHexRecord.calcSum == curHexRecord.checkSum)
        {
            debugInfo += "\tChecksums match\r\n\r\n";
        }
        else
        {
            debugInfo += "\tChecksums do not match\r\n\r\n";
            return NULL;
        }

        hexRecords->push_back(curHexRecord);
        numHexRecords++;
    }

    streamReader->close();

    return hexRecords;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10b8, %rsp           # imm = 0x10B8
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x90(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movl $0x18, %edi
callq 0x2210
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movl $0x208, %edi            # imm = 0x208
callq 0x2210
movq %rax, %r13
movq (%rbx), %rsi
movq %rax, %rdi
movl $0x8, %edx
callq 0x23a0
movq 0x8(%r14), %rdx
leaq 0x2ac4(%rip), %rcx      # 0x8a66
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x2310
movq %r13, %rdi
addq $0x78, %rdi
callq 0x2080
movq $0x0, -0xe0(%rbp)
testb %al, %al
je 0x699e
movq %r13, -0xc8(%rbp)
movq %r12, -0xd8(%rbp)
leaq -0x38(%rbp), %r15
leaq -0x58(%rbp), %r12
leaq -0x48(%rbp), %r13
movq -0xc8(%rbp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rcx,%rax)
jne 0x6955
movq -0xe0(%rbp), %rax
incl %eax
movl %eax, -0xcc(%rbp)
movl %eax, -0xc0(%rbp)
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
leaq -0xc0(%rbp), %rsi
callq 0x6b0b
movq %rbx, %rdi
leaq 0x28c6(%rip), %rsi      # 0x88f9
callq 0x23b0
movq %r15, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6058
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x605f
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x20c0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x609b
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x60b0
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movb $0x0, -0x10e0(%rbp)
movq -0xc8(%rbp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %ecx
movl $0x1000, %edx           # imm = 0x1000
movq -0xc8(%rbp), %rdi
leaq -0x10e0(%rbp), %rsi
callq 0x23c0
movq -0xc8(%rbp), %rcx
movq (%rcx), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%rcx,%rax)
je 0x6114
movl $0x3, %ebx
cmpb $0x0, -0x10e0(%rbp)
je 0x6948
movq -0x98(%rbp), %r12
leaq -0x10e0(%rbp), %r15
movq %r15, %rdi
callq 0x2110
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
movq %r12, %rdx
leaq -0x58(%rbp), %rbx
movq %r15, %rcx
leaq -0x38(%rbp), %r15
movq %rax, %r8
callq 0x2310
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
movq %r14, %rdi
callq 0x20c0
movq %r14, %rdi
leaq 0x28fb(%rip), %rsi      # 0x8a64
callq 0x23b0
movq -0xa0(%rbp), %rax
cmpb $0x3a, (%rax)
leaq 0x277d(%rip), %rsi      # 0x88fc
leaq 0x2788(%rip), %rax      # 0x890e
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0x23b0
movl $0x1, %edx
movl $0x2, %ecx
movq %r13, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x2230
movq %r13, %rdi
callq 0x6ba4
movw %ax, -0x80(%rbp)
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x61cc
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movzwl -0x80(%rbp), %esi
leaq -0xc0(%rbp), %r12
movq %r12, %rdi
callq 0x6f54
movl $0xb, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x272b(%rip), %rcx      # 0x891e
callq 0x2260
movq %rbx, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6218
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x621e
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x68(%rbp), %rdi
leaq 0x2824(%rip), %rsi      # 0x8a64
callq 0x23b0
movq %r15, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x6265
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x626c
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x20c0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x62a8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
je 0x62bd
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x62df
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x2220
movl $0x3, %edx
movl $0x4, %ecx
movq %r13, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x2230
movq %r13, %rdi
callq 0x6ba4
movw %ax, -0x7e(%rbp)
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x6319
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movzwl -0x7e(%rbp), %esi
movq %r12, %rdi
callq 0x6f54
movl $0xc, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x25f1(%rip), %rcx      # 0x892a
callq 0x2260
movq %rbx, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x635e
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x6364
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x68(%rbp), %rdi
leaq 0x26de(%rip), %rsi      # 0x8a64
callq 0x23b0
movq %r15, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x63ab
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x63b2
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x20c0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x63ee
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
je 0x6403
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x6425
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x2220
movl $0x7, %edx
movl $0x2, %ecx
movq %r13, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x2230
movq %r13, %rdi
callq 0x6ba4
movw %ax, -0x7c(%rbp)
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x645f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movzwl -0x7c(%rbp), %esi
leaq -0x68(%rbp), %r12
movq %r12, %rdi
callq 0x6f54
movl $0x9, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x24b4(%rip), %rcx      # 0x8937
callq 0x2260
movq %r15, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x64a8
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x64af
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x20c0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x64eb
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
je 0x6500
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movzwl -0x7c(%rbp), %eax
leaq 0x24eb(%rip), %rsi      # 0x89f6
cmpq $0x6, %rax
jae 0x651f
leaq 0x2594(%rip), %rcx      # 0x8aac
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
movq %r14, %rdi
callq 0x23b0
movzwl -0x80(%rbp), %edi
leaq 0x24e7(%rip), %rsi      # 0x8a19
testq %rdi, %rdi
je 0x661a
callq 0x2030
movq %rax, -0x78(%rbp)
movq %r14, %rdi
leaq 0x24c1(%rip), %rsi      # 0x8a0f
callq 0x23b0
cmpw $0x0, -0x80(%rbp)
leaq 0x2505(%rip), %rsi      # 0x8a64
je 0x661a
movl $0x9, %r12d
xorl %ebx, %ebx
movl $0x2, %ecx
movq %r13, %rdi
leaq -0xa0(%rbp), %rsi
movq %r12, %rdx
callq 0x2230
movq %r13, %rdi
callq 0x6bee
movq -0x78(%rbp), %rcx
movb %al, (%rcx,%rbx)
movq -0x78(%rbp), %rax
cmpb $0xf, (%rax,%rbx)
ja 0x65ac
movq %r14, %rdi
leaq 0x1cfa(%rip), %rsi      # 0x82a1
callq 0x23b0
movq -0x78(%rbp), %rax
movzbl (%rax,%rbx), %esi
leaq -0x68(%rbp), %rdi
callq 0x6f54
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq %r14, %rdi
callq 0x20c0
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x65e6
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x65fb
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
incq %rbx
movzwl -0x80(%rbp), %eax
addq $0x2, %r12
cmpq %rax, %rbx
jb 0x656d
leaq 0x244e(%rip), %rsi      # 0x8a64
leaq -0x58(%rbp), %rbx
movq %r14, %rdi
callq 0x23b0
movzwl -0x80(%rbp), %eax
leaq 0x9(,%rax,2), %rdx
movl $0x2, %ecx
movq %r13, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x2230
movq %r13, %rdi
callq 0x6ba4
movw %ax, -0x70(%rbp)
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x6663
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movzwl -0x70(%rbp), %esi
leaq -0xc0(%rbp), %r12
movq %r12, %rdi
callq 0x6f54
movl $0x14, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x239a(%rip), %rcx      # 0x8a24
callq 0x2260
movq %rbx, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x66af
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x66b5
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x68(%rbp), %rdi
leaq 0x238d(%rip), %rsi      # 0x8a64
callq 0x23b0
movq %r15, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x66fc
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x6703
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x20c0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x673f
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
cmpq %rbx, %rdi
je 0x6754
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x6776
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x2220
movw $0x0, -0x6e(%rbp)
movl $0x1, %r12d
leaq -0xa0(%rbp), %rbx
movl $0x2, %ecx
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x2230
movq %r13, %rdi
callq 0x6ba4
addw %ax, -0x6e(%rbp)
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x67bd
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
addq $0x2, %r12
movzwl -0x80(%rbp), %eax
leaq 0x9(,%rax,2), %rax
cmpq %rax, %r12
jb 0x6789
movzwl -0x6e(%rbp), %eax
xorl %ecx, %ecx
subw %ax, %cx
movzbl %cl, %esi
movw %si, -0x6e(%rbp)
leaq -0xc0(%rbp), %rbx
movq %rbx, %rdi
callq 0x6f54
leaq -0x58(%rbp), %r12
movl $0x18, %r8d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x2230(%rip), %rcx      # 0x8a39
callq 0x2260
movq %r12, -0x68(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x682e
movq %rdx, -0x68(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x58(%rbp)
jmp 0x6836
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x60(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x68(%rbp), %rdi
leaq 0x220c(%rip), %rsi      # 0x8a64
callq 0x23b0
movq %r15, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x687d
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x6884
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x20c0
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x68c0
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x68d5
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x68f7
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x2220
movzwl -0x6e(%rbp), %eax
cmpw -0x70(%rbp), %ax
jne 0x6934
movq %r14, %rdi
leaq 0x2147(%rip), %rsi      # 0x8a52
callq 0x23b0
xorl %ebx, %ebx
movq -0xd8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x6c3c
movl -0xcc(%rbp), %eax
movq %rax, -0xe0(%rbp)
jmp 0x6948
movl $0x1, %ebx
movq %r14, %rdi
leaq 0x2124(%rip), %rsi      # 0x8a67
callq 0x23b0
testl %ebx, %ebx
je 0x5fe8
cmpl $0x3, %ebx
jne 0x6971
movq -0xc8(%rbp), %rdi
leaq -0x90(%rbp), %r15
callq 0x2070
movq -0xd8(%rbp), %rbx
jmp 0x69a0
xorl %ebx, %ebx
leaq -0x90(%rbp), %r15
jmp 0x69a0
movq %rax, %rbx
movl $0x208, %esi            # imm = 0x208
movq %r13, %rdi
callq 0x2220
jmp 0x6991
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2100
callq 0x2340
xorl %ebx, %ebx
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x69bb
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2220
movq %rbx, %rax
addq $0x10b8, %rsp           # imm = 0x10B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x6ae8
jmp 0x6a03
jmp 0x6a03
jmp 0x6a1d
jmp 0x6a1d
jmp 0x6a3b
jmp 0x6a3b
jmp 0x6ade
jmp 0x6ade
jmp 0x6ade
jmp 0x6a03
jmp 0x6a1d
jmp 0x6a3b
jmp 0x6ade
jmp 0x6ade
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x6a20
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x6a20
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x6a3e
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x6a3e
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x6ae1
movq -0xb0(%rbp), %rsi
jmp 0x6ad0
jmp 0x6ade
jmp 0x6ade
jmp 0x6a71
jmp 0x6a6a
jmp 0x6ade
jmp 0x6ade
movq %rax, %rbx
jmp 0x6a89
jmp 0x6ade
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x6a89
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x6ae1
movq -0x58(%rbp), %rsi
jmp 0x6ad0
jmp 0x6a9e
movq %rax, %rbx
jmp 0x6abf
movq %rax, %rbx
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x6abf
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x2220
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x6ae1
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2220
jmp 0x6ae1
jmp 0x6ade
jmp 0x6ade
movq %rax, %rbx
leaq -0x90(%rbp), %r15
movq -0xa0(%rbp), %rdi
cmpq %r15, %rdi
je 0x6b03
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2220
movq %rbx, %rdi
callq 0x2380