	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function JSON_stringify
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
LCPI0_1:
	.quad	0x4024000000000000              ## double 10
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_JSON_stringify:                        ## @JSON_stringify
	.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	%r12
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, %r15
	movl	%ecx, %ebx
	movq	%rdi, %r12
	xorpd	%xmm0, %xmm0
	movupd	%xmm0, -56(%rbp)
	movupd	%xmm0, -72(%rbp)
	movupd	%xmm0, -88(%rbp)
	movupd	%xmm0, -104(%rbp)
	movq	%rdi, -112(%rbp)
	leaq	L_.str(%rip), %rdi
	callq	_TRACE
	cmpl	$1, %ebx
	je	LBB0_22
## %bb.1:
	testl	%ebx, %ebx
	jne	LBB0_5
## %bb.2:
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_jsval_undefined
	movl	%eax, (%r14)
LBB0_4:
	movq	_S_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_31
LBB0_5:
	movl	4(%r15), %edi
	callq	_is_object_instance
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	4(%r15), %edi
	callq	_debugstr_jsval
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_FIXME
	movq	_E_NOTIMPL@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_31
LBB0_7:
	cmpl	$3, %ebx
	jb	LBB0_22
## %bb.8:
	movl	8(%r15), %esi
	leaq	-36(%rbp), %rdx
	movq	%r12, %rdi
	callq	_maybe_to_primitive
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_31
## %bb.9:
	movl	-36(%rbp), %edi
	callq	_is_number
	movl	-36(%rbp), %edi
	testq	%rax, %rax
	je	LBB0_19
## %bb.10:
	callq	_get_number
	ucomisd	LCPI0_0(%rip), %xmm0
	jb	LBB0_21
## %bb.11:
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	minsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm0
	callq	_floor
	testl	%eax, %eax
	jle	LBB0_18
## %bb.12:
	movl	%eax, %esi
	leaq	-1(%rsi), %rdx
	movl	%esi, %ecx
	andl	$3, %ecx
	cmpq	$3, %rdx
	jae	LBB0_14
## %bb.13:
	xorl	%edx, %edx
	jmp	LBB0_16
LBB0_19:
	callq	_is_string
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movl	-36(%rbp), %edi
	callq	_get_string
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_jsstr_length
	cmpq	$10, %rax
	movl	$10, %edx
	cmovbq	%rax, %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r12, %rcx
	callq	_jsstr_extract
	jmp	LBB0_21
LBB0_14:
	andl	$-4, %esi
	xorl	%edx, %edx
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movb	$32, (%r12,%rdx)
	movq	-112(%rbp), %rdi
	movb	$32, 1(%rdi,%rdx)
	movq	-112(%rbp), %rdi
	movb	$32, 2(%rdi,%rdx)
	movq	-112(%rbp), %rdi
	movb	$32, 3(%rdi,%rdx)
	addq	$4, %rdx
	movq	-112(%rbp), %r12
	cmpq	%rdx, %rsi
	jne	LBB0_15
LBB0_16:
	testq	%rcx, %rcx
	je	LBB0_18
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movb	$32, (%r12,%rdx)
	incq	%rdx
	movq	-112(%rbp), %r12
	decq	%rcx
	jne	LBB0_17
LBB0_18:
	cltq
	movb	$0, (%r12,%rax)
LBB0_21:
	movl	-36(%rbp), %edi
	callq	_jsval_release
LBB0_22:
	movl	(%r15), %esi
	leaq	-112(%rbp), %rdi
	callq	_stringify
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_SUCCEEDED
	testq	%r14, %r14
	je	LBB0_30
## %bb.23:
	testq	%rax, %rax
	je	LBB0_30
## %bb.24:
	xorl	%edi, %edi
	cmpl	$0, -92(%rbp)
	sete	%dil
	callq	_assert
	movq	_S_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_28
## %bb.25:
	movl	-100(%rbp), %edi
	movl	-96(%rbp), %esi
	callq	_jsstr_alloc_len
	testq	%rax, %rax
	je	LBB0_27
## %bb.26:
	movq	%rax, %rdi
	callq	_jsval_string
	jmp	LBB0_29
LBB0_28:
	xorl	%eax, %eax
	callq	_jsval_undefined
LBB0_29:
	movl	%eax, (%r14)
LBB0_30:
	movl	-100(%rbp), %edi
	callq	_heap_free
	movl	-104(%rbp), %edi
	callq	_heap_free
