// File: /workspace/github_c_makefile_star2_O3/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
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
js 0x16c49
movl %esi, %ebp
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
subl %esi, %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x14940
movq %rbx, %rdi
movl %r14d, %esi
testl %eax, %eax
je 0x16c5a
callq 0x1189f
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 0x16936
cmpl $0x3, %eax
je 0x16853
cmpl $0x2, %eax
jne 0x16c1c
movq 0x20(%r12), %rax
movq (%rax), %rsi
movq 0x50(%rax), %rdx
movl 0x58(%rax), %ecx
movq %rbx, %rdi
callq 0x16c73
movq 0x20(%r12), %r14
movq 0x28(%r12), %r15
cmpl $0x0, 0xc(%r14)
je 0x16965
movq %rbx, %rdi
movq %r15, %rsi
callq 0x270d1
movl 0x18(%r14), %eax
movl %eax, %ecx
subl %ebp, %ecx
jge 0x16848
addl 0x140(%rbx), %ecx
movl %ecx, 0x140(%rbx)
movl 0x144(%rbx), %edx
movl %eax, %ebp
cmpl %edx, %ecx
jge 0x16848
movl %edx, 0x140(%rbx)
jmp 0x16c38
movq %rbx, %rdi
callq 0x88f1
incl %ebp
cmpl 0x4c(%r14), %ebp
jl 0x1683e
jmp 0x16ba1
movq 0x20(%r12), %rax
movq (%rax), %rsi
movq 0x50(%rax), %rdx
movl 0x58(%rax), %ecx
movq %rbx, %rdi
callq 0x16c73
movq 0x20(%r12), %r15
movq 0x28(%r12), %r14
testq %r14, %r14
je 0x16884
movq %rbx, %rdi
movq %r14, %rsi
callq 0x270d1
movl 0x140(%rbx), %ecx
movl 0x144(%rbx), %eax
subl %ebp, %ecx
movl %ecx, 0x140(%rbx)
cmpl %eax, %ecx
jl 0x16c32
cmpl $0x0, 0x4c(%r15)
jle 0x16904
xorl %r12d, %r12d
movq 0x40(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
callq 0x28b6b
testl %eax, %eax
jne 0x168f8
movq %rbx, %rdi
callq 0x88f1
movq 0x40(%r15), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x28e19
movl 0x140(%rbx), %ecx
movl 0x144(%rbx), %eax
leal -0x1(%rcx), %edx
movl %edx, 0x140(%rbx)
cmpl %eax, %ecx
jle 0x16c32
incq %r12
movslq 0x4c(%r15), %rax
cmpq %rax, %r12
jl 0x168aa
movq %rbx, %rdi
movq %r15, %rsi
callq 0x27140
movslq 0x140(%rbx), %rax
testq %rax, %rax
jle 0x16afe
movq 0x148(%rbx), %rcx
shlq $0x4, %rax
addq %rcx, %rax
addq $-0x10, %rax
jmp 0x16b05
movq 0x20(%r12), %rsi
leaq 0x1cee9(%rip), %rdx     # 0x3382b
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x16c73
movl 0x38(%r12), %edx
movq 0x28(%r12), %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x16cb5
jmp 0x16c16
movq %rbx, %rdi
movl $0x68, %esi
callq 0xde05
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)
movq $0x0, 0x60(%rax)
movq 0x170(%rbx), %rax
movq %rax, 0x50(%r12)
movq %r12, 0x170(%rbx)
incl 0x154(%rbx)
leaq 0x299fa(%rip), %rax     # 0x403b8
movq %rax, 0x8(%r12)
movl $0x1, 0x4(%r12)
movq %rbx, %rdi
movl $0x20, %esi
callq 0xde05
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 0x270d1
cmpl $0x0, 0x14(%r14)
je 0x16acb
movq %rbx, %rdi
callq 0x19fe3
cmpl $0x0, 0x34(%rbx)
jne 0x16a44
movq %rbx, %rdi
callq 0x14682
leaq 0x1e70f(%rip), %rdx     # 0x35141
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x2, %ecx
callq 0x662a
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movq %rbx, %rdi
callq 0x4124
leaq 0x1cd27(%rip), %rdx     # 0x33781
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0x2, %ecx
callq 0x662a
testl %ebp, %ebp
je 0x16a9a
xorl %r15d, %r15d
leal 0x1(%r15), %r12d
movq %rbx, %rdi
movl %r12d, %esi
callq 0x13c1a
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r15d, %edx
callq 0x134ed
movl %r12d, %r15d
cmpl %r12d, %ebp
jne 0x16a73
leaq 0x1d423(%rip), %rsi     # 0x33ec4
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x28e19
movl 0x140(%rbx), %ecx
movl 0x144(%rbx), %eax
leal -0x1(%rcx), %edx
movl %edx, 0x140(%rbx)
cmpl %eax, %ecx
jle 0x16c32
testl %ebp, %ebp
je 0x16b36
movl %ebp, %r12d
xorl %r15d, %r15d
movslq 0x18(%r14), %rax
cmpq %rax, %r15
jge 0x16b39
movq 0x40(%r14), %rax
movq (%rax,%r15,8), %rsi
incq %r15
movq %rbx, %rdi
movl %r15d, %edx
callq 0x28e19
cmpq %r15, %r12
jne 0x16ad5
movl %r12d, %r15d
jmp 0x16b39
leaq 0x298f3(%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 0x145a6
testq %r14, %r14
jne 0x16bf6
jmp 0x16c16
xorl %r15d, %r15d
movl 0x140(%rbx), %ecx
movl 0x144(%rbx), %eax
subl %ebp, %ecx
movl %ecx, 0x140(%rbx)
cmpl %eax, %ecx
jl 0x16c32
cmpl 0x4c(%r14), %r15d
jge 0x16ba1
movl %r15d, %r15d
movq %rbx, %rdi
callq 0x88f1
movq 0x40(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x28e19
movl 0x140(%rbx), %ecx
movl 0x144(%rbx), %eax
leal -0x1(%rcx), %edx
movl %edx, 0x140(%rbx)
cmpl %eax, %ecx
jle 0x16c32
incq %r15
cmpl %r15d, 0x4c(%r14)
jg 0x16b5e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x27140
movl 0x140(%rbx), %eax
testl %eax, %eax
jle 0x16bcc
movq 0x148(%rbx), %rcx
movl %eax, %eax
shlq $0x4, %rax
addq %rcx, %rax
addq $-0x10, %rax
jmp 0x16bd3
leaq 0x29825(%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 0x145a6
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 0x1cb5f(%rip), %rsi     # 0x3379e
movq %rbx, %rdi
xorl %eax, %eax
callq 0xc666
leaq 0x1cba1(%rip), %rsi     # 0x337f1
movq %rbx, %rdi
xorl %eax, %eax
callq 0xc7e2
callq 0x14aa8
leaq 0x1cbb2(%rip), %rsi     # 0x33818
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0xca10