// File: Smattr[P]ibpf/interpreter.cpp
// Function: Machine::apply(Instruction const&)
bool Machine::apply(const Instruction &i) {
    switch (i.get_class()) {

        case BPF_LD:
            switch (i.opcode) {

                case BPF_LD + BPF_W + BPF_LEN:
                    A = len;
                    break;

                case BPF_LD + BPF_IMM:
                    A = i.k;
                    break;

                case BPF_LD + BPF_MEM:
                    if (i.k >= SCRATCH_REGISTERS)
                        throw IllegalInstruction(&i);
                    A = M[i.k];
                    break;

                default:;

                    unsigned int offset;
                    switch (i.opcode) {

                        case BPF_LD + BPF_W + BPF_ABS:
                        case BPF_LD + BPF_H + BPF_ABS:
                        case BPF_LD + BPF_B + BPF_ABS:
                            offset = i.k;
                            break;

                        case BPF_LD + BPF_W + BPF_IND:
                        case BPF_LD + BPF_H + BPF_IND:
                        case BPF_LD + BPF_B + BPF_IND:
                            offset = X + i.k;
                            break;

                        default:
                            throw IllegalInstruction(&i);
                    }

                    switch (i.opcode) {

                        case BPF_LD + BPF_W + BPF_ABS:
                        case BPF_LD + BPF_W + BPF_IND:
                            if (offset > std::numeric_limits<unsigned int>::max() - 3 || offset + 3 >= len)
                                throw MemoryAccessOutOfRange(&i);
                            A = (static_cast<uint32_t>(P[offset])) |
                                      (static_cast<uint32_t>(P[offset + 1]) << 8) |
                                      (static_cast<uint32_t>(P[offset + 2]) << 16) |
                                      (static_cast<uint32_t>(P[offset + 3]) << 24);
                            break;

                        case BPF_LD + BPF_H + BPF_ABS:
                        case BPF_LD + BPF_H + BPF_IND:
                            if (offset > std::numeric_limits<unsigned int>::max() - 1 || offset + 1 >= len)
                                throw MemoryAccessOutOfRange(&i);
                            A = (static_cast<uint32_t>(P[offset])) |
                                      (static_cast<uint32_t>(P[offset + 1]) << 8);
                            break;

                        case BPF_LD + BPF_B + BPF_ABS:
                        case BPF_LD + BPF_B + BPF_IND:
                            if (offset >= len)
                                throw MemoryAccessOutOfRange(&i);
                            A = static_cast<uint32_t>(P[offset]);
                            break;

                        default:
                            throw std::logic_error("expected exhaustive case was not exhaustive");
                    }
            }
            break;

        case BPF_LDX:
            switch (i.opcode) {

                case BPF_LDX + BPF_W + BPF_IMM:
                    X = i.k;
                    break;

                case BPF_LDX + BPF_W + BPF_MEM:
                    if (i.k >= SCRATCH_REGISTERS)
                        throw IllegalInstruction(&i);
                    X = M[i.k];
                    break;

                case BPF_LDX + BPF_W + BPF_LEN:
                    X = len;
                    break;

                case BPF_LDX + BPF_B + BPF_MSH:
                    if (i.k >= len)
                        throw MemoryAccessOutOfRange(&i);
                    X = 4 * static_cast<uint32_t>(P[i.k] & 0xf);
                    break;

                default:
                    throw IllegalInstruction(&i);
            }
            break;

        case BPF_ST:
            if (i.k >= SCRATCH_REGISTERS)
                throw IllegalInstruction(&i);
            M[i.k] = A;
            break;

        case BPF_STX:
            if (i.k >= SCRATCH_REGISTERS)
                throw IllegalInstruction(&i);
            M[i.k] = X;
            break;

        case BPF_ALU:
            switch (i.opcode) {

                case BPF_ALU + BPF_ADD + BPF_K:
                    A += i.k;
                    break;

                case BPF_ALU + BPF_SUB + BPF_K:
                    A -= i.k;
                    break;

                case BPF_ALU + BPF_MUL + BPF_K:
                    A *= i.k;
                    break;

                case BPF_ALU + BPF_DIV + BPF_K:
                    A /= i.k;
                    break;

                case BPF_ALU + BPF_AND + BPF_K:
                    A &= i.k;
                    break;

                case BPF_ALU + BPF_OR + BPF_K:
                    A |= i.k;
                    break;

                case BPF_ALU + BPF_LSH + BPF_K:
                    A <<= i.k;
                    break;

                case BPF_ALU + BPF_RSH + BPF_K:
                    A >>= i.k;
                    break;

                case BPF_ALU + BPF_ADD + BPF_X:
                    A += X;
                    break;

                case BPF_ALU + BPF_SUB + BPF_X:
                    A -= X;
                    break;

                case BPF_ALU + BPF_MUL + BPF_X:
                    A *= X;
                    break;

                case BPF_ALU + BPF_DIV + BPF_X:
                    A /= X;
                    break;

                case BPF_ALU + BPF_AND + BPF_X:
                    A &= X;
                    break;

                case BPF_ALU + BPF_OR + BPF_X:
                    A |= X;
                    break;

                case BPF_ALU + BPF_LSH + BPF_X:
                    A <<= X;
                    break;

                case BPF_ALU + BPF_RSH + BPF_X:
                    A >>= X;
                    break;

                case BPF_ALU + BPF_NEG:
                    A = -A;
                    break;

                default:
                    throw IllegalInstruction(&i);
            }
            break;

        case BPF_JMP:
            switch (i.opcode) {

                case BPF_JMP + BPF_JA:
                    pc += i.k;
                    break;

                case BPF_JMP + BPF_JGT + BPF_K:
                    pc += A > i.k ? i.jt : i.jf;
                    break;

                case BPF_JMP + BPF_JGE + BPF_K:
                    pc += A >= i.k ? i.jt : i.jf;
                    break;

                case BPF_JMP + BPF_JEQ + BPF_K:
                    pc += A == i.k ? i.jt : i.jf;
                    break;

                case BPF_JMP + BPF_JSET + BPF_K:
                    pc += A & i.k ? i.jt : i.jf;
                    break;

                case BPF_JMP + BPF_JGT + BPF_X:
                    pc += A > X ? i.jt : i.jf;
                    break;

                case BPF_JMP + BPF_JGE + BPF_X:
                    pc += A >= X ? i.jt : i.jf;
                    break;

                case BPF_JMP + BPF_JEQ + BPF_X:
                    pc += A == X ? i.jt : i.jf;
                    break;

                case BPF_JMP + BPF_JSET + BPF_X:
                    pc += A & X ? i.jt : i.jf;
                    break;

                default:
                    throw IllegalInstruction(&i);
            }
            return false;

        case BPF_RET:
            switch (i.opcode) {

                case BPF_RET + BPF_A:
                    ret = A;
                    break;

                case BPF_RET + BPF_K:
                    ret = i.k;
                    break;

                default:
                    throw IllegalInstruction(&i);
            }
            pc++;
            return true;

        case BPF_MISC:
            switch (i.opcode) {

                case BPF_MISC + BPF_TAX:
                    X = A;
                    break;

                case BPF_MISC + BPF_TXA:
                    A = X;
                    break;

                default:
                    throw IllegalInstruction(&i);
            }
            break;

        default:
            throw std::domain_error("illegal instruction class");
    }
    pc++;
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2400
movzwl %ax, %ecx
movq %rcx, -0x68(%rbp)
subw $0x7, %ax
ja 0x33eb
movq -0x68(%rbp), %rax
leaq 0x3b44(%rip), %rcx      # 0x6004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x74(%rbp)
testl %eax, %eax
je 0x250f
jmp 0x24d9
movl -0x74(%rbp), %eax
subl $0x60, %eax
je 0x2529
jmp 0x24e3
movl -0x74(%rbp), %eax
subl $0x80, %eax
jne 0x25a1
jmp 0x24f3
movq -0x70(%rbp), %rdi
movq %rdi, %rsi
addq $0xa0, %rsi
addq $0x8, %rdi
callq 0x3dd0
jmp 0x2984
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
addq $0x8, %rdi
callq 0x3dd0
jmp 0x2984
movq -0x18(%rbp), %rax
cmpl $0x10, 0x4(%rax)
jb 0x2583
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3df0
jmp 0x2552
movq -0x80(%rbp), %rdi
leaq 0x76ab(%rip), %rsi      # 0x9c08
leaq 0x18cc(%rip), %rdx      # 0x3e30
callq 0x2270
movq -0x80(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movq -0x70(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl 0x18(%rax,%rcx,8), %edx
movl %edx, 0x8(%rax)
movb 0x1c(%rax,%rcx,8), %cl
movb %cl, 0xc(%rax)
jmp 0x2984
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x84(%rbp)
subl $0x20, %eax
je 0x25f6
jmp 0x25b5
movl -0x84(%rbp), %eax
subl $0x28, %eax
je 0x25f6
jmp 0x25c2
movl -0x84(%rbp), %eax
subl $0x30, %eax
je 0x25f6
jmp 0x25cf
movl -0x84(%rbp), %eax
subl $0x40, %eax
je 0x2602
jmp 0x25dc
movl -0x84(%rbp), %eax
subl $0x48, %eax
je 0x2602
jmp 0x25e9
movl -0x84(%rbp), %eax
subl $0x50, %eax
je 0x2602
jmp 0x261b
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x28(%rbp)
jmp 0x2674
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0x3e50
movq -0x18(%rbp), %rcx
addl 0x4(%rcx), %eax
movl %eax, -0x28(%rbp)
jmp 0x2674
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3df0
jmp 0x263d
movq -0x90(%rbp), %rdi
leaq 0x75bd(%rip), %rsi      # 0x9c08
leaq 0x17de(%rip), %rdx      # 0x3e30
callq 0x2270
movq -0x90(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x94(%rbp)
subl $0x20, %eax
je 0x26dc
jmp 0x2688
movl -0x94(%rbp), %eax
subl $0x28, %eax
je 0x27d3
jmp 0x2699
movl -0x94(%rbp), %eax
subl $0x30, %eax
je 0x289a
jmp 0x26aa
movl -0x94(%rbp), %eax
subl $0x40, %eax
je 0x26dc
jmp 0x26b7
movl -0x94(%rbp), %eax
subl $0x48, %eax
je 0x27d3
jmp 0x26c8
movl -0x94(%rbp), %eax
subl $0x50, %eax
je 0x289a
jmp 0x2926
movl -0x28(%rbp), %eax
movl %eax, -0x98(%rbp)
callq 0x3ed0
movl %eax, %ecx
movl -0x98(%rbp), %eax
subl $0x3, %ecx
cmpl %ecx, %eax
ja 0x270b
movq -0x70(%rbp), %rcx
movl -0x28(%rbp), %eax
addl $0x3, %eax
cmpl 0xa0(%rcx), %eax
jb 0x2764
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xa0(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3ee0
jmp 0x272d
movq -0xa0(%rbp), %rdi
leaq 0x74e5(%rip), %rsi      # 0x9c20
leaq 0x17de(%rip), %rdx      # 0x3f20
callq 0x2270
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movq -0x70(%rbp), %rdi
movq 0x98(%rdi), %rax
movl -0x28(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movq 0x98(%rdi), %rcx
movl -0x28(%rbp), %edx
addl $0x1, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq 0x98(%rdi), %rcx
movl -0x28(%rbp), %edx
addl $0x2, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq 0x98(%rdi), %rcx
movl -0x28(%rbp), %edx
addl $0x3, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x18, %ecx
orl %ecx, %eax
movl %eax, -0x2c(%rbp)
addq $0x8, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x3dd0
jmp 0x2982
movl -0x28(%rbp), %eax
movl %eax, -0xa4(%rbp)
callq 0x3ed0
movl %eax, %ecx
movl -0xa4(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
ja 0x2802
movq -0x70(%rbp), %rcx
movl -0x28(%rbp), %eax
addl $0x1, %eax
cmpl 0xa0(%rcx), %eax
jb 0x285b
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3ee0
jmp 0x2824
movq -0xb0(%rbp), %rdi
leaq 0x73ee(%rip), %rsi      # 0x9c20
leaq 0x16e7(%rip), %rdx      # 0x3f20
callq 0x2270
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movq -0x70(%rbp), %rdi
movq 0x98(%rdi), %rax
movl -0x28(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movq 0x98(%rdi), %rcx
movl -0x28(%rbp), %edx
addl $0x1, %edx
movl %edx, %edx
movzbl (%rcx,%rdx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, -0x30(%rbp)
addq $0x8, %rdi
leaq -0x30(%rbp), %rsi
callq 0x3dd0
jmp 0x2982
movq -0x70(%rbp), %rcx
movl -0x28(%rbp), %eax
cmpl 0xa0(%rcx), %eax
jb 0x2902
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3ee0
jmp 0x28cb
movq -0xb8(%rbp), %rdi
leaq 0x7347(%rip), %rsi      # 0x9c20
leaq 0x1640(%rip), %rdx      # 0x3f20
callq 0x2270
movq -0xb8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movq -0x70(%rbp), %rdi
movq 0x98(%rdi), %rax
movl -0x28(%rbp), %ecx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
addq $0x8, %rdi
leaq -0x34(%rbp), %rsi
callq 0x3dd0
jmp 0x2982
movl $0x10, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
leaq 0x3a4d(%rip), %rsi      # 0x6391
callq 0x21e0
jmp 0x294b
movq -0xc0(%rbp), %rdi
movq 0x7677(%rip), %rsi      # 0x9fd0
movq 0x7658(%rip), %rdx      # 0x9fb8
callq 0x2270
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
jmp 0x2984
jmp 0x3444
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0xc4(%rbp)
subl $0x1, %eax
je 0x29d3
jmp 0x299d
movl -0xc4(%rbp), %eax
subl $0x61, %eax
je 0x29ed
jmp 0x29aa
movl -0xc4(%rbp), %eax
subl $0x81, %eax
je 0x2a6e
jmp 0x29bd
movl -0xc4(%rbp), %eax
subl $0xb1, %eax
je 0x2a8a
jmp 0x2b24
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
addq $0x10, %rdi
callq 0x3dd0
jmp 0x2b7d
movq -0x18(%rbp), %rax
cmpl $0x10, 0x4(%rax)
jb 0x2a50
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xd0(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3df0
jmp 0x2a19
movq -0xd0(%rbp), %rdi
leaq 0x71e1(%rip), %rsi      # 0x9c08
leaq 0x1402(%rip), %rdx      # 0x3e30
callq 0x2270
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movq -0x70(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl 0x18(%rax,%rcx,8), %edx
movl %edx, 0x10(%rax)
movb 0x1c(%rax,%rcx,8), %cl
movb %cl, 0x14(%rax)
jmp 0x2b7d
movq -0x70(%rbp), %rdi
movq %rdi, %rsi
addq $0xa0, %rsi
addq $0x10, %rdi
callq 0x3dd0
jmp 0x2b7d
movq -0x70(%rbp), %rcx
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
cmpl 0xa0(%rcx), %eax
jb 0x2af6
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xd8(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3ee0
jmp 0x2abf
movq -0xd8(%rbp), %rdi
leaq 0x7153(%rip), %rsi      # 0x9c20
leaq 0x144c(%rip), %rdx      # 0x3f20
callq 0x2270
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movq -0x70(%rbp), %rdi
movq 0x98(%rdi), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
movzbl (%rax,%rcx), %eax
andl $0xf, %eax
shll $0x2, %eax
movl %eax, -0x38(%rbp)
addq $0x10, %rdi
leaq -0x38(%rbp), %rsi
callq 0x3dd0
jmp 0x2b7d
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xe0(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3df0
jmp 0x2b46
movq -0xe0(%rbp), %rdi
leaq 0x70b4(%rip), %rsi      # 0x9c08
leaq 0x12d5(%rip), %rdx      # 0x3e30
callq 0x2270
movq -0xe0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
jmp 0x3444
movq -0x18(%rbp), %rax
cmpl $0x10, 0x4(%rax)
jb 0x2be5
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xe8(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3df0
jmp 0x2bae
movq -0xe8(%rbp), %rdi
leaq 0x704c(%rip), %rsi      # 0x9c08
leaq 0x126d(%rip), %rdx      # 0x3e30
callq 0x2270
movq -0xe8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movq -0x70(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl 0x8(%rax), %edx
movl %edx, 0x18(%rax,%rcx,8)
movb 0xc(%rax), %dl
movb %dl, 0x1c(%rax,%rcx,8)
jmp 0x3444
movq -0x18(%rbp), %rax
cmpl $0x10, 0x4(%rax)
jb 0x2c66
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xf0(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3df0
jmp 0x2c2f
movq -0xf0(%rbp), %rdi
leaq 0x6fcb(%rip), %rsi      # 0x9c08
leaq 0x11ec(%rip), %rdx      # 0x3e30
callq 0x2270
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movq -0x70(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl 0x10(%rax), %edx
movl %edx, 0x18(%rax,%rcx,8)
movb 0x14(%rax), %dl
movb %dl, 0x1c(%rax,%rcx,8)
jmp 0x3444
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, -0xf8(%rbp)
subl $0x80, %eax
ja 0x2ee2
movq -0xf8(%rbp), %rax
leaq 0x3498(%rip), %rcx      # 0x6148
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
addq $0x8, %rdi
callq 0x3f40
jmp 0x2f3b
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
addq $0x8, %rdi
callq 0x3fd0
jmp 0x2f3b
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
addq $0x8, %rdi
callq 0x4060
jmp 0x2f3b
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
addq $0x8, %rdi
callq 0x40f0
jmp 0x2f3b
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
addq $0x8, %rdi
callq 0x4190
jmp 0x2f3b
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
addq $0x8, %rdi
callq 0x4220
jmp 0x2f3b
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
addq $0x8, %rdi
callq 0x42b0
jmp 0x2f3b
movq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
addq $0x8, %rdi
callq 0x4340
jmp 0x2f3b
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x3c(%rbp)
addq $0x8, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x3f40
jmp 0x2f3b
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x40(%rbp)
addq $0x8, %rdi
leaq -0x40(%rbp), %rsi
callq 0x3fd0
jmp 0x2f3b
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x44(%rbp)
addq $0x8, %rdi
leaq -0x44(%rbp), %rsi
callq 0x4060
jmp 0x2f3b
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x48(%rbp)
addq $0x8, %rdi
leaq -0x48(%rbp), %rsi
callq 0x40f0
jmp 0x2f3b
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x4c(%rbp)
addq $0x8, %rdi
leaq -0x4c(%rbp), %rsi
callq 0x4190
jmp 0x2f3b
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x50(%rbp)
addq $0x8, %rdi
leaq -0x50(%rbp), %rsi
callq 0x4220
jmp 0x2f3b
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x54(%rbp)
addq $0x8, %rdi
leaq -0x54(%rbp), %rsi
callq 0x42b0
jmp 0x2f3b
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x58(%rbp)
addq $0x8, %rdi
leaq -0x58(%rbp), %rsi
callq 0x4340
jmp 0x2f3b
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movl %eax, -0x5c(%rbp)
addq $0x8, %rdi
leaq -0x5c(%rbp), %rsi
callq 0x3dd0
jmp 0x2f3b
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x100(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3df0
jmp 0x2f04
movq -0x100(%rbp), %rdi
leaq 0x6cf6(%rip), %rsi      # 0x9c08
leaq 0xf17(%rip), %rdx       # 0x3e30
callq 0x2270
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
jmp 0x3444
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
addl $-0x5, %eax
movl %eax, %ecx
movq %rcx, -0x108(%rbp)
subl $0x48, %eax
ja 0x3234
movq -0x108(%rbp), %rax
leaq 0x30ba(%rip), %rcx      # 0x6024
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x70(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x328d
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
callq 0x3e50
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jbe 0x2fae
movq -0x18(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x109(%rbp)
jmp 0x2fbb
movq -0x18(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x109(%rbp)
movq -0x70(%rbp), %rax
movb -0x109(%rbp), %cl
movzbl %cl, %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x328d
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
callq 0x3e50
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jb 0x2ff8
movq -0x18(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x10a(%rbp)
jmp 0x3005
movq -0x18(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x10a(%rbp)
movq -0x70(%rbp), %rax
movb -0x10a(%rbp), %cl
movzbl %cl, %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x328d
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
callq 0x3e50
movq -0x18(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x3042
movq -0x18(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x10b(%rbp)
jmp 0x304f
movq -0x18(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x10b(%rbp)
movq -0x70(%rbp), %rax
movb -0x10b(%rbp), %cl
movzbl %cl, %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x328d
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
callq 0x3e50
movq -0x18(%rbp), %rcx
andl 0x4(%rcx), %eax
cmpl $0x0, %eax
je 0x308f
movq -0x18(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x10c(%rbp)
jmp 0x309c
movq -0x18(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x10c(%rbp)
movq -0x70(%rbp), %rax
movb -0x10c(%rbp), %cl
movzbl %cl, %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x328d
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x110(%rbp)
addq $0x10, %rdi
callq 0x3e50
movl %eax, %ecx
movl -0x110(%rbp), %eax
cmpl %ecx, %eax
jbe 0x30ef
movq -0x18(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x111(%rbp)
jmp 0x30fc
movq -0x18(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x111(%rbp)
movq -0x70(%rbp), %rax
movb -0x111(%rbp), %cl
movzbl %cl, %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x328d
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x118(%rbp)
addq $0x10, %rdi
callq 0x3e50
movl %eax, %ecx
movl -0x118(%rbp), %eax
cmpl %ecx, %eax
jb 0x314f
movq -0x18(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x119(%rbp)
jmp 0x315c
movq -0x18(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x119(%rbp)
movq -0x70(%rbp), %rax
movb -0x119(%rbp), %cl
movzbl %cl, %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x328d
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x120(%rbp)
addq $0x10, %rdi
callq 0x3e50
movl %eax, %ecx
movl -0x120(%rbp), %eax
cmpl %ecx, %eax
jne 0x31af
movq -0x18(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x121(%rbp)
jmp 0x31bc
movq -0x18(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x121(%rbp)
movq -0x70(%rbp), %rax
movb -0x121(%rbp), %cl
movzbl %cl, %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x328d
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
callq 0x3e50
movq -0x70(%rbp), %rdi
movl %eax, -0x128(%rbp)
addq $0x10, %rdi
callq 0x3e50
movl %eax, %ecx
movl -0x128(%rbp), %eax
andl %ecx, %eax
cmpl $0x0, %eax
je 0x3212
movq -0x18(%rbp), %rax
movb 0x2(%rax), %al
movb %al, -0x129(%rbp)
jmp 0x321f
movq -0x18(%rbp), %rax
movb 0x3(%rax), %al
movb %al, -0x129(%rbp)
movq -0x70(%rbp), %rax
movb -0x129(%rbp), %cl
movzbl %cl, %ecx
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0x328d
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x138(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3df0
jmp 0x3256
movq -0x138(%rbp), %rdi
leaq 0x69a4(%rip), %rsi      # 0x9c08
leaq 0xbc5(%rip), %rdx       # 0x3e30
callq 0x2270
movq -0x138(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movb $0x0, -0x1(%rbp)
jmp 0x3455
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x13c(%rbp)
subl $0x6, %eax
je 0x32ce
jmp 0x32aa
movl -0x13c(%rbp), %eax
subl $0x16, %eax
jne 0x32dd
jmp 0x32b7
movq -0x70(%rbp), %rdi
addq $0x8, %rdi
callq 0x3e50
movl %eax, %ecx
movq -0x70(%rbp), %rax
movl %ecx, (%rax)
jmp 0x3336
movq -0x70(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x4(%rcx), %ecx
movl %ecx, (%rax)
jmp 0x3336
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x148(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3df0
jmp 0x32ff
movq -0x148(%rbp), %rdi
leaq 0x68fb(%rip), %rsi      # 0x9c08
leaq 0xb1c(%rip), %rdx       # 0x3e30
callq 0x2270
movq -0x148(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movq -0x70(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x3455
movq -0x18(%rbp), %rax
movzwl (%rax), %eax
movl %eax, -0x14c(%rbp)
subl $0x7, %eax
je 0x336f
jmp 0x3360
movl -0x14c(%rbp), %eax
subl $0x87, %eax
je 0x3381
jmp 0x3393
movq -0x70(%rbp), %rax
movl 0x8(%rax), %ecx
movl %ecx, 0x10(%rax)
movb 0xc(%rax), %cl
movb %cl, 0x14(%rax)
jmp 0x33e9
movq -0x70(%rbp), %rax
movl 0x10(%rax), %ecx
movl %ecx, 0x8(%rax)
movb 0x14(%rax), %cl
movb %cl, 0xc(%rax)
jmp 0x33e9
movl $0x18, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x158(%rbp)
movq -0x18(%rbp), %rsi
callq 0x3df0
jmp 0x33b5
movq -0x158(%rbp), %rdi
leaq 0x6845(%rip), %rsi      # 0x9c08
leaq 0xa66(%rip), %rdx       # 0x3e30
callq 0x2270
movq -0x158(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
jmp 0x3444
movl $0x10, %edi
callq 0x20b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x160(%rbp)
leaq 0x2fb4(%rip), %rsi      # 0x63bd
callq 0x20f0
jmp 0x3410
movq -0x160(%rbp), %rdi
movq 0x6b72(%rip), %rsi      # 0x9f90
movq 0x6b83(%rip), %rdx      # 0x9fa8
callq 0x2270
movq -0x160(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x2100
jmp 0x3463
movq -0x70(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x4(%rax)
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x2280
nopl (%rax)