// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
testq %rdi, %rdi
je 0x1b94
movq %rdi, %r14
xorl %ebp, %ebp
testl %esi, %esi
movl %esi, 0x4(%rsp)
cmovgl %esi, %ebp
leaq 0x9807(%rip), %r15      # 0xb34e
pushq $0x2
popq %r12
pushq $0x1
popq %r13
subl $0x1, %ebp
jb 0x1b67
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %rbx, %rcx
callq 0x1200
jmp 0x1b4f
movl (%r14), %edx
cmpq $0x10, %rdx
ja 0x1dea
leaq 0x9561(%rip), %rax      # 0xb0dc
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x8(%r14), %rdx
leaq 0x97c2(%rip), %rsi      # 0xb351
jmp 0x1e2f
leaq 0x97ad(%rip), %rdi      # 0xb348
pushq $0x5
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1200
leaq 0x9857(%rip), %rdi      # 0xb415
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1200
movl 0x4(%rsp), %ebp
incl %ebp
xorl %r15d, %r15d
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jge 0x1ec3
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1b1f
incq %r15
jmp 0x1bd5
leaq 0x97f7(%rip), %rdi      # 0xb3f7
pushq $0xd
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1200
movl 0x4(%rsp), %ebp
incl %ebp
xorl %r15d, %r15d
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jge 0x1ec3
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1b1f
incq %r15
jmp 0x1c17
leaq 0x979b(%rip), %rdi      # 0xb3dd
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1200
movl 0x4(%rsp), %ebp
incl %ebp
xorl %r15d, %r15d
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jge 0x1ec3
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1b1f
incq %r15
jmp 0x1c59
movq 0x8(%r14), %rdx
leaq 0x9710(%rip), %rsi      # 0xb398
jmp 0x1e2f
leaq 0x9750(%rip), %rdi      # 0xb3e4
pushq $0x8
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1200
movl 0x4(%rsp), %ebp
incl %ebp
xorl %r15d, %r15d
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jge 0x1ec3
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1b1f
incq %r15
jmp 0x1cab
leaq 0x96fa(%rip), %rdi      # 0xb3d0
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1200
movl 0x4(%rsp), %ebp
incl %ebp
xorl %r15d, %r15d
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jge 0x1ec3
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1b1f
incq %r15
jmp 0x1ced
movq 0x8(%r14), %rax
movl (%rax), %edx
leaq 0x965f(%rip), %rsi      # 0xb37d
movq %rbx, %rdi
jmp 0x1df4
movq 0x8(%r14), %rdx
leaq 0x96d4(%rip), %rsi      # 0xb405
xorl %r15d, %r15d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1130
movl 0x4(%rsp), %ebp
incl %ebp
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jge 0x1ec3
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1b1f
incq %r15
jmp 0x1d44
movq 0x8(%r14), %rax
cvtss2sd (%rax), %xmm0
leaq 0x9614(%rip), %rsi      # 0xb38b
movq %rbx, %rdi
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1130
leaq 0x962c(%rip), %rdi      # 0xb3c2
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1200
movl 0x4(%rsp), %ebp
incl %ebp
xorl %r15d, %r15d
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jge 0x1ec3
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1b1f
incq %r15
jmp 0x1dad
cmpl $0x0, 0x8(%r14)
je 0x1ed2
leaq 0x957d(%rip), %rdi      # 0xb360
pushq $0xd
jmp 0x1b9d
leaq 0x962d(%rip), %rsi      # 0xb41e
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1130
movq 0x8(%r14), %rdx
leaq 0x9590(%rip), %rsi      # 0xb3a4
jmp 0x1e2f
leaq 0x95d0(%rip), %rdi      # 0xb3ed
pushq $0x9
jmp 0x1b9d
movq 0x8(%r14), %rdx
leaq 0x9583(%rip), %rsi      # 0xb3b2
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1130
leaq 0x958a(%rip), %rdi      # 0xb3d8
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1200
movl 0x4(%rsp), %ebp
incl %ebp
xorl %r15d, %r15d
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jge 0x1ec3
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1b1f
incq %r15
jmp 0x1e65
leaq 0x953d(%rip), %rdi      # 0xb3c9
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
callq 0x1200
movl 0x4(%rsp), %ebp
incl %ebp
xorl %r15d, %r15d
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jge 0x1ec3
movq 0x18(%r14), %rax
movq (%rax,%r15,8), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x1b1f
incq %r15
jmp 0x1ea3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9495(%rip), %rdi      # 0xb36e
pushq $0xe
jmp 0x1b9d