// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/compile-i386.c
// Function: x86_statement
static struct storage *x86_statement(struct statement *stmt)
{
	if (!stmt)
		return NULL;
	switch (stmt->type) {
	default:
		return NULL;
	case STMT_RETURN:
		return emit_return_stmt(stmt);
	case STMT_DECLARATION:
		x86_symbol_decl(stmt->declaration);
		break;
	case STMT_COMPOUND: {
		struct statement *s;
		struct storage *last = NULL;

		FOR_EACH_PTR(stmt->stmts, s) {
			last = x86_statement(s);
		} END_FOR_EACH_PTR(s);

		return last;
	}

	case STMT_EXPRESSION:
		return x86_expression(stmt->expression);
	case STMT_IF:
		emit_if_conditional(stmt);
		return NULL;

	case STMT_CASE:
		emit_case_statement(stmt);
		break;
	case STMT_SWITCH:
		emit_switch_statement(stmt);
		break;

	case STMT_ITERATOR:
		emit_loop(stmt);
		break;

	case STMT_NONE:
		break;

	case STMT_LABEL:
		printf(".L%p:\n", stmt->label_identifier);
		x86_statement(stmt->label_statement);
		break;

	case STMT_GOTO:
		if (stmt->goto_expression) {
			struct storage *val = x86_expression(stmt->goto_expression);
			printf("\tgoto *v%d\n", val->pseudo);
		} else if (!strcmp("break", show_ident(stmt->goto_label->ident))) {
			struct storage *lbv = new_storage(STOR_LABEL);
			lbv->label = loopstk_break();
			lbv->flags = STOR_WANTS_FREE;
			insn("jmp", lbv, NULL, "'break'; go to loop bottom");
		} else if (!strcmp("continue", show_ident(stmt->goto_label->ident))) {
			struct storage *lbv = new_storage(STOR_LABEL);
			lbv->label = loopstk_continue();
			lbv->flags = STOR_WANTS_FREE;
			insn("jmp", lbv, NULL, "'continue'; go to loop top");
		} else {
			struct storage *labelsym = new_labelsym(stmt->goto_label);
			insn("jmp", labelsym, NULL, NULL);
		}
		break;
	case STMT_ASM:
		printf("\tasm( .... )\n");
		break;
	}
	return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r12
xorl %r14d, %r14d
leaq 0xe85e(%rip), %r15      # 0x47a8c
leaq 0x7e04(%rip), %rbx      # 0x41039
xorl %r13d, %r13d
testq %r12, %r12
je 0x3996b
movl (%r12), %eax
decl %eax
cmpl $0xa, %eax
ja 0x3996b
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x28(%r12), %rdi
callq 0x3b051
jmp 0x39274
movq 0x10(%r12), %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0xe110
movq 0x20(%r12), %r12
movb $0x1, %r13b
jmp 0x39238
movq 0x57753(%rip), %r15     # 0x909d8
movq 0x10(%r12), %rbx
testq %rbx, %rbx
je 0x396c0
cmpq $0x0, 0x10(%rbx)
je 0x396c0
movq %rbx, %rdi
callq 0x39a55
testq %rax, %rax
je 0x39a36
movq %rax, %r14
movq 0x10(%rbx), %rdx
leaq 0x2a513(%rip), %rsi     # 0x637d0
leaq 0x56cb(%rip), %rcx      # 0x3e98f
movq %rax, %rdi
callq 0x3aa06
jmp 0x396c3
movq 0x10(%r12), %rdi
callq 0x39a55
movq %rax, %rdi
callq 0x3ac0b
movl %eax, %ebx
movq 0x18(%r12), %rdi
callq 0x39213
cmpq $0x0, 0x20(%r12)
je 0x3930a
movl %ebx, %edi
callq 0x3ac83
movl %eax, %ebx
movq 0x20(%r12), %rdi
callq 0x39213
leaq 0xebe3(%rip), %rsi      # 0x47ef4
movl %ebx, %edi
callq 0x3acce
jmp 0x39968
movq 0x10(%r12), %rdi
callq 0x39a55
movq %rax, %r14
jmp 0x3996b
movq 0x10(%r12), %rdi
callq 0x3a888
jmp 0x39968
movq 0x10(%r12), %rbx
testq %rbx, %rbx
je 0x39968
xorl %r14d, %r14d
movq %rbx, %r15
xorl %r12d, %r12d
movl (%r15), %eax
movsbq %al, %rcx
cmpq %rcx, %r12
jge 0x3937e
movq 0x18(%r15,%r12,8), %rdi
cmpw $0x100, %ax             # imm = 0x100
jb 0x39371
testq %rdi, %rdi
je 0x39379
callq 0x39213
movq %rax, %r14
incq %r12
jmp 0x39355
movq 0x10(%r15), %r15
cmpq %rbx, %r15
jne 0x39352
jmp 0x3996b
leaq 0x8341(%rip), %rdi      # 0x416d4
callq 0xe0b0
jmp 0x39968
movq 0x18(%r12), %rdi
testq %rdi, %rdi
je 0x39756
callq 0x39a55
movl 0x20(%rax), %esi
leaq 0xea00(%rip), %rdi      # 0x47dba
xorl %r14d, %r14d
xorl %eax, %eax
callq 0xe110
jmp 0x3996b
movq 0x10(%r12), %rdi
callq 0x39a55
movq 0x10(%r12), %rcx
movq 0x10(%rcx), %rdx
leaq 0x2a3ed(%rip), %rsi     # 0x637d0
leaq 0xebe9(%rip), %rcx      # 0x47fd3
movq %rax, %rdi
callq 0x3aa06
movq 0x28(%r12), %rax
movq 0x98(%rax), %rax
testq %rax, %rax
je 0x396ee
movq %r12, 0x18(%rsp)
movq %r13, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
leaq 0xebec(%rip), %rdx      # 0x4800d
leaq 0x2a3a8(%rip), %r13     # 0x637d0
movq %rax, %rsi
movq %rax, 0x20(%rsp)
xorl %ebp, %ebp
movq %rsi, (%rsp)
movl (%rsi), %eax
movsbq %al, %rcx
cmpq %rcx, %rbp
jge 0x39570
movq 0x18(%rsi,%rbp,8), %r14
cmpw $0x100, %ax             # imm = 0x100
jb 0x39459
testq %r14, %r14
je 0x39568
movq 0x90(%r14), %rax
movq 0x10(%rax), %rbx
testq %rbx, %rbx
je 0x3953c
movq %rdx, %r12
movq 0x18(%rax), %r15
movq 0x20(%rbx), %rdi
callq 0x3b089
cmpb $0x1, (%rbx)
jne 0x399f8
movq %r12, %rbx
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %r12
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x3a954
testq %r15, %r15
je 0x39543
pushq $0x5
popq %rdi
callq 0x3a92f
orb $0x2, 0x8(%rax)
movq %rbx, %r13
movl 0x57526(%rip), %ebx     # 0x909e0
incl %ebx
movl %ebx, 0x5751e(%rip)     # 0x909e0
movl %ebx, 0x20(%rax)
leaq 0xeb49(%rip), %rdi      # 0x48015
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a954
movq 0x20(%r15), %rdi
callq 0x3b089
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x3a954
pushq $0x5
popq %rdi
callq 0x3a92f
orb $0x2, 0x8(%rax)
movl %ebx, 0x20(%rax)
leaq 0xeb11(%rip), %rdi      # 0x48018
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a954
movq %r14, %rdi
callq 0x3a9f0
leaq 0x9407(%rip), %rdi      # 0x42929
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a954
movl %ebx, %edi
xorl %esi, %esi
callq 0x3acce
movq %r13, %rdx
jmp 0x39561
movq %r14, 0x10(%rsp)
jmp 0x39568
movq %r14, %rdi
callq 0x3a9f0
leaq 0xeac0(%rip), %rdi      # 0x48012
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a954
movq %rbx, %rdx
movq %r12, %r13
movq (%rsp), %rsi
incq %rbp
jmp 0x39436
movq 0x10(%rsi), %rsi
movq 0x20(%rsp), %rax
cmpq %rax, %rsi
jne 0x39430
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
movq 0x8(%rsp), %r13
movq 0x18(%rsp), %r12
je 0x396ee
callq 0x3a9f0
leaq 0x9383(%rip), %rdi      # 0x42929
leaq 0x7efc(%rip), %rcx      # 0x414a9
xorl %ebx, %ebx
jmp 0x39719
movq %r13, 0x8(%rsp)
movq 0x28(%r12), %rbx
movq 0x30(%r12), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%r12), %rax
movq %rax, 0x20(%rsp)
movq 0x40(%r12), %rax
movq %rax, 0x10(%rsp)
movq 0x48(%r12), %rbp
movl 0x573f8(%rip), %r13d    # 0x909e0
leal 0x1(%r13), %r14d
addl $0x2, %r13d
movl %r13d, 0x573e9(%rip)    # 0x909e0
movq 0x573da(%rip), %r15     # 0x909d8
pushq $0x10
popq %rdi
callq 0xe230
movl %r13d, (%rax)
movl %r14d, (%rsp)
movl %r14d, 0x4(%rax)
movq %rbp, %r14
movq 0x20(%r15), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x20(%r15)
movq %r12, %r15
movq 0x20(%r12), %rdi
callq 0x3a888
movq %rbx, %rdi
callq 0x39213
testq %rbp, %rbp
je 0x3964b
cmpb $0x1, (%r14)
jne 0x3964b
cmpq $0x0, 0x20(%r14)
je 0x399b5
movl 0x5738e(%rip), %r12d    # 0x909e0
incl %r12d
movl %r12d, 0x57384(%rip)    # 0x909e0
leaq 0xe790(%rip), %rsi      # 0x47df3
movl %r12d, %edi
callq 0x3acce
movb $0x1, %bpl
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x39821
cmpb $0x1, (%rax)
jne 0x397b9
cmpq $0x0, 0x20(%rax)
jne 0x39821
pushq $0x5
popq %rdi
callq 0x3a92f
movl (%rsp), %ecx
movl %ecx, 0x20(%rax)
movq $0x2, 0x8(%rax)
leaq 0x927c(%rip), %rdi      # 0x42929
leaq 0xe71b(%rip), %rcx      # 0x47dcf
xorl %ebp, %ebp
movq %rax, %rsi
xorl %edx, %edx
jmp 0x3981c
xorl %r14d, %r14d
pushq $0x5
popq %rdi
callq 0x3a92f
orb $0x2, 0x8(%rax)
movl 0x34(%r15), %ecx
movl %ecx, 0x20(%rax)
leaq 0x924c(%rip), %rdi      # 0x42929
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a954
jmp 0x3996b
pushq $0x5
popq %rdi
callq 0x3a92f
orb $0x2, 0x8(%rax)
movl 0x572e0(%rip), %ebx     # 0x909e0
incl %ebx
movl %ebx, 0x572d8(%rip)     # 0x909e0
movl %ebx, 0x20(%rax)
leaq 0x9217(%rip), %rdi      # 0x42929
leaq 0xe902(%rip), %rcx      # 0x4801b
movq %rax, %rsi
xorl %edx, %edx
callq 0x3a954
movq 0x18(%r12), %rdi
callq 0x39213
movq 0x20(%r12), %rdi
testb $0x2, 0x2(%rdi)
je 0x3973d
callq 0x3b051
testl %ebx, %ebx
je 0x39968
xorl %r14d, %r14d
movl %ebx, %edi
xorl %esi, %esi
callq 0x3acce
jmp 0x3996b
movq 0x10(%r12), %rax
movq 0x18(%rax), %rdi
callq 0x202b9
leaq 0x48b3(%rip), %rdi      # 0x3e01e
movq %rax, %rsi
callq 0xe1f0
testl %eax, %eax
je 0x39984
movq 0x10(%r12), %rax
movq 0x18(%rax), %rdi
callq 0x202b9
leaq 0x4894(%rip), %rdi      # 0x3e024
movq %rax, %rsi
callq 0xe1f0
testl %eax, %eax
je 0x399bd
movq 0x10(%r12), %rdi
callq 0x3a9f0
leaq 0x9178(%rip), %rdi      # 0x42929
xorl %r14d, %r14d
jmp 0x396dd
movq %rax, %rbp
pushq $0x5
popq %rdi
callq 0x3a92f
movq %rax, %rbx
movl (%rsp), %eax
movl %eax, 0x20(%rbx)
movq $0x2, 0x8(%rbx)
movq %rbp, %rdi
callq 0x39a55
leaq 0x29fec(%rip), %rbp     # 0x637d0
leaq 0xe843(%rip), %rcx      # 0x4802e
movq %rax, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x3aa06
leaq 0xe711(%rip), %rdi      # 0x47f10
movq %rbp, %rsi
movq %rbp, %rdx
xorl %ebp, %ebp
xorl %ecx, %ecx
callq 0x3a954
leaq 0xe700(%rip), %rdi      # 0x47f15
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a954
movq 0x20(%rsp), %rdi
callq 0x39213
movq 0x18(%r15), %rax
testb $0x2, 0x2(%rax)
je 0x39844
leaq 0xe805(%rip), %rsi      # 0x48041
movl %r13d, %edi
callq 0x3acce
movq 0x10(%rsp), %rdi
callq 0x39213
testq %r14, %r14
je 0x39895
cmpb $0x1, (%r14)
movq 0x8(%rsp), %r13
jne 0x398c8
cmpq $0x0, 0x20(%r14)
je 0x39929
pushq $0x5
popq %rdi
callq 0x3a92f
movl %r12d, 0x20(%rax)
movq $0x2, 0x8(%rax)
leaq 0x90a5(%rip), %rdi      # 0x42929
leaq 0xe562(%rip), %rcx      # 0x47ded
movq %rax, %rsi
xorl %edx, %edx
jmp 0x39924
pushq $0x5
popq %rdi
callq 0x3a92f
movl %r12d, 0x20(%rax)
movq $0x2, 0x8(%rax)
leaq 0x9079(%rip), %rdi      # 0x42929
leaq 0xe536(%rip), %rcx      # 0x47ded
movq %rax, %rsi
xorl %edx, %edx
callq 0x3a954
movq 0x8(%rsp), %r13
jmp 0x39929
pushq $0x5
popq %rdi
callq 0x3a92f
movq %rax, %rbx
movl %r12d, 0x20(%rax)
movq $0x2, 0x8(%rax)
movq %r14, %rdi
callq 0x39a55
leaq 0x29ee2(%rip), %r14     # 0x637d0
leaq 0xe760(%rip), %rcx      # 0x48055
movq %rax, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3aa06
leaq 0xe607(%rip), %rdi      # 0x47f10
movq %r14, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x3a954
leaq 0xe74c(%rip), %rdi      # 0x48069
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3a954
testb %bpl, %bpl
je 0x39938
movq 0x10(%r15), %rax
testb $0x2, 0x2(%rax)
je 0x39947
leaq 0xe496(%rip), %rsi      # 0x47dd5
movl (%rsp), %edi
callq 0x3acce
movq 0x5708a(%rip), %rax     # 0x909d8
movq 0x20(%rax), %rdi
testq %rdi, %rdi
je 0x39a17
movq 0x8(%rdi), %rcx
movq %rcx, 0x20(%rax)
callq 0xe030
xorl %r14d, %r14d
xorl %eax, %eax
testb $0x1, %r13b
cmoveq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x5
popq %rdi
callq 0x3a92f
movq 0x57045(%rip), %rcx     # 0x909d8
movq 0x20(%rcx), %rcx
movl 0x4(%rcx), %ecx
movl %ecx, 0x20(%rax)
movq $0x2, 0x8(%rax)
leaq 0x8f7d(%rip), %rdi      # 0x42929
leaq 0xe413(%rip), %rcx      # 0x47dc6
jmp 0x399eb
xorl %r12d, %r12d
jmp 0x3966b
pushq $0x5
popq %rdi
callq 0x3a92f
movq 0x5700c(%rip), %rcx     # 0x909d8
movq 0x20(%rcx), %rcx
movl (%rcx), %ecx
movl %ecx, 0x20(%rax)
movq $0x2, 0x8(%rax)
leaq 0x8f45(%rip), %rdi      # 0x42929
leaq 0xe3f6(%rip), %rcx      # 0x47de1
xorl %r14d, %r14d
movq %rax, %rsi
xorl %edx, %edx
jmp 0x396e4
leaq 0xe2ff(%rip), %rdi      # 0x47cfe
leaq 0xe20e(%rip), %rsi      # 0x47c14
leaq 0xe5d1(%rip), %rcx      # 0x47fde
movl $0x6ca, %edx            # imm = 0x6CA
callq 0xe140
leaq 0xe64f(%rip), %rdi      # 0x4806d
leaq 0xe1ef(%rip), %rsi      # 0x47c14
leaq 0xe657(%rip), %rcx      # 0x48083
movl $0x766, %edx            # imm = 0x766
callq 0xe140
leaq 0xe3bf(%rip), %rdi      # 0x47dfc
leaq 0xe1d0(%rip), %rsi      # 0x47c14
leaq 0xe3bd(%rip), %rcx      # 0x47e08
movl $0x606, %edx            # imm = 0x606
callq 0xe140