// File: /workspace/github_c_makefile_star2_O3/alexj136[P]minijit/src/icode.c
// Function: ICodeOperation_print
void ICodeOperation_print(ICodeOperation *op) {

    if(op->opc == MOVE) {
        printf("MOVE ");
        reg_print(op->arg1);
        printf(" ");
        reg_print(op->arg2);
        printf("\n");
    }
    else if(op->opc == LOAD) {
        printf("LOAD ");
        reg_print(op->arg1);
        printf(" ");
        reg_print(op->arg2);
        printf("\n");
    }
    else if(op->opc == STORE) {
        printf("STORE ");
        reg_print(op->arg1);
        printf(" ");
        reg_print(op->arg2);
        printf("\n");
    }
    else if (op->opc == ADD) {
        printf("ADD ");
        reg_print(op->arg1);
        printf(" ");
        reg_print(op->arg2);
        printf("\n");
    }
    else if (op->opc == SUB) {
        printf("SUB ");
        reg_print(op->arg1);
        printf(" ");
        reg_print(op->arg2);
        printf("\n");
    }
    else if (op->opc == LOADIMM) {
        printf("LOADIMM %d ", op->arg1);
        reg_print(op->arg2);
        printf("\n");
    }
    else if (op->opc == JUMP) {
        printf("JUMP L%d\n", op->arg1);
    }
    else if (op->opc == JUMPCOND) {
        printf("JUMPCOND L%d ", op->arg1);
        reg_print(op->arg2);
        printf("\n");
    }
    else if (op->opc == JUMPLINK) {
        printf("JUMPLINK L%d\n", op->arg1);
    }
    else if (op->opc == JUMPADDR) {
        printf("JUMPADDR ");
        reg_print(op->arg1);
        printf("\n");
    }
    else if (op->opc == LABEL) {
        printf("--- L%d ---\n", op->arg1);
    }
    else if (op->opc == HALT) {
        printf("HALT\n");
    }
    else {
        ERROR("Invalid Opcode");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1f40, %rsp           # imm = 0x1F40
movl (%rdi), %eax
cmpq $0xb, %rax
ja 0x1401d
movq %rdi, %rbx
leaq 0x853a(%rip), %rcx      # 0x1c464
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x85c2(%rip), %rdi      # 0x1c4fc
jmp 0x13f98
leaq 0x87bc(%rip), %rdi      # 0x1c6ff
addq $0x1f40, %rsp           # imm = 0x1F40
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6070
leaq 0x85b6(%rip), %rdi      # 0x1c514
jmp 0x13f98
leaq 0x85e4(%rip), %rdi      # 0x1c54b
xorl %eax, %eax
callq 0x6100
movl 0x4(%rbx), %edi
jmp 0x13fc7
leaq 0x858e(%rip), %rdi      # 0x1c508
jmp 0x13f98
leaq 0x858c(%rip), %rdi      # 0x1c50f
jmp 0x13f98
movl 0x4(%rbx), %esi
leaq 0x85a0(%rip), %rdi      # 0x1c52f
jmp 0x13fbd
leaq 0x856a(%rip), %rdi      # 0x1c502
xorl %eax, %eax
callq 0x6100
movl 0x4(%rbx), %edi
callq 0x140b5
movl $0x20, %edi
callq 0x6040
jmp 0x13fc4
movl 0x4(%rbx), %esi
leaq 0x855c(%rip), %rdi      # 0x1c519
xorl %eax, %eax
callq 0x6100
movl 0x8(%rbx), %edi
callq 0x140b5
movl $0xa, %edi
addq $0x1f40, %rsp           # imm = 0x1F40
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6040
movl 0x4(%rbx), %esi
leaq 0x8536(%rip), %rdi      # 0x1c525
jmp 0x14007
movl 0x4(%rbx), %esi
leaq 0x855a(%rip), %rdi      # 0x1c555
jmp 0x14007
movl 0x4(%rbx), %esi
leaq 0x8536(%rip), %rdi      # 0x1c53d
xorl %eax, %eax
addq $0x1f40, %rsp           # imm = 0x1F40
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6100
leaq 0x6fe0(%rip), %rdi      # 0x1b004
leaq 0x8481(%rip), %rsi      # 0x1c4ac
leaq 0x8530(%rip), %rcx      # 0x1c562
movl $0x5c, %edx
xorl %eax, %eax
callq 0x6100
leaq 0x6fe7(%rip), %rdi      # 0x1b02c
leaq 0x852b(%rip), %rsi      # 0x1c577
xorl %eax, %eax
callq 0x6100
leaq -0x1f60(%rbp), %rbx
movq %rbx, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x60e0
movl %eax, %r14d
movq %rbx, %rdi
movl %eax, %esi
callq 0x60b0
movq %rax, %rbx
leaq 0x7198(%rip), %rdi      # 0x1b216
callq 0x6070
testl %r14d, %r14d
jle 0x140ab
movl %r14d, %r15d
leaq 0x6f9a(%rip), %r14      # 0x1b02c
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x6100
incq %r12
cmpq %r12, %r15
jne 0x14095
movl $0x1, %edi
callq 0x61a0