	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_to_string                      ## -- Begin function to_string
	.p2align	4, 0x90
_to_string:                             ## @to_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	%esi, %edi
	callq	_jsval_type
                                        ## kill: def $eax killed $eax def $rax
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_3
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	xorl	%eax, %eax
	callq	_jsstr_undefined
	movq	%rax, (%r14)
	jmp	LBB0_13
LBB0_3:
	movl	%ebx, %edi
	callq	_debugstr_jsval
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_FIXME
	movq	_E_NOTIMPL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_4:
	movl	%ebx, %edi
	callq	_get_string
	movl	%eax, %edi
	callq	_jsstr_addref
	jmp	LBB0_11
LBB0_5:
	movq	_HINT_STRING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_to_primitive
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testl	%eax, %eax
	jne	LBB0_15
## %bb.6:
	movl	-28(%rbp), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_to_string
	movl	%eax, %ebx
	movl	-28(%rbp), %edi
	callq	_jsval_release
	jmp	LBB0_15
LBB0_7:
	movl	%ebx, %edi
	callq	_get_number
	movl	%eax, %edi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_double_to_string               ## TAILCALL
LBB0_8:
	leaq	_to_string.nullW(%rip), %rdi
	jmp	LBB0_10
LBB0_9:
	movl	%ebx, %edi
	callq	_get_bool
	testl	%eax, %eax
	leaq	_to_string.falseW(%rip), %rax
	leaq	_to_string.trueW(%rip), %rdi
	cmoveq	%rax, %rdi
LBB0_10:
	callq	_jsstr_alloc
LBB0_11:
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_13
## %bb.12:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_S_OK@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_5
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__const
_to_string.nullW:                       ## @to_string.nullW
	.asciz	"null"

_to_string.trueW:                       ## @to_string.trueW
	.asciz	"true"

_to_string.falseW:                      ## @to_string.falseW
	.asciz	"false"

	.comm	_S_OK,4,2                       ## @S_OK
	.comm	_HINT_STRING,4,2                ## @HINT_STRING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported %s\n"

	.comm	_E_NOTIMPL,4,2                  ## @E_NOTIMPL
	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_to_string                      ; -- Begin function to_string
	.p2align	2
_to_string:                             ; @to_string
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x21, x1
	mov	x20, x0
	mov	x0, x1
	bl	_jsval_type
	sub	w8, w0, #128
	cmp	w8, #5
	b.hi	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	bl	_jsstr_undefined
	str	x0, [x19]
Lloh2:
	adrp	x8, _S_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
	b	LBB0_12
LBB0_3:
	mov	x0, x21
	bl	_debugstr_jsval
	mov	x1, x0
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_FIXME
Lloh6:
	adrp	x8, _E_NOTIMPL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _E_NOTIMPL@GOTPAGEOFF]
	b	LBB0_12
LBB0_4:
	mov	x0, x21
	bl	_get_string
	bl	_jsstr_addref
	b	LBB0_11
LBB0_5:
Lloh8:
	adrp	x8, _HINT_STRING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HINT_STRING@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_to_primitive
	mov	x21, x0
	bl	_FAILED
	cbnz	w0, LBB0_13
; %bb.6:
	ldr	w1, [sp, #12]
	mov	x0, x20
	mov	x2, x19
	bl	_to_string
	mov	x21, x0
	ldr	w0, [sp, #12]
	bl	_jsval_release
	b	LBB0_13
LBB0_7:
	mov	x0, x21
	bl	_get_number
	mov	x1, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_double_to_string
LBB0_8:
Lloh11:
	adrp	x0, _to_string.nullW@PAGE
Lloh12:
	add	x0, x0, _to_string.nullW@PAGEOFF
	b	LBB0_10
LBB0_9:
	mov	x0, x21
	bl	_get_bool
Lloh13:
	adrp	x8, _to_string.trueW@PAGE
Lloh14:
	add	x8, x8, _to_string.trueW@PAGEOFF
Lloh15:
	adrp	x9, _to_string.falseW@PAGE
Lloh16:
	add	x9, x9, _to_string.falseW@PAGEOFF
	cmp	w0, #0
	csel	x0, x9, x8, eq
LBB0_10:
	bl	_jsstr_alloc
LBB0_11:
Lloh17:
	adrp	x8, _S_OK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
	str	x0, [x19]
Lloh19:
	adrp	x9, _E_OUTOFMEMORY@GOTPAGE
Lloh20:
	ldr	x9, [x9, _E_OUTOFMEMORY@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
LBB0_12:
	ldr	w21, [x8]
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
                                        ; -- End function
_to_string.nullW:                       ; @to_string.nullW
	.asciz	"null"

_to_string.trueW:                       ; @to_string.trueW
	.asciz	"true"

_to_string.falseW:                      ; @to_string.falseW
	.asciz	"false"

	.comm	_S_OK,4,2                       ; @S_OK
	.comm	_HINT_STRING,4,2                ; @HINT_STRING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported %s\n"

	.comm	_E_NOTIMPL,4,2                  ; @E_NOTIMPL
	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
.subsections_via_symbols
