// File: /workspace/github_c_makefile_star2_O2/alexj136[P]minijit/src/syntax.c
// Function: Comm_print
void Comm_print(Comm *comm, int indent, IntRefVector *local_name_map,
        charVector *global_name_map) {

    if(Comm_isWhile(comm)) {
        put_indent(indent);
        printf("while ");
        Expr_print(While_guard(comm), local_name_map, global_name_map);
        printf(" do {\n");
        Comm_print(While_body(comm), indent + 1, local_name_map,
                global_name_map);
        printf("\n");
        put_indent(indent);
        printf("}");
    }
    else if(Comm_isAssign(comm)) {
        put_indent(indent);
        printf("%s := ", charVector_get(global_name_map,
                IntRef_value(IntRefVector_get(local_name_map,
                Assign_name(comm)))));
        Expr_print(Assign_expr(comm), local_name_map, global_name_map);
    }
    else if(Comm_isComp(comm)) {
        Comm_print(Comp_fst(comm), indent, local_name_map, global_name_map);
        printf(";\n");
        Comm_print(Comp_snd(comm), indent, local_name_map, global_name_map);
    }
    else if(Comm_isReturn(comm)) {
        put_indent(indent);
        printf("return ");
        Expr_print(Return_expr(comm), local_name_map, global_name_map);
    }
    else {
        ERROR("Comm type not recognised.");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f48, %rsp           # imm = 0x1F48
movq %rcx, %r14
movq %rdx, %r13
movl %esi, %r12d
movq %rdi, %r15
leaq 0x10cdc(%rip), %rbx     # 0x1a224
movl (%r15), %eax
cmpq $0x3, %rax
ja 0x965a
movslq (%rbx,%rax,4), %rax
addq %rbx, %rax
jmpq *%rax
movq 0x10(%r15), %rdi
movl %r12d, %esi
movq %r13, %rdx
movq %r14, %rcx
callq 0x9521
leaq 0x10e8d(%rip), %rdi     # 0x1a404
callq 0x6070
movq 0x18(%r15), %r15
jmp 0x9548
movl %r12d, %edi
callq 0x6597
movl 0x20(%r15), %esi
movq %r13, %rdi
callq 0x77bb
movl (%rax), %esi
movq %r14, %rdi
callq 0x690b
leaq 0x10d5a(%rip), %rdi     # 0x1a301
movq %rax, %rsi
xorl %eax, %eax
callq 0x6100
jmp 0x963a
movl %r12d, %edi
callq 0x6597
leaq 0x10d35(%rip), %rdi     # 0x1a2fa
xorl %eax, %eax
callq 0x6100
movq 0x8(%r15), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x993d
leaq 0x10e24(%rip), %rdi     # 0x1a406
callq 0x6070
movq 0x10(%r15), %rdi
leal 0x1(%r12), %esi
movq %r13, %rdx
movq %r14, %rcx
callq 0x9521
pushq $0xa
popq %rdi
callq 0x6040
movl %r12d, %edi
callq 0x6597
pushq $0x7d
popq %rdi
addq $0x1f48, %rsp           # imm = 0x1F48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6040
movl %r12d, %edi
callq 0x6597
leaq 0x10cd5(%rip), %rdi     # 0x1a308
xorl %eax, %eax
callq 0x6100
movq 0x8(%r15), %rdi
movq %r13, %rsi
movq %r14, %rdx
addq $0x1f48, %rsp           # imm = 0x1F48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x993d
leaq 0x109a3(%rip), %rdi     # 0x1a004
leaq 0x10be0(%rip), %rsi     # 0x1a248
leaq 0x10ca1(%rip), %rcx     # 0x1a310
xorl %r12d, %r12d
movl $0xc6, %edx
xorl %eax, %eax
callq 0x6100
leaq 0x109a7(%rip), %rbx     # 0x1a02c
leaq 0x10c8f(%rip), %rsi     # 0x1a31b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6100
leaq -0x1f70(%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 0x10b55(%rip), %rdi     # 0x1a216
callq 0x6070
testl %r14d, %r14d
cmovlel %r12d, %r14d
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x96e8
movq (%r15,%r12,8), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x6100
incq %r12
jmp 0x96d0
pushq $0x1
popq %rdi
callq 0x61a0