// File: /workspace/github_c_makefile_star2_O3/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, %rbx
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %r15
leaq 0x11c52(%rip), %r13     # 0x1b3f4
movl (%r15), %eax
cmpl $0x2, %eax
jne 0x97ca
movq 0x10(%r15), %rdi
movl %r12d, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x977b
movq %r13, %rdi
callq 0x6070
movq 0x18(%r15), %r15
jmp 0x97a2
cmpl $0x3, %eax
je 0x9883
cmpl $0x1, %eax
je 0x9852
testl %eax, %eax
jne 0x98b9
movl %r12d, %edi
callq 0x65a5
leaq 0x11afb(%rip), %rdi     # 0x1b2ea
xorl %eax, %eax
callq 0x6100
movq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x9c80
leaq 0x11bea(%rip), %rdi     # 0x1b3f6
callq 0x6070
movq 0x10(%r15), %rdi
leal 0x1(%r12), %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x977b
movl $0xa, %edi
callq 0x6040
movl %r12d, %edi
callq 0x65a5
movl $0x7d, %edi
addq $0x1f48, %rsp           # imm = 0x1F48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6040
movl %r12d, %edi
callq 0x65a5
movl 0x20(%r15), %esi
movq %r14, %rdi
callq 0x7887
movl (%rax), %esi
movq %rbx, %rdi
callq 0x6937
leaq 0x11a7a(%rip), %rdi     # 0x1b2f1
movq %rax, %rsi
xorl %eax, %eax
callq 0x6100
jmp 0x9899
movl %r12d, %edi
callq 0x65a5
leaq 0x11a66(%rip), %rdi     # 0x1b2f8
xorl %eax, %eax
callq 0x6100
movq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x1f48, %rsp           # imm = 0x1F48
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9c80
leaq 0x11744(%rip), %rdi     # 0x1b004
leaq 0x11971(%rip), %rsi     # 0x1b238
leaq 0x11a32(%rip), %rcx     # 0x1b300
movl $0xc6, %edx
xorl %eax, %eax
callq 0x6100
leaq 0x1174b(%rip), %rdi     # 0x1b02c
leaq 0x11a23(%rip), %rsi     # 0x1b30b
xorl %eax, %eax
callq 0x6100
leaq -0x1f70(%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 0x118fc(%rip), %rdi     # 0x1b216
callq 0x6070
testl %r14d, %r14d
jle 0x9947
movl %r14d, %r15d
leaq 0x116fe(%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 0x9931
movl $0x1, %edi
callq 0x61a0