// File: /workspace/github_c_makefile_star2_O0/ccxvii[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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x22, %edx
callq 0xd910
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
je 0x27277
movq -0x18(%rbp), %rsi
leaq -0x24(%rbp), %rdi
callq 0x19d20
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x28(%rbp)
subl $0x8, %eax
je 0x270bd
jmp 0x27040
movl -0x28(%rbp), %eax
subl $0x9, %eax
je 0x27121
jmp 0x2704e
movl -0x28(%rbp), %eax
subl $0xa, %eax
je 0x270ef
jmp 0x2705c
movl -0x28(%rbp), %eax
subl $0xc, %eax
je 0x270d6
jmp 0x27066
movl -0x28(%rbp), %eax
subl $0xd, %eax
je 0x27108
jmp 0x27074
movl -0x28(%rbp), %eax
subl $0x22, %eax
je 0x2708b
jmp 0x2707e
movl -0x28(%rbp), %eax
subl $0x5c, %eax
je 0x270a4
jmp 0x2713a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x16252(%rip), %rdx     # 0x3d2ec
callq 0xda70
jmp 0x27261
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x1623c(%rip), %rdx     # 0x3d2ef
callq 0xda70
jmp 0x27261
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x16226(%rip), %rdx     # 0x3d2f2
callq 0xda70
jmp 0x27261
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x16210(%rip), %rdx     # 0x3d2f5
callq 0xda70
jmp 0x27261
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x161fa(%rip), %rdx     # 0x3d2f8
callq 0xda70
jmp 0x27261
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x161e4(%rip), %rdx     # 0x3d2fb
callq 0xda70
jmp 0x27261
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x161ce(%rip), %rdx     # 0x3d2fe
callq 0xda70
jmp 0x27261
cmpl $0x20, -0x24(%rbp)
jl 0x2715a
cmpl $0xd800, -0x24(%rbp)    # imm = 0xD800
jl 0x2720d
cmpl $0xdfff, -0x24(%rbp)    # imm = 0xDFFF
jg 0x2720d
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x5c, %edx
callq 0xd910
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x75, %edx
callq 0xd910
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq 0x20c4b(%rip), %rax     # 0x47dd8
movl -0x24(%rbp), %ecx
sarl $0xc, %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edx
callq 0xd910
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq 0x20c27(%rip), %rax     # 0x47dd8
movl -0x24(%rbp), %ecx
sarl $0x8, %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edx
callq 0xd910
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq 0x20c03(%rip), %rax     # 0x47dd8
movl -0x24(%rbp), %ecx
sarl $0x4, %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edx
callq 0xd910
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq 0x20bdf(%rip), %rax     # 0x47dd8
movl -0x24(%rbp), %ecx
andl $0xf, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %edx
callq 0xd910
jmp 0x2725f
cmpl $0x80, -0x24(%rbp)
jge 0x27228
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0xd910
jmp 0x2725d
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x2725b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %edx
callq 0xd910
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2722f
jmp 0x2725d
jmp 0x2725f
jmp 0x27261
movl -0x20(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x27016
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x22, %edx
callq 0xd910
addq $0x30, %rsp
popq %rbp
retq
nop