LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: ericprud[P]sean-parent-concept-based-polymorphism/./doc-library.hh
// Function: draw(document_t const&, std::ostream&, unsigned long)
void draw(const document_t& doc, std::ostream& out, size_t position)
    {
        out << std::string(position, ' ') << "<document>" << std::endl;
        for (const auto& ptr : doc.drawable_ptrs)
            ptr.binding->call_draw(out, position + 2);
        out << std::string(position, ' ') << "</document>" << std::endl;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x2240
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rcx
leaq -0x38(%rbp), %rdi
movl $0x20, %edx
callq 0x4520
jmp 0x46ab
movq -0xb0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2130
movq %rax, -0xb8(%rbp)
jmp 0x46c4
movq -0xb8(%rbp), %rdi
leaq 0x59fd(%rip), %rsi      # 0xa0cf
callq 0x2140
movq %rax, -0xc0(%rbp)
jmp 0x46e0
movq -0xc0(%rbp), %rdi
movq 0xc8d2(%rip), %rsi      # 0x10fc0
callq 0x2170
jmp 0x46f5
leaq -0x38(%rbp), %rdi
callq 0x20b0
leaq -0x39(%rbp), %rdi
callq 0x2190
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x4910
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
callq 0x4940
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x4970
testb $0x1, %al
jne 0x473c
jmp 0x47a3
leaq -0x60(%rbp), %rdi
callq 0x49b0
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdi
callq 0x49d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x2, %rdx
movq (%rdi), %rax
callq *0x10(%rax)
leaq -0x60(%rbp), %rdi
callq 0x49f0
jmp 0x4729
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4795
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x20b0
leaq -0x39(%rbp), %rdi
callq 0x2190
jmp 0x488d
movq -0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x2240
movq -0xd0(%rbp), %rsi
movq -0xc8(%rbp), %rcx
leaq -0x90(%rbp), %rdi
movl $0x20, %edx
callq 0x4520
jmp 0x47ed
movq -0xd8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x2130
movq %rax, -0xe0(%rbp)
jmp 0x4809
movq -0xe0(%rbp), %rdi
leaq 0x58c3(%rip), %rsi      # 0xa0da
callq 0x2140
movq %rax, -0xe8(%rbp)
jmp 0x4825
movq -0xe8(%rbp), %rdi
movq 0xc78d(%rip), %rsi      # 0x10fc0
callq 0x2170
jmp 0x483a
leaq -0x90(%rbp), %rdi
callq 0x20b0
leaq -0x91(%rbp), %rdi
callq 0x2190
addq $0xf0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4881
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x20b0
leaq -0x91(%rbp), %rdi
callq 0x2190
movq -0x48(%rbp), %rdi
callq 0x2230
nopw %cs:(%rax,%rax)
// File: khedoros[P]khednes/main.cpp
// Function: get_choice(rom&)
unsigned int get_choice(rom& cart) {
    unsigned int choice = 0;
    while(choice < 1 || choice > cart.get_song_count()) {
        cout<<"Choose a song number between 1 and "<<dec<<cart.get_song_count()<<": ";
        cout.flush();
        cin>>choice;
    }
    return choice;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movb $0x1, %al
cmpl $0x1, 0x1c(%rsp)
movb %al, 0x1b(%rsp)
jb 0xe7ff
movl 0x1c(%rsp), %eax
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rdi
callq 0x10f60
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
seta %al
movb %al, 0x1b(%rsp)
movb 0x1b(%rsp), %al
testb $0x1, %al
jne 0xe809
jmp 0xe877
movq 0x287a0(%rip), %rdi     # 0x36fb0
leaq 0x1cb7a(%rip), %rsi     # 0x2b391
callq 0x43c0
movq %rax, %rdi
leaq 0x25a(%rip), %rsi       # 0xea80
callq 0x4150
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x10f60
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x44c0
movq %rax, %rdi
leaq 0x1e3c5(%rip), %rsi     # 0x2cc15
callq 0x43c0
movq 0x28754(%rip), %rdi     # 0x36fb0
callq 0x42a0
movq 0x28770(%rip), %rdi     # 0x36fd8
leaq 0x1c(%rsp), %rsi
callq 0x4090
jmp 0xe7d1
movl 0x1c(%rsp), %eax
addq $0x28, %rsp
retq
// File: khedoros[P]khednes/main.cpp
// Function: init_nsf(rom&, mem&, cpu&, unsigned int)
bool init_nsf(rom& cart, mem& memi, cpu& cpui, unsigned int choice = 1) {
    cout<<"Playing song "<<dec<<choice<<" out of "<<cart.get_song_count()<<endl;
    cpui.reset(cart.get_rst_addr());
    cpui.set_acc(choice-1);
    cpui.set_x(0);
    for(int i=0;i<0x800;++i)
        memi.write(i,0);
    for(int i=0x6000;i<0x8000;++i)
        memi.write(i,0);
    for(int i=0x4000;i<0x4014;++i)
        memi.write(i,0);
    memi.write(0x4015, 0x0f);
    memi.write(0x4017, 0x40);
    cart.reset_map();
    int ret = 1;
    while(ret) {
        ret = cpui.run_next_op();
        if(ret < 0) return false;
    }
    cpui.reset(cart.get_nmi_addr());
    cout<<"I think I init'ed the program properly."<<endl;
    return true;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movl %ecx, 0x34(%rsp)
movq 0x28712(%rip), %rdi     # 0x36fb0
leaq 0x1cb10(%rip), %rsi     # 0x2b3b5
callq 0x43c0
movq %rax, %rdi
leaq 0x1cc(%rip), %rsi       # 0xea80
callq 0x4150
movq %rax, %rdi
movl 0x34(%rsp), %esi
callq 0x44c0
movq %rax, %rdi
leaq 0x1caf4(%rip), %rsi     # 0x2b3c3
callq 0x43c0
movq %rax, 0x10(%rsp)
movq 0x48(%rsp), %rdi
callq 0x10f60
movq 0x10(%rsp), %rdi
movl %eax, %esi
callq 0x44c0
movq %rax, %rdi
movq 0x28697(%rip), %rsi     # 0x36f90
callq 0x4400
movq 0x38(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x48(%rsp), %rdi
callq 0x110a0
movq 0x18(%rsp), %rdi
movl %eax, %esi
callq 0x195d0
movq 0x38(%rsp), %rdi
movl 0x34(%rsp), %esi
subl $0x1, %esi
callq 0x19610
movq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x195f0
movl $0x0, 0x30(%rsp)
cmpl $0x800, 0x30(%rsp)      # imm = 0x800
jge 0xe96a
movq 0x40(%rsp), %rdi
movl 0x30(%rsp), %esi
xorl %edx, %edx
callq 0x14b10
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0xe943
movl $0x6000, 0x2c(%rsp)     # imm = 0x6000
cmpl $0x8000, 0x2c(%rsp)     # imm = 0x8000
jge 0xe999
movq 0x40(%rsp), %rdi
movl 0x2c(%rsp), %esi
xorl %edx, %edx
callq 0x14b10
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0xe972
movl $0x4000, 0x28(%rsp)     # imm = 0x4000
cmpl $0x4014, 0x28(%rsp)     # imm = 0x4014
jge 0xe9c8
movq 0x40(%rsp), %rdi
movl 0x28(%rsp), %esi
xorl %edx, %edx
callq 0x14b10
movl 0x28(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0xe9a1
movq 0x40(%rsp), %rdi
movl $0x4015, %esi           # imm = 0x4015
movl $0xf, %edx
callq 0x14b10
movq 0x40(%rsp), %rdi
movl $0x4017, %esi           # imm = 0x4017
movl $0x40, %edx
callq 0x14b10
movq 0x48(%rsp), %rdi
callq 0x112b0
movl $0x1, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0xea27
movq 0x38(%rsp), %rdi
callq 0x173e0
movl %eax, 0x24(%rsp)
cmpl $0x0, 0x24(%rsp)
jge 0xea25
movb $0x0, 0x57(%rsp)
jmp 0xea6e
jmp 0xea02
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0x110c0
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x195d0
movq 0x28562(%rip), %rdi     # 0x36fb0
leaq 0x1c977(%rip), %rsi     # 0x2b3cc
callq 0x43c0
movq %rax, %rdi
movq 0x2852c(%rip), %rsi     # 0x36f90
callq 0x4400
movb $0x1, 0x57(%rsp)
movb 0x57(%rsp), %al
andb $0x1, %al
addq $0x58, %rsp
retq
nopl (%rax)
// File: khedoros[P]khednes/rom.cpp
// Function: rom::rom(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
rom::rom(std::string filename, int m) : file(filename), mapper_num(m) {
    valid=load(filename);
    if(valid) {
        print_info();
    }
    else {
        printf("Trying to load as NSF instead\n");
        valid=load_nsf(filename);
        if(nsf) {
            print_nsf_info();
        }
        else {
            print_info();
        }
        if(!valid) {
            printf("Problem loading %s. Make sure it exists and you can read it.\n",filename.c_str());
            exit(1);
        }
    }
    //printf("CHR_PAGE_SIZE: %d sizeof crom: %d crom pages: %d",CHR_PAGE_SIZE,crom_pages,CHR_PAGE_SIZE*crom_pages);
}

// Assembly:
subq $0x68, %rsp
movq %rsi, 0x38(%rsp)
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movl %edx, 0x54(%rsp)
movq 0x60(%rsp), %rdi
movq %rdi, 0x30(%rsp)
addq $0x10, %rdi
movq %rdi, 0x10(%rsp)
callq 0x112d0
movq 0x30(%rsp), %rdi
addq $0x28, %rdi
movq %rdi, 0x18(%rsp)
callq 0x112d0
movq 0x30(%rsp), %rdi
addq $0x40, %rdi
movq %rdi, 0x20(%rsp)
callq 0x112e0
movq 0x30(%rsp), %rdi
addq $0x58, %rdi
movq %rdi, 0x28(%rsp)
callq 0x112d0
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %rsi, 0x70(%rdi)
movl 0x54(%rsp), %eax
movl %eax, 0x90(%rdi)
callq 0xed50
movb %al, 0x43(%rsp)
jmp 0xec4b
movq 0x30(%rsp), %rax
movb 0x43(%rsp), %cl
andb $0x1, %cl
movb %cl, 0x8(%rax)
testb $0x1, 0x8(%rax)
je 0xecac
movq 0x30(%rsp), %rdi
callq 0xfa30
jmp 0xec6c
jmp 0xed39
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
callq 0x112f0
movq 0x20(%rsp), %rdi
callq 0x11350
movq 0x18(%rsp), %rdi
callq 0x112f0
movq 0x10(%rsp), %rdi
callq 0x112f0
jmp 0xed3e
leaq 0x1c785(%rip), %rdi     # 0x2b438
xorl %eax, %eax
callq 0x4050
jmp 0xecbc
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0xfd30
movb %al, 0xf(%rsp)
jmp 0xecd1
movq 0x30(%rsp), %rax
movb 0xf(%rsp), %cl
andb $0x1, %cl
movb %cl, 0x8(%rax)
testb $0x1, 0xce(%rax)
je 0xecf7
movq 0x30(%rsp), %rdi
callq 0x10be0
jmp 0xecf5
jmp 0xed05
movq 0x30(%rsp), %rdi
callq 0xfa30
jmp 0xed03
jmp 0xed05
movq 0x30(%rsp), %rax
testb $0x1, 0x8(%rax)
jne 0xed37
movq 0x38(%rsp), %rdi
callq 0x41a0
movq %rax, %rsi
leaq 0x1c733(%rip), %rdi     # 0x2b457
xorl %eax, %eax
callq 0x4050
jmp 0xed2d
movl $0x1, %edi
callq 0x4450
jmp 0xed39
addq $0x68, %rsp
retq
movq 0x48(%rsp), %rdi
callq 0x4680
nopl (%rax,%rax)
// File: khedoros[P]khednes/mem.cpp
// Function: mem::mem(rom&, ppu&, apu&)
mem::mem(rom &romi, ppu &ppui,apu &apui) : cart(romi), pu(ppui), snd(apui), cycle(0), mouse_x(0), mouse_y(0) {
    ram.resize(0x800);
    sram.resize(0x2000);
    read_from.resize(0x10000, false);
    written_to.resize(0x10000, false);
    for(int i=0;i<8;i++) {
        joy1_buttons[i]=false;
    }
    if(cart.has_sram()) {
        return;
        string infile = cart.filename();
        infile += ".sav";
        cout<<"Trying to open "<<infile<<endl;
        ifstream inf;
        inf.open(infile.c_str());
        if(inf.is_open()) {
            inf.seekg(0,ios::end);
            size_t filesize = inf.tellg();
            inf.seekg(0,ios::beg);
            if(filesize == 0x2000) {
                inf.read(reinterpret_cast<char *>(&(sram[0])), 0x2000);
                cout<<"Loaded "<<infile<<" as save game."<<endl;
            }
            inf.close();
        }
        else cout<<"Couldn't open "<<infile<<" for input."<<endl;
    }
}

// Assembly:
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rdi, 0x2a0(%rsp)
movq %rsi, 0x298(%rsp)
movq %rdx, 0x290(%rsp)
movq %rcx, 0x288(%rsp)
movq 0x2a0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq 0x298(%rsp), %rax
movq %rax, (%rdi)
movq 0x290(%rsp), %rax
movq %rax, 0x8(%rdi)
movq 0x288(%rsp), %rax
movq %rax, 0x10(%rdi)
movl $0x0, 0x18(%rdi)
addq $0x20, %rdi
movq %rdi, 0x30(%rsp)
callq 0x112d0
movq 0x20(%rsp), %rdi
addq $0x38, %rdi
movq %rdi, 0x10(%rsp)
callq 0x112d0
movq 0x20(%rsp), %rdi
movl $0x0, 0x68(%rdi)
movl $0x0, 0x6c(%rdi)
addq $0x70, %rdi
callq 0x14e80
movq 0x20(%rsp), %rdi
addq $0x78, %rdi
callq 0x14e80
movq 0x20(%rsp), %rdi
subq $-0x80, %rdi
movq %rdi, 0x18(%rsp)
callq 0x14e90
movq 0x20(%rsp), %rdi
addq $0x98, %rdi
movq %rdi, 0x28(%rsp)
callq 0x14e90
movq 0x30(%rsp), %rdi
movl $0x800, %esi            # imm = 0x800
callq 0x114c0
jmp 0x13d83
movq 0x20(%rsp), %rdi
addq $0x38, %rdi
movl $0x2000, %esi           # imm = 0x2000
callq 0x114c0
jmp 0x13d98
movq 0x20(%rsp), %rdi
subq $-0x80, %rdi
movl $0x0, 0x278(%rsp)
movl $0x10000, %esi          # imm = 0x10000
leaq 0x278(%rsp), %rdx
callq 0x14ea0
jmp 0x13dc0
movq 0x20(%rsp), %rdi
addq $0x98, %rdi
movl $0x0, 0x274(%rsp)
movl $0x10000, %esi          # imm = 0x10000
leaq 0x274(%rsp), %rdx
callq 0x14ea0
jmp 0x13deb
movl $0x0, 0x270(%rsp)
cmpl $0x8, 0x270(%rsp)
jge 0x13e91
movq 0x20(%rsp), %rsi
addq $0x70, %rsi
movslq 0x270(%rsp), %rdx
leaq 0x260(%rsp), %rdi
callq 0x14f60
jmp 0x13e24
leaq 0x260(%rsp), %rdi
xorl %esi, %esi
callq 0x14fa0
leaq 0x260(%rsp), %rdi
callq 0x15010
movl 0x270(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x270(%rsp)
jmp 0x13df6
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x280(%rsp)
movl %eax, 0x27c(%rsp)
callq 0x15020
movq 0x18(%rsp), %rdi
callq 0x15020
movq 0x10(%rsp), %rdi
callq 0x112f0
movq 0x30(%rsp), %rdi
callq 0x112f0
jmp 0x13eb8
movq 0x20(%rsp), %rax
movq (%rax), %rdi
callq 0x10f30
movb %al, 0xf(%rsp)
jmp 0x13ea4
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x13eae
jmp 0x13eb0
jmp 0x13eb0
addq $0x2a8, %rsp            # imm = 0x2A8
retq
movq 0x280(%rsp), %rdi
callq 0x4680
nopw %cs:(%rax,%rax)
// File: khedoros[P]khednes/mem.cpp
// Function: mem::read2(unsigned int)
const unsigned int mem::read2(unsigned int address) {        
        address&=0xFFFF;
        read_from[address]=true;
        read_from[address+1]=true;
        if(address<0x1FFF) { //0x1FFF because I'm returning 2 bytes
                unsigned int temp1=ram[(address+1)&0x7FF];
                temp1<<=(8);
                temp1|=ram[address&0x7FF];
                return temp1;
        }
        if(address>=0x6000&&address<=0x7fff) {
                unsigned int temp1=sram[(address+1)&0x1fff];
                temp1<<=(8);
                temp1|=sram[address&0x1fff];
                return temp1;
        }
        if(address>=0x8000) {
                //unsigned int temp1=cart.get_pbyte(address+1);
                //temp1<<=(8);
                //temp1|=cart.get_pbyte(address);
                //return temp1;
                return cart.get_pword(address);
        }
        util::debug(ORIGIN, "mem read(2) of %04x unhandled. I don't know what the address does.\n",address);
        return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, (%rsp)
movl 0x14(%rsp), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, 0x14(%rsp)
addq $0x80, %rdi
movl 0x14(%rsp), %eax
movl %eax, %esi
callq 0x15080
movq (%rsp), %rdi
movl $0x1, (%rax)
addq $0x80, %rdi
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x15080
movl $0x1, (%rax)
cmpl $0x1fff, 0x14(%rsp)     # imm = 0x1FFF
jae 0x149f7
movq (%rsp), %rdi
addq $0x20, %rdi
movl 0x14(%rsp), %eax
addl $0x1, %eax
andl $0x7ff, %eax            # imm = 0x7FF
movl %eax, %eax
movl %eax, %esi
callq 0x114a0
movq (%rsp), %rdi
movzbl (%rax), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
shll $0x8, %eax
movl %eax, 0x10(%rsp)
addq $0x20, %rdi
movl 0x14(%rsp), %eax
andl $0x7ff, %eax            # imm = 0x7FF
movl %eax, %eax
movl %eax, %esi
callq 0x114a0
movzbl (%rax), %eax
orl 0x10(%rsp), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x14aa8
cmpl $0x6000, 0x14(%rsp)     # imm = 0x6000
jb 0x14a69
cmpl $0x7fff, 0x14(%rsp)     # imm = 0x7FFF
ja 0x14a69
movq (%rsp), %rdi
addq $0x38, %rdi
movl 0x14(%rsp), %eax
addl $0x1, %eax
andl $0x1fff, %eax           # imm = 0x1FFF
movl %eax, %eax
movl %eax, %esi
callq 0x114a0
movq (%rsp), %rdi
movzbl (%rax), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
shll $0x8, %eax
movl %eax, 0xc(%rsp)
addq $0x38, %rdi
movl 0x14(%rsp), %eax
andl $0x1fff, %eax           # imm = 0x1FFF
movl %eax, %eax
movl %eax, %esi
callq 0x114a0
movzbl (%rax), %eax
orl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x14aa8
cmpl $0x8000, 0x14(%rsp)     # imm = 0x8000
jb 0x14a89
movq (%rsp), %rax
movq (%rax), %rdi
movl 0x14(%rsp), %esi
callq 0x11120
movl %eax, 0x24(%rsp)
jmp 0x14aa8
movl 0x14(%rsp), %edx
movl $0x3, %edi
leaq 0x16ff4(%rip), %rsi     # 0x2ba8d
movb $0x0, %al
callq 0x20e00
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::cpu(mem*, apu*, unsigned int, bool)
cpu::cpu(mem * data, apu * ap, const unsigned int start_loc, bool is_nsf) : nsf_mode(is_nsf) {
    for(int i=0;i<256;++i) {
        inst_counts[i]=0;
    }
    memory=data;
    audio=ap;
    pc=start_loc;
    status.reg=0;//FLAG_TRUE|FLAG_BRK;
    sp=0;
    acc=0;
    x=0;
    y=0;
    ops_ahead=0;
    ppu_cycle=0;
    addr=0;
    prevpc=0;
    prevop=0;
    prevopaddr = 0;
    prevopoffset = 0;
    prevoparg = 0;
    nextop = 0;
    nextopaddr = 0;
    nextopoffset = 0;
    nextoparg = 0;
    frame = 0;

    addresses.resize(17); //17th page is for any PC values that occur in RAM instead of ROM
    for(int page=0;page<16;page++) {
        addresses[page].resize(PRG_PAGE_SIZE);
        for(int paddr=0;paddr<PRG_PAGE_SIZE;paddr++) {
            addresses[page][paddr] = 0;
        }
    }
    addresses[16].resize(0x8000);
    for(int paddr=0;paddr<0x8000;paddr++) {
        addresses[16][paddr] = 0;
    }
}

// Assembly:
subq $0x38, %rsp
movb %r8b, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movl %ecx, 0x1c(%rsp)
andb $0x1, %al
movb %al, 0x1b(%rsp)
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movb 0x1b(%rsp), %cl
andb $0x1, %cl
movb %cl, 0x527(%rax)
movl $0x0, 0x14(%rsp)
cmpl $0x100, 0x14(%rsp)      # imm = 0x100
jge 0x16836
movq (%rsp), %rax
movslq 0x14(%rsp), %rcx
movl $0x0, 0x20(%rax,%rcx,4)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x1680e
movq (%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rcx
movq %rcx, 0x18(%rax)
movl 0x1c(%rsp), %ecx
movl %ecx, (%rax)
movb $0x0, 0x8(%rax)
movb $0x0, 0xe(%rax)
movb $0x0, 0x4(%rax)
movb $0x0, 0xc(%rax)
movb $0x0, 0xd(%rax)
movl $0x0, 0x464(%rax)
movl $0x0, 0x460(%rax)
movl $0x0, 0x448(%rax)
movl $0x0, 0x430(%rax)
movl $0x0, 0x434(%rax)
movl $0x0, 0x438(%rax)
movb $0x0, 0x440(%rax)
movl $0x0, 0x43c(%rax)
movl $0x0, 0x420(%rax)
movl $0x0, 0x424(%rax)
movb $0x0, 0x428(%rax)
movl $0x0, 0x42c(%rax)
movl $0x0, 0x468(%rax)
leaq 0x20ac7(%rip), %rdi     # 0x373b0
movl $0x11, %esi
callq 0x196f0
movl $0x0, 0x10(%rsp)
cmpl $0x10, 0x10(%rsp)
jge 0x16972
movslq 0x10(%rsp), %rsi
leaq 0x20aa2(%rip), %rdi     # 0x373b0
callq 0x19790
movq %rax, %rdi
movl $0x4000, %esi           # imm = 0x4000
callq 0x197b0
movl $0x0, 0xc(%rsp)
cmpl $0x4000, 0xc(%rsp)      # imm = 0x4000
jge 0x16963
movslq 0x10(%rsp), %rsi
leaq 0x20a72(%rip), %rdi     # 0x373b0
callq 0x19790
movq %rax, %rdi
movslq 0xc(%rsp), %rsi
callq 0x15080
movl $0x0, (%rax)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x16928
jmp 0x16965
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x168fb
leaq 0x20a37(%rip), %rdi     # 0x373b0
movl $0x10, %esi
callq 0x19790
movq %rax, %rdi
movl $0x8000, %esi           # imm = 0x8000
callq 0x197b0
movl $0x0, 0x8(%rsp)
cmpl $0x8000, 0x8(%rsp)      # imm = 0x8000
jge 0x169d3
leaq 0x20a07(%rip), %rdi     # 0x373b0
movl $0x10, %esi
callq 0x19790
movq %rax, %rdi
movslq 0x8(%rsp), %rsi
callq 0x15080
movl $0x0, (%rax)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x16998
addq $0x38, %rsp
retq
nopl (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::trigger_nmi()
void cpu::trigger_nmi() {
    push2(pc);
    status.inter = 0;
    push(status.reg);
    pc=memory->read2(NM_INT_INSERTION);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl (%rdi), %esi
callq 0x1b220
movq 0x8(%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x5, %cl
orb $0x0, %cl
movb %cl, 0x8(%rax)
movq %rax, %rdi
movzbl 0x8(%rax), %esi
callq 0x1b2a0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0xfffa, %esi           # imm = 0xFFFA
callq 0x14930
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, (%rax)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::trigger_irq()
void cpu::trigger_irq() {
    push2(pc);
    status.inter = 0;
    push(status.reg);
    pc=memory->read2(IRQ_INT_INSERTION);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl (%rdi), %esi
callq 0x1b220
movq 0x8(%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x5, %cl
orb $0x0, %cl
movb %cl, 0x8(%rax)
movq %rax, %rdi
movzbl 0x8(%rax), %esi
callq 0x1b2a0
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movl $0xfffe, %esi           # imm = 0xFFFE
callq 0x14930
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, (%rax)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_brk()
inline void cpu::op_brk() {
    pc++;
    push2(pc);
    status.brk = 1;
    push(status.reg);
    status.inter = 1;
    pc=memory->read2(0xFFFE);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movl (%rdi), %eax
addl $0x1, %eax
movl %eax, (%rdi)
movl (%rdi), %esi
callq 0x1b220
movq 0x8(%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x11, %cl
orb $0x10, %cl
movb %cl, 0x8(%rax)
movq %rax, %rdi
movzbl 0x8(%rax), %esi
callq 0x1b2a0
movq 0x8(%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x5, %cl
orb $0x4, %cl
movb %cl, 0x8(%rax)
movq 0x10(%rax), %rdi
movl $0xfffe, %esi           # imm = 0xFFFE
callq 0x14930
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, (%rax)
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_ora(int)
inline void cpu::op_ora(int addr) {
    temp=memory->read(addr);
    acc|=temp;
    set_sign(acc);
    set_zero(acc);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0x454(%rax)
movl 0x454(%rax), %edx
movzbl 0x4(%rax), %ecx
orl %edx, %ecx
movb %cl, 0x4(%rax)
movq %rax, %rdi
movzbl 0x4(%rax), %esi
callq 0x1b380
movq (%rsp), %rax
movq %rax, %rdi
movzbl 0x4(%rax), %esi
callq 0x1b3c0
addq $0x18, %rsp
retq
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_aslm(int)
inline void cpu::op_aslm(int addr) {
    temp=memory->read(addr);
    set_carry(temp&0x80);
    temp<<=(1);
    set_zero(temp);
    set_sign(temp);
    memory->write(addr,temp);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rdi
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
andl $0x80, %eax
movzbl %al, %esi
callq 0x1b400
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
shll %eax
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b380
movq (%rsp), %rax
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
movl 0x454(%rax), %eax
movzbl %al, %edx
callq 0x14b10
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_asla()
inline void cpu::op_asla() {
    set_carry(acc&0x80);
    acc<<=(1);
    set_zero(acc);
    set_sign(acc);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movzbl 0x4(%rdi), %eax
andl $0x80, %eax
movzbl %al, %esi
callq 0x1b400
movq 0x8(%rsp), %rax
movzbl 0x4(%rax), %ecx
shll %ecx
movb %cl, 0x4(%rax)
movq %rax, %rdi
movzbl 0x4(%rax), %esi
callq 0x1b3c0
movq 0x8(%rsp), %rax
movq %rax, %rdi
movzbl 0x4(%rax), %esi
callq 0x1b380
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_bpl(signed char)
inline void cpu::op_bpl(signed char offset) {
    if(!status.sign) {
        pc+=offset;
        extra_time++;
        if((pc>>(8))!=((pc-offset)>>(8))) {
            extra_time++;
        }
    }
}

// Assembly:
movb %sil, %al
movq %rdi, -0x8(%rsp)
movb %al, -0x9(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movb 0x8(%rax), %al
shrb $0x7, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x19c8c
movq -0x18(%rsp), %rcx
movsbl -0x9(%rsp), %eax
addl (%rcx), %eax
movl %eax, (%rcx)
movl 0x45c(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x45c(%rcx)
movl (%rcx), %eax
shrl $0x8, %eax
movl (%rcx), %ecx
movsbl -0x9(%rsp), %edx
subl %edx, %ecx
shrl $0x8, %ecx
cmpl %ecx, %eax
je 0x19c8a
movq -0x18(%rsp), %rax
movl 0x45c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x45c(%rax)
jmp 0x19c8c
retq
nopl (%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_jsr(int)
inline void cpu::op_jsr(int addr) {
    //saves address immediately BEFORE the one I want to return to!!!
    //REASON: RTS pops the stack to the PC, THEN increments PC by 1
    pc--;
    push2(pc);
    pc=addr;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, (%rsp)
movl (%rdi), %eax
addl $-0x1, %eax
movl %eax, (%rdi)
movl (%rdi), %esi
callq 0x1b220
movq (%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_bit(int)
inline void cpu::op_bit(int addr) {
    temp=memory->read(addr);
    set_zero(acc&temp);
    set_sign(temp);
    if((temp&0x40)>0)
        status.verflow = 1;
    else
        status.verflow = 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rdi
movl %eax, 0x454(%rdi)
movzbl 0x4(%rdi), %eax
andl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b380
movq (%rsp), %rax
movl 0x454(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jbe 0x19f15
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x41, %cl
orb $0x40, %cl
movb %cl, 0x8(%rax)
jmp 0x19f25
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x41, %cl
orb $0x0, %cl
movb %cl, 0x8(%rax)
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_rolm(int)
inline void cpu::op_rolm(int addr) {
    temp=memory->read(addr);
    temp2 = status.carry;
    set_carry(temp&0x80);
    temp=((temp<<(1))+temp2);
    memory->write(addr,temp);
    set_zero(temp);
    set_sign(temp);        
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rdi
movl %eax, 0x454(%rdi)
movb 0x8(%rdi), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x458(%rdi)
movl 0x454(%rdi), %eax
andl $0x80, %eax
movzbl %al, %esi
callq 0x1b400
movq (%rsp), %rax
movl 0x454(%rax), %ecx
shll %ecx
addl 0x458(%rax), %ecx
movl %ecx, 0x454(%rax)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
movl 0x454(%rax), %eax
movzbl %al, %edx
callq 0x14b10
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b380
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_rola()
inline void cpu::op_rola() {
    temp = status.carry;
    set_carry(acc&0x80);
    acc=(acc<<(1))+temp;
    set_zero(acc);
    set_sign(acc);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movb 0x8(%rdi), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x454(%rdi)
movzbl 0x4(%rdi), %eax
andl $0x80, %eax
movzbl %al, %esi
callq 0x1b400
movq 0x8(%rsp), %rax
movzbl 0x4(%rax), %ecx
shll %ecx
addl 0x454(%rax), %ecx
movb %cl, 0x4(%rax)
movq %rax, %rdi
movzbl 0x4(%rax), %esi
callq 0x1b3c0
movq 0x8(%rsp), %rax
movq %rax, %rdi
movzbl 0x4(%rax), %esi
callq 0x1b380
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_bmi(signed char)
inline void cpu::op_bmi(signed char offset) {
    if(status.sign) {
        pc+=offset;
        extra_time++;
        if((pc>>(8))!=((pc-offset)>>(8))) {
            extra_time++;
        }
    }
}

// Assembly:
movb %sil, %al
movq %rdi, -0x8(%rsp)
movb %al, -0x9(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movb 0x8(%rax), %al
shrb $0x7, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1a0ec
movq -0x18(%rsp), %rcx
movsbl -0x9(%rsp), %eax
addl (%rcx), %eax
movl %eax, (%rcx)
movl 0x45c(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x45c(%rcx)
movl (%rcx), %eax
shrl $0x8, %eax
movl (%rcx), %ecx
movsbl -0x9(%rsp), %edx
subl %edx, %ecx
shrl $0x8, %ecx
cmpl %ecx, %eax
je 0x1a0ea
movq -0x18(%rsp), %rax
movl 0x45c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x45c(%rax)
jmp 0x1a0ec
retq
nopl (%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_lsrm(int)
inline void cpu::op_lsrm(int addr) {
    temp=memory->read(addr);
    status.sign = 0;
    set_carry(temp&0x01);
    temp>>=(1);
    set_zero(temp);
    memory->write(addr,temp);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rdi
movl %eax, 0x454(%rdi)
movb 0x8(%rdi), %al
andb $0x7f, %al
orb $0x0, %al
movb %al, 0x8(%rdi)
movl 0x454(%rdi), %eax
andl $0x1, %eax
movzbl %al, %esi
callq 0x1b400
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
shrl %eax
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
movq (%rsp), %rax
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
movl 0x454(%rax), %eax
movzbl %al, %edx
callq 0x14b10
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_lsra()
inline void cpu::op_lsra() {
    status.sign = 0;
    set_carry(acc&0x01);
    acc>>=(1);
    set_zero(acc);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movb 0x8(%rdi), %al
andb $0x7f, %al
orb $0x0, %al
movb %al, 0x8(%rdi)
movzbl 0x4(%rdi), %eax
andl $0x1, %eax
movzbl %al, %esi
callq 0x1b400
movq 0x8(%rsp), %rax
movzbl 0x4(%rax), %ecx
sarl %ecx
movb %cl, 0x4(%rax)
movq %rax, %rdi
movzbl 0x4(%rax), %esi
callq 0x1b3c0
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_bvc(signed char)
inline void cpu::op_bvc(signed char offset) {
    if(!status.verflow) {
        pc+=offset;
        extra_time++;
        if((pc>>(8))!=((pc-offset)>>(8))) {
            extra_time++;
        }
    }
}

// Assembly:
movb %sil, %al
movq %rdi, -0x8(%rsp)
movb %al, -0x9(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movb 0x8(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1a33e
movq -0x18(%rsp), %rcx
movsbl -0x9(%rsp), %eax
addl (%rcx), %eax
movl %eax, (%rcx)
movl 0x45c(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x45c(%rcx)
movl (%rcx), %eax
shrl $0x8, %eax
movl (%rcx), %ecx
movsbl -0x9(%rsp), %edx
subl %edx, %ecx
shrl $0x8, %ecx
cmpl %ecx, %eax
je 0x1a33c
movq -0x18(%rsp), %rax
movl 0x45c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x45c(%rax)
jmp 0x1a33e
retq
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::pop2()
inline unsigned int cpu::pop2() {
    sp++;
    unsigned int pcl=memory->read(0x100+sp);
    sp++;
    unsigned int pch=memory->read(0x100+sp);
    return pch*0x100+pcl;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movb 0xe(%rax), %cl
addb $0x1, %cl
movb %cl, 0xe(%rax)
movq 0x10(%rax), %rdi
movzbl 0xe(%rax), %esi
addl $0x100, %esi            # imm = 0x100
callq 0x14460
movl %eax, %ecx
movq (%rsp), %rax
movl %ecx, 0xc(%rsp)
movb 0xe(%rax), %cl
addb $0x1, %cl
movb %cl, 0xe(%rax)
movq 0x10(%rax), %rdi
movzbl 0xe(%rax), %esi
addl $0x100, %esi            # imm = 0x100
callq 0x14460
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
shll $0x8, %eax
addl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_adc(int)
inline void cpu::op_adc(int addr) {
    temp=memory->read(addr);
    temp2=temp+acc+status.carry;
    //if the operands have the same sign, AND      The operands have the same sign as the result
    if (!((acc ^ temp) & 0x80) && ((acc ^ temp2) & 0x80))
        status.verflow = 1;
    else
        status.verflow = 0;
    set_zero(temp2);
    set_sign(temp2);
    if((int(temp)+int(acc)+status.carry)>0xFF)
        status.carry = 1;
    else
        status.carry = 0;
    acc=temp2;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rcx
movl %eax, 0x454(%rcx)
movl 0x454(%rcx), %eax
movzbl 0x4(%rcx), %edx
addl %edx, %eax
movb 0x8(%rcx), %dl
andb $0x1, %dl
movzbl %dl, %edx
addl %edx, %eax
movl %eax, 0x458(%rcx)
movzbl 0x4(%rcx), %eax
xorl 0x454(%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x1a488
movq (%rsp), %rcx
movzbl 0x4(%rcx), %eax
xorl 0x458(%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x1a488
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x41, %cl
orb $0x40, %cl
movb %cl, 0x8(%rax)
jmp 0x1a498
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x41, %cl
orb $0x0, %cl
movb %cl, 0x8(%rax)
movq (%rsp), %rdi
movl 0x458(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
movq (%rsp), %rdi
movl 0x458(%rdi), %eax
movzbl %al, %esi
callq 0x1b380
movq (%rsp), %rcx
movl 0x454(%rcx), %eax
movzbl 0x4(%rcx), %edx
addl %edx, %eax
movb 0x8(%rcx), %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
cmpl $0xff, %eax
jle 0x1a4f0
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x8(%rax)
jmp 0x1a500
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x8(%rax)
movq (%rsp), %rax
movl 0x458(%rax), %ecx
movb %cl, 0x4(%rax)
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_rorm(int)
inline void cpu::op_rorm(int addr) {
    temp=memory->read(addr);
    temp2=status.carry*0x80;
    set_carry(temp&0x01);
    temp=(temp>>(1))+temp2;
    set_sign(temp);
    set_zero(temp);
    memory->write(addr,temp);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rdi
movl %eax, 0x454(%rdi)
movb 0x8(%rdi), %al
andb $0x1, %al
movzbl %al, %eax
shll $0x7, %eax
movl %eax, 0x458(%rdi)
movl 0x454(%rdi), %eax
andl $0x1, %eax
movzbl %al, %esi
callq 0x1b400
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
shrl %eax
addl 0x458(%rdi), %eax
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b380
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
movq (%rsp), %rax
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
movl 0x454(%rax), %eax
movzbl %al, %edx
callq 0x14b10
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_rora()
inline void cpu::op_rora() {
    temp2=status.carry*0x80;
    set_carry(acc&0x01);
    acc=(acc>>(1))+temp2;
    set_sign(acc);
    set_zero(acc);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
movb 0x8(%rdi), %al
andb $0x1, %al
movzbl %al, %eax
shll $0x7, %eax
movl %eax, 0x458(%rdi)
movzbl 0x4(%rdi), %eax
andl $0x1, %eax
movzbl %al, %esi
callq 0x1b400
movq 0x8(%rsp), %rax
movzbl 0x4(%rax), %ecx
sarl %ecx
addl 0x458(%rax), %ecx
movb %cl, 0x4(%rax)
movq %rax, %rdi
movzbl 0x4(%rax), %esi
callq 0x1b380
movq 0x8(%rsp), %rax
movq %rax, %rdi
movzbl 0x4(%rax), %esi
callq 0x1b3c0
addq $0x18, %rsp
retq
nopl (%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::ind()
inline int cpu::ind() {
    int addr=memory->read2(pc+1);
    if((addr&0xFF)==0xFF) {
        return (memory->read(addr))|((memory->read(addr-0xFF))<<(8));
    }
    else {
        return memory->read2(addr);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rax), %rdi
movl (%rax), %esi
addl $0x1, %esi
callq 0x14930
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
andl $0xff, %eax
cmpl $0xff, %eax
jne 0x1a706
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movl 0x14(%rsp), %esi
callq 0x14460
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x4(%rsp)
movq 0x10(%rax), %rdi
movl 0x14(%rsp), %esi
subl $0xff, %esi
callq 0x14460
movl %eax, %ecx
movl 0x4(%rsp), %eax
shll $0x8, %ecx
orl %ecx, %eax
movl %eax, 0x24(%rsp)
jmp 0x1a71c
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movl 0x14(%rsp), %esi
callq 0x14930
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_bvs(signed char)
inline void cpu::op_bvs(signed char offset) {
    if(status.verflow) {
        pc+=offset;
        extra_time++;
        if((pc>>(8))!=((pc-offset)>>(8))) {
                extra_time++;
        }
    }
}

// Assembly:
movb %sil, %al
movq %rdi, -0x8(%rsp)
movb %al, -0x9(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movb 0x8(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1a79e
movq -0x18(%rsp), %rcx
movsbl -0x9(%rsp), %eax
addl (%rcx), %eax
movl %eax, (%rcx)
movl 0x45c(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x45c(%rcx)
movl (%rcx), %eax
shrl $0x8, %eax
movl (%rcx), %ecx
movsbl -0x9(%rsp), %edx
subl %edx, %ecx
shrl $0x8, %ecx
cmpl %ecx, %eax
je 0x1a79c
movq -0x18(%rsp), %rax
movl 0x45c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x45c(%rax)
jmp 0x1a79e
retq
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_bcc(signed char)
inline void cpu::op_bcc(signed char offset) {
    if(!status.carry) {
        extra_time++;
        pc+=offset;
        if((pc>>(8))!=((pc-offset)>>(8))) {
            extra_time++;
        }
    }
}

// Assembly:
movb %sil, %al
movq %rdi, -0x8(%rsp)
movb %al, -0x9(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movb 0x8(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1a93b
movq -0x18(%rsp), %rcx
movl 0x45c(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x45c(%rcx)
movsbl -0x9(%rsp), %eax
addl (%rcx), %eax
movl %eax, (%rcx)
movl (%rcx), %eax
shrl $0x8, %eax
movl (%rcx), %ecx
movsbl -0x9(%rsp), %edx
subl %edx, %ecx
shrl $0x8, %ecx
cmpl %ecx, %eax
je 0x1a939
movq -0x18(%rsp), %rax
movl 0x45c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x45c(%rax)
jmp 0x1a93b
retq
nopl (%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_bcs(signed char)
inline void cpu::op_bcs(signed char offset) {
    if(status.carry) {
        extra_time++;
        pc+=offset;
        if((pc>>(8))!=((pc-offset)>>(8))) {
            extra_time++;
        }
    }
}

// Assembly:
movb %sil, %al
movq %rdi, -0x8(%rsp)
movb %al, -0x9(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movb 0x8(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1abcb
movq -0x18(%rsp), %rcx
movl 0x45c(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x45c(%rcx)
movsbl -0x9(%rsp), %eax
addl (%rcx), %eax
movl %eax, (%rcx)
movl (%rcx), %eax
shrl $0x8, %eax
movl (%rcx), %ecx
movsbl -0x9(%rsp), %edx
subl %edx, %ecx
shrl $0x8, %ecx
cmpl %ecx, %eax
je 0x1abc9
movq -0x18(%rsp), %rax
movl 0x45c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x45c(%rax)
jmp 0x1abcb
retq
nopl (%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_cpy(int)
inline void cpu::op_cpy(int addr) {
    temp=memory->read(addr);
    if(y>=temp)
        status.carry = 1;
    else
        status.carry = 0;
    temp=y-temp;
    set_sign(temp);
    set_zero(temp);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rcx
movl %eax, 0x454(%rcx)
movzbl 0xd(%rcx), %eax
cmpl 0x454(%rcx), %eax
jb 0x1ac7b
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x8(%rax)
jmp 0x1ac8b
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x8(%rax)
movq (%rsp), %rdi
movzbl 0xd(%rdi), %eax
subl 0x454(%rdi), %eax
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b380
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_cmp(int)
inline void cpu::op_cmp(int addr) {
    temp=memory->read(addr);
    if(acc>=temp)
        status.carry = 1;
    else
        status.carry = 0;
    temp=acc-temp;
    set_sign(temp);
    set_zero(temp);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rcx
movl %eax, 0x454(%rcx)
movzbl 0x4(%rcx), %eax
cmpl 0x454(%rcx), %eax
jb 0x1ad1b
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x8(%rax)
jmp 0x1ad2b
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x8(%rax)
movq (%rsp), %rdi
movzbl 0x4(%rdi), %eax
subl 0x454(%rdi), %eax
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b380
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_dec(int)
inline void cpu::op_dec(int addr) {
    temp=memory->read(addr);
    temp--;
    set_sign(temp);
    set_zero(temp);
    memory->write(addr,temp);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rdi
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
addl $-0x1, %eax
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b380
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
movq (%rsp), %rax
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
movl 0x454(%rax), %eax
movzbl %al, %edx
callq 0x14b10
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_bne(signed char)
inline void cpu::op_bne(signed char offset) {
    if(!status.zero) {
        pc+=offset;
        extra_time++;
        if((pc>>(8))!=((pc-offset)>>(8))) {
            extra_time++;
        }
    }
}

// Assembly:
movb %sil, %al
movq %rdi, -0x8(%rsp)
movb %al, -0x9(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movb 0x8(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x1aedd
movq -0x18(%rsp), %rcx
movsbl -0x9(%rsp), %eax
addl (%rcx), %eax
movl %eax, (%rcx)
movl 0x45c(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x45c(%rcx)
movl (%rcx), %eax
shrl $0x8, %eax
movl (%rcx), %ecx
movsbl -0x9(%rsp), %edx
subl %edx, %ecx
shrl $0x8, %ecx
cmpl %ecx, %eax
je 0x1aedb
movq -0x18(%rsp), %rax
movl 0x45c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x45c(%rax)
jmp 0x1aedd
retq
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_cpx(int)
inline void cpu::op_cpx(int addr) {
    temp=memory->read(addr);
    if(x>=temp)
        status.carry = 1;
    else
        status.carry = 0;
    temp=x-temp;
    set_sign(temp);
    set_zero(temp);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rcx
movl %eax, 0x454(%rcx)
movzbl 0xc(%rcx), %eax
cmpl 0x454(%rcx), %eax
jb 0x1af4b
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x8(%rax)
jmp 0x1af5b
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x8(%rax)
movq (%rsp), %rdi
movzbl 0xc(%rdi), %eax
subl 0x454(%rdi), %eax
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b380
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_sbc(int)
inline void cpu::op_sbc(int addr) {
    temp=memory->read(addr);
    temp2=temp;
    temp+=(status.carry?0:1);
    set_zero(acc-temp);
    set_sign(acc-temp);
    if(((acc^temp)&0x80)>0&&((acc^temp2)&0x80)>0) //magic code from 6502 docs
        status.verflow = 1;
    else
        status.verflow = 0;

    if(acc>=temp) {
        status.carry = 1;
    }
    else {
        status.carry = 0;
    }
    acc-=temp;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rdi
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
movl %eax, 0x458(%rdi)
movb 0x8(%rdi), %al
andb $0x1, %al
movzbl %al, %edx
movl $0x1, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
addl 0x454(%rdi), %eax
movl %eax, 0x454(%rdi)
movzbl 0x4(%rdi), %eax
subl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
movq (%rsp), %rdi
movzbl 0x4(%rdi), %eax
subl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b380
movq (%rsp), %rcx
movzbl 0x4(%rcx), %eax
xorl 0x454(%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jbe 0x1b064
movq (%rsp), %rcx
movzbl 0x4(%rcx), %eax
xorl 0x458(%rcx), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jbe 0x1b064
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x41, %cl
orb $0x40, %cl
movb %cl, 0x8(%rax)
jmp 0x1b074
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x41, %cl
orb $0x0, %cl
movb %cl, 0x8(%rax)
movq (%rsp), %rcx
movzbl 0x4(%rcx), %eax
cmpl 0x454(%rcx), %eax
jb 0x1b096
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x2, %cl
orb $0x1, %cl
movb %cl, 0x8(%rax)
jmp 0x1b0a6
movq (%rsp), %rax
movb 0x8(%rax), %cl
andb $-0x2, %cl
orb $0x0, %cl
movb %cl, 0x8(%rax)
movq (%rsp), %rax
movl 0x454(%rax), %edx
movzbl 0x4(%rax), %ecx
subl %edx, %ecx
movb %cl, 0x4(%rax)
addq $0x18, %rsp
retq
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_inc(int)
inline void cpu::op_inc(int addr) {
    temp=memory->read(addr);
    temp++;
    set_sign(temp);
    set_zero(temp);
    memory->write(addr,temp);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
callq 0x14460
movq (%rsp), %rdi
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x454(%rdi)
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b380
movq (%rsp), %rdi
movl 0x454(%rdi), %eax
movzbl %al, %esi
callq 0x1b3c0
movq (%rsp), %rax
movq 0x10(%rax), %rdi
movl 0xc(%rsp), %esi
movl 0x454(%rax), %eax
movzbl %al, %edx
callq 0x14b10
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::op_beq(signed char)
inline void cpu::op_beq(signed char offset) {
    if(status.zero) {
        extra_time++;
        pc+=offset;
        if((pc>>(8))!=((pc-offset)>>(8))) {
            extra_time++;
        }
    }
}

// Assembly:
movb %sil, %al
movq %rdi, -0x8(%rsp)
movb %al, -0x9(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movb 0x8(%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x1b1fd
movq -0x18(%rsp), %rcx
movl 0x45c(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x45c(%rcx)
movsbl -0x9(%rsp), %eax
addl (%rcx), %eax
movl %eax, (%rcx)
movl (%rcx), %eax
shrl $0x8, %eax
movl (%rcx), %ecx
movsbl -0x9(%rsp), %edx
subl %edx, %ecx
shrl $0x8, %ecx
cmpl %ecx, %eax
je 0x1b1fb
movq -0x18(%rsp), %rax
movl 0x45c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x45c(%rax)
jmp 0x1b1fd
retq
nop
// File: khedoros[P]khednes/cpu2.cpp
// Function: cpu::push2(unsigned int)
inline void cpu::push2(unsigned int val) {
    unsigned char pcl=pc&0xff;
    unsigned char pch=(pc/0x100)&0xff;
    //util::debug(ORIGIN, "PCL: %02x PCH:  %02x\n",pcl,pch);
    memory->write(0x100+sp,pch);
    sp--;
    memory->write(0x100+sp,pcl);
    sp--;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl (%rax), %ecx
andl $0xff, %ecx
movb %cl, 0xb(%rsp)
movl (%rax), %ecx
shrl $0x8, %ecx
andl $0xff, %ecx
movb %cl, 0xa(%rsp)
movq 0x10(%rax), %rdi
movzbl 0xe(%rax), %esi
addl $0x100, %esi            # imm = 0x100
movzbl 0xa(%rsp), %edx
callq 0x14b10
movq (%rsp), %rax
movb 0xe(%rax), %cl
addb $-0x1, %cl
movb %cl, 0xe(%rax)
movq 0x10(%rax), %rdi
movzbl 0xe(%rax), %esi
addl $0x100, %esi            # imm = 0x100
movzbl 0xb(%rsp), %edx
callq 0x14b10
movq (%rsp), %rax
movb 0xe(%rax), %cl
addb $-0x1, %cl
movb %cl, 0xe(%rax)
addq $0x18, %rsp
retq