// File: /workspace/github_c_makefile_star2_O3/niho[P]elmc/src/east.c
// Function: elm_ast_print_depth
void elm_ast_print_depth(elm_ast_t *a, int d, FILE *fp) {
    if (a == NULL) {
        fprintf(fp, "NULL\n");
        return;
    }

    for (int i = 0; i < d; i++) { fprintf(fp, "  "); }

    switch(a->tag) {
        case ELM_AST_COMMENT:
            fprintf(fp, "comment: <%s>\n", (char*)a->contents);
            break;
        case ELM_AST_BOOL:
            if (a->i)
                fprintf(fp, "bool: <True>\n");
            else
                fprintf(fp, "bool: <False>\n");
            break;
        case ELM_AST_NUMBER:
            fprintf(fp, "number: <%d>\n", *(int*)a->contents);
            break;
        case ELM_AST_FLOAT:
            fprintf(fp, "float: <%f>\n", *(float*)a->contents);
            break;
        case ELM_AST_CHAR:
            fprintf(fp, "char: <%s>\n", (char*)a->contents);
            break;
        case ELM_AST_STRING:
            fprintf(fp, "string: <%s>\n", (char*)a->contents);
            break;
        case ELM_AST_VAR:
            fprintf(fp, "variable: <%s>\n", (char*)a->contents);
            break;
        case ELM_AST_EXPR:
            fprintf(fp, "expr:\n");
            for(int i = 0; i < a->children_num; i++) {
                elm_ast_print_depth(a->children[i], d+1, fp);
            }
            break;
        case ELM_AST_LIST:
            fprintf(fp, "list:\n");
            for(int i = 0; i < a->children_num; i++) {
                elm_ast_print_depth(a->children[i], d+1, fp);
            }
            break;
        case ELM_AST_TUPLE:
            fprintf(fp, "tuple:\n");
            for(int i = 0; i < a->children_num; i++) {
                elm_ast_print_depth(a->children[i], d+1, fp);
            }
            break;
        case ELM_AST_IF:
            fprintf(fp, "if:\n");
            for(int i = 0; i < a->children_num; i++) {
                elm_ast_print_depth(a->children[i], d+1, fp);
            }
            break;
        case ELM_AST_CASE:
            fprintf(fp, "case:\n");
            for(int i = 0; i < a->children_num; i++) {
                elm_ast_print_depth(a->children[i], d+1, fp);
            }
            break;
        case ELM_AST_BRANCH:
            fprintf(fp, "branch:\n");
            for(int i = 0; i < a->children_num; i++) {
                elm_ast_print_depth(a->children[i], d+1, fp);
            }
            break;
        case ELM_AST_WILDCARD:
            fprintf(fp, "wildcard\n");
            break;
        case ELM_AST_DECL:
            fprintf(fp, "declaration:\n");
            for(int i = 0; i < a->children_num; i++) {
                elm_ast_print_depth(a->children[i], d+1, fp);
            }
            break;
        case ELM_AST_FUNC:
            fprintf(fp, "function: <%s>\n", a->contents);
            for(int i = 0; i < a->children_num; i++) {
                elm_ast_print_depth(a->children[i], d+1, fp);
            }
            break;
        case ELM_AST_MODULE:
            fprintf(fp, "module:\n");
            for(int i = 0; i < a->children_num; i++) {
                elm_ast_print_depth(a->children[i], d+1, fp);
            }
            break;
        default:
            fprintf(fp, "unknown ast node (tag: %d)\n", a->tag);
            break;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
testq %rdi, %rdi
je 0x2049
movl %esi, %ebp
movq %rdi, %r14
testl %esi, %esi
jle 0x201c
leaq 0xb34f(%rip), %r15      # 0xd34e
movl %ebp, %r12d
movl $0x2, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1200
decl %r12d
jne 0x2002
movl (%r14), %edx
cmpq $0x10, %rdx
ja 0x22dc
leaq 0xb0ac(%rip), %rax      # 0xd0dc
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%r14), %rdx
leaq 0xb30d(%rip), %rsi      # 0xd351
jmp 0x231e
leaq 0xb2f8(%rip), %rdi      # 0xd348
movl $0x5, %esi
movl $0x1, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1200
leaq 0xb3a4(%rip), %rdi      # 0xd415
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1200
cmpl $0x0, 0x10(%r14)
jle 0x23b8
incl %ebp
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1fdf
incq %r15
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jl 0x2093
jmp 0x23b8
leaq 0xb33a(%rip), %rdi      # 0xd3f7
movl $0xd, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1200
cmpl $0x0, 0x10(%r14)
jle 0x23b8
incl %ebp
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1fdf
incq %r15
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jl 0x20df
jmp 0x23b8
leaq 0xb2d4(%rip), %rdi      # 0xd3dd
movl $0x6, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1200
cmpl $0x0, 0x10(%r14)
jle 0x23b8
incl %ebp
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1fdf
incq %r15
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jl 0x212b
jmp 0x23b8
movq 0x8(%r14), %rdx
leaq 0xb23f(%rip), %rsi      # 0xd398
jmp 0x231e
leaq 0xb27f(%rip), %rdi      # 0xd3e4
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1200
cmpl $0x0, 0x10(%r14)
jle 0x23b8
incl %ebp
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1fdf
incq %r15
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jl 0x2187
jmp 0x23b8
leaq 0xb21f(%rip), %rdi      # 0xd3d0
movl $0x7, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1200
cmpl $0x0, 0x10(%r14)
jle 0x23b8
incl %ebp
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1fdf
incq %r15
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jl 0x21d3
jmp 0x23b8
movq 0x8(%r14), %rax
movl (%rax), %edx
leaq 0xb17a(%rip), %rsi      # 0xd37d
movq %rbx, %rdi
jmp 0x22e6
movq 0x8(%r14), %rdx
leaq 0xb1ef(%rip), %rsi      # 0xd405
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1130
cmpl $0x0, 0x10(%r14)
jle 0x23b8
incl %ebp
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1fdf
incq %r15
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jl 0x2230
jmp 0x23b8
movq 0x8(%r14), %rax
cvtss2sd (%rax), %xmm0
leaq 0xb129(%rip), %rsi      # 0xd38b
movq %rbx, %rdi
movb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1130
leaq 0xb147(%rip), %rdi      # 0xd3c2
movl $0x6, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1200
cmpl $0x0, 0x10(%r14)
jle 0x23b8
incl %ebp
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1fdf
incq %r15
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jl 0x229d
jmp 0x23b8
cmpl $0x0, 0x8(%r14)
je 0x23c1
leaq 0xb08e(%rip), %rdi      # 0xd360
movl $0xd, %esi
jmp 0x2055
leaq 0xb13b(%rip), %rsi      # 0xd41e
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1130
movq 0x8(%r14), %rdx
leaq 0xb0a4(%rip), %rsi      # 0xd3a4
jmp 0x231e
leaq 0xb0e4(%rip), %rdi      # 0xd3ed
movl $0x9, %esi
jmp 0x2055
movq 0x8(%r14), %rdx
leaq 0xb094(%rip), %rsi      # 0xd3b2
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1130
leaq 0xb0a1(%rip), %rdi      # 0xd3d8
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1200
cmpl $0x0, 0x10(%r14)
jle 0x23b8
incl %ebp
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1fdf
incq %r15
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jl 0x2355
jmp 0x23b8
leaq 0xb04d(%rip), %rdi      # 0xd3c9
movl $0x6, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1200
cmpl $0x0, 0x10(%r14)
jle 0x23b8
incl %ebp
xorl %r15d, %r15d
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1fdf
incq %r15
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jl 0x239a
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0xafa6(%rip), %rdi      # 0xd36e
movl $0xe, %esi
jmp 0x2055