// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[P]mujs/./json.c
// Function: fmtstr
static void fmtstr(js_State *J, js_Buffer **sb, const char *s)
{
	static const char *HEX = "0123456789abcdef";
	int i, n;
	Rune c;
	js_putc(J, sb, '"');
	while (*s) {
		n = chartorune(&c, s);
		switch (c) {
		case '"': js_puts(J, sb, "\\\""); break;
		case '\\': js_puts(J, sb, "\\\\"); break;
		case '\b': js_puts(J, sb, "\\b"); break;
		case '\f': js_puts(J, sb, "\\f"); break;
		case '\n': js_puts(J, sb, "\\n"); break;
		case '\r': js_puts(J, sb, "\\r"); break;
		case '\t': js_puts(J, sb, "\\t"); break;
		default:
			if (c < ' ' || (c >= 0xd800 && c <= 0xdfff)) {
				js_putc(J, sb, '\\');
				js_putc(J, sb, 'u');
				js_putc(J, sb, HEX[(c>>12)&15]);
				js_putc(J, sb, HEX[(c>>8)&15]);
				js_putc(J, sb, HEX[(c>>4)&15]);
				js_putc(J, sb, HEX[c&15]);
			} else if (c < 128) {
				js_putc(J, sb, c);
			} else {
				for (i = 0; i < n; ++i)
					js_putc(J, sb, s[i]);
			}
			break;
		}
		s += n;
	}
	js_putc(J, sb, '"');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x22
popq %rdx
callq 0xa986
leaq 0x6965(%rip), %r13      # 0x20b60
cmpb $0x0, (%r15)
je 0x1a388
leaq 0x4(%rsp), %rdi
movq %r15, %rsi
callq 0x1241b
movl 0x4(%rsp), %ebp
leal -0x8(%rbp), %ecx
movl %eax, %r12d
cmpl $0x5, %ecx
ja 0x1a23d
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xfa0f(%rip), %rdx      # 0x29c47
jmp 0x1a348
cmpl $0x5c, %ebp
je 0x1a33b
cmpl $0x22, %ebp
jne 0x1a25d
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xf9e9(%rip), %rdx      # 0x29c41
jmp 0x1a348
cmpl $0x20, %ebp
setge %al
movl %ebp, %ecx
andl $0x7ffff800, %ecx       # imm = 0x7FFFF800
cmpl $0xd800, %ecx           # imm = 0xD800
setne %cl
testb %cl, %al
jne 0x1a355
movq %r14, %rdi
movq %rbx, %rsi
pushq $0x5c
popq %rdx
callq 0xa986
movq %r14, %rdi
movq %rbx, %rsi
pushq $0x75
popq %rdx
callq 0xa986
movl %ebp, %eax
shrl $0xc, %eax
andl $0xf, %eax
leaq 0xf989(%rip), %r13      # 0x29c30
movsbl (%rax,%r13), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa986
movl %ebp, %eax
shrl $0x8, %eax
andl $0xf, %eax
movsbl (%rax,%r13), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa986
movl %ebp, %eax
shrl $0x4, %eax
andl $0xf, %eax
movsbl (%rax,%r13), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa986
andl $0xf, %ebp
movsbl (%rbp,%r13), %edx
leaq 0x6869(%rip), %r13      # 0x20b60
movq %r14, %rdi
movq %rbx, %rsi
jmp 0x1a365
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xf947(%rip), %rdx      # 0x29c53
jmp 0x1a348
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xf932(%rip), %rdx      # 0x29c4d
jmp 0x1a348
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xf920(%rip), %rdx      # 0x29c4a
jmp 0x1a348
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xf917(%rip), %rdx      # 0x29c50
jmp 0x1a348
movq %r14, %rdi
movq %rbx, %rsi
leaq 0xf8fc(%rip), %rdx      # 0x29c44
callq 0xaa1e
addq %r12, %r15
jmp 0x1a1fb
cmpl $0x80, %ebp
jae 0x1a36c
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0xa986
jmp 0x1a34d
xorl %ebp, %ebp
cmpq %rbp, %r12
je 0x1a34d
movsbl (%r15,%rbp), %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa986
incq %rbp
jmp 0x1a36e
pushq $0x22
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa986