// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[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
subq $0x18, %rsp
movq %rdi, %rbx
testl %esi, %esi
js 0x11452
movl %esi, %ebp
pushq $-0x2
popq %r14
subl %esi, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0xf950
movq %rbx, %rdi
movl %r14d, %esi
testl %eax, %eax
je 0x11463
callq 0xd49c
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 0x112ba
cmpl $0x3, %eax
je 0x111c4
cmpl $0x2, %eax
jne 0x112ea
movq 0x20(%r12), %rax
movq (%rax), %rsi
movq 0x50(%rax), %rdx
movl 0x58(%rax), %ecx
movq %rbx, %rdi
callq 0x1147c
movq 0x20(%r12), %r14
movq 0x28(%r12), %r12
cmpl $0x0, 0xc(%r14)
je 0x11300
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1cbbd
movl %ebp, %esi
subl 0x18(%r14), %esi
jle 0x11180
movq %rbx, %rdi
callq 0x3f3d
movl 0x18(%r14), %ebp
jmp 0x11180
movq %rbx, %rdi
callq 0x7336
incl %ebp
cmpl 0x4c(%r14), %ebp
jl 0x11176
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1cbf2
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xf87b
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 0xf74a
jmp 0x11298
movl %r13d, 0xc(%rsp)
movq 0x20(%r12), %rax
movq (%rax), %rsi
movq 0x50(%rax), %rdx
movl 0x58(%rax), %ecx
movq %rbx, %rdi
callq 0x1147c
movq 0x20(%r12), %r15
movq 0x28(%r12), %r14
testq %r14, %r14
je 0x111fa
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1cbbd
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3f3d
xorl %r13d, %r13d
pushq $-0x1
popq %rbp
pushq $0x1
popq %r12
movslq 0x4c(%r15), %rax
cmpq %rax, %r13
jge 0x11255
movq 0x40(%r15), %rax
movq (%rax,%r13,8), %rsi
movq %rbx, %rdi
callq 0x1db27
testl %eax, %eax
jne 0x11250
movq %rbx, %rdi
callq 0x7336
movq 0x40(%r15), %rax
movq (%rax,%r13,8), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x1dd5c
movq %rbx, %rdi
movl %r12d, %esi
callq 0x3f3d
incq %r13
jmp 0x1120e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1cbf2
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xf87b
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 0xf74a
testq %r14, %r14
movl 0xc(%rsp), %r13d
je 0x112e4
movslq 0x188(%rbx), %rax
leaq -0x1(%rax), %rcx
movl %ecx, 0x188(%rbx)
movq 0x188(%rbx,%rax,8), %rax
movq %rax, 0x130(%rbx)
jmp 0x112e4
movq 0x20(%r12), %rsi
leaq 0x17535(%rip), %rdx     # 0x287fb
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x1147c
movl 0x38(%r12), %edx
movq 0x28(%r12), %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x114be
decl 0x2190(%rbx)
movl %r13d, 0x144(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %eax
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x5d6b
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x11070
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1cbbd
cmpl $0x0, 0x14(%r14)
je 0x113d8
movl %r13d, 0xc(%rsp)
movq %rbx, %rdi
callq 0x13831
cmpl $0x0, 0x34(%rbx)
jne 0x11367
movq %rbx, %rdi
callq 0xf80e
leaq 0x18dc3(%rip), %rdx     # 0x2a11c
pushq $-0x2
popq %rsi
pushq $0x2
popq %rcx
movq %rbx, %rdi
callq 0x5963
cvtsi2sd %ebp, %xmm0
movq %rbx, %rdi
callq 0x3f9a
leaq 0x173d7(%rip), %rdx     # 0x28751
pushq $-0x2
popq %r12
pushq $0x2
popq %rcx
movq %rbx, %rdi
movl %r12d, %esi
callq 0x5963
xorl %r13d, %r13d
subl $0x1, %ebp
jb 0x113b6
leal 0x1(%r13), %r15d
movq %rbx, %rdi
movl %r15d, %esi
callq 0xeee2
movq %rbx, %rdi
movl %r12d, %esi
movl %r13d, %edx
callq 0xe9c5
movl %r15d, %r13d
jmp 0x1138f
leaq 0x17ad7(%rip), %rsi     # 0x28e94
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x1dd5c
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f3d
movl 0xc(%rsp), %r13d
xorl %r12d, %r12d
movq 0x10(%rsp), %r15
cmpq %r12, %r15
je 0x11406
movslq 0x18(%r14), %rax
cmpq %rax, %r12
jge 0x11409
movq 0x40(%r14), %rax
movq (%rax,%r12,8), %rsi
incq %r12
movq %rbx, %rdi
movl %r12d, %edx
callq 0x1dd5c
jmp 0x113e0
movq %r15, %r12
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3f3d
pushq $-0x1
popq %rbp
pushq $0x1
popq %r15
movslq 0x4c(%r14), %rax
cmpq %rax, %r12
jge 0x11186
movq %rbx, %rdi
callq 0x7336
movq 0x40(%r14), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
movl %ebp, %edx
callq 0x1dd5c
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3f3d
incq %r12
jmp 0x1141b
leaq 0x17368(%rip), %rsi     # 0x287c1
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9778
callq 0xfa0c
leaq 0x17379(%rip), %rsi     # 0x287e8
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x99a6