// File: /workspace/github_c_makefile_star2_O1/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 0x10cec
movq %rdi, %rbx
movl (%rdi), %edx
cmpq $0xd, %rdx
ja 0x110b0
leaq 0x30705(%rip), %rax     # 0x413b0
movslq (%rax,%rdx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x10(%rbx), %rdi
callq 0x11111
cmpq 0x10(%rbx), %rax
je 0x1109e
movq %rax, %r14
movl (%rbx), %esi
movq 0x4(%rbx), %rdi
callq 0x19687
movl $0xa, %ecx
movq %rbx, %rsi
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, 0x10(%rax)
jmp 0x10faa
xorl %ebx, %ebx
jmp 0x1109e
movq 0x4(%rbx), %rdi
movl %edx, %esi
callq 0x19687
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 0x110c4
movq %rax, 0x10(%r14)
jmp 0x1108e
movq 0x4(%rbx), %rdi
movl %edx, %esi
callq 0x19687
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 0x110c4
movq %rax, 0x10(%r14)
movq 0x18(%r14), %rdi
callq 0x11111
movq %rax, 0x18(%r14)
movq 0x20(%r14), %rdi
callq 0x115e0
jmp 0x11097
movq 0x4(%rbx), %rdi
movq 0x20(%rbx), %rsi
callq 0x110c4
movq %rax, %r14
movq 0x4(%rbx), %rdi
movq 0x28(%rbx), %rsi
callq 0x110c4
movq %rax, %r15
movq 0x10(%rbx), %rdi
callq 0x11111
movq %rax, %r12
movq 0x18(%rbx), %rdi
callq 0x10c82
movq %rax, %r13
movl (%rbx), %esi
movq 0x4(%rbx), %rdi
callq 0x19687
movq %rax, %rbp
movl $0xa, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x98(%r15), %rdi
callq 0x115e0
movq %rax, 0x98(%r15)
movq %r14, 0x20(%rbp)
movq %r15, 0x28(%rbp)
movq %r12, 0x10(%rbp)
movq %r13, 0x18(%rbp)
movq %rbp, %rbx
jmp 0x1109e
movq 0x4(%rbx), %rdi
movl %edx, %esi
callq 0x19687
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 0x10faa
movq %rax, 0x8(%rsp)
movq %rax, %r15
addq $0x10, %r15
movq %rcx, %rbp
movq %rcx, 0x10(%rsp)
movzwl (%rbp), %eax
testb %al, %al
jle 0x10e8f
xorl %r14d, %r14d
movq 0x18(%rbp,%r14,8), %r12
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x10e4d
testq %r12, %r12
je 0x10e80
movq 0x4(%rbx), %rdi
movq %r12, %rsi
callq 0x110c4
movq %rax, %r13
cmpq %r12, %rax
je 0x10e75
movq 0xb0(%r12), %rdi
callq 0x11111
movq %rax, 0xb0(%r13)
movq %r15, %rdi
movq %r13, %rsi
callq 0x2285b
incq %r14
movl (%rbp), %eax
movsbq %al, %rcx
cmpq %rcx, %r14
jl 0x10e39
movq 0x10(%rbp), %rbp
movq 0x10(%rsp), %rcx
cmpq %rcx, %rbp
jne 0x10e2e
movq 0x8(%rsp), %rbx
jmp 0x1109e
movq 0x10(%rbx), %rdi
callq 0x11111
movq %rax, %r14
movq 0x4(%rbx), %rdi
movq 0x18(%rbx), %rsi
callq 0x110c4
movq %rax, %r15
movl (%rbx), %esi
movq 0x4(%rbx), %rdi
callq 0x19687
movl $0xa, %ecx
movq %rbx, %rsi
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %r14, 0x10(%rax)
movq %r15, 0x18(%rax)
jmp 0x10faa
movq 0x4(%rbx), %rdi
movl $0x3, %esi
callq 0x19687
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x10aa6
jmp 0x1109b
movq 0x4(%rbx), %rdi
movl %edx, %esi
callq 0x19687
movq %rax, %r14
movl $0xa, %ecx
movq %rax, %rdi
movq %rbx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq 0x20(%rax), %rdi
callq 0x11659
movq %rax, 0x20(%r14)
movq 0x18(%r14), %rdi
callq 0x11659
movq %rax, 0x18(%r14)
jmp 0x1109b
movq 0x10(%rbx), %rdi
movq 0x18(%rbx), %r15
movq 0x20(%rbx), %r12
callq 0x11111
movq %rax, %r14
movq %r15, %rdi
callq 0x10c82
movq %rax, %r15
movq %r12, %rdi
callq 0x10c82
movq %rax, %r12
cmpq %r14, 0x10(%rbx)
jne 0x10f85
cmpq %r15, 0x18(%rbx)
jne 0x10f85
cmpq %r12, 0x20(%rbx)
je 0x1109e
movl (%rbx), %esi
movq 0x4(%rbx), %rdi
callq 0x19687
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 0x1109e
movq 0x4(%rbx), %rdi
movl %edx, %esi
callq 0x19687
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 0x110c4
movq %rax, 0x10(%r14)
movq 0x4(%r14), %rdi
movq 0x18(%r14), %rsi
callq 0x110c4
movq %rax, 0x18(%r14)
movq 0x20(%r14), %rdi
callq 0x115e0
movq %rax, 0x20(%r14)
movq 0x28(%r14), %rdi
callq 0x10c82
movq %rax, 0x28(%r14)
movq 0x30(%r14), %rdi
callq 0x11111
movq %rax, 0x30(%r14)
movq 0x38(%r14), %rdi
callq 0x10c82
movq %rax, 0x38(%r14)
movq 0x40(%r14), %rdi
callq 0x10c82
movq %rax, 0x40(%r14)
movq 0x48(%r14), %rdi
callq 0x11111
movq %rax, 0x48(%r14)
jmp 0x1109b
movq 0x4(%rbx), %rdi
movl %edx, %esi
callq 0x19687
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 0x110c4
movq %rax, 0x28(%r14)
movq %r14, 0x90(%rax)
movq 0x10(%r14), %rdi
callq 0x11111
movq %rax, 0x10(%r14)
movq 0x18(%r14), %rdi
callq 0x11111
movq %rax, 0x18(%r14)
movq 0x20(%r14), %rdi
callq 0x10c82
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 0x303d1(%rip), %rsi     # 0x4148c
xorl %eax, %eax
callq 0x118b4
jmp 0x1109e