// File: /workspace/github_c_makefile_star2_O1/ccxvii[P]mujs/./jsrun.c
// Function: js_call
void js_call(js_State *J, int n)
{
	js_Object *obj;
	int savebot;

	if (n < 0)
		js_rangeerror(J, "number of arguments cannot be negative");

	if (!js_iscallable(J, -n-2))
		js_typeerror(J, "%s is not callable", js_typeof(J, -n-2));

	obj = js_toobject(J, -n-2);

	savebot = BOT;
	BOT = TOP - n - 1;

	if (obj->type == JS_CFUNCTION) {
		jsR_pushtrace(J, obj->u.f.function->name, obj->u.f.function->filename, obj->u.f.function->line);
		if (obj->u.f.function->lightweight)
			jsR_calllwfunction(J, n, obj->u.f.function, obj->u.f.scope);
		else
			jsR_callfunction(J, n, obj->u.f.function, obj->u.f.scope);
		--J->tracetop;
	} else if (obj->type == JS_CSCRIPT) {
		jsR_pushtrace(J, obj->u.f.function->name, obj->u.f.function->filename, obj->u.f.function->line);
		jsR_callscript(J, n, obj->u.f.function, obj->u.f.scope);
		--J->tracetop;
	} else if (obj->type == JS_CCFUNCTION) {
		jsR_pushtrace(J, obj->u.c.name, "native", 0);
		jsR_callcfunction(J, n, obj->u.c.length, obj->u.c.function);
		--J->tracetop;
	}

	BOT = savebot;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
js 0x17138
movl %esi, %ebp
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
subl %esi, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x14e17
movq %rbx, %rdi
movl %r14d, %esi
testl %eax, %eax
je 0x17149
callq 0x11c37
movq %rax, %r12
movl %ebp, %eax
notl %eax
addl 0x140(%rbx), %eax
movl 0x144(%rbx), %r13d
movl %eax, 0x144(%rbx)
movl (%r12), %eax
cmpl $0x4, %eax
je 0x16df9
cmpl $0x3, %eax
je 0x16d16
cmpl $0x2, %eax
jne 0x1710b
movq 0x20(%r12), %rax
movq (%rax), %rsi
movq 0x50(%rax), %rdx
movl 0x58(%rax), %ecx
movq %rbx, %rdi
callq 0x17162
movq 0x20(%r12), %r14
movq 0x28(%r12), %r15
cmpl $0x0, 0xc(%r14)
je 0x16e28
movq %rbx, %rdi
movq %r15, %rsi
callq 0x27427
movl 0x18(%r14), %eax
movl %eax, %ecx
subl %ebp, %ecx
jge 0x16d0b
addl 0x140(%rbx), %ecx
movl %ecx, 0x140(%rbx)
movl 0x144(%rbx), %edx
movl %eax, %ebp
cmpl %edx, %ecx
jge 0x16d0b
movl %edx, 0x140(%rbx)
jmp 0x17127
movq %rbx, %rdi
callq 0x89b6
incl %ebp
cmpl 0x4c(%r14), %ebp
jl 0x16d01
jmp 0x17090
movq 0x20(%r12), %rax
movq (%rax), %rsi
movq 0x50(%rax), %rdx
movl 0x58(%rax), %ecx
movq %rbx, %rdi
callq 0x17162
movq 0x20(%r12), %r15
movq 0x28(%r12), %r14
testq %r14, %r14
je 0x16d47
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27427
movl 0x140(%rbx), %ecx
movl 0x144(%rbx), %eax
subl %ebp, %ecx
movl %ecx, 0x140(%rbx)
cmpl %eax, %ecx
jl 0x17121
cmpl $0x0, 0x4c(%r15)
jle 0x16dc7
xorl %r12d, %r12d
movq 0x40(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
callq 0x28ef2
testl %eax, %eax
jne 0x16dbb
movq %rbx, %rdi
callq 0x89b6
movq 0x40(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2920a
movl 0x140(%rbx), %ecx
movl 0x144(%rbx), %eax
leal -0x1(%rcx), %edx
movl %edx, 0x140(%rbx)
cmpl %eax, %ecx
jle 0x17121
incq %r12
movslq 0x4c(%r15), %rax
cmpq %rax, %r12
jl 0x16d6d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x27496
movslq 0x140(%rbx), %rax
testq %rax, %rax
jle 0x16fed
movq 0x148(%rbx), %rcx
shlq $0x4, %rax
addq %rcx, %rax
addq $-0x10, %rax
jmp 0x16ff4
movq 0x20(%r12), %rsi
leaq 0x1c9f6(%rip), %rdx     # 0x337fb
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x17162
movl 0x38(%r12), %edx
movq 0x28(%r12), %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x171a4
jmp 0x17105
movq %rbx, %rdi
movl $0x68, %esi
callq 0xe119
movq %rax, %r12
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movupd %xmm0, 0x10(%rax)
movupd %xmm0, 0x20(%rax)
movupd %xmm0, 0x30(%rax)
movupd %xmm0, 0x40(%rax)
movupd %xmm0, 0x50(%rax)
xorl %ecx, %ecx
movq %rcx, 0x60(%rax)
movq 0x170(%rbx), %rax
movq %rax, 0x50(%r12)
movq %r12, 0x170(%rbx)
incl 0x154(%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, (%r12)
leaq 0x2952b(%rip), %rax     # 0x403b8
movq %rax, 0x8(%r12)
movq %rcx, 0x18(%r12)
movq %rbx, %rdi
movl $0x20, %esi
callq 0xe119
movl $0x0, 0x18(%rax)
movq 0x160(%rbx), %rcx
movq %rcx, 0x10(%rax)
movq %rax, 0x160(%rbx)
incl 0x154(%rbx)
movq %r15, (%rax)
movq %r12, 0x8(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x27427
cmpl $0x0, 0x14(%r14)
je 0x16fad
movl %r13d, 0x4(%rsp)
movq %rbx, %rdi
callq 0x1a4ab
cmpl $0x0, 0x34(%rbx)
jne 0x16f14
movq %rbx, %rdi
callq 0x14b59
leaq 0x1e20f(%rip), %rdx     # 0x35111
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x2, %ecx
callq 0x66df
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movq %rbx, %rdi
callq 0x4184
leaq 0x1c827(%rip), %rdx     # 0x33751
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x2, %ecx
callq 0x66df
testl %ebp, %ebp
je 0x16f77
cmpl $0x2, %ebp
movl $0x1, %r13d
cmovgel %ebp, %r13d
xorl %r15d, %r15d
leal 0x1(%r15), %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x14073
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r15d, %edx
callq 0x1393c
movl %r12d, %r15d
cmpl %r12d, %r13d
jne 0x16f50
leaq 0x1cf16(%rip), %rsi     # 0x33e94
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2920a
movl 0x140(%rbx), %ecx
movl 0x144(%rbx), %eax
leal -0x1(%rcx), %edx
movl %edx, 0x140(%rbx)
cmpl %eax, %ecx
movl 0x4(%rsp), %r13d
jle 0x17121
testl %ebp, %ebp
movl $0x0, %r12d
je 0x17028
cmpl $0x2, %ebp
movl $0x1, %r12d
cmovgel %ebp, %r12d
xorl %r15d, %r15d
movslq 0x18(%r14), %rax
cmpq %rax, %r15
jge 0x17025
movq 0x40(%r14), %rax
movq (%rax,%r15,8), %rsi
incq %r15
movq %rbx, %rdi
movl %r15d, %edx
callq 0x2920a
cmpq %r15, %r12
jne 0x16fc7
jmp 0x17028
leaq 0x29404(%rip), %rax     # 0x403f8
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movl 0x144(%rbx), %eax
decl %eax
movl %eax, 0x144(%rbx)
movl %eax, 0x140(%rbx)
movq %rbx, %rdi
callq 0x14a7d
testq %r14, %r14
jne 0x170e5
jmp 0x17105
movl %r15d, %r12d
movl 0x140(%rbx), %ecx
movl 0x144(%rbx), %eax
subl %ebp, %ecx
movl %ecx, 0x140(%rbx)
cmpl %eax, %ecx
jl 0x17121
cmpl 0x4c(%r14), %r12d
jge 0x17090
movl %r12d, %r15d
movq %rbx, %rdi
callq 0x89b6
movq 0x40(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2920a
movl 0x140(%rbx), %ecx
movl 0x144(%rbx), %eax
leal -0x1(%rcx), %edx
movl %edx, 0x140(%rbx)
cmpl %eax, %ecx
jle 0x17121
incq %r15
cmpl %r15d, 0x4c(%r14)
jg 0x1704d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27496
movl 0x140(%rbx), %eax
testl %eax, %eax
jle 0x170bb
movq 0x148(%rbx), %rcx
movl %eax, %eax
shlq $0x4, %rax
addq %rcx, %rax
addq $-0x10, %rax
jmp 0x170c2
leaq 0x29336(%rip), %rax     # 0x403f8
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movl 0x144(%rbx), %eax
decl %eax
movl %eax, 0x144(%rbx)
movl %eax, 0x140(%rbx)
movq %rbx, %rdi
callq 0x14a7d
movslq 0x188(%rbx), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0x188(%rbx)
movq 0x188(%rbx,%rax,8), %rax
movq %rax, 0x130(%rbx)
decl 0x2190(%rbx)
movl %r13d, 0x144(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, 0x140(%rbx)
leaq 0x1c640(%rip), %rsi     # 0x3376e
movq %rbx, %rdi
xorl %eax, %eax
callq 0xc939
leaq 0x1c682(%rip), %rsi     # 0x337c1
movq %rbx, %rdi
xorl %eax, %eax
callq 0xcab5
callq 0x14f7f
leaq 0x1c693(%rip), %rsi     # 0x337e8
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xcce3