LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstate.c
// Function: js_ploadstring
int js_ploadstring(js_State *J, const char *filename, const char *source)
{
	if (js_ptry(J))
		return 1;
	if (js_try(J))
		return 1;
	js_loadstring(J, filename, source);
	js_endtry(J);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x11bd4
pushq $0x1
popq %rbp
testl %eax, %eax
jne 0x11bc7
movq %rbx, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
jne 0x11bc7
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x11c1d
movq %rbx, %rdi
callq 0xf5a7
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstate.c
// Function: js_ptry
static int js_ptry(js_State *J) {
	if (J->trytop == JS_TRYLIMIT) {
		J->stack[J->top].t.type = JS_TLITSTR;
		J->stack[J->top].u.litstr = "exception stack overflow";
		++J->top;
		return 1;
	}
	return 0;
}

// Assembly:
xorl %eax, %eax
cmpl $0x40, 0x8198(%rdi)
jne 0x11c1c
movq 0x148(%rdi), %rax
movslq 0x140(%rdi), %rcx
shlq $0x4, %rcx
movb $0x5, 0xf(%rax,%rcx)
movq 0x148(%rdi), %rax
movslq 0x140(%rdi), %rcx
shlq $0x4, %rcx
leaq 0x16c1c(%rip), %rdx     # 0x2882b
movq %rdx, (%rax,%rcx)
incl 0x140(%rdi)
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstate.c
// Function: js_ploadfile
int js_ploadfile(js_State *J, const char *filename)
{
	if (js_ptry(J))
		return 1;
	if (js_try(J))
		return 1;
	js_loadfile(J, filename);
	js_endtry(J);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x11bd4
pushq $0x1
popq %rbp
testl %eax, %eax
jne 0x11c63
movq %rbx, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
jne 0x11c63
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11c6a
movq %rbx, %rdi
callq 0xf5a7
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstate.c
// Function: js_trystring
const char *js_trystring(js_State *J, int idx, const char *error)
{
	const char *s;
	if (js_ptry(J)) {
		js_pop(J, 1);
		return error;
	}
	if (js_try(J)) {
		js_pop(J, 1);
		return error;
	}
	s = js_tostring(J, idx);
	js_endtry(J);
	return s;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x11bd4
testl %eax, %eax
jne 0x11e99
movq %r14, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
je 0x11eac
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x3f3d
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movl %ebp, %esi
callq 0xf64d
movq %rax, %rbx
movq %r14, %rdi
callq 0xf5a7
jmp 0x11ea4
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstate.c
// Function: js_trynumber
double js_trynumber(js_State *J, int idx, double error)
{
	double v;
	if (js_ptry(J)) {
		js_pop(J, 1);
		return error;
	}
	if (js_try(J)) {
		js_pop(J, 1);
		return error;
	}
	v = js_tonumber(J, idx);
	js_endtry(J);
	return v;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, 0x8(%rsp)
movl %esi, %ebp
movq %rdi, %rbx
callq 0x11bd4
testl %eax, %eax
jne 0x11ef1
movq %rbx, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
je 0x11f09
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f3d
movsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movq %rbx, %rdi
movl %ebp, %esi
callq 0xfb28
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0xf5a7
movsd 0x10(%rsp), %xmm0
jmp 0x11f02
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstate.c
// Function: js_tryinteger
int js_tryinteger(js_State *J, int idx, int error)
{
	int v;
	if (js_ptry(J)) {
		js_pop(J, 1);
		return error;
	}
	if (js_try(J)) {
		js_pop(J, 1);
		return error;
	}
	v = js_tointeger(J, idx);
	js_endtry(J);
	return v;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x11bd4
testl %eax, %eax
jne 0x11f51
movq %r14, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
je 0x11f63
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x3f3d
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movl %ebp, %esi
callq 0x3f23
movl %eax, %ebx
movq %r14, %rdi
callq 0xf5a7
jmp 0x11f5c
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstate.c
// Function: js_tryboolean
int js_tryboolean(js_State *J, int idx, int error)
{
	int v;
	if (js_ptry(J)) {
		js_pop(J, 1);
		return error;
	}
	if (js_try(J)) {
		js_pop(J, 1);
		return error;
	}
	v = js_toboolean(J, idx);
	js_endtry(J);
	return v;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x11bd4
testl %eax, %eax
jne 0x11fa1
movq %r14, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
je 0x11fb3
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x3f3d
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %r14, %rdi
movl %ebp, %esi
callq 0xfaca
movl %eax, %ebx
movq %r14, %rdi
callq 0xf5a7
jmp 0x11fac
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstate.c
// Function: js_loadstringx
static void js_loadstringx(js_State *J, const char *filename, const char *source, int iseval)
{
	js_Ast *P;
	js_Function *F;

	if (js_try(J)) {
		jsP_freeparse(J);
		js_throw(J);
	}

	P = jsP_parse(J, filename, source);
	F = jsC_compilescript(J, P, iseval ? J->strict : J->default_strict);
	jsP_freeparse(J);
	js_newscript(J, F, iseval ? (J->strict ? J->E : NULL) : J->GE);

	js_endtry(J);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0xee71
movq %rax, %rdi
callq 0x3100
movq %rbx, %rdi
testl %eax, %eax
jne 0x12059
movq %r15, %rsi
movq %r14, %rdx
callq 0xd7ee
xorl %ecx, %ecx
testl %ebp, %ebp
setne %dl
movb %dl, %cl
movl 0x30(%rbx,%rcx,4), %edx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7aad
movq %rax, %r14
movq %rbx, %rdi
callq 0xd795
testl %ebp, %ebp
je 0x12032
movl $0x130, %eax            # imm = 0x130
cmpl $0x0, 0x34(%rbx)
jne 0x12037
xorl %eax, %eax
movl %eax, %edx
jmp 0x1203b
movl $0x138, %eax            # imm = 0x138
movq (%rbx,%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x13930
movq %rbx, %rdi
callq 0xf5a7
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0xd795
movq %rbx, %rdi
callq 0x7714
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstate.c
// Function: js_dostring
int js_dostring(js_State *J, const char *source)
{
	if (js_ptry(J)) {
		js_report(J, "exception stack overflow");
		js_pop(J, 1);
		return 1;
	}
	if (js_try(J)) {
		js_report(J, js_trystring(J, -1, "Error"));
		js_pop(J, 1);
		return 1;
	}
	js_loadstring(J, "[string]", source);
	js_pushundefined(J);
	js_call(J, 0);
	js_pop(J, 1);
	js_endtry(J);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x11bd4
testl %eax, %eax
je 0x12090
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x120c7
leaq 0x167a2(%rip), %rsi     # 0x2882b
movq %rbx, %rdi
callq *%rax
jmp 0x120c7
movq %rbx, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
je 0x120db
leaq 0x160ea(%rip), %rdx     # 0x28195
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x11e70
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x120c7
movq %rax, %rsi
movq %rbx, %rdi
callq *%rcx
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3f3d
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0xe04e(%rip), %rsi      # 0x20130
movq %rbx, %rdi
movq %r14, %rdx
callq 0x11c1d
movq %rbx, %rdi
callq 0x7336
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x110b0
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f3d
movq %rbx, %rdi
callq 0xf5a7
jmp 0x120d4
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstate.c
// Function: js_dofile
int js_dofile(js_State *J, const char *filename)
{
	if (js_ptry(J)) {
		js_report(J, "exception stack overflow");
		js_pop(J, 1);
		return 1;
	}
	if (js_try(J)) {
		js_report(J, js_trystring(J, -1, "Error"));
		js_pop(J, 1);
		return 1;
	}
	js_loadfile(J, filename);
	js_pushundefined(J);
	js_call(J, 0);
	js_pop(J, 1);
	js_endtry(J);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x11bd4
testl %eax, %eax
je 0x12140
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x12177
leaq 0x166f2(%rip), %rsi     # 0x2882b
movq %rbx, %rdi
callq *%rax
jmp 0x12177
movq %rbx, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
je 0x1218b
leaq 0x1603a(%rip), %rdx     # 0x28195
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0x11e70
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x12177
movq %rax, %rsi
movq %rbx, %rdi
callq *%rcx
pushq $0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3f3d
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
movq %r14, %rsi
callq 0x11c6a
movq %rbx, %rdi
callq 0x7336
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x110b0
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f3d
movq %rbx, %rdi
callq 0xf5a7
jmp 0x12184
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstate.c
// Function: js_newstate
js_State *js_newstate(js_Alloc alloc, void *actx, int flags)
{
	js_State *J;

	assert(sizeof(js_Value) == 16);
	assert(soffsetof(js_Value, t.type) == 15);

	if (!alloc)
		alloc = js_defaultalloc;

	J = alloc(actx, NULL, sizeof *J);
	if (!J)
		return NULL;
	memset(J, 0, sizeof(*J));
	J->actx = actx;
	J->alloc = alloc;

	if (flags & JS_STRICT)
		J->strict = J->default_strict = 1;

	J->trace[0].name = "-top-";
	J->trace[0].file = "native";
	J->trace[0].line = 0;

	J->report = js_defaultreport;
	J->panic = js_defaultpanic;

	J->stack = alloc(actx, NULL, JS_STACKSIZE * sizeof *J->stack);
	if (!J->stack) {
		alloc(actx, J, 0);
		return NULL;
	}

	J->gcmark = 1;
	J->nextref = 0;
	J->gcthresh = 0; /* reaches stability within ~ 2-5 GC cycles */

	if (js_try(J)) {
		js_freestate(J);
		return NULL;
	}

	J->R = jsV_newobject(J, JS_COBJECT, NULL);
	J->G = jsV_newobject(J, JS_COBJECT, NULL);
	J->E = jsR_newenvironment(J, J->G, NULL);
	J->GE = J->E;

	jsB_init(J);

	js_endtry(J);
	return J;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
testq %rdi, %rdi
leaq 0x156(%rip), %r15       # 0x12343
cmovneq %rdi, %r15
xorl %eax, %eax
movl %eax, %ebx
movq %rsi, %rdi
movq %rbx, %rsi
movl $0xbda0, %edx           # imm = 0xBDA0
callq *%r15
testq %rax, %rax
je 0x12335
movq %rax, %rbx
movq %rax, %rdi
addq $0x8, %rdi
movl $0xbd98, %edx           # imm = 0xBD98
xorl %esi, %esi
callq 0x3060
movq %r14, (%rbx)
movq %r15, 0x10(%rbx)
testb $0x1, %bpl
je 0x1223d
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x30(%rbx)
leaq 0x16600(%rip), %rax     # 0x28844
movq %rax, 0x2198(%rbx)
leaq 0x165a9(%rip), %rax     # 0x287fb
movq %rax, 0x21a0(%rbx)
andl $0x0, 0x21a8(%rbx)
leaq 0xf5(%rip), %rax        # 0x1235c
movq %rax, 0x18(%rbx)
leaq 0x109(%rip), %rax       # 0x1237b
movq %rax, 0x20(%rbx)
xorl %eax, %eax
movl %eax, %esi
movq %r14, %rdi
movl $0x10000, %edx          # imm = 0x10000
callq *%r15
movq %rax, 0x148(%rbx)
testq %rax, %rax
je 0x122cb
movl $0x1, 0x150(%rbx)
andl $0x0, 0x118(%rbx)
andl $0x0, 0x158(%rbx)
movq %rbx, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
je 0x122dc
movq %rbx, %rdi
callq 0xa8aa
xorl %eax, %eax
movl %eax, %ebx
jmp 0x12335
xorl %ebp, %ebp
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq *%r15
movl %ebp, %ebx
jmp 0x12335
xorl %ebp, %ebp
movl %ebp, %r14d
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x5d6b
movq %rax, 0x120(%rbx)
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x5d6b
movq %rax, 0x128(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x11070
movq %rax, 0x130(%rbx)
movq %rax, 0x138(%rbx)
movq %rbx, %rdi
callq 0x5a55
movq %rbx, %rdi
callq 0xf5a7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: js_runeat
int js_runeat(js_State *J, const char *s, int i)
{
	Rune rune = EOF;
	while (i >= 0) {
		rune = *(unsigned char*)s;
		if (rune < Runeself) {
			if (rune == 0)
				return EOF;
			++s;
			--i;
		} else {
			s += chartorune(&rune, s);
			if (rune >= 0x10000)
				i -= 2;
			else
				--i;
		}
	}
	if (rune >= 0x10000) {
		/* high surrogate */
		if (i == -2)
			return 0xd800 + ((rune - 0x10000) >> 10);
		/* low surrogate */
		else
			return 0xdc00 + ((rune - 0x10000) & 0x3ff);
	}
	return rune;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x4(%rsp), %r14
orl $-0x1, (%r14)
movl %edx, %ebx
movq %rsi, %r15
pushq $-0x1
popq %rbp
movl %ebp, %eax
testl %ebx, %ebx
js 0x123e7
movzbl (%r15), %eax
movl %eax, 0x4(%rsp)
testb %al, %al
js 0x123c3
testl %eax, %eax
je 0x12402
incq %r15
movl %ebp, %ecx
jmp 0x123e3
movq %r14, %rdi
movq %r15, %rsi
callq 0x1241b
movl %eax, %eax
addq %rax, %r15
movl 0x4(%rsp), %eax
xorl %ecx, %ecx
cmpl $0x10000, %eax          # imm = 0x10000
setge %cl
notl %ecx
addl %ecx, %ebx
jmp 0x123a8
cmpl $0x10000, %eax          # imm = 0x10000
jl 0x12410
cmpl $-0x2, %ebx
jne 0x12406
addl $0xffff0000, %eax       # imm = 0xFFFF0000
shrl $0xa, %eax
addl $0xd800, %eax           # imm = 0xD800
jmp 0x12410
movl %ebp, %eax
jmp 0x12410
andl $0x3ff, %eax            # imm = 0x3FF
orl $0xdc00, %eax           # imm = 0xDC00
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: js_utflen
int js_utflen(const char *s)
{
	int c;
	int n;
	Rune rune;

	n = 0;
	for(;;) {
		c = *(unsigned char *)s;
		if (c < Runeself) {
			if (c == 0)
				return n;
			s++;
			n++;
		} else {
			s += chartorune(&rune, s);
			if (rune >= 0x10000)
				n += 2;
			else
				n++;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
xorl %ebx, %ebx
pushq $0x1
popq %rbp
leaq 0x4(%rsp), %r15
cmpb $0x0, (%r14)
js 0x12530
je 0x12553
incq %r14
movl %ebp, %eax
jmp 0x1254f
movq %r15, %rdi
movq %r14, %rsi
callq 0x1241b
movl %eax, %eax
addq %rax, %r14
xorl %eax, %eax
cmpl $0x10000, 0x4(%rsp)     # imm = 0x10000
setge %al
incl %eax
addl %eax, %ebx
jmp 0x12521
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_charAt
static void Sp_charAt(js_State *J)
{
	char buf[UTFmax + 1];
	const char *s = checkstring(J, 0);
	int pos = js_tointeger(J, 1);
	Rune rune = js_runeat(J, s, pos);
	if (rune >= 0) {
		buf[runetochar(buf, &rune)] = 0;
		js_pushstring(J, buf);
	} else {
		js_pushliteral(J, "");
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x1dda8
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f23
movq %r14, %rsi
movl %eax, %edx
callq 0x1238e
movl %eax, 0xc(%rsp)
testl %eax, %eax
js 0x12617
leaq 0x13(%rsp), %r14
leaq 0xc(%rsp), %rsi
movq %r14, %rdi
callq 0x15185
movl %eax, %eax
movb $0x0, 0x13(%rsp,%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xe7f7
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x16d73(%rip), %rsi     # 0x29391
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x5a13
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_charCodeAt
static void Sp_charCodeAt(js_State *J)
{
	const char *s = checkstring(J, 0);
	int pos = js_tointeger(J, 1);
	Rune rune = js_runeat(J, s, pos);
	if (rune >= 0)
		js_pushnumber(J, rune);
	else
		js_pushnumber(J, NAN);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1dda8
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f23
movq %r14, %rsi
movl %eax, %edx
callq 0x1238e
testl %eax, %eax
jns 0x1265f
movsd 0xddbb(%rip), %xmm0     # 0x20418
jmp 0x12663
cvtsi2sd %eax, %xmm0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3f9a
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_concat
static void Sp_concat(js_State *J)
{
	int i, top = js_gettop(J);
	int n;
	char * volatile out = NULL;
	const char *s;

	if (top == 1)
		return;

	s = checkstring(J, 0);
	n = 1 + strlen(s);

	if (js_try(J)) {
		js_free(J, out);
		js_throw(J);
	}

	if (n > JS_STRLIMIT)
		js_rangeerror(J, "invalid string length");
	out = js_malloc(J, n);
	strcpy(out, s);

	for (i = 1; i < top; ++i) {
		s = js_tostring(J, i);
		n += strlen(s);
		if (n > JS_STRLIMIT)
			js_rangeerror(J, "invalid string length");
		out = js_realloc(J, out, n);
		strcat(out, s);
	}

	js_pushstring(J, out);
	js_endtry(J);
	js_free(J, out);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl 0x140(%rdi), %r12d
subl 0x144(%rdi), %r12d
movq $0x0, 0x8(%rsp)
cmpl $0x1, %r12d
je 0x12772
movq %rdi, %rbx
callq 0x1dda8
movq %rax, %r14
movq %rax, %rdi
callq 0x3200
movq %rax, %r15
movq %rbx, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
jne 0x12790
movl %r15d, %ebp
incl %ebp
cmpl $0x10000001, %ebp       # imm = 0x10000001
jge 0x1277f
movq %rbx, %rdi
movl %ebp, %esi
callq 0xa9e8
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x3310
pushq $0x1
popq %rax
movl %ebp, %r14d
cmpl %r12d, %eax
jge 0x12750
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
callq 0xf64d
movq %rax, %r15
movq %rax, %rdi
callq 0x3200
addl %eax, %r14d
cmpl $0x10000001, %r14d      # imm = 0x10000001
jge 0x1277f
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
movl %r14d, %edx
callq 0xaa05
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x3270
incl %ebp
movl %ebp, %eax
jmp 0x12700
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xe7f7
movq %rbx, %rdi
callq 0xf5a7
movq 0x8(%rsp), %rsi
movq (%rbx), %rdi
xorl %edx, %edx
callq *0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15fbc(%rip), %rsi     # 0x28742
xorl %eax, %eax
movq %rbx, %rdi
callq 0x9778
movq 0x8(%rsp), %rsi
movq (%rbx), %rdi
xorl %edx, %edx
callq *0x10(%rbx)
movq %rbx, %rdi
callq 0x7714
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_indexOf
static void Sp_indexOf(js_State *J)
{
	const char *haystack = checkstring(J, 0);
	const char *needle = js_tostring(J, 1);
	int pos = js_tointeger(J, 2);
	int len = strlen(needle);
	int k = 0;
	Rune rune;
	while (*haystack) {
		if (k >= pos && !strncmp(haystack, needle, len)) {
			js_pushnumber(J, k);
			return;
		}
		haystack += chartorune(&rune, haystack);
		++k;
	}
	js_pushnumber(J, -1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x1dda8
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xf64d
movq %rax, %r15
pushq $0x2
popq %rsi
movq %rbx, 0x8(%rsp)
movq %rbx, %rdi
callq 0x3f23
movl %eax, %ebp
movq %r15, %rdi
callq 0x3200
movslq %eax, %r12
xorl %ebx, %ebx
movsd 0xdc15(%rip), %xmm0     # 0x20408
movsd %xmm0, (%rsp)
leaq 0x14(%rsp), %r13
cmpb $0x0, (%r14)
je 0x12836
cmpl %ebp, %ebx
jl 0x12819
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3160
testl %eax, %eax
je 0x1282d
movq %r13, %rdi
movq %r14, %rsi
callq 0x1241b
movl %eax, %eax
addq %rax, %r14
incl %ebx
jmp 0x127fd
cvtsi2sd %ebx, %xmm0
movsd %xmm0, (%rsp)
movq 0x8(%rsp), %rdi
movsd (%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3f9a
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_lastIndexOf
static void Sp_lastIndexOf(js_State *J)
{
	const char *haystack = checkstring(J, 0);
	const char *needle = js_tostring(J, 1);
	int pos = js_isdefined(J, 2) ? js_tointeger(J, 2) : (int)strlen(haystack);
	int len = strlen(needle);
	int k = 0, last = -1;
	Rune rune;
	while (*haystack && k <= pos) {
		if (!strncmp(haystack, needle, len))
			last = k;
		haystack += chartorune(&rune, haystack);
		++k;
	}
	js_pushnumber(J, last);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x1dda8
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xf64d
movq %rax, %r15
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0xf8a8
testl %eax, %eax
movq %rbx, 0x8(%rsp)
je 0x1289e
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x3f23
movl %eax, %r12d
jmp 0x128a9
movq %r14, %rdi
callq 0x3200
movq %rax, %r12
movq %r15, %rdi
callq 0x3200
movslq %eax, %r13
pushq $-0x1
popq %rbx
xorl %ebp, %ebp
cmpb $0x0, (%r14)
je 0x128ed
cmpl %r12d, %ebp
jg 0x128ed
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x3160
testl %eax, %eax
cmovel %ebp, %ebx
leaq 0x14(%rsp), %rdi
movq %r14, %rsi
callq 0x1241b
movl %eax, %eax
addq %rax, %r14
incl %ebp
jmp 0x128b9
cvtsi2sd %ebx, %xmm0
movq 0x8(%rsp), %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3f9a
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_match
static void Sp_match(js_State *J)
{
	js_Regexp *re;
	const char *text;
	int len;
	const char *a, *b, *c, *e;
	Resub m;

	text = checkstring(J, 0);

	if (js_isregexp(J, 1))
		js_copy(J, 1);
	else if (js_isundefined(J, 1))
		js_newregexp(J, "", 0);
	else
		js_newregexp(J, js_tostring(J, 1), 0);

	re = js_toregexp(J, -1);
	if (!(re->flags & JS_REGEXP_G)) {
		js_RegExp_prototype_exec(J, re, text);
		return;
	}

	re->last = 0;

	js_newarray(J);

	len = 0;
	a = text;
	e = text + strlen(text);
	while (a <= e) {
		if (js_doregexec(J, re->prog, a, &m, a > text ? REG_NOTBOL : 0))
			break;

		b = m.sub[0].sp;
		c = m.sub[0].ep;

		js_pushlstring(J, b, c - b);
		js_setindex(J, -2, len++);

		a = c;
		if (c - b == 0)
			++a;
	}

	if (len == 0) {
		js_pop(J, 1);
		js_pushnull(J);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rdi, %rbx
callq 0x1dda8
movq %rax, (%rsp)
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xf99d
pushq $0x1
popq %rsi
movq %rbx, %rdi
testl %eax, %eax
je 0x1297a
callq 0xeee2
jmp 0x129a7
callq 0xf8bb
testl %eax, %eax
je 0x1298f
leaq 0x16a07(%rip), %rsi     # 0x29391
movq %rbx, %rdi
jmp 0x129a0
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xf64d
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0xe514
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xfee4
movq %rax, %r12
testb $0x1, 0x10(%rax)
jne 0x129db
movq %rbx, %rdi
movq %r12, %rsi
movq (%rsp), %rdx
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe606
andw $0x0, 0x12(%r12)
movq %rbx, %rdi
callq 0xe7d1
movq (%rsp), %r14
movq %r14, %rdi
callq 0x3200
addq %r14, %rax
movq %rax, 0x8(%rsp)
xorl %ebp, %ebp
movq %r14, %rdx
cmpq 0x8(%rsp), %rdx
ja 0x12a6a
movq (%r12), %rsi
xorl %r8d, %r8d
cmpq (%rsp), %rdx
seta %r8b
shll $0x2, %r8d
movq %rbx, %rdi
leaq 0x10(%rsp), %rcx
callq 0x1ddd3
testl %eax, %eax
jne 0x12a6a
movq 0x18(%rsp), %r13
movq 0x20(%rsp), %r14
movl %r14d, %edx
subl %r13d, %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0xe918
leal 0x1(%rbp), %r15d
movq %rbx, %rdi
pushq $-0x2
popq %rsi
movl %ebp, %edx
callq 0xe9c5
xorl %edx, %edx
cmpq %r13, %r14
sete %dl
addq %r14, %rdx
movl %r15d, %ebp
jmp 0x12a03
testl %ebp, %ebp
jne 0x12a81
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f3d
movq %rbx, %rdi
callq 0xe756
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_replace
static void Sp_replace(js_State *J)
{
	if (js_isregexp(J, 1))
		Sp_replace_regexp(J);
	else
		Sp_replace_string(J);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x1
popq %rsi
callq 0xf99d
movq %rbx, %rdi
testl %eax, %eax
je 0x12aac
popq %rbx
jmp 0x1ddff
popq %rbx
jmp 0x1e1b5
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_search
static void Sp_search(js_State *J)
{
	js_Regexp *re;
	const char *text;
	Resub m;

	text = checkstring(J, 0);

	if (js_isregexp(J, 1))
		js_copy(J, 1);
	else if (js_isundefined(J, 1))
		js_newregexp(J, "", 0);
	else
		js_newregexp(J, js_tostring(J, 1), 0);

	re = js_toregexp(J, -1);

	if (!js_doregexec(J, re->prog, text, &m, 0))
		js_pushnumber(J, js_utfptrtoidx(text, m.sub[0].sp));
	else
		js_pushnumber(J, -1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
callq 0x1dda8
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xf99d
pushq $0x1
popq %rsi
movq %rbx, %rdi
testl %eax, %eax
je 0x12ae3
callq 0xeee2
jmp 0x12b10
callq 0xf8bb
testl %eax, %eax
je 0x12af8
leaq 0x1689e(%rip), %rsi     # 0x29391
movq %rbx, %rdi
jmp 0x12b09
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0xf64d
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0xe514
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xfee4
movq (%rax), %rsi
movq %rsp, %rcx
movq %rbx, %rdi
movq %r14, %rdx
xorl %r8d, %r8d
callq 0x1ddd3
testl %eax, %eax
je 0x12b3d
movsd 0xd8cd(%rip), %xmm0     # 0x20408
jmp 0x12b4e
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0xe8bd
cvtsi2sd %eax, %xmm0
movq %rbx, %rdi
callq 0x3f9a
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_slice
static void Sp_slice(js_State *J)
{
	const char *str = checkstring(J, 0);
	int len = js_utflen(str);
	int s = js_tointeger(J, 1);
	int e = js_isdefined(J, 2) ? js_tointeger(J, 2) : len;

	s = s < 0 ? s + len : s;
	e = e < 0 ? e + len : e;

	s = s < 0 ? 0 : s > len ? len : s;
	e = e < 0 ? 0 : e > len ? len : e;

	if (s < e)
		Sp_substring_imp(J, str, s, e - s);
	else if (s > e)
		Sp_substring_imp(J, str, e, s - e);
	else
		js_pushliteral(J, "");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1dda8
movq %rax, %r14
movq %rax, %rdi
callq 0x1250d
movl %eax, %ebp
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f23
movl %eax, %r15d
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0xf8a8
testl %eax, %eax
je 0x12ba7
pushq $0x2
popq %rsi
movq %rbx, %rdi
callq 0x3f23
jmp 0x12ba9
movl %ebp, %eax
movl %r15d, %ecx
sarl $0x1f, %ecx
andl %ebp, %ecx
addl %r15d, %ecx
movl %eax, %esi
sarl $0x1f, %esi
andl %ebp, %esi
addl %eax, %esi
cmpl %ebp, %ecx
movl %ebp, %edx
cmovll %ecx, %edx
xorl %eax, %eax
testl %ecx, %ecx
cmovsl %eax, %edx
cmpl %ebp, %esi
cmovll %esi, %ebp
testl %esi, %esi
cmovsl %eax, %ebp
movl %edx, %ecx
subl %ebp, %ecx
jge 0x12be7
subl %edx, %ebp
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %ecx
jmp 0x12bf1
jle 0x12c00
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1e43c
leaq 0x1678a(%rip), %rsi     # 0x29391
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5a13
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_toLowerCase
static void Sp_toLowerCase(js_State *J)
{
	const char *s, *s0 = checkstring(J, 0);
	char * volatile dst = NULL;
	char *d;
	Rune rune;
	const Rune *full;
	int n;

	n = 1;
	for (s = s0; *s;) {
		s += chartorune(&rune, s);
		full = tolowerrune_full(rune);
		if (full) {
			while (*full) {
				n += runelen(*full);
				++full;
			}
		} else {
			rune = tolowerrune(rune);
			n += runelen(rune);
		}
	}

	if (js_try(J)) {
		js_free(J, dst);
		js_throw(J);
	}

	d = dst = js_malloc(J, n);
	for (s = s0; *s;) {
		s += chartorune(&rune, s);
		full = tolowerrune_full(rune);
		if (full) {
			while (*full) {
				d += runetochar(d, full);
				++full;
			}
		} else {
			rune = tolowerrune(rune);
			d += runetochar(d, &rune);
		}
	}
	*d = 0;

	js_pushstring(J, dst);
	js_endtry(J);
	js_free(J, dst);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x1dda8
movq %rax, %r12
movq $0x0, 0x10(%rsp)
pushq $0x1
popq %rbp
leaq 0xc(%rsp), %r14
movq %rax, %r15
cmpb $0x0, (%r15)
je 0x130ca
movq %r14, %rdi
movq %r15, %rsi
callq 0x1241b
movl %eax, %eax
movl %eax, %r13d
addq %r15, %r13
movl 0xc(%rsp), %r15d
movl %r15d, %edi
callq 0x1540c
testq %rax, %rax
je 0x130ae
movq %rax, %r15
movl (%r15), %edi
testl %edi, %edi
je 0x130a9
callq 0x15222
addl %ebp, %eax
addq $0x4, %r15
movl %eax, %ebp
jmp 0x13093
movq %r13, %r15
jmp 0x13065
movl %r15d, %edi
callq 0x1523c
movl %eax, 0xc(%rsp)
movl %eax, %edi
callq 0x15222
addl %ebp, %eax
movq %r13, %r15
movl %eax, %ebp
jmp 0x13065
movq %rbx, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
jne 0x131a3
movq %rbx, %rdi
movl %ebp, %esi
callq 0xa9e8
movq %rax, %r15
movq %rax, 0x10(%rsp)
leaq 0xc(%rsp), %r14
cmpb $0x0, (%r12)
je 0x1316e
movq %r14, %rdi
movq %r12, %rsi
callq 0x1241b
movl %eax, %eax
movl %eax, %r13d
addq %r12, %r13
movl 0xc(%rsp), %ebp
movl %ebp, %edi
callq 0x1540c
testq %rax, %rax
je 0x1314b
movq %rax, %r12
cmpl $0x0, (%r12)
je 0x13146
movq %r15, %rdi
movq %r12, %rsi
callq 0x15185
movl %eax, %eax
addq %r15, %rax
addq $0x4, %r12
movq %rax, %r15
jmp 0x13126
movq %r13, %r12
jmp 0x130f9
movl %ebp, %edi
callq 0x1523c
movl %eax, 0xc(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x15185
movl %eax, %eax
addq %r15, %rax
movq %r13, %r12
movq %rax, %r15
jmp 0x130f9
movb $0x0, (%r15)
movq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xe7f7
movq %rbx, %rdi
callq 0xf5a7
movq 0x10(%rsp), %rsi
movq (%rbx), %rdi
xorl %edx, %edx
callq *0x10(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rsi
movq (%rbx), %rdi
xorl %edx, %edx
callq *0x10(%rbx)
movq %rbx, %rdi
callq 0x7714
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_toUpperCase
static void Sp_toUpperCase(js_State *J)
{
	const char *s, *s0 = checkstring(J, 0);
	char * volatile dst = NULL;
	char *d;
	const Rune *full;
	Rune rune;
	int n;

	n = 1;
	for (s = s0; *s;) {
		s += chartorune(&rune, s);
		full = toupperrune_full(rune);
		if (full) {
			while (*full) {
				n += runelen(*full);
				++full;
			}
		} else {
			rune = toupperrune(rune);
			n += runelen(rune);
		}
	}

	if (js_try(J)) {
		js_free(J, dst);
		js_throw(J);
	}

	d = dst = js_malloc(J, n);
	for (s = s0; *s;) {
		s += chartorune(&rune, s);
		full = toupperrune_full(rune);
		if (full) {
			while (*full) {
				d += runetochar(d, full);
				++full;
			}
		} else {
			rune = toupperrune(rune);
			d += runetochar(d, &rune);
		}
	}
	*d = 0;

	js_pushstring(J, dst);
	js_endtry(J);
	js_free(J, dst);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x1dda8
movq %rax, %r12
movq $0x0, 0x10(%rsp)
pushq $0x1
popq %rbp
leaq 0xc(%rsp), %r14
movq %rax, %r15
cmpb $0x0, (%r15)
je 0x1324a
movq %r14, %rdi
movq %r15, %rsi
callq 0x1241b
movl %eax, %eax
movl %eax, %r13d
addq %r15, %r13
movl 0xc(%rsp), %r15d
movl %r15d, %edi
callq 0x1543e
testq %rax, %rax
je 0x1322e
movq %rax, %r15
movl (%r15), %edi
testl %edi, %edi
je 0x13229
callq 0x15222
addl %ebp, %eax
addq $0x4, %r15
movl %eax, %ebp
jmp 0x13213
movq %r13, %r15
jmp 0x131e5
movl %r15d, %edi
callq 0x152be
movl %eax, 0xc(%rsp)
movl %eax, %edi
callq 0x15222
addl %ebp, %eax
movq %r13, %r15
movl %eax, %ebp
jmp 0x131e5
movq %rbx, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
jne 0x13323
movq %rbx, %rdi
movl %ebp, %esi
callq 0xa9e8
movq %rax, %r15
movq %rax, 0x10(%rsp)
leaq 0xc(%rsp), %r14
cmpb $0x0, (%r12)
je 0x132ee
movq %r14, %rdi
movq %r12, %rsi
callq 0x1241b
movl %eax, %eax
movl %eax, %r13d
addq %r12, %r13
movl 0xc(%rsp), %ebp
movl %ebp, %edi
callq 0x1543e
testq %rax, %rax
je 0x132cb
movq %rax, %r12
cmpl $0x0, (%r12)
je 0x132c6
movq %r15, %rdi
movq %r12, %rsi
callq 0x15185
movl %eax, %eax
addq %r15, %rax
addq $0x4, %r12
movq %rax, %r15
jmp 0x132a6
movq %r13, %r12
jmp 0x13279
movl %ebp, %edi
callq 0x152be
movl %eax, 0xc(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x15185
movl %eax, %eax
addq %r15, %rax
movq %r13, %r12
movq %rax, %r15
jmp 0x13279
movb $0x0, (%r15)
movq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0xe7f7
movq %rbx, %rdi
callq 0xf5a7
movq 0x10(%rsp), %rsi
movq (%rbx), %rdi
xorl %edx, %edx
callq *0x10(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rsi
movq (%rbx), %rdi
xorl %edx, %edx
callq *0x10(%rbx)
movq %rbx, %rdi
callq 0x7714
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: Sp_trim
static void Sp_trim(js_State *J)
{
	const char *s, *e;
	s = checkstring(J, 0);
	while (istrim(*s))
		++s;
	e = s + strlen(s);
	while (e > s && istrim(e[-1]))
		--e;
	js_pushlstring(J, s, e - s);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1dda8
movq %rax, %r14
decq %r14
movsbl 0x1(%r14), %edi
incq %r14
callq 0x1e643
testl %eax, %eax
jne 0x1334e
movq %r14, %rdi
callq 0x3200
leaq (%r14,%rax), %r12
movl %eax, %r15d
cmpq %r14, %r12
jbe 0x1338b
movsbl -0x1(%r12), %edi
decq %r12
callq 0x1e643
movl %eax, %ecx
leal -0x1(%r15), %eax
testl %ecx, %ecx
jne 0x1336b
movq %rbx, %rdi
movq %r14, %rsi
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xe918
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsstring.c
// Function: S_fromCharCode
static void S_fromCharCode(js_State *J)
{
	int i, top = js_gettop(J);
	char * volatile s = NULL;
	char *p;
	Rune c;

	if (js_try(J)) {
		js_free(J, s);
		js_throw(J);
	}

	s = p = js_malloc(J, (top-1) * UTFmax + 1);

	for (i = 1; i < top; ++i) {
		c = js_touint32(J, i);
		p += runetochar(p, &c);
	}
	*p = 0;

	js_pushstring(J, s);
	js_endtry(J);
	js_free(J, s);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x140(%rdi), %r12d
subl 0x144(%rdi), %r12d
movq $0x0, (%rsp)
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
jne 0x134c0
movl %r12d, %eax
leal -0x3(,%rax,4), %esi
movq %rbx, %rdi
callq 0xa9e8
movq %rax, %r15
movq %rax, (%rsp)
pushq $0x1
popq %rbp
leaq 0xc(%rsp), %r14
cmpl %r12d, %ebp
jge 0x1348f
movq %rbx, %rdi
movl %ebp, %esi
callq 0xfc4b
movl %eax, 0xc(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x15185
movl %eax, %eax
addq %r15, %rax
incl %ebp
movq %rax, %r15
jmp 0x13465
movb $0x0, (%r15)
movq (%rsp), %rsi
movq %rbx, %rdi
callq 0xe7f7
movq %rbx, %rdi
callq 0xf5a7
movq (%rsp), %rsi
movq (%rbx), %rdi
xorl %edx, %edx
callq *0x10(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%rsp), %rsi
movq (%rbx), %rdi
xorl %edx, %edx
callq *0x10(%rbx)
movq %rbx, %rdi
callq 0x7714
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsvalue.c
// Function: jsV_toString
static int jsV_toString(js_State *J, js_Object *obj)
{
	js_pushobject(J, obj);
	js_getproperty(J, -1, "toString");
	if (js_iscallable(J, -1)) {
		js_rot2(J);
		js_call(J, 0);
		if (js_isprimitive(J, -1))
			return 1;
		js_pop(J, 1);
		return 0;
	}
	js_pop(J, 2);
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4274
leaq 0x14765(%rip), %rdx     # 0x27cb2
pushq $-0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3eff
movq %rbx, %rdi
movl %ebp, %esi
callq 0xf950
testl %eax, %eax
je 0x13590
movq %rbx, %rdi
callq 0x10070
movq %rbx, %rdi
xorl %esi, %esi
callq 0x110b0
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xf927
movl %eax, %ecx
pushq $0x1
popq %rax
testl %ecx, %ecx
jne 0x1359f
jmp 0x13593
pushq $0x2
popq %rax
movq %rbx, %rdi
movl %eax, %esi
callq 0x3f3d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsvalue.c
// Function: jsV_valueOf
static int jsV_valueOf(js_State *J, js_Object *obj)
{
	js_pushobject(J, obj);
	js_getproperty(J, -1, "valueOf");
	if (js_iscallable(J, -1)) {
		js_rot2(J);
		js_call(J, 0);
		if (js_isprimitive(J, -1))
			return 1;
		js_pop(J, 1);
		return 0;
	}
	js_pop(J, 2);
	return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4274
leaq 0x146e3(%rip), %rdx     # 0x27c9b
pushq $-0x1
popq %rbp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3eff
movq %rbx, %rdi
movl %ebp, %esi
callq 0xf950
testl %eax, %eax
je 0x135fb
movq %rbx, %rdi
callq 0x10070
movq %rbx, %rdi
xorl %esi, %esi
callq 0x110b0
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xf927
movl %eax, %ecx
pushq $0x1
popq %rax
testl %ecx, %ecx
jne 0x1360a
jmp 0x135fe
pushq $0x2
popq %rax
movq %rbx, %rdi
movl %eax, %esi
callq 0x3f3d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsvalue.c
// Function: js_stringtofloat
double js_stringtofloat(const char *s, char **ep)
{
	char *end;
	double n;
	const char *e = s;
	int isflt = 0;
	if (*e == '+' || *e == '-') ++e;
	while (*e >= '0' && *e <= '9') ++e;
	if (*e == '.') { ++e; isflt = 1; }
	while (*e >= '0' && *e <= '9') ++e;
	if (*e == 'e' || *e == 'E') {
		++e;
		if (*e == '+' || *e == '-') ++e;
		while (*e >= '0' && *e <= '9') ++e;
		isflt = 1;
	}
	if (isflt)
		n = js_strtod(s, &end);
	else {
		/* js_strtol doesn't parse the sign */
		if (*s == '-')
			n = -js_strtol(s+1, &end, 10);
		else if (*s == '+')
			n = js_strtol(s+1, &end, 10);
		else
			n = js_strtol(s, &end, 10);
	}
	if (end == e) {
		*ep = (char*)e;
		return n;
	}
	*ep = (char*)s;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movzbl (%rdi), %eax
cmpl $0x2d, %eax
je 0x13630
movq %r14, %rdi
cmpl $0x2b, %eax
jne 0x13634
leaq 0x1(%r14), %rdi
movb (%rdi), %cl
leal -0x30(%rcx), %edx
incq %rdi
cmpb $0xa, %dl
jb 0x13634
xorl %r8d, %r8d
cmpb $0x2e, %cl
sete %r8b
leaq (%rdi,%r8), %rdx
leaq (%rdi,%r8), %rsi
decq %rsi
leaq (%rdi,%r8), %r15
addq $-0x2, %r15
movzbl (%rsi), %edi
leal -0x30(%rdi), %r8d
incq %rsi
incq %r15
incq %rdx
cmpb $0xa, %r8b
jb 0x1365e
orl $0x20, %edi
cmpl $0x65, %edi
jne 0x136c7
movzbl (%rsi), %eax
cmpl $0x2b, %eax
je 0x1368c
cmpl $0x2d, %eax
je 0x1368c
movq %rsi, %rdx
decq %rdx
movq %rdx, %r15
movb 0x1(%r15), %al
incq %r15
addb $-0x30, %al
cmpb $0xa, %al
jb 0x13692
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x92be
cmpq %r15, 0x8(%rsp)
cmoveq %r15, %r14
je 0x136ba
xorps %xmm0, %xmm0
movq %r14, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
cmpb $0x2e, %cl
je 0x1369f
cmpl $0x2b, %eax
je 0x136f0
cmpl $0x2d, %eax
jne 0x136fe
leaq 0x1(%r14), %rdi
leaq 0x8(%rsp), %rsi
pushq $0xa
popq %rdx
callq 0x134d4
xorps 0xceb2(%rip), %xmm0     # 0x205a0
jmp 0x136ac
leaq 0x1(%r14), %rdi
leaq 0x8(%rsp), %rsi
pushq $0xa
popq %rdx
jmp 0x13709
leaq 0x8(%rsp), %rsi
pushq $0xa
popq %rdx
movq %r14, %rdi
callq 0x134d4
jmp 0x136ac
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsvalue.c
// Function: jsV_newstring
static js_Object *jsV_newstring(js_State *J, const char *v)
{
	js_Object *obj = jsV_newobject(J, JS_CSTRING, J->String_prototype);
	size_t n = strlen(v);
	if (n < sizeof(obj->u.s.shrstr)) {
		obj->u.s.string = obj->u.s.shrstr;
		memcpy(obj->u.s.shrstr, v, n + 1);
	} else {
		obj->u.s.string = js_strdup(J, v);
	}
	obj->u.s.length = js_utflen(v);
	return obj;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
movq 0xb8(%rdi), %rdx
pushq $0x8
popq %rsi
callq 0x5d6b
movq %rax, %r14
movq %rbx, %rdi
callq 0x3200
cmpq $0xf, %rax
ja 0x13767
movq %r14, %rdi
addq $0x30, %rdi
movq %rdi, 0x28(%r14)
incq %rax
movq %rbx, %rsi
movq %rax, %rdx
callq 0x33d0
jmp 0x13776
movq %r15, %rdi
movq %rbx, %rsi
callq 0x615c
movq %rax, 0x28(%r14)
movq %rbx, %rdi
callq 0x1250d
movl %eax, 0x20(%r14)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsvalue.c
// Function: js_newobjectx
void js_newobjectx(js_State *J)
{
	js_Object *prototype = NULL;
	if (js_isobject(J, -1))
		prototype = js_toobject(J, -1);
	js_pop(J, 1);
	js_pushobject(J, jsV_newobject(J, JS_COBJECT, prototype));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $-0x1
popq %rsi
callq 0xd489
testl %eax, %eax
je 0x137e6
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xd49c
movq %rax, %r14
jmp 0x137e9
xorl %r14d, %r14d
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f3d
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x5d6b
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4274
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsvalue.c
// Function: js_newfunction
void js_newfunction(js_State *J, js_Function *fun, js_Environment *scope)
{
	js_Object *obj = jsV_newobject(J, JS_CFUNCTION, J->Function_prototype);
	obj->u.f.function = fun;
	obj->u.f.scope = scope;
	js_pushobject(J, obj);
	{
		js_pushnumber(J, fun->numparams);
		js_defproperty(J, -2, "length", JS_READONLY | JS_DONTENUM | JS_DONTCONF);
		js_newobject(J);
		{
			js_copy(J, -2);
			js_defproperty(J, -2, "constructor", JS_DONTENUM);
		}
		js_defproperty(J, -2, "prototype", JS_DONTENUM | JS_DONTCONF);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0xa0(%rdi), %rdx
pushq $0x2
popq %rbp
movl %ebp, %esi
callq 0x5d6b
movq %r15, 0x20(%rax)
movq %r14, 0x28(%rax)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4274
cvtsi2sdl 0x18(%r15), %xmm0
movq %rbx, %rdi
callq 0x3f9a
leaq 0x14e79(%rip), %rdx     # 0x28751
pushq $-0x2
popq %r14
pushq $0x7
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
callq 0x5963
movq %rbx, %rdi
callq 0x13813
movq %rbx, %rdi
movl %r14d, %esi
callq 0xeee2
leaq 0x151e1(%rip), %rdx     # 0x28ae5
movq %rbx, %rdi
movl %r14d, %esi
movl %ebp, %ecx
callq 0x5963
leaq 0x1488c(%rip), %rdx     # 0x281a4
pushq $0x6
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5963
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsvalue.c
// Function: js_newscript
void js_newscript(js_State *J, js_Function *fun, js_Environment *scope)
{
	js_Object *obj = jsV_newobject(J, JS_CSCRIPT, NULL);
	obj->u.f.function = fun;
	obj->u.f.scope = scope;
	js_pushobject(J, obj);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
pushq $0x3
popq %rsi
xorl %edx, %edx
callq 0x5d6b
movq %r14, 0x20(%rax)
movq %rbx, 0x28(%rax)
movq %r15, %rdi
movq %rax, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4274
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsvalue.c
// Function: js_newcfunctionx
void js_newcfunctionx(js_State *J, js_CFunction cfun, const char *name, int length, void *data, js_Finalize finalize)
{
	js_Object *obj;

	if (js_try(J)) {
		if (finalize)
			finalize(J, data);
		js_throw(J);
	}

	obj = jsV_newobject(J, JS_CCFUNCTION, J->Function_prototype);
	obj->u.c.name = name;
	obj->u.c.function = cfun;
	obj->u.c.constructor = NULL;
	obj->u.c.length = length;
	obj->u.c.data = data;
	obj->u.c.finalize = finalize;

	js_endtry(J);

	js_pushobject(J, obj);
	{
		js_pushnumber(J, length);
		js_defproperty(J, -2, "length", JS_READONLY | JS_DONTENUM | JS_DONTCONF);
		js_newobject(J);
		{
			js_copy(J, -2);
			js_defproperty(J, -2, "constructor", JS_DONTENUM);
		}
		js_defproperty(J, -2, "prototype", JS_DONTENUM | JS_DONTCONF);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, (%rsp)
movq %r8, %r15
movl %ecx, %ebp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
jne 0x13a42
movq 0xa0(%rbx), %rdx
pushq $0x4
popq %rsi
movq %rbx, %rdi
callq 0x5d6b
movq %rax, %r14
movq %r13, 0x20(%rax)
movq %r12, 0x28(%rax)
andq $0x0, 0x30(%rax)
movl %ebp, 0x38(%rax)
movq %r15, 0x40(%rax)
movq (%rsp), %rax
movq %rax, 0x48(%r14)
movq %rbx, %rdi
callq 0xf5a7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4274
cvtsi2sd %ebp, %xmm0
movq %rbx, %rdi
callq 0x3f9a
leaq 0x14d68(%rip), %rdx     # 0x28751
pushq $-0x2
popq %rbp
pushq $0x7
popq %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5963
movq %rbx, %rdi
callq 0x13813
movq %rbx, %rdi
movl %ebp, %esi
callq 0xeee2
leaq 0x150d3(%rip), %rdx     # 0x28ae5
pushq $0x2
popq %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5963
leaq 0x1477e(%rip), %rdx     # 0x281a4
pushq $0x6
popq %rcx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5963
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, (%rsp)
je 0x13a52
movq %rbx, %rdi
movq %r15, %rsi
callq *(%rsp)
movq %rbx, %rdi
callq 0x7714
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsvalue.c
// Function: js_newuserdatax
void js_newuserdatax(js_State *J, const char *tag, void *data, js_HasProperty has, js_Put put, js_Delete delete, js_Finalize finalize)
{
	js_Object *prototype = NULL;
	js_Object *obj;

	if (js_isobject(J, -1))
		prototype = js_toobject(J, -1);
	js_pop(J, 1);

	if (js_try(J)) {
		if (finalize)
			finalize(J, data);
		js_throw(J);
	}

	obj = jsV_newobject(J, JS_CUSERDATA, prototype);
	obj->u.user.tag = tag;
	obj->u.user.data = data;
	obj->u.user.has = has;
	obj->u.user.put = put;
	obj->u.user.delete = delete;
	obj->u.user.finalize = finalize;

	js_endtry(J);

	js_pushobject(J, obj);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r15
movq %r8, %r12
movq %rcx, %r13
movq %rdx, (%rsp)
movq %rsi, %rbp
movq %rdi, %rbx
pushq $-0x1
popq %rsi
callq 0xd489
testl %eax, %eax
je 0x13a94
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xd49c
movq %rax, %r14
jmp 0x13a99
xorl %eax, %eax
movl %eax, %r14d
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3f3d
movq %rbx, %rdi
callq 0xee71
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
jne 0x13b0c
pushq $0xf
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5d6b
movq %rax, %r14
movq %rbp, 0x20(%rax)
movq (%rsp), %rax
movq %rax, 0x28(%r14)
movq %r13, 0x30(%r14)
movq %r12, 0x38(%r14)
movq %r15, 0x40(%r14)
movq 0x40(%rsp), %rax
movq %rax, 0x48(%r14)
movq %rbx, %rdi
callq 0xf5a7
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4274
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x40(%rsp)
je 0x13b1f
movq %rbx, %rdi
movq (%rsp), %rsi
callq *0x40(%rsp)
movq %rbx, %rdi
callq 0x7714
// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./jsvalue.c
// Function: js_instanceof
int js_instanceof(js_State *J)
{
	js_Object *O, *V;

	if (!js_iscallable(J, -1))
		js_typeerror(J, "instanceof: invalid operand");

	if (!js_isobject(J, -2))
		return 0;

	js_getproperty(J, -1, "prototype");
	if (!js_isobject(J, -1))
		js_typeerror(J, "instanceof: 'prototype' property is not an object");
	O = js_toobject(J, -1);
	js_pop(J, 1);

	V = js_toobject(J, -2);
	while (V) {
		V = V->prototype;
		if (O == V)
			return 1;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $-0x1
popq %rsi
callq 0xf950
testl %eax, %eax
je 0x13bcd
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0xd489
xorl %ebp, %ebp
testl %eax, %eax
je 0x13bc0
leaq 0x1463b(%rip), %rdx     # 0x281a4
pushq $-0x1
popq %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x3eff
movq %rbx, %rdi
movl %r14d, %esi
callq 0xd489
testl %eax, %eax
je 0x13bd6
pushq $-0x1
popq %rsi
movq %rbx, %rdi
callq 0xd49c
movq %rax, %r14
pushq $0x1
popq %r15
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3f3d
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0xd49c
testq %rax, %rax
je 0x13bc0
movq 0x18(%rax), %rax
cmpq %rax, %r14
jne 0x13baf
movl %r15d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x14f1d(%rip), %rsi     # 0x28af1
jmp 0x13bdd
leaq 0x14f30(%rip), %rsi     # 0x28b0d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x99a6