// File: /workspace/github_c_makefile_star2_O3/lucvoo[P]sparse-dev/inline.c
// Function: copy_one_statement
static struct statement *copy_one_statement(struct statement *stmt)
{
	if (!stmt)
		return NULL;
	switch(stmt->type) {
	case STMT_NONE:
		break;
	case STMT_DECLARATION: {
		struct symbol *sym;
		struct statement *newstmt = dup_statement(stmt);
		newstmt->declaration = NULL;
		FOR_EACH_PTR(stmt->declaration, sym) {
			struct symbol *newsym = copy_symbol(stmt->pos, sym);
			if (newsym != sym)
				newsym->initializer = copy_expression(sym->initializer);
			add_symbol(&newstmt->declaration, newsym);
		} END_FOR_EACH_PTR(sym);
		stmt = newstmt;
		break;
	}
	case STMT_CONTEXT:
	case STMT_EXPRESSION: {
		struct expression *expr = copy_expression(stmt->expression);
		if (expr == stmt->expression)
			break;
		stmt = dup_statement(stmt);
		stmt->expression = expr;
		break;
	}
	case STMT_RANGE: {
		struct expression *expr = copy_expression(stmt->range_expression);
		if (expr == stmt->expression)
			break;
		stmt = dup_statement(stmt);
		stmt->range_expression = expr;
		break;
	}
	case STMT_COMPOUND: {
		struct statement *new = alloc_statement(stmt->pos, STMT_COMPOUND);
		copy_statement(stmt, new);
		stmt = new;
		break;
	}
	case STMT_IF: {
		struct expression *cond = stmt->if_conditional;
		struct statement *valt = stmt->if_true;
		struct statement *valf = stmt->if_false;

		cond = copy_expression(cond);
		valt = copy_one_statement(valt);
		valf = copy_one_statement(valf);
		if (stmt->if_conditional == cond &&
		    stmt->if_true == valt &&
		    stmt->if_false == valf)
			break;
		stmt = dup_statement(stmt);
		stmt->if_conditional = cond;
		stmt->if_true = valt;
		stmt->if_false = valf;
		break;
	}
	case STMT_RETURN: {
		struct expression *retval = copy_expression(stmt->ret_value);
		struct symbol *sym = copy_symbol(stmt->pos, stmt->ret_target);

		stmt = dup_statement(stmt);
		stmt->ret_value = retval;
		stmt->ret_target = sym;
		break;
	}
	case STMT_CASE: {
		stmt = dup_statement(stmt);
		stmt->case_label = copy_symbol(stmt->pos, stmt->case_label);
		stmt->case_label->stmt = stmt;
		stmt->case_expression = copy_expression(stmt->case_expression);
		stmt->case_to = copy_expression(stmt->case_to);
		stmt->case_statement = copy_one_statement(stmt->case_statement);
		break;
	}
	case STMT_SWITCH: {
		struct symbol *switch_break = copy_symbol(stmt->pos, stmt->switch_break);
		struct symbol *switch_case = copy_symbol(stmt->pos, stmt->switch_case);
		struct expression *expr = copy_expression(stmt->switch_expression);
		struct statement *switch_stmt = copy_one_statement(stmt->switch_statement);

		stmt = dup_statement(stmt);
		switch_case->symbol_list = copy_symbol_list(switch_case->symbol_list);
		stmt->switch_break = switch_break;
		stmt->switch_case = switch_case;
		stmt->switch_expression = expr;
		stmt->switch_statement = switch_stmt;
		break;		
	}
	case STMT_ITERATOR: {
		stmt = dup_statement(stmt);
		stmt->iterator_break = copy_symbol(stmt->pos, stmt->iterator_break);
		stmt->iterator_continue = copy_symbol(stmt->pos, stmt->iterator_continue);
		stmt->iterator_syms = copy_symbol_list(stmt->iterator_syms);

		stmt->iterator_pre_statement = copy_one_statement(stmt->iterator_pre_statement);
		stmt->iterator_pre_condition = copy_expression(stmt->iterator_pre_condition);

		stmt->iterator_statement = copy_one_statement(stmt->iterator_statement);

		stmt->iterator_post_statement = copy_one_statement(stmt->iterator_post_statement);
		stmt->iterator_post_condition = copy_expression(stmt->iterator_post_condition);
		break;
	}
	case STMT_LABEL: {
		stmt = dup_statement(stmt);
		stmt->label_identifier = copy_symbol(stmt->pos, stmt->label_identifier);
		stmt->label_statement = copy_one_statement(stmt->label_statement);
		break;
	}
	case STMT_GOTO: {
		stmt = dup_statement(stmt);
		stmt->goto_label = copy_symbol(stmt->pos, stmt->goto_label);
		stmt->goto_expression = copy_expression(stmt->goto_expression);
		stmt->target_list = copy_symbol_list(stmt->target_list);
		break;
	}
	case STMT_ASM: {
		stmt = dup_statement(stmt);
		stmt->asm_inputs = copy_asm_operands(stmt->asm_inputs);
		stmt->asm_outputs = copy_asm_operands(stmt->asm_outputs);
		/* no need to dup "clobbers", since they are all constant strings */
		break;
	}
	default:
		warning(stmt->pos, "trying to copy statement type %d", stmt->type);
		break;
	}
	return stmt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testq %rdi, %rdi
je 0x10d22
movq %rdi, %rbx
movl (%rdi), %edx
cmpq $0xd, %rdx
ja 0x110fd
leaq 0x2f6cf(%rip), %rax     # 0x403b0
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x10(%rbx), %rdi
callq 0x1115e
cmpq 0x10(%rbx), %rax
je 0x110eb
movq %rax, %r14
movl (%rbx), %esi
movq 0x4(%rbx), %rdi
callq 0x195bf
movl $0xa, %ecx
movq %rbx, %rsi
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, 0x10(%rax)
jmp 0x10ff1
xorl %ebx, %ebx
jmp 0x110eb
movq 0x4(%rbx), %rdi
movl $0x9, %esi
callq 0x195bf
movq %rax, %r14
movl $0xa, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x4(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x11111
movq %rax, 0x10(%r14)
jmp 0x110db
movq 0x4(%rbx), %rdi
movl $0xa, %esi
callq 0x195bf
movq %rax, %r14
movl $0xa, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x4(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x11111
movq %rax, 0x10(%r14)
movq 0x18(%r14), %rdi
callq 0x1115e
movq %rax, 0x18(%r14)
movq 0x20(%r14), %rdi
callq 0x11617
jmp 0x110e4
movq 0x4(%rbx), %rdi
movq 0x20(%rbx), %rsi
callq 0x11111
movq %rax, %r14
movq 0x4(%rbx), %rdi
movq 0x28(%rbx), %rsi
callq 0x11111
movq %rax, %r15
movq 0x10(%rbx), %rdi
callq 0x1115e
movq %rax, %r12
movq 0x18(%rbx), %rdi
callq 0x10cb8
movq %rax, %r13
movl (%rbx), %esi
movq 0x4(%rbx), %rdi
callq 0x195bf
movq %rax, %rbp
movl $0xa, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x98(%r15), %rdi
callq 0x11617
movq %rax, 0x98(%r15)
movq %r14, 0x20(%rbp)
movq %r15, 0x28(%rbp)
movq %r12, 0x10(%rbp)
movq %r13, 0x18(%rbp)
movq %rbp, %rbx
jmp 0x110eb
movq 0x4(%rbx), %rdi
movl $0x1, %esi
callq 0x195bf
movl $0xa, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq $0x0, 0x10(%rax)
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x10ff1
movq %rax, 0x8(%rsp)
movq %rax, %r15
addq $0x10, %r15
movq %rcx, %rbp
movq %rcx, 0x10(%rsp)
movzwl (%rbp), %eax
testb %al, %al
jle 0x10ed3
xorl %r14d, %r14d
movq 0x18(%rbp,%r14,8), %r12
movzwl %ax, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jb 0x10e8d
testq %r12, %r12
je 0x10ec4
movq 0x4(%rbx), %rdi
movq %r12, %rsi
callq 0x11111
movq %rax, %r13
cmpq %r12, %rax
je 0x10eb5
movq 0xb0(%r12), %rdi
callq 0x1115e
movq %rax, 0xb0(%r13)
movq %r15, %rdi
movq %r13, %rsi
callq 0x227b4
movzwl (%rbp), %eax
incq %r14
movzwl %ax, %ecx
movsbq %cl, %rcx
cmpq %rcx, %r14
jl 0x10e78
movq 0x10(%rbp), %rbp
movq 0x10(%rsp), %rcx
cmpq %rcx, %rbp
jne 0x10e6d
movq 0x8(%rsp), %rbx
jmp 0x110eb
movq 0x10(%rbx), %rdi
callq 0x1115e
movq %rax, %r14
movq 0x4(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0x11111
movq %rax, %r15
movl (%rbx), %esi
movq 0x4(%rbx), %rdi
callq 0x195bf
movl $0xa, %ecx
movq %rbx, %rsi
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, 0x10(%rax)
movq %r15, 0x18(%rax)
jmp 0x10ff1
movq 0x4(%rbx), %rdi
movl $0x3, %esi
callq 0x195bf
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x10ad3
jmp 0x110e8
movq 0x4(%rbx), %rdi
movl $0xb, %esi
callq 0x195bf
movq %rax, %r14
movl $0xa, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x20(%rax), %rdi
callq 0x11699
movq %rax, 0x20(%r14)
movq 0x18(%r14), %rdi
callq 0x11699
movq %rax, 0x18(%r14)
jmp 0x110e8
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %r15
movq 0x20(%rbx), %r12
callq 0x1115e
movq %rax, %r14
movq %r15, %rdi
callq 0x10cb8
movq %rax, %r15
movq %r12, %rdi
callq 0x10cb8
movq %rax, %r12
cmpq %r14, 0x10(%rbx)
jne 0x10fcc
cmpq %r15, 0x18(%rbx)
jne 0x10fcc
cmpq %r12, 0x20(%rbx)
je 0x110eb
movl (%rbx), %esi
movq 0x4(%rbx), %rdi
callq 0x195bf
movl $0xa, %ecx
movq %rbx, %rsi
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, 0x10(%rax)
movq %r15, 0x18(%rax)
movq %r12, 0x20(%rax)
movq %rax, %rbx
jmp 0x110eb
movq 0x4(%rbx), %rdi
movl $0x8, %esi
callq 0x195bf
movq %rax, %r14
movl $0xa, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x4(%rax), %rdi
movq 0x10(%rax), %rsi
callq 0x11111
movq %rax, 0x10(%r14)
movq 0x4(%r14), %rdi
movq 0x18(%r14), %rsi
callq 0x11111
movq %rax, 0x18(%r14)
movq 0x20(%r14), %rdi
callq 0x11617
movq %rax, 0x20(%r14)
movq 0x28(%r14), %rdi
callq 0x10cb8
movq %rax, 0x28(%r14)
movq 0x30(%r14), %rdi
callq 0x1115e
movq %rax, 0x30(%r14)
movq 0x38(%r14), %rdi
callq 0x10cb8
movq %rax, 0x38(%r14)
movq 0x40(%r14), %rdi
callq 0x10cb8
movq %rax, 0x40(%r14)
movq 0x48(%r14), %rdi
callq 0x1115e
movq %rax, 0x48(%r14)
jmp 0x110e8
movq 0x4(%rbx), %rdi
movl $0x6, %esi
callq 0x195bf
movq %rax, %r14
movl $0xa, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x4(%rax), %rdi
movq 0x28(%rax), %rsi
callq 0x11111
movq %rax, 0x28(%r14)
movq %r14, 0x90(%rax)
movq 0x10(%r14), %rdi
callq 0x1115e
movq %rax, 0x10(%r14)
movq 0x18(%r14), %rdi
callq 0x1115e
movq %rax, 0x18(%r14)
movq 0x20(%r14), %rdi
callq 0x10cb8
movq %rax, 0x20(%r14)
movq %r14, %rbx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4(%rbx), %rdi
leaq 0x2f384(%rip), %rsi     # 0x4048c
xorl %eax, %eax
callq 0x118fc
jmp 0x110eb