// File: /workspace/github_c_makefile_star2_O3/ArtifexSoftware[P]mujs/./jscompile.c
// Function: cfunbody
static void cfunbody(JF, js_Ast *name, js_Ast *params, js_Ast *body, int is_fun_exp)
{
	F->lightweight = 1;
	F->arguments = 0;

	if (F->script)
		F->lightweight = 0;

	/* Check if first statement is 'use strict': */
	if (body && body->type == AST_LIST && body->a && body->a->type == EXP_STRING)
		if (!strcmp(body->a->string, "use strict"))
			F->strict = 1;

	F->lastline = F->line;

	cparams(J, F, params, name);

	if (body) {
		cvardecs(J, F, body);
		cfundecs(J, F, body);
	}

	if (name) {
		checkfutureword(J, F, name);
		if (is_fun_exp) {
			if (findlocal(J, F, name->string) < 0) {
				/* TODO: make this binding immutable! */
				emit(J, F, OP_CURRENT);
				emit(J, F, OP_SETLOCAL);
				emitarg(J, F, addlocal(J, F, name, 1));
				emit(J, F, OP_POP);
			}
		}
	}

	if (F->script) {
		emit(J, F, OP_UNDEF);
		cstmlist(J, F, body);
		emit(J, F, OP_RETURN);
	} else {
		cstmlist(J, F, body);
		emit(J, F, OP_UNDEF);
		emit(J, F, OP_RETURN);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movq %r8, %r15
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, 0xc(%rsi)
movl $0x0, 0x14(%rsi)
cmpl $0x0, 0x8(%rsi)
je 0x1d049
movl $0x0, 0xc(%rbx)
testq %r15, %r15
je 0x1d130
cmpl $0x0, (%r15)
je 0x1d28e
movl 0x58(%rbx), %eax
movl %eax, 0x5c(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1d2c8
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x1d326
movq %r15, %r13
movq 0x10(%r13), %rbp
cmpl $0x1, (%rbp)
jne 0x1d121
movl 0x4(%rbp), %esi
movl %esi, 0x5c(%rbx)
movq 0x10(%rbp), %rdx
movq 0x18(%rbp), %rcx
movq 0x20(%rbp), %r8
movl 0x10(%rbx), %eax
movq %r14, %rdi
xorl %r9d, %r9d
pushq $0x0
pushq %rax
callq 0x8eff
addq $0x10, %rsp
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x1d64d
movl 0x4(%rbp), %edx
movl %edx, 0x5c(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d6ca
movq %r14, %rdi
movq %rbx, %rsi
movl $0x14, %edx
callq 0x1d6ca
movq 0x10(%rbp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
callq 0x1d4cd
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x1d6ca
movl 0x5c(%rbx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d6ca
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1d6ca
movq 0x18(%r13), %r13
testq %r13, %r13
jne 0x1d081
jmp 0x1d144
movl 0x58(%rbx), %eax
movl %eax, 0x5c(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x1d2c8
testq %r12, %r12
je 0x1d1ee
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1d3df
cmpl $0x0, 0x4(%rsp)
je 0x1d1ee
movq 0x38(%r12), %rsi
movq %rbx, %rdi
callq 0x1d458
testl %eax, %eax
jns 0x1d1ee
movl 0x5c(%rbx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d6ca
movq %r14, %rdi
movq %rbx, %rsi
movl $0x12, %edx
callq 0x1d6ca
movl 0x5c(%rbx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d6ca
movq %r14, %rdi
movq %rbx, %rsi
movl $0x14, %edx
callq 0x1d6ca
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x1d4cd
movq %r14, %rdi
movq %rbx, %rsi
movl %eax, %edx
callq 0x1d6ca
movl 0x5c(%rbx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d6ca
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1d6ca
cmpl $0x0, 0x8(%rbx)
je 0x1d23f
movl 0x5c(%rbx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d6ca
movq %r14, %rdi
movq %rbx, %rsi
movl $0xd, %edx
callq 0x1d6ca
testq %r15, %r15
je 0x1d262
movq 0x10(%r15), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d733
movq 0x18(%r15), %r15
jmp 0x1d212
movq 0x10(%r15), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d733
movq 0x18(%r15), %r15
testq %r15, %r15
jne 0x1d22c
movl 0x5c(%rbx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d6ca
movq %r14, %rdi
movq %rbx, %rsi
movl $0xd, %edx
callq 0x1d6ca
movl 0x5c(%rbx), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1d6ca
movq %r14, %rdi
movq %rbx, %rsi
movl $0x54, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1d6ca
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x1d05c
cmpl $0x5, (%rax)
jne 0x1d05c
movq 0x38(%rax), %rdi
leaq 0x16b2b(%rip), %rsi     # 0x33dda
callq 0x32f0
testl %eax, %eax
jne 0x1d05c
movl $0x1, 0x10(%rbx)
jmp 0x1d05c