// File: /workspace/github_c_makefile_star2_O1/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 0x14079
movq %rdi, %rbx
leaq 0x84ee(%rip), %rcx      # 0x1c474
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x8576(%rip), %rdi      # 0x1c50c
jmp 0x13ff4
leaq 0x8770(%rip), %rdi      # 0x1c70f
addq $0x1f40, %rsp           # imm = 0x1F40
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6070
leaq 0x856a(%rip), %rdi      # 0x1c524
jmp 0x13ff4
leaq 0x8598(%rip), %rdi      # 0x1c55b
xorl %eax, %eax
callq 0x6100
movl 0x4(%rbx), %edi
jmp 0x14023
leaq 0x8542(%rip), %rdi      # 0x1c518
jmp 0x13ff4
leaq 0x8540(%rip), %rdi      # 0x1c51f
jmp 0x13ff4
movl 0x4(%rbx), %esi
leaq 0x8554(%rip), %rdi      # 0x1c53f
jmp 0x14019
leaq 0x851e(%rip), %rdi      # 0x1c512
xorl %eax, %eax
callq 0x6100
movl 0x4(%rbx), %edi
callq 0x14111
movl $0x20, %edi
callq 0x6040
jmp 0x14020
movl 0x4(%rbx), %esi
leaq 0x8510(%rip), %rdi      # 0x1c529
xorl %eax, %eax
callq 0x6100
movl 0x8(%rbx), %edi
callq 0x14111
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 0x84ea(%rip), %rdi      # 0x1c535
jmp 0x14063
movl 0x4(%rbx), %esi
leaq 0x850e(%rip), %rdi      # 0x1c565
jmp 0x14063
movl 0x4(%rbx), %esi
leaq 0x84ea(%rip), %rdi      # 0x1c54d
xorl %eax, %eax
addq $0x1f40, %rsp           # imm = 0x1F40
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6100
leaq 0x6f84(%rip), %rdi      # 0x1b004
leaq 0x8435(%rip), %rsi      # 0x1c4bc
leaq 0x84e4(%rip), %rcx      # 0x1c572
movl $0x5c, %edx
xorl %eax, %eax
callq 0x6100
leaq 0x6f8b(%rip), %rdi      # 0x1b02c
leaq 0x84df(%rip), %rsi      # 0x1c587
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 0x713c(%rip), %rdi      # 0x1b216
callq 0x6070
testl %r14d, %r14d
jle 0x14107
movl %r14d, %r15d
leaq 0x6f3e(%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 0x140f1
movl $0x1, %edi
callq 0x61a0