LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleLDH(dsemu::cpu::OpCode const&)
int handleLDH(const OpCode &op) {
    bool srcIsA = op.params[1] == A;

    if (srcIsA) {
        byte *p = getPointer(op.params[0]);
        //cout << "READING B: " << Int64((uint64_t)p) << endl;
        //cout << "B: " << Byte(*p) << endl;
        
        bus::write(*p | 0xFF00, regAF.hi);
    } else {
        byte *p = getPointer(op.params[1]);
        regAF.hi = bus::read(*p | 0xFF00);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x20(%rax)
sete %al
andb $0x1, %al
movb %al, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
je 0x1a5bb
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edi
movl $0x1, %esi
callq 0x1a3c0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movzbl (%rax), %eax
orl $0xff00, %eax           # imm = 0xFF00
movw %ax, %cx
leaq 0x14fe3(%rip), %rax     # 0x2f590
movzwl %cx, %edi
movzbl 0x1(%rax), %esi
callq 0x13590
jmp 0x1a5f0
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edi
movl $0x1, %esi
callq 0x1a3c0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
orl $0xff00, %eax           # imm = 0xFF00
movzwl %ax, %edi
callq 0x13450
movb %al, %cl
leaq 0x14fa3(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::getAddrValue(dsemu::cpu::ParamType, short)
ushort getAddrValue(ParamType op, short srcValue) {
    switch(op) {
        case HL: return getReg16Value(regHL);
        case AF: return getReg16Value(regAF);
        case BC: return getReg16Value(regBC);
        case DE: return getReg16Value(regDE);
        case NN: return srcValue;
        case N: return 0xFF00 | srcValue;
        default: 
            cout << "ERROR BAD ADDR VAL: " << endl;
            exit(-1);
            return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movl %edi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl -0x8(%rbp), %eax
addl $-0x7, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x7, %eax
ja 0x1a698
movq -0x18(%rbp), %rax
leaq 0x9ca6(%rip), %rcx      # 0x242d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x14f58(%rip), %rdi     # 0x2f596
callq 0x15070
movw %ax, -0x2(%rbp)
jmp 0x1a6c4
leaq 0x14f40(%rip), %rdi     # 0x2f590
callq 0x15070
movw %ax, -0x2(%rbp)
jmp 0x1a6c4
leaq 0x14f30(%rip), %rdi     # 0x2f592
callq 0x15070
movw %ax, -0x2(%rbp)
jmp 0x1a6c4
leaq 0x14f20(%rip), %rdi     # 0x2f594
callq 0x15070
movw %ax, -0x2(%rbp)
jmp 0x1a6c4
movw -0xa(%rbp), %ax
movw %ax, -0x2(%rbp)
jmp 0x1a6c4
movswl -0xa(%rbp), %eax
orl $0xff00, %eax           # imm = 0xFF00
movw %ax, -0x2(%rbp)
jmp 0x1a6c4
movq 0x14931(%rip), %rdi     # 0x2efd0
leaq 0x9d6d(%rip), %rsi      # 0x24413
callq 0x32c0
movq %rax, %rdi
movq 0x148fb(%rip), %rsi     # 0x2efb0
callq 0x3310
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3390
movw -0x2(%rbp), %ax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::conditionalJump(unsigned short, dsemu::cpu::OpCode const&, bool&)
int conditionalJump(ushort location, const OpCode &op, bool &didJump) {
    int diff = jumpCycleMap[op.value];

    if (op.mode == ATypeJ) {
        regPC = location;
        didJump = true;
        return 0;
    } else if (op.mode == ATypeJ_C && getFlag(FlagC)) {
        regPC = location;
        didJump = true;
        return diff;
    } else if (op.mode == ATypeJ_NC && !getFlag(FlagC)) {
        regPC = location;
        didJump = true;
        return diff;
    } else if (op.mode == ATypeJ_NZ && !getFlag(FlagZ)) {
        regPC = location;
        didJump = true;
        return diff;
    } else if (op.mode == ATypeJ_Z && getFlag(FlagZ)) {
        regPC = location;
        didJump = true;
        return diff;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %di, %ax
movw %ax, -0x6(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x3453e(%rip), %rdi     # 0x4f6c0
callq 0x1daf0
movzbl (%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x6, 0x18(%rax)
jne 0x1b1b8
movw -0x6(%rbp), %cx
leaq 0x143fc(%rip), %rax     # 0x2f59e
movw %cx, (%rax)
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x1b2a2
movq -0x10(%rbp), %rax
cmpl $0xa, 0x18(%rax)
jne 0x1b1f2
movl $0x4, %edi
callq 0x1dac0
testb $0x1, %al
jne 0x1b1d2
jmp 0x1b1f2
movw -0x6(%rbp), %cx
leaq 0x143c1(%rip), %rax     # 0x2f59e
movw %cx, (%rax)
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1b2a2
movq -0x10(%rbp), %rax
cmpl $0x9, 0x18(%rax)
jne 0x1b227
movl $0x4, %edi
callq 0x1dac0
testb $0x1, %al
jne 0x1b227
movw -0x6(%rbp), %cx
leaq 0x14389(%rip), %rax     # 0x2f59e
movw %cx, (%rax)
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1b2a2
movq -0x10(%rbp), %rax
cmpl $0x7, 0x18(%rax)
jne 0x1b25c
movl $0x7, %edi
callq 0x1dac0
testb $0x1, %al
jne 0x1b25c
movw -0x6(%rbp), %cx
leaq 0x14354(%rip), %rax     # 0x2f59e
movw %cx, (%rax)
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1b2a2
movq -0x10(%rbp), %rax
cmpl $0x8, 0x18(%rax)
jne 0x1b293
movl $0x7, %edi
callq 0x1dac0
testb $0x1, %al
jne 0x1b276
jmp 0x1b293
movw -0x6(%rbp), %cx
leaq 0x1431d(%rip), %rax     # 0x2f59e
movw %cx, (%rax)
movq -0x18(%rbp), %rax
movb $0x1, (%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x1b2a2
jmp 0x1b295
jmp 0x1b297
jmp 0x1b299
jmp 0x1b29b
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleJumpRelative(dsemu::cpu::OpCode const&)
int handleJumpRelative(const OpCode &op) {
    char b = bus::read(regPC + 1);

    if ((byte)b == 0xfe) {
        cout << "INF LOOP? " << endl;
        sleep(5);
    }

    ushort location = regPC + b;
    bool didJump;

    return conditionalJump(location, op, didJump);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x142db(%rip), %rax     # 0x2f59e
movzwl (%rax), %eax
addl $0x1, %eax
movzwl %ax, %edi
callq 0x13450
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
cmpl $0xfe, %eax
jne 0x1b30b
movq 0x13cea(%rip), %rdi     # 0x2efd0
leaq 0x91a1(%rip), %rsi      # 0x2448e
callq 0x32c0
movq %rax, %rdi
movq 0x13cb4(%rip), %rsi     # 0x2efb0
callq 0x3310
movl $0x5, %edi
callq 0x3210
leaq 0x1428c(%rip), %rax     # 0x2f59e
movzwl (%rax), %eax
movsbl -0x9(%rbp), %ecx
addl %ecx, %eax
movw %ax, -0xc(%rbp)
movw -0xc(%rbp), %ax
movq -0x8(%rbp), %rsi
leaq -0xd(%rbp), %rdx
movzwl %ax, %edi
callq 0x1b160
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleJump(dsemu::cpu::OpCode const&)
int handleJump(const OpCode &op) {
    ushort location = 0;
    bool didJump;

    switch(op.params[0]) {
        case NN:
            location = toShort(bus::read(regPC + 1), bus::read(regPC + 2));
            break;
        case HL:
            location = toShort(regHL.lo, regHL.hi);
            break;
        default:
            cout << "ERRO BAD JUMP" << endl;
            exit(-1);

    }

    return conditionalJump(location - op.length, op, didJump);

/*
    if (op.mode == ATypeJ) {
        regPC = location - op.length;
        return 0;
    } else if (op.mode == ATypeJ_C && getFlag(FlagC)) {
        regPC = location - op.length;
        return 4;
    } else if (op.mode == ATypeJ_NC && !getFlag(FlagC)) {
        regPC = location - op.length;
        return 4;
    } else if (op.mode == ATypeJ_NZ && !getFlag(FlagZ)) {
        regPC = location - op.length;
        return 4;
    } else if (op.mode == ATypeJ_Z && getFlag(FlagZ)) {
        regPC = location - op.length;
        return 4;
    }
    return 0;
*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movw $0x0, -0xa(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x10(%rbp)
subl $0x9, %eax
je 0x1b3ae
jmp 0x1b363
movl -0x10(%rbp), %eax
subl $0xd, %eax
jne 0x1b3d0
jmp 0x1b36d
leaq 0x1422a(%rip), %rax     # 0x2f59e
movzwl (%rax), %eax
addl $0x1, %eax
movzwl %ax, %edi
callq 0x13450
movb %al, -0x11(%rbp)
leaq 0x14212(%rip), %rax     # 0x2f59e
movzwl (%rax), %eax
addl $0x2, %eax
movzwl %ax, %edi
callq 0x13450
movb -0x11(%rbp), %cl
movzbl %cl, %edi
movzbl %al, %esi
callq 0x19ad0
movw %ax, -0xa(%rbp)
jmp 0x1b3fc
leaq 0x141e1(%rip), %rax     # 0x2f596
movb (%rax), %cl
leaq 0x141d8(%rip), %rax     # 0x2f596
movzbl %cl, %edi
movzbl 0x1(%rax), %esi
callq 0x19ad0
movw %ax, -0xa(%rbp)
jmp 0x1b3fc
movq 0x13bf9(%rip), %rdi     # 0x2efd0
leaq 0x90bb(%rip), %rsi      # 0x24499
callq 0x32c0
movq %rax, %rdi
movq 0x13bc3(%rip), %rsi     # 0x2efb0
callq 0x3310
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3390
movzwl -0xa(%rbp), %eax
movq -0x8(%rbp), %rcx
movzbl 0x14(%rcx), %ecx
subl %ecx, %eax
movq -0x8(%rbp), %rsi
leaq -0xb(%rbp), %rdx
movzwl %ax, %edi
callq 0x1b160
addq $0x20, %rsp
popq %rbp
retq
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleDAA(dsemu::cpu::OpCode const&)
int handleDAA(const OpCode &op) {
    if (!getFlag(FlagN)) {
        ushort a = regAF.hi;
        byte nl = (regAF.hi & 0x0f);
        bool finalVal = false;
        
        if (getFlag(FlagH) || nl > 0x09) {
            a += 6;
        }

        if (getFlag(FlagC) || (a & 0xFFF0) > 0x90) {
            a += 0x60;
            finalVal = true;
        }

        regAF.hi = (byte)(a & 0xFF);
        setFlag(FlagC, finalVal);
    } else {
        if (getFlag(FlagH)) {
            regAF.hi -= 6;
        }

        if (getFlag(FlagC)) {
            regAF.hi -= 0x60;
        } else {
            setFlag(FlagC, false);
        }
    }

    setFlag(FlagZ, regAF.hi == 0);
    setFlag(FlagH, false);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x6, %edi
callq 0x1dac0
testb $0x1, %al
jne 0x1b4da
leaq 0x1414b(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
movw %ax, -0xa(%rbp)
leaq 0x1413c(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
andl $0xf, %eax
movb %al, -0xb(%rbp)
movb $0x0, -0xc(%rbp)
movl $0x5, %edi
callq 0x1dac0
testb $0x1, %al
jne 0x1b479
movzbl -0xb(%rbp), %eax
cmpl $0x9, %eax
jle 0x1b484
movzwl -0xa(%rbp), %eax
addl $0x6, %eax
movw %ax, -0xa(%rbp)
movl $0x4, %edi
callq 0x1dac0
testb $0x1, %al
jne 0x1b4a2
movzwl -0xa(%rbp), %eax
andl $0xfff0, %eax           # imm = 0xFFF0
cmpl $0x90, %eax
jle 0x1b4b1
movzwl -0xa(%rbp), %eax
addl $0x60, %eax
movw %ax, -0xa(%rbp)
movb $0x1, -0xc(%rbp)
movzwl -0xa(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
leaq 0x140cd(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
movb -0xc(%rbp), %al
movl $0x4, %edi
andb $0x1, %al
movzbl %al, %esi
callq 0x1da80
jmp 0x1b53e
movl $0x5, %edi
callq 0x1dac0
testb $0x1, %al
jne 0x1b4ea
jmp 0x1b504
leaq 0x1409f(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
subl $0x6, %eax
movb %al, %cl
leaq 0x1408f(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
movl $0x4, %edi
callq 0x1dac0
testb $0x1, %al
jne 0x1b514
jmp 0x1b530
leaq 0x14075(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
subl $0x60, %eax
movb %al, %cl
leaq 0x14065(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
jmp 0x1b53c
movl $0x4, %edi
xorl %esi, %esi
callq 0x1da80
jmp 0x1b53e
leaq 0x1404b(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
sete %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x7, %edi
callq 0x1da80
movl $0x5, %edi
xorl %esi, %esi
callq 0x1da80
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handlePOP(dsemu::cpu::OpCode const&)
int handlePOP(const OpCode &op) {
    ushort *p = (ushort *)getPointer(op.params[0], false);
    
    ushort s = spop();
    cout << "POPPED VALUE: " << Short(s) << endl;

    if (p == (ushort *)&regAF) {
        *p = s & 0xFFF0;
    } else {
        *p = s;
    }

    if (op.value == 0xF1) {
        //sleep(2);
    }
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edi
xorl %esi, %esi
callq 0x1a3c0
movq %rax, -0x10(%rbp)
callq 0x144b0
movw %ax, -0x12(%rbp)
movq 0x13a22(%rip), %rdi     # 0x2efd0
leaq 0x8ef2(%rip), %rsi      # 0x244a7
callq 0x32c0
movq %rax, -0x20(%rbp)
leaq -0x14(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0x13840
movq -0x20(%rbp), %rdi
movzwl -0x14(%rbp), %esi
callq 0x137b0
movq %rax, %rdi
movq 0x139ce(%rip), %rsi     # 0x2efb0
callq 0x3310
leaq 0x13fa2(%rip), %rax     # 0x2f590
cmpq %rax, -0x10(%rbp)
jne 0x1b609
movzwl -0x12(%rbp), %eax
andl $0xfff0, %eax           # imm = 0xFFF0
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
jmp 0x1b614
movw -0x12(%rbp), %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xf1, %eax
jne 0x1b624
jmp 0x1b624
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handlePUSH(dsemu::cpu::OpCode const&)
int handlePUSH(const OpCode &op) {
    ushort *p = (ushort *)getPointer(op.params[0], false);

    push(*p);

    cout << "PUSHED: " << Short(*p) << endl;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edi
xorl %esi, %esi
callq 0x1a3c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzwl (%rax), %edi
callq 0x14360
movq 0x1396f(%rip), %rdi     # 0x2efd0
leaq 0x8e4e(%rip), %rsi      # 0x244b6
callq 0x32c0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
leaq -0x12(%rbp), %rdi
movzwl (%rax), %esi
callq 0x13840
movq -0x20(%rbp), %rdi
movzwl -0x12(%rbp), %esi
callq 0x137b0
movq %rax, %rdi
movq 0x13918(%rip), %rsi     # 0x2efb0
callq 0x3310
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleRETI(dsemu::cpu::OpCode const&)
int handleRETI(const OpCode &op) {
    interruptsEnabled = true;
    cameFromI = true;
    int n = handleRET(op);
    cameFromI = false;

    //cout << "RETI - AFTER RET: " << n << " - " << Short(regPC) << endl;

    return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movb $0x1, 0x33b66(%rip)     # 0x4f6b9
movb $0x1, 0x33b9e(%rip)     # 0x4f6f8
movq -0x8(%rbp), %rdi
callq 0x1b900
movl %eax, -0xc(%rbp)
movb $0x0, 0x33b8b(%rip)     # 0x4f6f8
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleADC(dsemu::cpu::OpCode const&)
int handleADC(const OpCode &op) {
    byte *val = getPointer(op.params[1]);

    if (op.value == 0xCE) {
        byte t = bus::read(regPC + 1);
        unsigned int i = regAF.hi + t + getFlag(FlagC) >= 0x100;
        //setFlags(regAF.hi, t, true, true);
        setFlag(FlagN, false);
        setFlag(FlagH, ((regAF.hi&0xF) + (t&0xF) + getFlag(FlagC)) >= 0x10);
        regAF.hi = regAF.hi + t + getFlag(FlagC);
        setFlag(FlagC, i);
        setFlag(FlagZ, !regAF.hi);

        return  0;
    }

    unsigned int a = regAF.hi + *val + getFlag(FlagC);

    setFlags(regAF.hi, *val, true, true);

    regAF.hi = a & 0xFF;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edi
movl $0x1, %esi
callq 0x1a3c0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xce, %eax
jne 0x1bf00
leaq 0x137b4(%rip), %rax     # 0x2f59e
movzwl (%rax), %eax
addl $0x1, %eax
movzwl %ax, %edi
callq 0x13450
movb %al, -0x19(%rbp)
leaq 0x1378e(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
movzbl -0x19(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x30(%rbp)
movl $0x4, %edi
callq 0x1dac0
movb %al, %cl
movl -0x30(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cmpl $0x100, %eax            # imm = 0x100
setge %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x20(%rbp)
movl $0x6, %edi
xorl %esi, %esi
callq 0x1da80
leaq 0x13747(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
andl $0xf, %eax
movzbl -0x19(%rbp), %ecx
andl $0xf, %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl $0x4, %edi
callq 0x1dac0
movb %al, %cl
movl -0x2c(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cmpl $0x10, %eax
setge %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x5, %edi
callq 0x1da80
leaq 0x13700(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
movzbl -0x19(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x28(%rbp)
movl $0x4, %edi
callq 0x1dac0
movb %al, %cl
movl -0x28(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movb %al, %cl
leaq 0x136d3(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
cmpl $0x0, -0x20(%rbp)
setne %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x4, %edi
callq 0x1da80
leaq 0x136b2(%rip), %rax     # 0x2f590
cmpb $0x0, 0x1(%rax)
setne %al
xorb $-0x1, %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x7, %edi
callq 0x1da80
movl $0x0, -0x4(%rbp)
jmp 0x1bf6c
leaq 0x13689(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
movq -0x18(%rbp), %rcx
movzbl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x34(%rbp)
movl $0x4, %edi
callq 0x1dac0
movb %al, %cl
movl -0x34(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x24(%rbp)
leaq 0x13658(%rip), %rax     # 0x2f590
movb 0x1(%rax), %dl
movq -0x18(%rbp), %rax
movl $0x1, %ecx
movzbl %dl, %edi
movzbl (%rax), %esi
movl %ecx, %edx
callq 0x1bb80
movl -0x24(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
leaq 0x1362e(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleADD(dsemu::cpu::OpCode const&)
int handleADD(const OpCode &op) {
    if (op.params[0] == A) {
        byte *p = getPointer(op.params[1]);
        ushort a = regAF.hi + *p;
        setFlags(regAF.hi, *p, true, false);
        regAF.hi = a & 0x00FF;

    } else if (op.params[0] == SP) {
        char e = bus::read(regPC + 1);
        setFlags(getReg16Value(regSP), e, true, false);
        setReg16Value(regSP, getReg16Value(regSP) + e);
        setFlag(FlagZ, false);
    } else {
        ushort *p = (ushort *)getPointer(op.params[1], false);
        ushort *pHL = (ushort *)&regHL;
        int n = *pHL + *p;

        setFlag(FlagC, n >= 0x10000);
        setFlag(FlagN, false);
        setFlag(FlagH, (n & 0xFFF) < (*pHL & 0xFFF));
        *pHL = n & 0xFFFF;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x1bfff
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edi
movl $0x1, %esi
callq 0x1a3c0
movq %rax, -0x10(%rbp)
leaq 0x135de(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
addl %ecx, %eax
movw %ax, -0x12(%rbp)
leaq 0x135c6(%rip), %rax     # 0x2f590
movb 0x1(%rax), %sil
movq -0x10(%rbp), %rax
movl $0x1, %edx
xorl %ecx, %ecx
movzbl %sil, %edi
movzbl (%rax), %esi
callq 0x1bb80
movzwl -0x12(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
leaq 0x13599(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
jmp 0x1c109
movq -0x8(%rbp), %rax
cmpl $0xa, 0x1c(%rax)
jne 0x1c075
leaq 0x1358e(%rip), %rax     # 0x2f59e
movzwl (%rax), %eax
addl $0x1, %eax
movzwl %ax, %edi
callq 0x13450
movb %al, -0x13(%rbp)
leaq 0x13574(%rip), %rdi     # 0x2f59c
callq 0x15070
movl $0x1, %edx
xorl %ecx, %ecx
movzbl %al, %edi
movzbl -0x13(%rbp), %esi
callq 0x1bb80
leaq 0x13555(%rip), %rdi     # 0x2f59c
callq 0x15070
movzwl %ax, %eax
movsbl -0x13(%rbp), %ecx
addl %ecx, %eax
leaq 0x13540(%rip), %rdi     # 0x2f59c
movzwl %ax, %esi
callq 0x15030
movl $0x7, %edi
xorl %esi, %esi
callq 0x1da80
jmp 0x1c107
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edi
xorl %esi, %esi
callq 0x1a3c0
movq %rax, -0x20(%rbp)
leaq 0x13508(%rip), %rax     # 0x2f596
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movzwl (%rax), %eax
movq -0x20(%rbp), %rcx
movzwl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x2c(%rbp)
cmpl $0x10000, -0x2c(%rbp)   # imm = 0x10000
setge %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x4, %edi
callq 0x1da80
movl $0x6, %edi
xorl %esi, %esi
callq 0x1da80
movl -0x2c(%rbp), %eax
andl $0xfff, %eax            # imm = 0xFFF
movq -0x28(%rbp), %rcx
movzwl (%rcx), %ecx
andl $0xfff, %ecx            # imm = 0xFFF
cmpl %ecx, %eax
setl %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x5, %edi
callq 0x1da80
movl -0x2c(%rbp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movw %ax, %cx
movq -0x28(%rbp), %rax
movw %cx, (%rax)
jmp 0x1c109
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleSUB(dsemu::cpu::OpCode const&)
int handleSUB(const OpCode &op) {
    byte *val = getPointer(op.params[0]);

    short a = regAF.hi - *val;
    setFlags(regAF.hi, *val, false, false);

    regAF.hi = a & 0x00FF;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edi
movl $0x1, %esi
callq 0x1a3c0
movq %rax, -0x10(%rbp)
leaq 0x13448(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movw %ax, -0x12(%rbp)
leaq 0x13430(%rip), %rax     # 0x2f590
movb 0x1(%rax), %dl
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movzbl %dl, %edi
movzbl (%rax), %esi
movl %ecx, %edx
callq 0x1bb80
movswl -0x12(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
leaq 0x13408(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleSBC(dsemu::cpu::OpCode const&)
int handleSBC(const OpCode &op) {
    byte *val = getPointer(op.params[0]);

    short a = regAF.hi - *val - getFlag(FlagC);
    setFlags(regAF.hi, *val, false, true);

    regAF.hi = a & 0x00FF;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edi
movl $0x1, %esi
callq 0x1a3c0
movq %rax, -0x10(%rbp)
leaq 0x133c8(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
movq -0x10(%rbp), %rcx
movzbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movl $0x4, %edi
callq 0x1dac0
movb %al, %cl
movl -0x18(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
subl %ecx, %eax
movw %ax, -0x12(%rbp)
leaq 0x13396(%rip), %rax     # 0x2f590
movb 0x1(%rax), %sil
movq -0x10(%rbp), %rax
xorl %edx, %edx
movl $0x1, %ecx
movzbl %sil, %edi
movzbl (%rax), %esi
callq 0x1bb80
movswl -0x12(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
leaq 0x13369(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleAND(dsemu::cpu::OpCode const&)
int handleAND(const OpCode &op) {
    byte *val = getPointer(op.params[0]);

    regAF.hi &= *val;
    
    setFlag(FlagZ, regAF.hi == 0);
    setFlag(FlagN, false);
    setFlag(FlagH, true);
    setFlag(FlagC, 0);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edi
movl $0x1, %esi
callq 0x1a3c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %ecx
leaq 0x13321(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
andl %ecx, %eax
movb %al, %cl
leaq 0x13312(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
leaq 0x13308(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
sete %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x7, %edi
callq 0x1da80
movl $0x6, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x5, %edi
movl $0x1, %esi
callq 0x1da80
movl $0x4, %edi
xorl %esi, %esi
callq 0x1da80
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleOR(dsemu::cpu::OpCode const&)
int handleOR(const OpCode &op) {
    byte *val = getPointer(op.params[0]);

    regAF.hi |= *val;
    
    setFlag(FlagZ, regAF.hi == 0);
    setFlag(FlagN, false);
    setFlag(FlagH, false);
    setFlag(FlagC, 0);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edi
movl $0x1, %esi
callq 0x1a3c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %ecx
leaq 0x13281(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
orl %ecx, %eax
movb %al, %cl
leaq 0x13272(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
leaq 0x13268(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
sete %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x7, %edi
callq 0x1da80
movl $0x6, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x5, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x4, %edi
xorl %esi, %esi
callq 0x1da80
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleXOR(dsemu::cpu::OpCode const&)
int handleXOR(const OpCode &op) {
    byte *val = getPointer(op.params[0]);

    //cout << "XORING VAL: " << Byte(*val) << endl;

    regAF.hi ^= *val;
    
    setFlag(FlagZ, regAF.hi == 0);
    setFlag(FlagN, false);
    setFlag(FlagH, false);
    setFlag(FlagC, 0);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %edi
movl $0x1, %esi
callq 0x1a3c0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %ecx
leaq 0x131f1(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
xorl %ecx, %eax
movb %al, %cl
leaq 0x131e2(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
leaq 0x131d8(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
cmpl $0x0, %eax
sete %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x7, %edi
callq 0x1da80
movl $0x6, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x5, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x4, %edi
xorl %esi, %esi
callq 0x1da80
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::getVal(dsemu::cpu::ParamType)
byte getVal(ParamType pt) {
    switch(pt) {
        case A: return regAF.hi; 
        case B: return regBC.hi; 
        case C: return regBC.lo; 
        case D: return regDE.hi; 
        case E: return regDE.lo; 
        case H: return regHL.hi; 
        case L: return regHL.lo; 
        case N: return bus::read(regPC + 1); 
        case HL: return bus::read(toShort(regHL.lo, regHL.hi)); break;
        default:
            cout << "BAD LDD" << endl;
            exit(-1);
            return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x10(%rbp)
subq $0xc, %rax
ja 0x1c4e8
movq -0x10(%rbp), %rax
leaq 0x7f21(%rip), %rcx      # 0x24348
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x13159(%rip), %rax     # 0x2f590
movb 0x1(%rax), %al
movb %al, -0x1(%rbp)
jmp 0x1c514
leaq 0x13149(%rip), %rax     # 0x2f592
movb 0x1(%rax), %al
movb %al, -0x1(%rbp)
jmp 0x1c514
leaq 0x13137(%rip), %rax     # 0x2f592
movb (%rax), %al
movb %al, -0x1(%rbp)
jmp 0x1c514
leaq 0x13128(%rip), %rax     # 0x2f594
movb 0x1(%rax), %al
movb %al, -0x1(%rbp)
jmp 0x1c514
leaq 0x13116(%rip), %rax     # 0x2f594
movb (%rax), %al
movb %al, -0x1(%rbp)
jmp 0x1c514
leaq 0x13107(%rip), %rax     # 0x2f596
movb 0x1(%rax), %al
movb %al, -0x1(%rbp)
jmp 0x1c514
leaq 0x130f8(%rip), %rax     # 0x2f596
movb (%rax), %al
movb %al, -0x1(%rbp)
jmp 0x1c514
leaq 0x130f2(%rip), %rax     # 0x2f59e
movzwl (%rax), %eax
addl $0x1, %eax
movzwl %ax, %edi
callq 0x13450
movb %al, -0x1(%rbp)
jmp 0x1c514
leaq 0x130d0(%rip), %rax     # 0x2f596
movb (%rax), %cl
leaq 0x130c7(%rip), %rax     # 0x2f596
movzbl %cl, %edi
movzbl 0x1(%rax), %esi
callq 0x19ad0
movzwl %ax, %edi
callq 0x13450
movb %al, -0x1(%rbp)
jmp 0x1c514
movq 0x12ae1(%rip), %rdi     # 0x2efd0
leaq 0x800e(%rip), %rsi      # 0x24504
callq 0x32c0
movq %rax, %rdi
movq 0x12aab(%rip), %rsi     # 0x2efb0
callq 0x3310
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3390
movb -0x1(%rbp), %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleLDD(dsemu::cpu::OpCode const&)
int handleLDD(const OpCode &op) {
    handleLD(op);
    ushort *p = (ushort *)&regHL;
    (*p)--;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1a6d0
leaq 0x1305a(%rip), %rax     # 0x2f596
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movw (%rax), %cx
addw $-0x1, %cx
movw %cx, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleLDI(dsemu::cpu::OpCode const&)
int handleLDI(const OpCode &op) {
    handleLD(op);
    ushort *p = (ushort *)&regHL;
    (*p)++;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1a6d0
leaq 0x1301a(%rip), %rax     # 0x2f596
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movw (%rax), %cx
addw $0x1, %cx
movw %cx, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleRLA(dsemu::cpu::OpCode const&)
int handleRLA(const OpCode &op) {
    byte cf = getFlag(FlagC);
    setFlag(FlagC, !!(regAF.hi & (1 << 7)));
    regAF.hi <<= 1;
    regAF.hi += cf;
    setFlag(FlagZ, false);
    setFlag(FlagH, false);
    setFlag(FlagN, false);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x4, %edi
callq 0x1dac0
andb $0x1, %al
movb %al, -0x9(%rbp)
leaq 0x1295e(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x4, %edi
callq 0x1da80
leaq 0x12934(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
shll %eax
movb %al, %cl
leaq 0x12925(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
movzbl -0x9(%rbp), %ecx
leaq 0x12917(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
addl %ecx, %eax
movb %al, %cl
leaq 0x12908(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
movl $0x7, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x5, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x6, %edi
xorl %esi, %esi
callq 0x1da80
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleRLCA(dsemu::cpu::OpCode const&)
int handleRLCA(const OpCode &op) {
    byte b = !!(regAF.hi & 0x80);
    regAF.hi <<= 1;
    regAF.hi |= b;
    
    setFlag(FlagC, b);
    setFlag(FlagZ, false);
    setFlag(FlagH, false);
    setFlag(FlagN, false);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x128bd(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x9(%rbp)
leaq 0x1289e(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
shll %eax
movb %al, %cl
leaq 0x1288f(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
movzbl -0x9(%rbp), %ecx
leaq 0x12881(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
orl %ecx, %eax
movb %al, %cl
leaq 0x12872(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
cmpb $0x0, -0x9(%rbp)
setne %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x4, %edi
callq 0x1da80
movl $0x7, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x5, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x6, %edi
xorl %esi, %esi
callq 0x1da80
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleRRA(dsemu::cpu::OpCode const&)
int handleRRA(const OpCode &op) {
    byte carry = getFlag(FlagC);

    setFlag(FlagC, regAF.hi & 1);
    regAF.hi >>= 1;
    regAF.hi |= (carry << 7);
    setFlag(FlagZ, false);
    setFlag(FlagH, false);
    setFlag(FlagN, false);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x4, %edi
callq 0x1dac0
andb $0x1, %al
movb %al, -0x9(%rbp)
leaq 0x127fe(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
setne %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x4, %edi
callq 0x1da80
leaq 0x127da(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
sarl %eax
movb %al, %cl
leaq 0x127cb(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
movzbl -0x9(%rbp), %ecx
shll $0x7, %ecx
leaq 0x127ba(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
orl %ecx, %eax
movb %al, %cl
leaq 0x127ab(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
movl $0x7, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x5, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x6, %edi
xorl %esi, %esi
callq 0x1da80
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleCPL(dsemu::cpu::OpCode const&)
int handleCPL(const OpCode &op) {
    regAF.hi = ~regAF.hi;
    setFlag(FlagH, true);
    setFlag(FlagN, true);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x1275d(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
xorl $-0x1, %eax
movb %al, %cl
leaq 0x1274d(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
movl $0x5, %edi
movl $0x1, %esi
callq 0x1da80
movl $0x6, %edi
movl $0x1, %esi
callq 0x1da80
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleRRCA(dsemu::cpu::OpCode const&)
int handleRRCA(const OpCode &op) {
    byte b = regAF.hi & 1;
    regAF.hi >>= 1;
    regAF.hi |= b << 7;
    
    if (b) {
        setFlag(FlagC, true);
    } else {
        setFlag(FlagC, false);
    }

    setFlag(FlagZ, false);
    setFlag(FlagH, false);
    setFlag(FlagN, false);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x1270d(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
andl $0x1, %eax
movb %al, -0x9(%rbp)
leaq 0x126fc(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
sarl %eax
movb %al, %cl
leaq 0x126ed(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
movzbl -0x9(%rbp), %ecx
shll $0x7, %ecx
leaq 0x126dc(%rip), %rax     # 0x2f590
movzbl 0x1(%rax), %eax
orl %ecx, %eax
movb %al, %cl
leaq 0x126cd(%rip), %rax     # 0x2f590
movb %cl, 0x1(%rax)
cmpb $0x0, -0x9(%rbp)
je 0x1cedd
movl $0x4, %edi
movl $0x1, %esi
callq 0x1da80
jmp 0x1cee9
movl $0x4, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x7, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x5, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x6, %edi
xorl %esi, %esi
callq 0x1da80
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleSCF(dsemu::cpu::OpCode const&)
int handleSCF(const OpCode &op) {
    setFlag(FlagH, false);
    setFlag(FlagN, false);
    setFlag(FlagC, true);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x5, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x6, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x4, %edi
movl $0x1, %esi
callq 0x1da80
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleCCF(dsemu::cpu::OpCode const&)
int handleCCF(const OpCode &op) {
    setFlag(FlagH, false);
    setFlag(FlagN, false);
    setFlag(FlagC, !getFlag(FlagC));
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x5, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x6, %edi
xorl %esi, %esi
callq 0x1da80
movl $0x4, %edi
callq 0x1dac0
xorb $-0x1, %al
movzbl %al, %esi
andl $0x1, %esi
movl $0x4, %edi
callq 0x1da80
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handleRST(dsemu::cpu::OpCode const&)
int handleRST(const OpCode &op) {
    push((ushort)(regPC + 1));

    switch(op.params[0]) {
        case x00: regPC = 0x00; break;
        case x08: regPC = 0x08; break;
        case x10: regPC = 0x10; break;
        case x18: regPC = 0x18; break;
        case x20: regPC = 0x20; break;
        case x28: regPC = 0x28; break;
        case x30: regPC = 0x30; break;
        case x38: regPC = 0x38; break;
        default: {
            cout << "UNKNOWN RST" << endl;
            exit(-1);
        }
    }

    regPC -= 1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x1259b(%rip), %rax     # 0x2f59e
movzwl (%rax), %eax
incl %eax
movzwl %ax, %edi
callq 0x14360
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
addl $-0xf, %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x7, %eax
ja 0x1d0b3
movq -0x10(%rbp), %rax
leaq 0x73a0(%rip), %rcx      # 0x243d4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1255a(%rip), %rax     # 0x2f59e
movw $0x0, (%rax)
jmp 0x1d0df
leaq 0x12549(%rip), %rax     # 0x2f59e
movw $0x8, (%rax)
jmp 0x1d0df
leaq 0x12538(%rip), %rax     # 0x2f59e
movw $0x10, (%rax)
jmp 0x1d0df
leaq 0x1252a(%rip), %rax     # 0x2f59e
movw $0x18, (%rax)
jmp 0x1d0df
leaq 0x1251c(%rip), %rax     # 0x2f59e
movw $0x20, (%rax)
jmp 0x1d0df
leaq 0x1250e(%rip), %rax     # 0x2f59e
movw $0x28, (%rax)
jmp 0x1d0df
leaq 0x12500(%rip), %rax     # 0x2f59e
movw $0x30, (%rax)
jmp 0x1d0df
leaq 0x124f2(%rip), %rax     # 0x2f59e
movw $0x38, (%rax)
jmp 0x1d0df
movq 0x11f16(%rip), %rdi     # 0x2efd0
leaq 0x746d(%rip), %rsi      # 0x2452e
callq 0x32c0
movq %rax, %rdi
movq 0x11ee0(%rip), %rsi     # 0x2efb0
callq 0x3310
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3390
leaq 0x124b8(%rip), %rax     # 0x2f59e
movzwl (%rax), %eax
subl $0x1, %eax
movw %ax, %cx
leaq 0x124a8(%rip), %rax     # 0x2f59e
movw %cx, (%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/op_handler.cpp
// Function: dsemu::cpu::handle_op(dsemu::cpu::OpCode&)
int handle_op(OpCode &opCode) {
    std::map<Op, HANDLER>::iterator it = handlerMap.find(opCode.op);

    if (it == handlerMap.end()) {
        cout << "UNKNOWN OP CODE: " << Byte(opCode.value) << endl;
        exit(-1);
    }

    int ret = it->second(opCode);

    if (opCode.op != EI && eiCalled) {
        eiCalled = false;
        interruptsEnabled = true;
    }

    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
addq $0x10, %rsi
leaq 0x3202d(%rip), %rdi     # 0x4f658
callq 0x1dcd0
movq %rax, -0x10(%rbp)
leaq 0x3201d(%rip), %rdi     # 0x4f658
callq 0x1dd30
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x1dd00
testb $0x1, %al
jne 0x1d657
jmp 0x1d6a4
movq 0x11972(%rip), %rdi     # 0x2efd0
leaq 0x6ed5(%rip), %rsi      # 0x2453a
callq 0x32c0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
leaq -0x19(%rbp), %rdi
movzbl (%rax), %esi
callq 0x13860
movq -0x28(%rbp), %rdi
movzbl -0x19(%rbp), %esi
callq 0x13720
movq %rax, %rdi
movq 0x1191b(%rip), %rsi     # 0x2efb0
callq 0x3310
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3390
leaq -0x10(%rbp), %rdi
callq 0x1dd60
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdi
callq *%rax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1d, 0x10(%rax)
je 0x1d6db
testb $0x1, 0x31fed(%rip)     # 0x4f6b8
je 0x1d6db
movb $0x0, 0x31fe4(%rip)     # 0x4f6b8
movb $0x1, 0x31fde(%rip)     # 0x4f6b9
movl -0x20(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: rockytriton[P]dreamsys_emu_gb/src/common.h
// Function: setBit(unsigned char&, unsigned char, bool)
inline void setBit(byte &b, byte n, bool on) {
    if (on) {
        b |= (1 << n);
    } else {
        b &= ~(1 << n);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
andb $0x1, %al
movb %al, -0xa(%rbp)
testb $0x1, -0xa(%rbp)
je 0x1e983
movzbl -0x9(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
orl %edx, %ecx
movb %cl, (%rax)
jmp 0x1e99c
movzbl -0x9(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
xorl $-0x1, %edx
movq -0x8(%rbp), %rax
movzbl (%rax), %ecx
andl %edx, %ecx
movb %cl, (%rax)
popq %rbp
retq
nop
// File: rockytriton[P]dreamsys_emu_gb/src/ppu.cpp
// Function: dsemu::ppu::init()
void init() {
    currentFrame = 0;
    currentLine = 0;
    scrollInfo.x = 0;
    scrollInfo.y = 0;
    memset(oamRAM, 0, sizeof(oamRAM));

    videoBuffer = new unsigned long[256 * 256];
    memset(videoBuffer, 0, 256 * 256 * sizeof(unsigned long));

    cout << "VID BUFF: " << Int64((uint64_t)videoBuffer) << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, 0x32a86(%rip)     # 0x54718
movb $0x0, 0x32a83(%rip)     # 0x5471c
movb $0x0, 0x32a73(%rip)     # 0x54713
movb $0x0, 0x32a6d(%rip)     # 0x54714
leaq 0x32a72(%rip), %rdi     # 0x54720
xorl %esi, %esi
movl $0xa0, %edx
callq 0x3180
movl $0x80000, %edi          # imm = 0x80000
callq 0x3030
movq %rax, 0x32af5(%rip)     # 0x547c0
movq 0x32aee(%rip), %rdi     # 0x547c0
xorl %esi, %esi
movl $0x80000, %edx          # imm = 0x80000
callq 0x3180
movq 0xd2eb(%rip), %rdi      # 0x2efd0
leaq 0x2eec(%rip), %rsi      # 0x24bd8
callq 0x32c0
movq %rax, -0x10(%rbp)
movq 0x32ac4(%rip), %rsi     # 0x547c0
leaq -0x8(%rbp), %rdi
callq 0x151e0
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x15160
movq %rax, %rdi
movq 0xd294(%rip), %rsi      # 0x2efb0
callq 0x3310
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/ppu.cpp
// Function: dsemu::ppu::readOAM(unsigned short)
byte readOAM(ushort address) {


    //cout << "READ DUMPING OAM RAM: " << Short(address) << " - " << Byte(memory::ram[address]) << " - " << endl;

    for (int i=0; i<160; i++) {
        //if ((i % 32) == 0) cout << endl;
        //cout << " " << Byte(oamRAM[i]);
    }

    //cout << endl;

    //sleep(2);


    return oamRAM[address];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movw %di, %ax
movw %ax, -0x2(%rbp)
movl $0x0, -0x8(%rbp)
cmpl $0xa0, -0x8(%rbp)
jge 0x21d88
jmp 0x21d7d
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x21d72
movzwl -0x2(%rbp), %eax
movl %eax, %ecx
leaq 0x3298b(%rip), %rax     # 0x54720
movb (%rax,%rcx), %al
popq %rbp
retq
nopw (%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/ppu.cpp
// Function: dsemu::ppu::getSpritesOnLine(int)
vector<OAMEntry *> getSpritesOnLine(int lineNum) {

    vector<OAMEntry *> entries;

    for (int i=0; i<160; i += 4) {
        OAMEntry *entry = (OAMEntry *)&oamRAM[i];
        
        if (entry->y >= lineNum + 8 && entry->y < lineNum + 16) {
            entries.push_back(entry);
        }
    }

    return entries;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movb $0x0, -0xd(%rbp)
callq 0x22420
movl $0x0, -0x14(%rbp)
cmpl $0xa0, -0x14(%rbp)
jge 0x21e6c
movslq -0x14(%rbp), %rcx
leaq 0x32912(%rip), %rax     # 0x54720
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl -0xc(%rbp), %ecx
addl $0x8, %ecx
cmpl %ecx, %eax
jl 0x21e5f
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl -0xc(%rbp), %ecx
addl $0x10, %ecx
cmpl %ecx, %eax
jge 0x21e5f
movq -0x40(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x22440
jmp 0x21e46
jmp 0x21e5f
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x224b0
jmp 0x21e89
jmp 0x21e61
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
jmp 0x21dfa
movb $0x1, -0xd(%rbp)
testb $0x1, -0xd(%rbp)
jne 0x21e7f
movq -0x40(%rbp), %rdi
callq 0x224b0
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x34b0
nopw %cs:(%rax,%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/ppu.cpp
// Function: dsemu::ppu::getSpriteOnX(std::vector<dsemu::ppu::OAMEntry*, std::allocator<dsemu::ppu::OAMEntry*>>&, int)
OAMEntry *getSpriteOnX(vector<OAMEntry *> &sprites, int x) {
    for (auto entry : sprites) {
        if (entry->x >= x && entry->x < x + 8) {
            return entry;
        }
    }

    return nullptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x22510
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x22540
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x22570
testb $0x1, %al
jne 0x21ee4
jmp 0x21f2a
leaq -0x28(%rbp), %rdi
callq 0x225b0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl -0x14(%rbp), %eax
jl 0x21f1d
movq -0x38(%rbp), %rax
movzbl 0x1(%rax), %eax
movl -0x14(%rbp), %ecx
addl $0x8, %ecx
cmpl %ecx, %eax
jge 0x21f1d
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x21f32
jmp 0x21f1f
leaq -0x28(%rbp), %rdi
callq 0x225d0
jmp 0x21ed1
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: rockytriton[P]dreamsys_emu_gb/src/ui.cpp
// Function: dsemu::ui::displayTile(SDL_Surface*, unsigned short, unsigned short, int, int)
void displayTile(SDL_Surface *surface, ushort startLocation, ushort tileNum, int x, int y) {

    SDL_Rect rc;

    for (int tileY=0; tileY<16; tileY += 2) {
        byte b1 = bus::read(startLocation + (tileNum * 16) + tileY);
        byte b2 = bus::read(startLocation + (tileNum * 16) + 1 + tileY);
        
        for (int bit=7, n=0; bit >= 0; bit--, n++) {
            byte hi = !!(b1 & (1 << bit)) << 1;
            byte lo = !!(b2 & (1 << bit));

            byte color = hi|lo;

            rc.x = x + (n * scale);
            rc.y = y + (tileY / 2 * scale);
            rc.w = scale;
            rc.h = scale;

            SDL_FillRect(surface, &rc, colors[color]);
        }
    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movw %dx, %ax
movw %si, %dx
movq %rdi, -0x8(%rbp)
movw %dx, -0xa(%rbp)
movw %ax, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x10, -0x28(%rbp)
jge 0x231e4
movzwl -0xa(%rbp), %eax
movzwl -0xc(%rbp), %ecx
shll $0x4, %ecx
addl %ecx, %eax
addl -0x28(%rbp), %eax
movzwl %ax, %edi
callq 0x13450
movb %al, -0x29(%rbp)
movzwl -0xa(%rbp), %eax
movzwl -0xc(%rbp), %ecx
shll $0x4, %ecx
addl %ecx, %eax
addl $0x1, %eax
addl -0x28(%rbp), %eax
movzwl %ax, %edi
callq 0x13450
movb %al, -0x2a(%rbp)
movl $0x7, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
cmpl $0x0, -0x30(%rbp)
jl 0x231d4
movzbl -0x29(%rbp), %eax
movl -0x30(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
shll %eax
movb %al, -0x35(%rbp)
movzbl -0x2a(%rbp), %eax
movl -0x30(%rbp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x36(%rbp)
movzbl -0x35(%rbp), %eax
movzbl -0x36(%rbp), %ecx
orl %ecx, %eax
movb %al, -0x37(%rbp)
movl -0x10(%rbp), %eax
movl -0x34(%rbp), %ecx
imull 0xc17c(%rip), %ecx      # 0x2f2e0
addl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x28(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x3c(%rbp), %eax
imull 0xc15a(%rip), %ecx      # 0x2f2e0
addl %ecx, %eax
movl %eax, -0x20(%rbp)
movl 0xc14f(%rip), %eax      # 0x2f2e0
movl %eax, -0x1c(%rbp)
movl 0xc146(%rip), %eax      # 0x2f2e0
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movzbl -0x37(%rbp), %eax
movl %eax, %ecx
leaq 0xc142(%rip), %rax      # 0x2f2f0
movq (%rax,%rcx,8), %rax
movl %eax, %edx
leaq -0x24(%rbp), %rsi
callq 0x3060
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x230f9
jmp 0x231d6
movl -0x28(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x28(%rbp)
jmp 0x230a8
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)