// File: /workspace/github_c_makefile_star2_O0/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
subq $0x1f80, %rsp           # imm = 0x1F80
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jne 0xae60
movl -0xc(%rbp), %edi
callq 0x66b0
leaq 0x194ea(%rip), %rdi     # 0x242dc
movb $0x0, %al
callq 0x60f0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xb430
leaq 0x194ce(%rip), %rdi     # 0x242e3
movb $0x0, %al
callq 0x60f0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xadc0
leaq 0x1a708(%rip), %rdi     # 0x25546
movb $0x0, %al
callq 0x60f0
movl -0xc(%rbp), %edi
callq 0x66b0
leaq 0x1ad6b(%rip), %rdi     # 0x25bbf
movb $0x0, %al
callq 0x60f0
jmp 0xb019
movq -0x8(%rbp), %rax
cmpl $0x1, (%rax)
jne 0xaec5
movl -0xc(%rbp), %edi
callq 0x66b0
movq -0x20(%rbp), %rax
movq %rax, -0x1f80(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x20(%rax), %esi
callq 0x81e0
movq -0x1f80(%rbp), %rdi
movl (%rax), %esi
callq 0x6c10
movq %rax, %rsi
leaq 0x19446(%rip), %rdi     # 0x242ea
movb $0x0, %al
callq 0x60f0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xb430
jmp 0xb017
movq -0x8(%rbp), %rax
cmpl $0x2, (%rax)
jne 0xaf11
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xadc0
leaq 0x19404(%rip), %rdi     # 0x242f1
movb $0x0, %al
callq 0x60f0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0xc(%rbp), %esi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0xadc0
jmp 0xb015
movq -0x8(%rbp), %rax
cmpl $0x3, (%rax)
jne 0xaf4a
movl -0xc(%rbp), %edi
callq 0x66b0
leaq 0x193cb(%rip), %rdi     # 0x242f4
movb $0x0, %al
callq 0x60f0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xb430
jmp 0xb013
jmp 0xaf4c
leaq 0x190b1(%rip), %rdi     # 0x24004
leaq 0x192c8(%rip), %rsi     # 0x24222
movl $0xc6, %edx
leaq 0x19396(%rip), %rcx     # 0x242fc
movb $0x0, %al
callq 0x60f0
leaq 0x190b8(%rip), %rdi     # 0x2402c
leaq 0x1938c(%rip), %rsi     # 0x24307
movb $0x0, %al
callq 0x60f0
leaq -0x1f60(%rbp), %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x60d0
movl %eax, -0x1f64(%rbp)
leaq -0x1f60(%rbp), %rdi
movl -0x1f64(%rbp), %esi
callq 0x60a0
movq %rax, -0x1f70(%rbp)
leaq 0x19092(%rip), %rdi     # 0x2404b
movb $0x0, %al
callq 0x60f0
movl $0x0, -0x1f74(%rbp)
movl -0x1f74(%rbp), %eax
cmpl -0x1f64(%rbp), %eax
jge 0xb009
movq -0x1f70(%rbp), %rax
movslq -0x1f74(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1903b(%rip), %rdi     # 0x2402c
movb $0x0, %al
callq 0x60f0
movl -0x1f74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f74(%rbp)
jmp 0xafca
movl $0x1, %edi
callq 0x61a0
jmp 0xb015
jmp 0xb017
jmp 0xb019
addq $0x1f80, %rsp           # imm = 0x1F80
popq %rbp
retq
nopw %cs:(%rax,%rax)