// File: /workspace/github_c_makefile_star2_O2/lucvoo[P]sparse-dev/parse.c
// Function: parse_function_body
static struct token *parse_function_body(struct token *token, struct symbol *decl,
	struct symbol_list **list)
{
	struct symbol_list **old_symbol_list;
	struct symbol *base_type = decl->ctype.base_type;
	struct statement *stmt, **p;
	struct symbol *prev;
	struct symbol *arg;

	old_symbol_list = function_symbol_list;
	if (decl->ctype.modifiers & MOD_INLINE) {
		function_symbol_list = &decl->inline_symbol_list;
		p = &base_type->inline_stmt;
	} else {
		function_symbol_list = &decl->symbol_list;
		p = &base_type->stmt;
	}
	function_computed_target_list = NULL;
	function_computed_goto_list = NULL;

	if ((decl->ctype.modifiers & (MOD_EXTERN|MOD_INLINE)) == MOD_EXTERN) {
		if (Wexternal_function_has_definition)
			warning(decl->pos, "function '%s' with external linkage has definition", show_ident(decl->ident));
	}
	if (!(decl->ctype.modifiers & MOD_STATIC))
		decl->ctype.modifiers |= MOD_EXTERN;

	stmt = start_function(decl);
	*p = stmt;

	FOR_EACH_PTR (base_type->arguments, arg) {
		declare_argument(arg, base_type);
	} END_FOR_EACH_PTR(arg);

	token = statement_list(token->next, &stmt->stmts);
	end_function(decl);

