// File: /workspace/github_c_makefile_star2_O1/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 0x11c84(%rip), %r13     # 0x1b3f4
movl (%r15), %eax
cmpl $0x2, %eax
jne 0x9798
movq 0x10(%r15), %rdi
movl %r12d, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x9749
movq %r13, %rdi
callq 0x6070
movq 0x18(%r15), %r15
jmp 0x9770
cmpl $0x3, %eax
je 0x9851
cmpl $0x1, %eax
je 0x9820
testl %eax, %eax
jne 0x9887
movl %r12d, %edi
callq 0x65a5
leaq 0x11b2d(%rip), %rdi     # 0x1b2ea
xorl %eax, %eax
callq 0x6100
movq 0x8(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x9c4d
leaq 0x11c1c(%rip), %rdi     # 0x1b3f6
callq 0x6070
movq 0x10(%r15), %rdi
leal 0x1(%r12), %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x9749
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 0x787d
movl (%rax), %esi
movq %rbx, %rdi
callq 0x693b
leaq 0x11aac(%rip), %rdi     # 0x1b2f1
movq %rax, %rsi
xorl %eax, %eax
callq 0x6100
jmp 0x9867
movl %r12d, %edi
callq 0x65a5
leaq 0x11a98(%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 0x9c4d
leaq 0x11776(%rip), %rdi     # 0x1b004
leaq 0x119a3(%rip), %rsi     # 0x1b238
leaq 0x11a64(%rip), %rcx     # 0x1b300
movl $0xc6, %edx
xorl %eax, %eax
callq 0x6100
leaq 0x1177d(%rip), %rdi     # 0x1b02c
leaq 0x11a55(%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 0x1192e(%rip), %rdi     # 0x1b216
callq 0x6070
testl %r14d, %r14d
jle 0x9915
movl %r14d, %r15d
leaq 0x11730(%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 0x98ff
movl $0x1, %edi
callq 0x61a0