	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_json_string
_parse_json_string:                     ## @parse_json_string
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %rax
	leaq	1(%rax), %r15
	movq	%r15, (%rdi)
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rbx
	movzbl	(%rax,%rcx), %ecx
	testb	%cl, %cl
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpb	$34, %cl
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	1(%rbx), %rcx
	leaq	(%rax,%rbx), %rdx
	incq	%rdx
	movq	%rdx, (%r13)
	cmpb	$92, (%rax,%rbx)
	jne	LBB0_1
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%rax,%rbx), %rcx
	addq	$2, %rcx
	addq	$2, %rbx
	movq	%rcx, (%r13)
	movq	%rbx, %rcx
	jmp	LBB0_1
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_FIXME
LBB0_13:
	movq	_E_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_6:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	leaq	-1(%rbx), %r14
	movq	%r14, -48(%rbp)
	movq	%rbx, %rdi
	callq	_heap_alloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	%rax, %r12
	cmpq	$1, %rbx
	je	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memcpy
LBB0_9:
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_unescape
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movq	-48(%rbp), %rax
	movb	$0, (%r12,%rax)
	incq	(%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax)
	movq	_S_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
	callq	_FIXME
	movq	%r12, %rdi
	callq	_heap_free
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unterminated string\n"

	.comm	_E_FAIL,4,2                     ## @E_FAIL
	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
L_.str.1:                               ## @.str.1
	.asciz	"unescape failed\n"

	.comm	_S_OK,4,2                       ## @S_OK
	.no_dead_strip	_parse_json_string
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_json_string
_parse_json_string:                     ; @parse_json_string
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	add	x21, x8, #1
	str	x21, [x0]
	mov	w9, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x9
	ldrb	w9, [x8, x9]
	cbz	w9, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w9, #34
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x9, x23, #1
	add	x10, x8, x9
	str	x10, [x20]
	ldrb	w10, [x8, x23]
	cmp	w10, #92
	b.ne	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x9, x23, #2
	add	x10, x8, x9
	str	x10, [x20]
	b	LBB0_1
LBB0_5:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
LBB0_6:
Lloh2:
	adrp	x8, _E_FAIL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E_FAIL@GOTPAGEOFF]
	b	LBB0_13
LBB0_7:
	sub	x24, x23, #1
	str	x24, [sp, #8]
	mov	x0, x23
	bl	_heap_alloc
	cbz	x0, LBB0_12
; %bb.8:
	mov	x22, x0
	cmp	x23, #1
	b.eq	LBB0_10
; %bb.9:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x24
	bl	_memcpy
LBB0_10:
	add	x1, sp, #8
	mov	x0, x22
	bl	_unescape
	cbz	w0, LBB0_14
; %bb.11:
	ldr	x8, [sp, #8]
	strb	wzr, [x22, x8]
	ldr	x8, [x20]
	add	x8, x8, #1
	str	x8, [x20]
	str	x22, [x19]
Lloh4:
	adrp	x8, _S_OK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh6:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
	mov	x0, x22
	bl	_heap_free
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unterminated string\n"

	.comm	_E_FAIL,4,2                     ; @E_FAIL
	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
l_.str.1:                               ; @.str.1
	.asciz	"unescape failed\n"

	.comm	_S_OK,4,2                       ; @S_OK
	.no_dead_strip	_parse_json_string
.subsections_via_symbols
