// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/dissect.c
// Function: do_statement
static struct symbol *do_statement(usage_t mode, struct statement *stmt)
{
	struct symbol *ret = &void_ctype;

	if (stmt) switch (stmt->type) {
	default:
		warning(stmt->pos, "bad stmt->type: %d", stmt->type);

	case STMT_NONE:
	case STMT_RANGE:
	case STMT_CONTEXT:

	break; case STMT_DECLARATION:
		do_sym_list(stmt->declaration);

	break; case STMT_EXPRESSION:
		ret = do_expression(mode, stmt->expression);

	break; case STMT_RETURN: {
		struct symbol *type = dissect_ctx->ctype.base_type;
		do_expression(u_lval(base_type(type)), stmt->expression);
	}

	break; case STMT_ASM:
		do_expression(U_R_VAL, stmt->asm_string);
		do_asm_xputs(U_W_VAL, stmt->asm_outputs);
		do_asm_xputs(U_R_VAL, stmt->asm_inputs);

	break; case STMT_COMPOUND: {
		int count;

		count = statement_list_size(stmt->stmts);
		DO_LIST(stmt->stmts, st,
			ret = do_statement(--count ? U_VOID : mode, st));
	}

	break; case STMT_ITERATOR:
		do_sym_list(stmt->iterator_syms);
		do_statement(U_VOID, stmt->iterator_pre_statement);
		do_expression(U_R_VAL, stmt->iterator_pre_condition);
		do_statement(U_VOID, stmt->iterator_post_statement);
		do_statement(U_VOID, stmt->iterator_statement);
		do_expression(U_R_VAL, stmt->iterator_post_condition);

	break; case STMT_IF:
		do_expression(U_R_VAL, stmt->if_conditional);
		do_statement(U_VOID, stmt->if_true);
		do_statement(U_VOID, stmt->if_false);

	break; case STMT_SWITCH:
		do_expression(U_R_VAL, stmt->switch_expression);
		do_statement(U_VOID, stmt->switch_statement);

	break; case STMT_CASE:
		do_expression(U_R_VAL, stmt->case_expression);
		do_expression(U_R_VAL, stmt->case_to);
		do_statement(U_VOID, stmt->case_statement);

	break; case STMT_GOTO:
		do_expression(U_R_PTR, stmt->goto_expression);

	break; case STMT_LABEL:
		do_statement(mode, stmt->label_statement);

	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x5e94b(%rip), %r15     # 0x71460
testq %rsi, %rsi
je 0x12d3f
movq %rsi, %rbx
movl %edi, %ebp
xorl %r12d, %r12d
leaq 0x329df(%rip), %r14     # 0x4550c
movl (%rbx), %edx
cmpl $0x9, %edx
jne 0x12b45
movq 0x20(%rbx), %rbx
movb $0x1, %r12b
testq %rbx, %rbx
jne 0x12b2d
jmp 0x12d3f
cmpl $0xd, %edx
ja 0x12d06
movl %edx, %eax
movslq (%r14,%rax,4), %rax
addq %r14, %rax
jmpq *%rax
movq 0x10(%rbx), %rsi
movl $0x4, %edi
callq 0x1230d
movq 0x18(%rbx), %rsi
xorl %edi, %edi
callq 0x12b03
jmp 0x12b90
movq 0x10(%rbx), %rsi
movl $0x4, %edi
callq 0x1230d
movq 0x18(%rbx), %rsi
movl $0x4, %edi
callq 0x1230d
movl $0x20, %eax
jmp 0x12baa
movq 0x10(%rbx), %rsi
movl $0x4, %edi
callq 0x1230d
movl $0x18, %eax
movq (%rbx,%rax), %rbx
xorl %ebp, %ebp
jmp 0x12b38
movq 0x20(%rbx), %rdi
callq 0x1200e
movq 0x28(%rbx), %rsi
xorl %edi, %edi
callq 0x12b03
movq 0x30(%rbx), %rsi
movl $0x4, %edi
callq 0x1230d
movq 0x40(%rbx), %rsi
xorl %edi, %edi
callq 0x12b03
movq 0x38(%rbx), %rsi
xorl %edi, %edi
callq 0x12b03
movq 0x48(%rbx), %rsi
movl $0x4, %edi
callq 0x1230d
jmp 0x12d3f
movq 0x18(%rbx), %rsi
movl $0x400, %edi            # imm = 0x400
jmp 0x12d36
movq 0x10(%rbx), %rdi
callq 0x1dd94
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
je 0x12c7a
movl %eax, %r14d
leaq 0x5e839(%rip), %rax     # 0x71460
movq %rbx, %r13
movzwl (%r13), %ecx
testb %cl, %cl
jle 0x12c6f
xorl %r15d, %r15d
movq 0x18(%r13,%r15,8), %rsi
movzwl %cx, %edx
cmpl $0x100, %edx            # imm = 0x100
jb 0x12c4b
testq %rsi, %rsi
je 0x12c60
decl %r14d
movl $0x0, %edi
cmovel %ebp, %edi
callq 0x12b03
movzwl (%r13), %ecx
incq %r15
movzwl %cx, %edx
movsbq %dl, %rdx
cmpq %rdx, %r15
jl 0x12c36
movq 0x10(%r13), %r13
cmpq %rbx, %r13
jne 0x12c2a
jmp 0x12c81
leaq 0x5e7df(%rip), %rax     # 0x71460
testb $0x1, %r12b
leaq 0x5e7d4(%rip), %r15     # 0x71460
jne 0x12d3f
jmp 0x12d42
movq 0x10(%rbx), %rsi
movl $0x4, %edi
callq 0x1230d
movq 0x18(%rbx), %rsi
movl $0x8, %edi
callq 0x1308e
movq 0x20(%rbx), %rsi
movl $0x4, %edi
callq 0x1308e
jmp 0x12d3b
movq 0x10(%rbx), %rsi
movl %ebp, %edi
callq 0x1230d
testb $0x1, %r12b
jne 0x12d3f
jmp 0x12d42
movq 0x10(%rbx), %rdi
callq 0x1200e
jmp 0x12d3b
movq 0x59ee8(%rip), %rax     # 0x6cbd0
movq 0x60(%rax), %rdi
callq 0x12d51
movl $0xfd, %ecx
andl (%rax), %ecx
cmpl $0x4, %ecx
jne 0x12d1a
testb $0x2, 0x69(%rax)
sete %cl
jmp 0x12d1c
movq 0x4(%rbx), %rdi
leaq 0x3286e(%rip), %rsi     # 0x4557f
xorl %eax, %eax
callq 0x13394
jmp 0x12d3b
xorl %ecx, %ecx
cmpq 0x5326d(%rip), %rax     # 0x65f90
movzbl %cl, %eax
leal 0x4(%rax,%rax), %eax
movl $0x6, %edi
cmovnel %eax, %edi
movq 0x10(%rbx), %rsi
callq 0x1230d
testb $0x1, %r12b
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq