// File: /workspace/github_c_makefile_star2_O3/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, %r15
movq %rdi, 0x20(%rsp)
movq 0x60(%rsi), %r13
movq 0x68(%rsi), %rax
movq 0x4bd46(%rip), %rcx     # 0x66f30
movq %rcx, 0x28(%rsp)
movl %eax, %ebp
andl $0x40, %ebp
shrl $0x2, %ebp
leaq (%rsi,%rbp), %rcx
addq $0x98, %rcx
movq %rcx, 0x4bd27(%rip)     # 0x66f30
xorl %ecx, %ecx
movq %rcx, 0x4bd0e(%rip)     # 0x66f20
movq %rcx, 0x4bd0f(%rip)     # 0x66f28
movl %eax, %ecx
andl $0x48, %ecx
cmpl $0x8, %ecx
jne 0x1b251
leaq 0x4537e(%rip), %rcx     # 0x605a8
cmpl $0x0, (%rcx)
je 0x1b251
movq 0x18(%r15), %rdi
callq 0x2de35
movq 0x4(%r15), %rdi
leaq 0x2a384(%rip), %rsi     # 0x455c7
movq %rax, %rdx
xorl %eax, %eax
callq 0x118fc
movq 0x68(%r15), %rax
testb $0x4, %al
jne 0x1b25d
orq $0x8, %rax
movq %rax, 0x68(%r15)
addq $0x90, %rbp
movq 0x4(%r15), %rbx
xorl %edi, %edi
callq 0x2fa58
movq %rax, %r12
movl $0x3, (%rax)
movq %rbx, 0x4(%rax)
callq 0x22d3b
movq 0x4(%r15), %rdi
movl $0x3, %esi
callq 0x2b00b
movq %rax, %r14
movq 0x60(%r15), %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 0x48b28(%rip), %rsi     # 0x63df8
movq %r14, %rdi
movl $0x20, %edx
callq 0x2beca
movq %r14, 0x18(%r12)
movq 0x4bc47(%rip), %rdi     # 0x66f30
testq %rdi, %rdi
je 0x1b2f6
movq %r14, %rsi
callq 0x227b4
leaq 0x74c73(%rip), %rax     # 0x8ff70
movq %r15, 0x30(%rsp)
movq %r15, (%rax)
movq %r12, 0x18(%rsp)
movq %r12, (%r13,%rbp)
movq 0x88(%r13), %rax
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x1b3e0
leaq 0x2a353(%rip), %r13     # 0x4567e
leaq 0x513c6(%rip), %r12     # 0x6c6f8
leaq 0x45277(%rip), %rbp     # 0x605b0
movq 0x8(%rsp), %r15
movzwl (%r15), %eax
testb %al, %al
jle 0x1b3d1
xorl %ebx, %ebx
movq 0x18(%r15,%rbx,8), %r14
movzwl %ax, %eax
cmpl $0x100, %eax            # imm = 0x100
jb 0x1b360
testq %r14, %r14
je 0x1b3be
movq 0x18(%r14), %rsi
testq %rsi, %rsi
je 0x1b3b0
cmpq %r12, 0x60(%r14)
jne 0x1b3a1
leaq 0x503c2(%rip), %rax     # 0x6b738
movq %rax, 0x60(%r14)
cmpl $0x0, (%rbp)
je 0x1b3a1
movq %rsi, %rdi
callq 0x2de35
movq 0x4(%r14), %rdi
leaq 0x2a1e1(%rip), %rsi     # 0x45574
movq %rax, %rdx
xorl %eax, %eax
callq 0x11a80
movq 0x18(%r14), %rsi
movq %r14, %rdi
movl $0x10, %edx
callq 0x2beca
jmp 0x1b3be
movq 0x4(%r14), %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x11a80
incq %rbx
movl (%r15), %eax
movsbq %al, %rcx
cmpq %rcx, %rbx
jl 0x1b34c
movq 0x10(%r15), %r15
cmpq 0x8(%rsp), %r15
jne 0x1b33e
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rsp), %rsi
addq $0x10, %rsi
callq 0x1a248
movq %rax, %r15
leaq 0x74b6f(%rip), %rax     # 0x8ff70
movq $0x0, (%rax)
callq 0x22e42
movq 0x30(%rsp), %rbx
testb $0x40, 0x68(%rbx)
jne 0x1b425
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x227b4
movq %rbx, %rdi
callq 0x2bc31
movq %rbx, 0xc8(%rbx)
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x1b49c
cmpq $0x0, 0xc8(%r14)
je 0x1b480
movq 0x18(%rbx), %rdi
callq 0x2de35
movq 0x4(%rbx), %rdi
leaq 0x2a19f(%rip), %rsi     # 0x455fa
movq %rax, %rdx
xorl %eax, %eax
callq 0x118fc
movq 0xc8(%r14), %rax
movq 0x4(%rax), %rdi
leaq 0x2a1aa(%rip), %rsi     # 0x45621
xorl %eax, %eax
callq 0x1178c
jmp 0x1b49c
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x22cb2
movq %rbx, 0xc8(%r14)
movq 0x38(%r14), %r14
testq %r14, %r14
jne 0x1b480
movq 0x28(%rsp), %rax
movq %rax, 0x4ba88(%rip)     # 0x66f30
movq 0x4ba79(%rip), %rax     # 0x66f28
testq %rax, %rax
je 0x1b524
movq 0x4ba65(%rip), %rcx     # 0x66f20
testq %rcx, %rcx
je 0x1b506
movq %rax, %rdx
movzwl (%rdx), %esi
testb %sil, %sil
jle 0x1b4fb
xorl %edi, %edi
movq 0x18(%rdx,%rdi,8), %r8
movzwl %si, %r9d
cmpl $0x100, %r9d            # imm = 0x100
jb 0x1b4e4
testq %r8, %r8
je 0x1b4eb
movq %rcx, 0x20(%r8)
movzwl (%rdx), %esi
incq %rdi
movzwl %si, %r8d
movsbq %r8b, %r8
cmpq %r8, %rdi
jl 0x1b4cd
movq 0x10(%rdx), %rdx
cmpq %rax, %rdx
jne 0x1b4c3
jmp 0x1b524
movq 0x18(%rbx), %rdi
callq 0x2de35
movq 0x4(%rbx), %rdi
leaq 0x2a121(%rip), %rsi     # 0x4563b
movq %rax, %rdx
xorl %eax, %eax
callq 0x118fc
leaq 0x2a140(%rip), %rdx     # 0x4566b
movq %r15, %rdi
movl $0x7d, %esi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1950f