	if (!(decl->ctype.modifiers & MOD_INLINE))
		add_symbol(list, decl);
	check_declaration(decl);
	decl->definition = decl;
	prev = decl->same_symbol;
	if (prev && prev->definition) {
		warning(decl->pos, "multiple definitions for function '%s'",
			show_ident(decl->ident));
		info(prev->definition->pos, " the previous one is here");
	} else {
		while (prev) {
			rebind_scope(prev, decl->scope);
			prev->definition = decl;
			prev = prev->same_symbol;
		}
	}
	function_symbol_list = old_symbol_list;
	if (function_computed_goto_list) {
		if (!function_computed_target_list)
			warning(decl->pos, "function '%s' has computed goto but no targets?", show_ident(decl->ident));
		else {
			FOR_EACH_PTR(function_computed_goto_list, stmt) {
				stmt->target_list = function_computed_target_list;
			} END_FOR_EACH_PTR(stmt);
		}
	}
	return expect(token, '}', "at end of function");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x10(%rsp)
movq %rsi, %rbx
movq %rdi, 0x20(%rsp)
movq 0x60(%rsi), %r15
movq 0x68(%rsi), %rax
movq 0x47fe0(%rip), %rcx     # 0x60f30
movq %rcx, 0x28(%rsp)
movl %eax, %r13d
andl $0x40, %r13d
shrl $0x2, %r13d
andq $0x0, 0x47fb8(%rip)     # 0x60f20
leaq (%rsi,%r13), %rcx
addq $0x98, %rcx
andq $0x0, 0x47fad(%rip)     # 0x60f28
movq %rcx, 0x47fae(%rip)     # 0x60f30
movl %eax, %ecx
andl $0x48, %ecx
cmpl $0x8, %ecx
jne 0x18fba
leaq 0x41615(%rip), %rcx     # 0x5a5a8
cmpl $0x0, (%rcx)
je 0x18fba
movq 0x18(%rbx), %rdi
callq 0x2936d
movq 0x4(%rbx), %rdi
leaq 0x2567b(%rip), %rsi     # 0x3e627
movq %rax, %rdx
xorl %eax, %eax
callq 0x1108a
movq 0x68(%rbx), %rax
addq $0x90, %r13
testb $0x4, %al
jne 0x18fcd
orq $0x8, %rax
movq %rax, 0x68(%rbx)
movq 0x4(%rbx), %rdi
pushq $0x3
popq %rbp
movl %ebp, %esi
callq 0x17530
movq %rax, %r12
callq 0x2000d
movq 0x4(%rbx), %rdi
movl %ebp, %esi
callq 0x2671f
movq %rax, %r14
movq 0x60(%rbx), %rax
movups 0x60(%rax), %xmm0
movups 0x70(%rax), %xmm1
movups %xmm0, 0x60(%r14)
movups %xmm1, 0x70(%r14)
movq 0x80(%rax), %rax
movq %rax, 0x80(%r14)
movq $-0xc001000, %rax       # imm = 0xF3FFF000
andq 0x68(%r14), %rax
orq $0x3, %rax
movq %rax, 0x68(%r14)
leaq 0x44dc9(%rip), %rsi     # 0x5ddf8
pushq $0x20
popq %rdx
movq %r14, %rdi
callq 0x274ad
movq %r14, 0x18(%r12)
movq %r14, %rdi
callq 0x175a3
leaq 0x70f22(%rip), %rax     # 0x89f70
movq %rbx, 0x30(%rsp)
movq %rbx, (%rax)
movq %r12, 0x18(%rsp)
movq %r12, (%r15,%r13)
movq 0x88(%r15), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x19124
leaq 0x25663(%rip), %r13     # 0x3e6de
leaq 0x4d676(%rip), %rbx     # 0x666f8
pushq $0x10
popq %r14
movq 0x8(%rsp), %r12
xorl %ebp, %ebp
movl (%r12), %eax
movsbq %al, %rcx
cmpq %rcx, %rbp
jge 0x19114
movq 0x18(%r12,%rbp,8), %r15
cmpw $0x100, %ax             # imm = 0x100
jb 0x190aa
testq %r15, %r15
je 0x1910c
movq 0x18(%r15), %rsi
testq %rsi, %rsi
je 0x190fe
cmpq %rbx, 0x60(%r15)
jne 0x190f1
leaq 0x4c678(%rip), %rax     # 0x65738
movq %rax, 0x60(%r15)
leaq 0x414e5(%rip), %rax     # 0x5a5b0
cmpl $0x0, (%rax)
je 0x190f1
movq %rsi, %rdi
callq 0x2936d
movq 0x4(%r15), %rdi
leaq 0x254f1(%rip), %rsi     # 0x3e5d4
movq %rax, %rdx
xorl %eax, %eax
callq 0x1120e
movq 0x18(%r15), %rsi
movq %r15, %rdi
movl %r14d, %edx
callq 0x274ad
jmp 0x1910c
movq 0x4(%r15), %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x1120e
incq %rbp
jmp 0x1908d
movq 0x10(%r12), %r12
cmpq 0x8(%rsp), %r12
jne 0x1908b
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rsp), %rsi
addq $0x10, %rsi
callq 0x180f1
movq %rax, %r15
leaq 0x70e2b(%rip), %rax     # 0x89f70
andq $0x0, (%rax)
callq 0x200d2
movq 0x30(%rsp), %rbx
testb $0x40, 0x68(%rbx)
jne 0x19166
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x1fae9
movq %rbx, %rdi
callq 0x27254
movq %rbx, 0xc8(%rbx)
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x191d8
cmpq $0x0, 0xc8(%r14)
je 0x191d8
movq 0x18(%rbx), %rdi
callq 0x2936d
movq 0x4(%rbx), %rdi
leaq 0x254be(%rip), %rsi     # 0x3e65a
movq %rax, %rdx
xorl %eax, %eax
callq 0x1108a
movq 0xc8(%r14), %rax
movq 0x4(%rax), %rdi
leaq 0x254c9(%rip), %rsi     # 0x3e681
xorl %eax, %eax
callq 0x10ddc
jmp 0x191dd
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x1ff86
movq %rbx, 0xc8(%r14)
movq 0x38(%r14), %r14
testq %r14, %r14
jne 0x191c1
movq 0x28(%rsp), %rax
movq %rax, 0x47d47(%rip)     # 0x60f30
movq 0x47d38(%rip), %rax     # 0x60f28
testq %rax, %rax
je 0x19254
movq 0x47d24(%rip), %rcx     # 0x60f20
testq %rcx, %rcx
je 0x19236
movq %rax, %rdx
xorl %esi, %esi
movl (%rdx), %edi
movsbq %dil, %r8
cmpq %r8, %rsi
jge 0x1922b
movq 0x18(%rdx,%rsi,8), %r8
cmpw $0x100, %di             # imm = 0x100
jb 0x19222
testq %r8, %r8
je 0x19226
movq %rcx, 0x20(%r8)
incq %rsi
jmp 0x19206
movq 0x10(%rdx), %rdx
cmpq %rax, %rdx
jne 0x19204
jmp 0x19254
movq 0x18(%rbx), %rdi
callq 0x2936d
movq 0x4(%rbx), %rdi
leaq 0x25451(%rip), %rsi     # 0x3e69b
movq %rax, %rdx
xorl %eax, %eax
callq 0x1108a
leaq 0x25470(%rip), %rdx     # 0x3e6cb
pushq $0x7d
popq %rsi
movq %r15, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17480