// File: /workspace/github_c_makefile_star2_O3/ArtifexSoftware[P]mujs/./jsbuiltin.c
// Function: Decode
static void Decode(js_State *J, const char *str_, const char *reserved)
{
	/* NOTE: volatile to silence GCC warning about longjmp clobbering a variable */
	const char * volatile str = str_;
	js_Buffer *sb = NULL;
	int a, b;

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

	while (*str) {
		int c = (unsigned char) *str++;
		if (c != '%')
			js_putc(J, &sb, c);
		else {
			if (!str[0] || !str[1])
				js_urierror(J, "truncated escape sequence");
			a = *str++;
			b = *str++;
			if (!jsY_ishex(a) || !jsY_ishex(b))
				js_urierror(J, "invalid escape sequence");
			c = jsY_tohex(a) << 4 | jsY_tohex(b);
			if (!strchr(reserved, c))
				js_putc(J, &sb, c);
			else {
				js_putc(J, &sb, '%');
				js_putc(J, &sb, a);
				js_putc(J, &sb, b);
			}
		}
	}
	js_putc(J, &sb, 0);

	js_pushstring(J, sb ? sb->s : "");
	js_endtry(J);
	js_free(J, sb);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x13b6c
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
jne 0x1ceb2
movq 0x8(%rsp), %rax
cmpb $0x0, (%rax)
je 0x1ce3d
leaq 0x10(%rsp), %r15
movq 0x8(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rsp)
movzbl (%rax), %eax
movl %eax, %edx
cmpl $0x25, %eax
jne 0x1ce24
movq 0x8(%rsp), %rax
cmpb $0x0, (%rax)
je 0x1ce98
movq 0x8(%rsp), %rax
cmpb $0x0, 0x1(%rax)
je 0x1ce98
movq 0x8(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rsp)
movsbl (%rax), %r12d
movq 0x8(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rsp)
movsbl (%rax), %ebp
movl %r12d, %eax
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x1cd6d
movl %r12d, %eax
andl $-0x21, %eax
addl $-0x47, %eax
cmpl $-0x6, %eax
jb 0x1cea1
movl %ebp, %eax
addl $-0x30, %eax
cmpl $0xa, %eax
jb 0x1cd88
movl %ebp, %edx
andl $-0x21, %edx
addl $-0x47, %edx
cmpl $-0x7, %edx
jbe 0x1cea1
movl %ecx, %r13d
cmpl $0xa, %ecx
jb 0x1cdbd
movl %r12d, %ecx
addl $-0x61, %ecx
cmpl $0x5, %ecx
ja 0x1cda4
movl %r12d, %ecx
leal -0x57(%rcx), %r13d
jmp 0x1cdbd
movl %r12d, %ecx
addl $-0x41, %ecx
movl %r12d, %edx
leal -0x37(%rdx), %r13d
cmpl $0x6, %ecx
movl $0x0, %ecx
cmovael %ecx, %r13d
movl %eax, %edx
cmpl $0xa, %eax
jb 0x1cdea
movl %ebp, %eax
addl $-0x61, %eax
cmpl $0x5, %eax
ja 0x1cdd5
movl %ebp, %eax
leal -0x57(%rax), %edx
jmp 0x1cdea
movl %ebp, %eax
addl $-0x41, %eax
movl %ebp, %edx
addl $-0x37, %edx
cmpl $0x6, %eax
movl $0x0, %eax
cmovael %eax, %edx
shll $0x4, %r13d
addl %edx, %r13d
movq %r14, %rdi
movl %r13d, %esi
callq 0x32a0
movl %r13d, %edx
testq %rax, %rax
je 0x1ce24
movq %rbx, %rdi
movq %r15, %rsi
movl $0x25, %edx
callq 0xdda1
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0xdda1
movl %ebp, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xdda1
movq 0x8(%rsp), %rax
cmpb $0x0, (%rax)
jne 0x1ccf4
leaq 0x10(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xdda1
movq (%r14), %r14
leaq 0x8(%r14), %rax
testq %r14, %r14
leaq 0x17556(%rip), %rsi     # 0x343b6
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0x13215
movl 0x8198(%rbx), %eax
testl %eax, %eax
je 0x1cec4
decl %eax
movl %eax, 0x8198(%rbx)
movq (%rbx), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq *0x10(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16e5d(%rip), %rsi     # 0x33cfc
jmp 0x1cea8
leaq 0x16e6e(%rip), %rsi     # 0x33d16
xorl %eax, %eax
movq %rbx, %rdi
callq 0xcace
movq (%rbx), %rdi
xorl %edx, %edx
movl %edx, %esi
callq *0x10(%rbx)
movq %rbx, %rdi
callq 0x8e1b
leaq 0x1696e(%rip), %rsi     # 0x33839
xorl %eax, %eax
movq %rbx, %rdi
callq 0xc666