// File: /workspace/github_c_makefile_star2_O2/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 0x13349
movq %rdi, %rbx
leaq 0x824a(%rip), %rcx      # 0x1b4a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x82d2(%rip), %rdi      # 0x1b53c
jmp 0x132c8
leaq 0x84cc(%rip), %rdi      # 0x1b73f
addq $0x1f40, %rsp           # imm = 0x1F40
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6070
leaq 0x82c6(%rip), %rdi      # 0x1b554
jmp 0x132c8
leaq 0x82f4(%rip), %rdi      # 0x1b58b
xorl %eax, %eax
callq 0x6100
movl 0x4(%rbx), %edi
jmp 0x132f5
leaq 0x829e(%rip), %rdi      # 0x1b548
jmp 0x132c8
leaq 0x829c(%rip), %rdi      # 0x1b54f
jmp 0x132c8
movl 0x4(%rbx), %esi
leaq 0x82b0(%rip), %rdi      # 0x1b56f
jmp 0x132eb
leaq 0x827a(%rip), %rdi      # 0x1b542
xorl %eax, %eax
callq 0x6100
movl 0x4(%rbx), %edi
callq 0x133dd
pushq $0x20
popq %rdi
callq 0x6040
jmp 0x132f2
movl 0x4(%rbx), %esi
leaq 0x826e(%rip), %rdi      # 0x1b559
xorl %eax, %eax
callq 0x6100
movl 0x8(%rbx), %edi
callq 0x133dd
pushq $0xa
popq %rdi
addq $0x1f40, %rsp           # imm = 0x1F40
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6040
movl 0x4(%rbx), %esi
leaq 0x824a(%rip), %rdi      # 0x1b565
jmp 0x13333
movl 0x4(%rbx), %esi
leaq 0x826e(%rip), %rdi      # 0x1b595
jmp 0x13333
movl 0x4(%rbx), %esi
leaq 0x824a(%rip), %rdi      # 0x1b57d
xorl %eax, %eax
addq $0x1f40, %rsp           # imm = 0x1F40
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6100
leaq 0x6cb4(%rip), %rdi      # 0x1a004
leaq 0x8195(%rip), %rsi      # 0x1b4ec
leaq 0x8244(%rip), %rcx      # 0x1b5a2
xorl %r12d, %r12d
pushq $0x5c
popq %rdx
xorl %eax, %eax
callq 0x6100
leaq 0x6cba(%rip), %rbx      # 0x1a02c
leaq 0x823e(%rip), %rsi      # 0x1b5b7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6100
leaq -0x1f60(%rbp), %r15
movq %r15, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x60e0
movl %eax, %r14d
movq %r15, %rdi
movl %eax, %esi
callq 0x60b0
movq %rax, %r15
leaq 0x6e68(%rip), %rdi      # 0x1a216
callq 0x6070
testl %r14d, %r14d
cmovlel %r12d, %r14d
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x133d5
movq (%r15,%r12,8), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6100
incq %r12
jmp 0x133bd
pushq $0x1
popq %rdi
callq 0x61a0