// File: /workspace/github_c_makefile_star2_O0/neosploit[P]compiler/ast_print.c
// Function: ast_variable_print
void ast_variable_print(AstPrintState* state, Variable* variable) {

    switch (variable->tag) {
        case VARIABLE_ID:
            fprintf(state->fp, " [VARIABLE_ID:");
            ast_id_print(state, variable->id.id);
            fprintf(state->fp, "]");

            break;
        case VARIABLE_COMPONENT:
            fprintf(state->fp, " [VARIABLE_COMPONENT:");
            ast_variable_print(state, variable->component.variable);
            ast_id_print(state, variable->component.id);
            fprintf(state->fp, "]");

            break;
        case VARIABLE_INDEX:
            fprintf(state->fp, " [VARIABLE_INDEX:");
            ast_variable_print(state, variable->index.variable);
            ast_expression_print(state, variable->index.expressions);
            fprintf(state->fp, "]");

            break;
        case VARIABLE_LISTFUNC:
            fprintf(state->fp, " [VARIABLE_LISTFUNC:");
            ast_id_print(state, variable->listfunc.id);
            ast_expression_print(state, variable->listfunc.expression);
            fprintf(state->fp, "]");
    }

    if (variable->next) ast_variable_print(state, variable->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 $0x3, %rax
ja 0xfa2c
movq -0x18(%rbp), %rax
leaq 0x12868(%rip), %rcx     # 0x22158
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x12b28(%rip), %rsi     # 0x22430
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xf130
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x12ce2(%rip), %rsi     # 0x22611
movb $0x0, %al
callq 0x7170
jmp 0xfa2c
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x12af5(%rip), %rsi     # 0x2243f
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xf8c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xf130
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x12c8f(%rip), %rsi     # 0x22611
movb $0x0, %al
callq 0x7170
jmp 0xfa2c
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x12ab8(%rip), %rsi     # 0x22455
movb $0x0, %al
callq 0x7170
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xf8c0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0xf220
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x12c3c(%rip), %rsi     # 0x22611
movb $0x0, %al
callq 0x7170
jmp 0xfa2c
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x12a7a(%rip), %rsi     # 0x22467
movb $0x0, %al
callq 0x7170
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
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rdi
leaq 0x12bec(%rip), %rsi     # 0x22611
movb $0x0, %al
callq 0x7170
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xfa48
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0xf8c0
addq $0x20, %rsp
popq %rbp
retq
nop