LBB0_31:
	movq	%rbx, %rax
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_S_OK,8,3                       ## @S_OK
L_.str.1:                               ## @.str.1
	.asciz	"Replacer %s not yet supported\n"

	.comm	_E_NOTIMPL,8,3                  ## @E_NOTIMPL
	.comm	_E_OUTOFMEMORY,8,3              ## @E_OUTOFMEMORY
	.no_dead_strip	_JSON_stringify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function JSON_stringify
_JSON_stringify:                        ; @JSON_stringify
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x5
	mov	x20, x4
	mov	x22, x3
	mov	x21, x0
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #48]
	stp	q0, q0, [sp, #16]
	str	x0, [sp, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	cmp	w22, #1
	b.eq	LBB0_18
; %bb.1:
	cbnz	w22, LBB0_5
; %bb.2:
	cbz	x19, LBB0_4
; %bb.3:
	bl	_jsval_undefined
	str	w0, [x19]
LBB0_4:
Lloh2:
	adrp	x8, _S_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh4:
	ldr	x22, [x8]
	b	LBB0_26
LBB0_5:
	ldr	w0, [x20, #4]
	bl	_is_object_instance
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x20, #4]
	bl	_debugstr_jsval
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_FIXME
Lloh7:
	adrp	x8, _E_NOTIMPL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _E_NOTIMPL@GOTPAGEOFF]
Lloh9:
	ldr	x22, [x8]
	b	LBB0_26
LBB0_7:
	cmp	w22, #3
	b.lo	LBB0_18
; %bb.8:
	ldr	w1, [x20, #8]
	add	x2, sp, #4
	mov	x0, x21
	bl	_maybe_to_primitive
	mov	x22, x0
	bl	_FAILED
	cbnz	x0, LBB0_26
; %bb.9:
	ldr	w0, [sp, #4]
	bl	_is_number
	mov	x8, x0
	ldr	w0, [sp, #4]
	cbz	x8, LBB0_15
; %bb.10:
	bl	_get_number
	fmov	d1, #1.00000000
	fcmp	d0, d1
	b.lt	LBB0_17
; %bb.11:
	fmov	d1, #10.00000000
	fmin	d0, d0, d1
	bl	_floor
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x8, #0
	mov	w9, w0
	mov	w10, #32
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	strb	w10, [x21, x8]
	add	x8, x8, #1
	ldr	x21, [sp, #8]
	cmp	x9, x8
	b.ne	LBB0_13
LBB0_14:
	strb	wzr, [x21, w0, sxtw]
	b	LBB0_17
LBB0_15:
	bl	_is_string
	cbz	x0, LBB0_17
; %bb.16:
	ldr	w0, [sp, #4]
	bl	_get_string
	mov	x22, x0
	bl	_jsstr_length
	mov	w8, #10
	cmp	x0, #10
	csel	x2, x0, x8, lo
	mov	x0, x22
	mov	w1, #0
	mov	x3, x21
	bl	_jsstr_extract
LBB0_17:
	ldr	w0, [sp, #4]
	bl	_jsval_release
LBB0_18:
	ldr	w1, [x20]
	add	x0, sp, #8
	bl	_stringify
	mov	x22, x0
	bl	_SUCCEEDED
	cbz	x19, LBB0_25
; %bb.19:
	cbz	x0, LBB0_25
; %bb.20:
	ldr	w8, [sp, #28]
	cmp	w8, #0
	cset	w0, eq
	bl	_assert
Lloh10:
	adrp	x8, _S_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x22, x8
	b.ne	LBB0_23
; %bb.21:
	ldp	w0, w1, [sp, #20]
	bl	_jsstr_alloc_len
	cbz	x0, LBB0_27
; %bb.22:
	bl	_jsval_string
	b	LBB0_24
LBB0_23:
	bl	_jsval_undefined
LBB0_24:
	str	w0, [x19]
LBB0_25:
	ldr	w0, [sp, #20]
	bl	_heap_free
	ldr	w0, [sp, #16]
	bl	_heap_free
LBB0_26:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_27:
Lloh13:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
Lloh15:
	ldr	x22, [x8]
	b	LBB0_25
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_S_OK,8,3                       ; @S_OK
l_.str.1:                               ; @.str.1
	.asciz	"Replacer %s not yet supported\n"

	.comm	_E_NOTIMPL,8,3                  ; @E_NOTIMPL
	.comm	_E_OUTOFMEMORY,8,3              ; @E_OUTOFMEMORY
	.no_dead_strip	_JSON_stringify
.subsections_via_symbols
