// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/ast_print.c
// Function: ast_definition_print
void ast_definition_print(AstPrintState* state, Definition* definition) {

    switch (definition->tag) {
        case DEFINITION_PROGRAM:
            fprintf(state->fp, "[DEFINITION_PROGRAM]");
            ast_tag_space_print(state, strlen("[DEFINITION_PROGRAM]"));
            ast_indent_space_print(state);

            ast_id_print(state, definition->program.id);

            break;
        case DEFINITION_CONSTANT:
            fprintf(state->fp, "\n[DEFINITION_CONSTANT]");
            ast_tag_space_print(state, strlen("[DEFINITION_CONSTANT]"));
            ast_indent_space_print(state);

            ast_id_print(state, definition->constant.id);
            ast_expression_print(state, definition->constant.expression);

            break;
        case DEFINITION_TYPE:
            fprintf(state->fp, "\n[DEFINITION_TYPE]");
            ast_tag_space_print(state, strlen("[DEFINITION_TYPE]"));
            ast_indent_space_print(state);

            ast_id_print(state, definition->type.id);
            ast_type_print(state, definition->type.type);

            break;
        case DEFINITION_FIELD:
            fprintf(state->fp, "\n[DEFINITION_FIELD]");
            ast_tag_space_print(state, strlen("[DEFINITION_FIELD]"));
            ast_indent_space_print(state);

            ast_id_print(state, definition->field.identifiers);
            ast_type_print(state, definition->field.type);

            break;
        case DEFINITION_VARIABLE:
            fprintf(state->fp, "\n[DEFINITION_VARIABLE]");
            ast_tag_space_print(state, strlen("[DEFINITION_VARIABLE]"));
            ast_indent_space_print(state);

            ast_id_print(state, definition->variable.identifiers);
            ast_type_print(state, definition->variable.type);

            break;
        case DEFINITION_SUBPROGRAM_FORWARD:
            fprintf(state->fp, "\n[DEFINITION_SUBPROGRAM_FORWARD]");
            ast_tag_space_print(state, strlen("[DEFINITION_SUBPROGRAM_FORWARD]"));

            ast_definition_print(state, definition->subprogram_forward.sub_header);

            break;
        case DEFINITION_SUBPROGRAM:
            fprintf(state->fp, "[DEFINITION_SUBPROGRAM]");

            ast_definition_print(state, definition->subprogram.sub_header);

            state->indent++;

            ast_declaration_print(state, definition->subprogram.declarations);
            if (definition->subprogram.subprograms) ast_definition_print(state, definition->subprogram.subprograms);
            if (definition->subprogram.comp_statement) ast_statement_print(state, definition->subprogram.comp_statement);

            state->indent--;

            break;
        case DEFINITION_FUNCTION:
            fprintf(state->fp, "\n[DEFINITION_FUNCTION]");
            ast_tag_space_print(state, strlen("[DEFINITION_FUNCTION]"));
            ast_indent_space_print(state);

            ast_id_print(state, definition->function.id);
            if (definition->function.formal_parameters) ast_definition_print(state, definition->function.formal_parameters);
            if (definition->function.type) ast_type_print(state, definition->function.type);

            break;
        case DEFINITION_PROCEDURE:
            fprintf(state->fp, "\n[DEFINITION_PROCEDURE]");
            ast_tag_space_print(state, strlen("[DEFINITION_PROCEDURE]"));
            ast_indent_space_print(state);

            ast_id_print(state, definition->procedure.id);
            if (definition->procedure.formal_parameters) ast_definition_print(state, definition->procedure.formal_parameters);

            break;
        case DEFINITION_PARAMETER:
            fprintf(state->fp, "[DEFINITION_PARAMETER:");

            fprintf(state->fp, " (PASS: %s)", PassString[definition->parameter.pass]);
            ast_id_print(state, definition->parameter.identifiers);
            ast_type_print(state, definition->parameter.type);

            fprintf(state->fp, "]");
    }

    if (definition->next) ast_definition_print(state, definition->next);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x18(%rbp)
subq $0x9, %rax
ja 0xecf4
movq -0x18(%rbp), %rax
leaq 0x1376c(%rip), %rcx     # 0x220ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x138b4(%rip), %rsi     # 0x2220c
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movl $0x14, %esi
callq 0xf180
movq -0x8(%rbp), %rdi
callq 0xf1d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xf130
jmp 0xecf4
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x13886(%rip), %rsi     # 0x22221
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movl $0x15, %esi
callq 0xf180
movq -0x8(%rbp), %rdi
callq 0xf1d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xf130
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xf220
jmp 0xecf4
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x13849(%rip), %rsi     # 0x22238
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movl $0x11, %esi
callq 0xf180
movq -0x8(%rbp), %rdi
callq 0xf1d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xf130
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xf670
jmp 0xecf4
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x13808(%rip), %rsi     # 0x2224b
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movl $0x12, %esi
callq 0xf180
movq -0x8(%rbp), %rdi
callq 0xf1d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xf130
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xf670
jmp 0xecf4
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x137c8(%rip), %rsi     # 0x2225f
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movl $0x15, %esi
callq 0xf180
movq -0x8(%rbp), %rdi
callq 0xf1d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xf130
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xf670
jmp 0xecf4
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x1378b(%rip), %rsi     # 0x22276
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movl $0x1f, %esi
callq 0xf180
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xe910
jmp 0xecf4
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x13772(%rip), %rsi     # 0x22297
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xe910
movq -0x8(%rbp), %rax
movl 0x40(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xed20
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xeb77
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xe910
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xeb93
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0xed90
movq -0x8(%rbp), %rax
movl 0x40(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x40(%rax)
jmp 0xecf4
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x136fb(%rip), %rsi     # 0x222af
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movl $0x15, %esi
callq 0xf180
movq -0x8(%rbp), %rdi
callq 0xf1d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xf130
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xebff
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xe910
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xec1b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xf670
jmp 0xecf4
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x13697(%rip), %rsi     # 0x222c6
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movl $0x16, %esi
callq 0xf180
movq -0x8(%rbp), %rdi
callq 0xf1d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xf130
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xec7a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xe910
jmp 0xecf4
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x13653(%rip), %rsi     # 0x222de
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
movl %eax, %ecx
leaq 0x1b556(%rip), %rax     # 0x2a200
movq (%rax,%rcx,8), %rdx
leaq 0x13640(%rip), %rsi     # 0x222f5
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xf130
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xf670
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x13924(%rip), %rsi     # 0x22611
movb $0x0, %al
callq 0x7170
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xed10
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0xe910
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)