// File: /workspace/github_cpp_makefile_star2_O3/khedoros[P]khednes/rom.cpp
// Function: rom::print_info()
void rom::print_info() {
    std::cout<<"Filename: "<<file.c_str()<<std::endl;
    std::cout<<"Filesize: "<<filesize<<std::endl;
    std::cout<<"Valid: "<<(valid?"true":"false")<<std::endl;
    std::cout<<"PROM pages: "<<prom_pages<<std::endl;
    std::cout<<"CROM pages: "<<crom_pages<<std::endl;
    std::cout<<"Trainer: "<<(trainer?"true":"false")<<std::endl;
    std::cout<<"Mirror mode: ";
    switch(mirror_mode) {
        case VERT:
            std::cout<<"Vertical mirroring"<<std::endl;
            break;
        case HORIZ:
            std::cout<<"Horizontal mirroring"<<std::endl;
            break;
        case FOUR_SCR:
            std::cout<<"4-Screen mirroring"<<std::endl;
            break;
    }
    std::cout<<"Contains SRAM: "<<(sram?"true":"false")<<std::endl;
    std::cout<<"Mapper: "<<mapper_num<<std::endl;

    printf("RST Insertion point: %04x\n",rst_addr);
    printf("IRQ Insertion point: %04x\n",irq_addr);
    printf("NMI Insertion point: %04x\n",nmi_addr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x12c63(%rip), %r14     # 0x1bfb0
leaq 0xb23e(%rip), %rsi      # 0x14592
movl $0xa, %edx
movq %r14, %rdi
callq 0x4410
movq 0x70(%rbx), %rax
movq (%rax), %r15
testq %r15, %r15
je 0x9389
movq %r15, %rdi
callq 0x41c0
movq 0x12c34(%rip), %rdi     # 0x1bfb0
movq %r15, %rsi
movq %rax, %rdx
callq 0x4410
jmp 0x93a1
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x45d0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4390
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4290
leaq 0xb1ce(%rip), %rsi      # 0x1459d
movl $0xa, %edx
movq %r14, %rdi
callq 0x4410
movl 0x8c(%rbx), %esi
movq %r14, %rdi
callq 0x45e0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4390
movsbl %al, %esi
movq %r15, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4290
leaq 0xb18d(%rip), %rsi      # 0x145a8
movl $0x7, %edx
movq %r14, %rdi
callq 0x4410
movzbl 0x8(%rbx), %edx
leaq 0xb17d(%rip), %r13      # 0x145b0
leaq 0xb17b(%rip), %r15      # 0x145b5
testq %rdx, %rdx
movq %r15, %rsi
cmovneq %r13, %rsi
xorq $0x5, %rdx
movq %r14, %rdi
callq 0x4410
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4390
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4290
leaq 0xb13d(%rip), %rsi      # 0x145bb
movl $0xc, %edx
movq %r14, %rdi
callq 0x4410
movl 0x78(%rbx), %esi
movq %r14, %rdi
callq 0x45e0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x4390
movsbl %al, %esi
movq %r12, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4290
leaq 0xb101(%rip), %rsi      # 0x145c8
movl $0xc, %edx
movq %r14, %rdi
callq 0x4410
movl 0x7c(%rbx), %esi
movq %r14, %rdi
callq 0x45e0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x4390
movsbl %al, %esi
movq %r12, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4290
leaq 0xb0c5(%rip), %rsi      # 0x145d5
movl $0x9, %edx
movq %r14, %rdi
callq 0x4410
movzbl 0xa1(%rbx), %edx
testq %rdx, %rdx
movq %r15, %rsi
cmovneq %r13, %rsi
xorq $0x5, %rdx
movq %r14, %rdi
callq 0x4410
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4390
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4290
leaq 0xb077(%rip), %rsi      # 0x145df
movl $0xd, %edx
movq %r14, %rdi
callq 0x4410
movl 0x88(%rbx), %eax
cmpl $0x2, %eax
je 0x95ae
cmpl $0x1, %eax
je 0x9599
testl %eax, %eax
jne 0x95ed
movq 0x12a20(%rip), %rdi     # 0x1bfb0
leaq 0xb056(%rip), %rsi      # 0x145ed
jmp 0x95bc
movq 0x12a10(%rip), %rdi     # 0x1bfb0
leaq 0xb059(%rip), %rsi      # 0x14600
movl $0x14, %edx
jmp 0x95c1
movq 0x129fb(%rip), %rdi     # 0x1bfb0
leaq 0xb059(%rip), %rsi      # 0x14615
movl $0x12, %edx
callq 0x4410
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4390
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4290
leaq 0xb034(%rip), %rsi      # 0x14628
movl $0xf, %edx
movq %r14, %rdi
callq 0x4410
movzbl 0xa0(%rbx), %edx
testq %rdx, %rdx
cmovneq %r13, %r15
xorq $0x5, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4410
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4390
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4290
leaq 0xafec(%rip), %rsi      # 0x14638
movl $0x8, %edx
movq %r14, %rdi
callq 0x4410
movl 0x90(%rbx), %esi
movq %r14, %rdi
callq 0x45e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4390
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4290
movl 0x94(%rbx), %esi
leaq 0xafa3(%rip), %rdi      # 0x14641
xorl %eax, %eax
callq 0x4050
movl 0x9c(%rbx), %esi
leaq 0xafaa(%rip), %rdi      # 0x1465c
xorl %eax, %eax
callq 0x4050
movl 0x98(%rbx), %esi
leaq 0xafb1(%rip), %rdi      # 0x14677
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4050