// File: /workspace/github_c_makefile_star2_O0/ccxvii[P]mujs/./jsrun.c
// Function: jsR_callfunction
static void jsR_callfunction(js_State *J, int n, js_Function *F, js_Environment *scope)
{
	js_Value v;
	int i;

	scope = jsR_newenvironment(J, jsV_newobject(J, JS_COBJECT, NULL), scope);

	jsR_savescope(J, scope);

	if (F->arguments) {
		js_newarguments(J);
		if (!J->strict) {
			js_currentfunction(J);
			js_defproperty(J, -2, "callee", JS_DONTENUM);
		}
		js_pushnumber(J, n);
		js_defproperty(J, -2, "length", JS_DONTENUM);
		for (i = 0; i < n; ++i) {
			js_copy(J, i + 1);
			js_setindex(J, -2, i);
		}
		js_initvar(J, "arguments", -1);
		js_pop(J, 1);
	}

	for (i = 0; i < n && i < F->numparams; ++i)
		js_initvar(J, F->vartab[i], i + 1);
	js_pop(J, n);

	for (; i < F->varlen; ++i) {
		js_pushundefined(J);
		js_initvar(J, F->vartab[i], -1);
		js_pop(J, 1);
	}

	jsR_run(J, F);
	v = *stackidx(J, -1);
	TOP = --BOT; /* clear stack */
	js_pushvalue(J, v);

	jsR_restorescope(J);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x6bc0
movq -0x40(%rbp), %rdi
movq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0x17e10
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x2dd10
movq -0x18(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0x18368
movq -0x8(%rbp), %rdi
callq 0x1b7e0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x34(%rax)
jne 0x182e3
movq -0x8(%rbp), %rdi
callq 0x14f00
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x254f9(%rip), %rdx     # 0x3d7d2
movl $0x2, %ecx
callq 0x65c0
movq -0x8(%rbp), %rdi
cvtsi2sdl -0xc(%rbp), %xmm0
callq 0x44d0
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
leaq 0x23afb(%rip), %rdx     # 0x3bdfc
movl $0x2, %ecx
callq 0x65c0
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x18345
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %esi
addl $0x1, %esi
callq 0x14410
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %edx
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x13bb0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x18312
movq -0x8(%rbp), %rdi
leaq 0x241ef(%rip), %rsi     # 0x3c53f
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2f7c0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x4400
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x41(%rbp)
jge 0x1838c
movl -0x34(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x18(%rcx), %eax
setl %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0x18395
jmp 0x183bf
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl -0x34(%rbp), %edx
addl $0x1, %edx
callq 0x2f7c0
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x1836f
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x4400
movl -0x34(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x4c(%rcx), %eax
jge 0x18417
movq -0x8(%rbp), %rdi
callq 0x8640
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2f7c0
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x4400
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x183cb
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2dd90
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x15050
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl 0x144(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x144(%rax)
movq -0x8(%rbp), %rax
movl %ecx, 0x140(%rax)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x14d40
movq -0x8(%rbp), %rdi
callq 0x2f400
addq $0x50, %rsp
popq %rbp
retq
nop