// File: instance01[P]chromium-snss-parse/examples/../snss-parse-lib.hpp
// Function: read_next_session_command(std::basic_ifstream<char, std::char_traits<char>>&)
std::shared_ptr<Command> read_next_session_command(std::ifstream& f) {
    std::shared_ptr<Command> ret;
    int prev = f.tellg();
    uint16_t size = read_arbitrary<uint16_t>(f, 2);
    uint8_t type_id = read_arbitrary<uint8_t>(f, 1);

    if (0 == size) {
        std::cerr << "Error: Encountered command with size 0. This can indicate a corrupt file.";
    }

    // See https://0x1.pl/s/33 for all command ids
    switch(type_id) {
        case 6: // CommandUpdateTabNavigation
        {
            ret = std::shared_ptr<CommandUpdateTabNavigation>(new CommandUpdateTabNavigation());
            std::shared_ptr<CommandUpdateTabNavigation> ret2 = std::static_pointer_cast<CommandUpdateTabNavigation>(ret);
            ret2->pickle_size = read_arbitrary<uint32_t>(f, 4);
            ret2->tabid = read_arbitrary<int32_t>(f, 4);
            ret2->index = read_arbitrary<int32_t>(f, 4);
            if (read_string(f, ret2->url, true))
                ret2->title = read_string16(f, true);
            // TODO Add missing stuff
            break;
        }
        case 0: // CommandSetTabWindow
        case 2: // CommandSetTabIndexInWindow
        case 5: // CommandTabNavigationPathPrunedFromBack
        case 7: // CommandSetSelectedNavigationIndex
        case 8: // CommandSetSelectedTabInIndex
        case 9: // CommandSetWindowType
        case 12: // CommandSetPinnedState (TODO works, but we should read a bool here, not int!)
        {
            ret = std::shared_ptr<IDAndIndex>(new IDAndIndex());
            std::shared_ptr<IDAndIndex> ret2 = std::static_pointer_cast<IDAndIndex>(ret);
            //IDAndIndex & cmd = (IDAndIndex &) ret;
            ret2->id = read_arbitrary<uint32_t>(f, 4);
            ret2->index = read_arbitrary<int32_t>(f, 4);
            break;
        }
        case 14: // CommandSetWindowBounds3
        {
            ret = std::shared_ptr<CommandSetWindowBounds3>(new CommandSetWindowBounds3());
            std::shared_ptr<CommandSetWindowBounds3> ret2 = std::static_pointer_cast<CommandSetWindowBounds3>(ret);
            ret2->window_id = read_arbitrary<int32_t>(f, 4);
            ret2->x = read_arbitrary<int32_t>(f, 4);
            ret2->y = read_arbitrary<int32_t>(f, 4);
            ret2->width = read_arbitrary<int32_t>(f, 4);
            ret2->height = read_arbitrary<int32_t>(f, 4);
            ret2->show_state = read_arbitrary<int32_t>(f, 4);
            break;
        }
        case 16: // CommandTabClosed
        {
            ret = std::shared_ptr<CommandTabClosed>(new CommandTabClosed());
            std::shared_ptr<CommandTabClosed> ret2 = std::static_pointer_cast<CommandTabClosed>(ret);
            ret2->id = read_arbitrary<int32_t>(f, 4);
            ret2->UNKNOWN_0 = read_arbitrary<int32_t>(f, 4); // TODO
            ret2->close_time = read_arbitrary<int64_t>(f, 8);
            break;
        }
        case 17: // CommandWindowClosed
        {
            ret = std::shared_ptr<CommandWindowClosed>(new CommandWindowClosed());
            std::shared_ptr<CommandWindowClosed> ret2 = std::static_pointer_cast<CommandWindowClosed>(ret);
            ret2->id = read_arbitrary<int32_t>(f, 4);
            ret2->UNKNOWN_0 = read_arbitrary<int32_t>(f, 4); // TODO
            ret2->close_time = read_arbitrary<int64_t>(f, 8);
            break;
        }
        case 19: // CommandSessionStorageAssociated
        {
            ret = std::shared_ptr<CommandSessionStorageAssociated>(new CommandSessionStorageAssociated());
            std::shared_ptr<CommandSessionStorageAssociated> ret2 = std::static_pointer_cast<CommandSessionStorageAssociated>(ret);
            ret2->pickle_size = read_arbitrary<uint32_t>(f, 4);
            ret2->tabid = read_arbitrary<int32_t>(f, 4);
            read_string(f, ret2->session_storage_persistent_id, false);
            break;
        }
        case 20: // CommandSetActiveWindow
        {
            ret = std::shared_ptr<CommandSetActiveWindow>(new CommandSetActiveWindow());
            std::shared_ptr<CommandSetActiveWindow> ret2 = std::static_pointer_cast<CommandSetActiveWindow>(ret);
            ret2->window_id = read_arbitrary<uint32_t>(f, 4);
            break;
        }
        case 21: // CommandLastActiveTime
        {
            ret = std::shared_ptr<CommandLastActiveTime>(new CommandLastActiveTime());
            std::shared_ptr<CommandLastActiveTime> ret2 = std::static_pointer_cast<CommandLastActiveTime>(ret);
            ret2->id = read_arbitrary<int32_t>(f, 4);
            ret2->UNKNOWN_0 = read_arbitrary<int32_t>(f, 4); // TODO
            ret2->last_active_time = read_arbitrary<int64_t>(f, 8);
            break;
        }
        case 23: // CommandSetWindowWorkspace2
        {
            ret = std::shared_ptr<CommandSetWindowWorkspace2>(new CommandSetWindowWorkspace2());
            std::shared_ptr<CommandSetWindowWorkspace2> ret2 = std::static_pointer_cast<CommandSetWindowWorkspace2>(ret);
            ret2->pickle_size = read_arbitrary<uint32_t>(f, 4);
            ret2->window_id = read_arbitrary<int32_t>(f, 4);
            read_string(f, ret2->workspace, false);
            break;
        }
        default:
        {
            std::cerr << "Warning: Encountered unsupported id " << static_cast<uint16_t>(type_id) << std::endl;
            std::cerr << std::hex << "P: " << prev << std::dec << " S: " << size << " T: " << static_cast<uint16_t>(type_id) << std::endl;
            ret = std::shared_ptr<Command>(new Command());
        }
    }
    ret->size = size;
    ret->type = type_id;

    // Finish reading the command in case we skipped stuff
    // Size already includes the 2 bytes from the uint16 size
    prev += size + 2L;
    if (f.tellg() < prev) {
        f.seekg(prev);
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3e0, %rsp            # imm = 0x3E0
movq %rdi, -0x1c8(%rbp)
movq %rdi, %rax
movq %rax, -0x1c0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x5b90
movq -0x10(%rbp), %rdi
callq 0x3240
movq %rdx, -0x1b8(%rbp)
movq %rax, -0x1b0(%rbp)
jmp 0x37c6
movq -0x1b8(%rbp), %rax
movq -0x1b0(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq %rax, -0x20(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x5ad0
movq %rax, -0x1d0(%rbp)
jmp 0x37ee
movq -0x1d0(%rbp), %rax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x5af0
movw %ax, -0x1d2(%rbp)
jmp 0x380f
movw -0x1d2(%rbp), %ax
movw %ax, -0x36(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x5b60
movb %al, -0x1d3(%rbp)
jmp 0x3830
movb -0x1d3(%rbp), %al
movb %al, -0x37(%rbp)
movzwl -0x36(%rbp), %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x386b
movq 0xe7a6(%rip), %rdi      # 0x11ff0
leaq 0x782c(%rip), %rsi      # 0xb07d
callq 0x3130
jmp 0x3858
jmp 0x386b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x4648
movzbl -0x37(%rbp), %eax
movq %rax, -0x1e0(%rbp)
subq $0x17, %rax
ja 0x43ac
movq -0x1e0(%rbp), %rax
leaq 0x7776(%rip), %rcx      # 0xb004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x60, %edi
callq 0x3140
movq %rax, -0x1e8(%rbp)
jmp 0x38aa
movq -0x1e8(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rdi)
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x5bb0
movq -0x1e8(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x5c00
jmp 0x38e2
movq -0x1c8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movq %rsi, -0x1f8(%rbp)
callq 0x5c30
movq -0x1f8(%rbp), %rdi
callq 0x5c60
movq -0x1c8(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x5c80
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5aa0
movl %eax, -0x1ec(%rbp)
jmp 0x392b
leaq -0x58(%rbp), %rdi
callq 0x5cd0
movl -0x1ec(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x1fc(%rbp)
jmp 0x3953
leaq -0x58(%rbp), %rdi
callq 0x5cd0
movl -0x1fc(%rbp), %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x200(%rbp)
jmp 0x397b
leaq -0x58(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x5cd0
movl -0x200(%rbp), %ecx
movq -0x218(%rbp), %rdi
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x210(%rbp)
callq 0x5cd0
movq -0x210(%rbp), %rdi
movq %rax, %rsi
addq $0x20, %rsi
movl $0x1, %edx
callq 0x3460
movb %al, -0x201(%rbp)
jmp 0x39cb
movb -0x201(%rbp), %al
testb $0x1, %al
jne 0x39d7
jmp 0x3a29
movq -0x10(%rbp), %rsi
leaq -0x78(%rbp), %rdi
movl $0x1, %edx
callq 0x35b0
jmp 0x39eb
leaq -0x58(%rbp), %rdi
callq 0x5cd0
movq %rax, %rdi
addq $0x40, %rdi
leaq -0x78(%rbp), %rsi
callq 0x3270
leaq -0x78(%rbp), %rdi
callq 0x3210
jmp 0x3a29
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x5c60
jmp 0x4648
leaq -0x58(%rbp), %rdi
callq 0x5c60
jmp 0x453a
movl $0x18, %edi
callq 0x3140
movq %rax, -0x220(%rbp)
jmp 0x3a4a
movq -0x220(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0x5d20
movq -0x220(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x5d60
jmp 0x3a79
movq -0x1c8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %rsi, -0x230(%rbp)
callq 0x5d90
movq -0x230(%rbp), %rdi
callq 0x5dc0
movq -0x1c8(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x5de0
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5aa0
movl %eax, -0x224(%rbp)
jmp 0x3ac8
leaq -0x98(%rbp), %rdi
callq 0x5e30
movl -0x224(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x234(%rbp)
jmp 0x3af3
leaq -0x98(%rbp), %rdi
callq 0x5e30
movl -0x234(%rbp), %ecx
movl %ecx, 0x14(%rax)
leaq -0x98(%rbp), %rdi
callq 0x5dc0
jmp 0x453a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x5dc0
jmp 0x4648
movl $0x28, %edi
callq 0x3140
movq %rax, -0x240(%rbp)
jmp 0x3b49
movq -0x240(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
callq 0x5e50
movq -0x240(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
callq 0x5e90
jmp 0x3b7c
movq -0x1c8(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
movq %rsi, -0x250(%rbp)
callq 0x5ec0
movq -0x250(%rbp), %rdi
callq 0x5ef0
movq -0x1c8(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
callq 0x5f10
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x244(%rbp)
jmp 0x3bcb
leaq -0xb8(%rbp), %rdi
callq 0x5f60
movl -0x244(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x254(%rbp)
jmp 0x3bf6
leaq -0xb8(%rbp), %rdi
callq 0x5f60
movl -0x254(%rbp), %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x258(%rbp)
jmp 0x3c21
leaq -0xb8(%rbp), %rdi
callq 0x5f60
movl -0x258(%rbp), %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x25c(%rbp)
jmp 0x3c4c
leaq -0xb8(%rbp), %rdi
callq 0x5f60
movl -0x25c(%rbp), %ecx
movl %ecx, 0x1c(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x260(%rbp)
jmp 0x3c77
leaq -0xb8(%rbp), %rdi
callq 0x5f60
movl -0x260(%rbp), %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x264(%rbp)
jmp 0x3ca2
leaq -0xb8(%rbp), %rdi
callq 0x5f60
movl -0x264(%rbp), %ecx
movl %ecx, 0x24(%rax)
leaq -0xb8(%rbp), %rdi
callq 0x5ef0
jmp 0x453a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x5ef0
jmp 0x4648
movl $0x20, %edi
callq 0x3140
movq %rax, -0x270(%rbp)
jmp 0x3cf8
movq -0x270(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x5f80
movq -0x270(%rbp), %rsi
leaq -0xc8(%rbp), %rdi
callq 0x5fc0
jmp 0x3d23
movq -0x1c8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
movq %rsi, -0x280(%rbp)
callq 0x5ff0
movq -0x280(%rbp), %rdi
callq 0x6020
movq -0x1c8(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x6040
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x274(%rbp)
jmp 0x3d72
leaq -0xd8(%rbp), %rdi
callq 0x6090
movl -0x274(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x284(%rbp)
jmp 0x3d9d
leaq -0xd8(%rbp), %rdi
callq 0x6090
movl -0x284(%rbp), %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x60b0
movq %rax, -0x290(%rbp)
jmp 0x3dc9
leaq -0xd8(%rbp), %rdi
callq 0x6090
movq -0x290(%rbp), %rcx
movq %rcx, 0x18(%rax)
leaq -0xd8(%rbp), %rdi
callq 0x6020
jmp 0x453a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x6020
jmp 0x4648
movl $0x20, %edi
callq 0x3140
movq %rax, -0x298(%rbp)
jmp 0x3e21
movq -0x298(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x5f80
movq -0x298(%rbp), %rsi
leaq -0xe8(%rbp), %rdi
callq 0x5fc0
jmp 0x3e4c
movq -0x1c8(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
movq %rsi, -0x2a8(%rbp)
callq 0x5ff0
movq -0x2a8(%rbp), %rdi
callq 0x6020
movq -0x1c8(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x6040
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x29c(%rbp)
jmp 0x3e9b
leaq -0xf8(%rbp), %rdi
callq 0x6090
movl -0x29c(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x2ac(%rbp)
jmp 0x3ec6
leaq -0xf8(%rbp), %rdi
callq 0x6090
movl -0x2ac(%rbp), %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x60b0
movq %rax, -0x2b8(%rbp)
jmp 0x3ef2
leaq -0xf8(%rbp), %rdi
callq 0x6090
movq -0x2b8(%rbp), %rcx
movq %rcx, 0x18(%rax)
leaq -0xf8(%rbp), %rdi
callq 0x6020
jmp 0x453a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x6020
jmp 0x4648
movl $0x38, %edi
callq 0x3140
movq %rax, -0x2c0(%rbp)
jmp 0x3f4a
movq -0x2c0(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq $0x0, 0x30(%rdi)
callq 0x60e0
movq -0x2c0(%rbp), %rsi
leaq -0x108(%rbp), %rdi
callq 0x6120
jmp 0x3f81
movq -0x1c8(%rbp), %rdi
leaq -0x108(%rbp), %rsi
movq %rsi, -0x2d0(%rbp)
callq 0x6150
movq -0x2d0(%rbp), %rdi
callq 0x6180
movq -0x1c8(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0x61a0
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5aa0
movl %eax, -0x2c4(%rbp)
jmp 0x3fd0
leaq -0x118(%rbp), %rdi
callq 0x61f0
movl -0x2c4(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x2d4(%rbp)
jmp 0x3ffb
leaq -0x118(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0x61f0
movl -0x2d4(%rbp), %ecx
movq -0x2e8(%rbp), %rdi
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x2e0(%rbp)
callq 0x61f0
movq -0x2e0(%rbp), %rdi
movq %rax, %rsi
addq $0x18, %rsi
xorl %edx, %edx
callq 0x3460
jmp 0x4045
leaq -0x118(%rbp), %rdi
callq 0x6180
jmp 0x453a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x6180
jmp 0x4648
movl $0x18, %edi
callq 0x3140
movq %rax, -0x2f0(%rbp)
jmp 0x4086
movq -0x2f0(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0x6210
movq -0x2f0(%rbp), %rsi
leaq -0x128(%rbp), %rdi
callq 0x6250
jmp 0x40b5
movq -0x1c8(%rbp), %rdi
leaq -0x128(%rbp), %rsi
movq %rsi, -0x300(%rbp)
callq 0x6280
movq -0x300(%rbp), %rdi
callq 0x62b0
movq -0x1c8(%rbp), %rsi
leaq -0x138(%rbp), %rdi
callq 0x62d0
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5aa0
movl %eax, -0x2f4(%rbp)
jmp 0x4104
leaq -0x138(%rbp), %rdi
callq 0x6320
movl -0x2f4(%rbp), %ecx
movl %ecx, 0x10(%rax)
leaq -0x138(%rbp), %rdi
callq 0x62b0
jmp 0x453a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x62b0
jmp 0x4648
movl $0x20, %edi
callq 0x3140
movq %rax, -0x308(%rbp)
jmp 0x415a
movq -0x308(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
callq 0x6340
movq -0x308(%rbp), %rsi
leaq -0x148(%rbp), %rdi
callq 0x6380
jmp 0x4185
movq -0x1c8(%rbp), %rdi
leaq -0x148(%rbp), %rsi
movq %rsi, -0x318(%rbp)
callq 0x63b0
movq -0x318(%rbp), %rdi
callq 0x63e0
movq -0x1c8(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x6400
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x30c(%rbp)
jmp 0x41d4
leaq -0x158(%rbp), %rdi
callq 0x6450
movl -0x30c(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x31c(%rbp)
jmp 0x41ff
leaq -0x158(%rbp), %rdi
callq 0x6450
movl -0x31c(%rbp), %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x60b0
movq %rax, -0x328(%rbp)
jmp 0x422b
leaq -0x158(%rbp), %rdi
callq 0x6450
movq -0x328(%rbp), %rcx
movq %rcx, 0x18(%rax)
leaq -0x158(%rbp), %rdi
callq 0x63e0
jmp 0x453a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x63e0
jmp 0x4648
movl $0x38, %edi
callq 0x3140
movq %rax, -0x330(%rbp)
jmp 0x4283
movq -0x330(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq $0x0, 0x30(%rdi)
callq 0x6470
movq -0x330(%rbp), %rsi
leaq -0x168(%rbp), %rdi
callq 0x64b0
jmp 0x42ba
movq -0x1c8(%rbp), %rdi
leaq -0x168(%rbp), %rsi
movq %rsi, -0x340(%rbp)
callq 0x64e0
movq -0x340(%rbp), %rdi
callq 0x6510
movq -0x1c8(%rbp), %rsi
leaq -0x178(%rbp), %rdi
callq 0x6530
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5aa0
movl %eax, -0x334(%rbp)
jmp 0x4309
leaq -0x178(%rbp), %rdi
callq 0x6580
movl -0x334(%rbp), %ecx
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rdi
movl $0x4, %esi
callq 0x5cf0
movl %eax, -0x344(%rbp)
jmp 0x4334
leaq -0x178(%rbp), %rdi
movq %rdi, -0x358(%rbp)
callq 0x6580
movl -0x344(%rbp), %ecx
movq -0x358(%rbp), %rdi
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x350(%rbp)
callq 0x6580
movq -0x350(%rbp), %rdi
movq %rax, %rsi
addq $0x18, %rsi
xorl %edx, %edx
callq 0x3460
jmp 0x437e
leaq -0x178(%rbp), %rdi
callq 0x6510
jmp 0x453a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x6510
jmp 0x4648
movq 0xdc3d(%rip), %rdi      # 0x11ff0
leaq 0x6d0d(%rip), %rsi      # 0xb0c7
callq 0x3130
movq %rax, -0x360(%rbp)
jmp 0x43c8
movq -0x360(%rbp), %rdi
movzbl -0x37(%rbp), %esi
callq 0x3220
movq %rax, -0x368(%rbp)
jmp 0x43e1
movq -0x368(%rbp), %rdi
movq 0xdbc9(%rip), %rsi      # 0x11fb8
callq 0x3160
jmp 0x43f6
movq 0xdbf3(%rip), %rdi      # 0x11ff0
leaq 0x219c(%rip), %rsi      # 0x65a0
callq 0x3070
movq %rax, -0x370(%rbp)
jmp 0x4412
movq -0x370(%rbp), %rdi
leaq 0x6ccc(%rip), %rsi      # 0xb0ec
callq 0x3130
movq %rax, -0x378(%rbp)
jmp 0x442e
movq -0x378(%rbp), %rdi
movl -0x18(%rbp), %esi
callq 0x3230
movq %rax, -0x380(%rbp)
jmp 0x4446
movq -0x380(%rbp), %rdi
leaq 0x217c(%rip), %rsi      # 0x65d0
callq 0x3070
movq %rax, -0x388(%rbp)
jmp 0x4462
movq -0x388(%rbp), %rdi
leaq 0x6c80(%rip), %rsi      # 0xb0f0
callq 0x3130
movq %rax, -0x390(%rbp)
jmp 0x447e
movq -0x390(%rbp), %rdi
movzwl -0x36(%rbp), %esi
callq 0x3220
movq %rax, -0x398(%rbp)
jmp 0x4497
movq -0x398(%rbp), %rdi
leaq 0x6bd3(%rip), %rsi      # 0xb078
callq 0x3130
movq %rax, -0x3a0(%rbp)
jmp 0x44b3
movq -0x3a0(%rbp), %rdi
movzbl -0x37(%rbp), %esi
callq 0x3220
movq %rax, -0x3a8(%rbp)
jmp 0x44cc
movq -0x3a8(%rbp), %rdi
movq 0xdade(%rip), %rsi      # 0x11fb8
callq 0x3160
jmp 0x44e1
movl $0x10, %edi
callq 0x3140
movq %rax, -0x3b0(%rbp)
jmp 0x44f4
movq -0x3b0(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
callq 0x6600
movq -0x3b0(%rbp), %rsi
leaq -0x188(%rbp), %rdi
callq 0x6620
jmp 0x451b
movq -0x1c8(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x6650
leaq -0x188(%rbp), %rdi
callq 0x6680
movq -0x1c8(%rbp), %rdi
movw -0x36(%rbp), %ax
movw %ax, -0x3c6(%rbp)
callq 0x66a0
movw -0x3c6(%rbp), %cx
movq -0x1c8(%rbp), %rdi
movw %cx, 0x8(%rax)
movzbl -0x37(%rbp), %eax
movl %eax, -0x3c4(%rbp)
callq 0x66a0
movl -0x3c4(%rbp), %ecx
movl %ecx, 0xc(%rax)
movzwl -0x36(%rbp), %edx
movl -0x18(%rbp), %eax
movl %eax, %ecx
movl %edx, %eax
leal 0x2(%rax,%rcx), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x3240
movq %rdx, -0x3c0(%rbp)
movq %rax, -0x3b8(%rbp)
jmp 0x45a6
movq -0x3c0(%rbp), %rax
movq -0x3b8(%rbp), %rcx
movq %rcx, -0x198(%rbp)
movq %rax, -0x190(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x5ad0
movq %rax, -0x3d0(%rbp)
jmp 0x45d7
movq -0x3d0(%rbp), %rax
movslq -0x18(%rbp), %rcx
cmpq %rcx, %rax
jge 0x4622
movq -0x10(%rbp), %rax
movq %rax, -0x3d8(%rbp)
movslq -0x18(%rbp), %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x5a60
jmp 0x4604
movq -0x3d8(%rbp), %rdi
movq -0x1a8(%rbp), %rsi
movq -0x1a0(%rbp), %rdx
callq 0x3180
jmp 0x4620
jmp 0x4622
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x4638
movq -0x1c8(%rbp), %rdi
callq 0x6680
movq -0x1c0(%rbp), %rax
addq $0x3e0, %rsp            # imm = 0x3E0
popq %rbp
retq
movq -0x1c8(%rbp), %rdi
callq 0x6680
movq -0x30(%rbp), %rdi
callq 0x3250
nopl (%rax)