	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_to_primitive                   ## -- Begin function to_primitive
	.p2align	4, 0x90
_to_primitive:                          ## @to_primitive
	.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	%rcx, %r15
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r13
	movl	%esi, %edi
	callq	_is_object_instance
	testq	%rax, %rax
	je	LBB0_21
## %bb.1:
	movl	%ebx, %edi
	callq	_get_object
	testl	%eax, %eax
	je	LBB0_2
## %bb.4:
	movl	%ebx, %edi
	callq	_get_object
	movl	%eax, %edi
	callq	_iface_to_jsdisp
	testq	%rax, %rax
	je	LBB0_22
## %bb.5:
	movq	%rax, %r12
	movq	_NO_HINT@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jne	LBB0_6
## %bb.7:
	movq	_JSCLASS_DATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_is_class
	movq	_HINT_STRING@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, %r15
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	_HINT_NUMBER@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	jmp	LBB0_9
LBB0_21:
	movl	%ebx, %edi
	movq	%r14, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_jsval_copy                     ## TAILCALL
LBB0_2:
	xorl	%eax, %eax
	callq	_jsval_null
	movl	%eax, (%r14)
LBB0_3:
	movq	_S_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_20
LBB0_22:
	movl	%ebx, %edi
	callq	_get_object
	movq	_DISPID_VALUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movl	%eax, %esi
	movq	%r14, %rcx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_disp_propget                   ## TAILCALL
LBB0_6:
	movq	_HINT_STRING@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_9:
	cmpq	%rcx, %r15
	leaq	_to_primitive.toStringW(%rip), %r13
	leaq	_to_primitive.valueOfW(%rip), %rbx
	movq	%rbx, %rsi
	cmoveq	%r13, %rsi
	leaq	-48(%rbp), %rcx
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_jsdisp_get_id
	movl	%eax, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_15
## %bb.10:
	movl	-48(%rbp), %esi
	movq	_DISPATCH_METHOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %r9
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_jsdisp_call
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_11
## %bb.12:
	movl	-44(%rbp), %edi
	callq	_is_object_instance
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movl	-44(%rbp), %edi
	callq	_get_object
	movl	%eax, %edi
	callq	_IDispatch_Release
LBB0_15:
	movq	_HINT_STRING@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	cmoveq	%rbx, %r13
	leaq	-48(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_jsdisp_get_id
	movl	%eax, %edi
	callq	_SUCCEEDED
	testq	%rax, %rax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_19
## %bb.16:
	movl	-48(%rbp), %esi
	movq	_DISPATCH_METHOD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %r9
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_jsdisp_call
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_17
LBB0_11:
	leaq	L_.str(%rip), %rdi
	callq	_WARN
	movq	%r12, %rdi
	callq	_jsdisp_release
	jmp	LBB0_20
LBB0_17:
	movl	-44(%rbp), %edi
	callq	_is_object_instance
	testq	%rax, %rax
	je	LBB0_13
## %bb.18:
	movl	-44(%rbp), %edi
	callq	_get_object
	movl	%eax, %edi
	callq	_IDispatch_Release
LBB0_19:
	movq	%r12, %rdi
	callq	_jsdisp_release
	leaq	L_.str.1(%rip), %rdi
	callq	_WARN
	movq	_JS_E_TO_PRIMITIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_throw_type_error
	movl	%eax, %r14d
LBB0_20:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r12, %rdi
	callq	_jsdisp_release
	movl	-44(%rbp), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
_to_primitive.toStringW:                ## @to_primitive.toStringW
	.asciz	"toString"

_to_primitive.valueOfW:                 ## @to_primitive.valueOfW
	.asciz	"valueOf"

	.comm	_S_OK,4,2                       ## @S_OK
	.comm	_DISPID_VALUE,4,2               ## @DISPID_VALUE
	.comm	_NO_HINT,8,3                    ## @NO_HINT
	.comm	_JSCLASS_DATE,4,2               ## @JSCLASS_DATE
	.comm	_HINT_STRING,8,3                ## @HINT_STRING
	.comm	_HINT_NUMBER,8,3                ## @HINT_NUMBER
	.comm	_DISPATCH_METHOD,4,2            ## @DISPATCH_METHOD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"call error - forwarding exception\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed\n"

	.comm	_JS_E_TO_PRIMITIVE,4,2          ## @JS_E_TO_PRIMITIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_to_primitive                   ; -- Begin function to_primitive
	.p2align	2
_to_primitive:                          ; @to_primitive
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x3
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
	mov	x0, x1
	bl	_is_object_instance
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x23
	bl	_get_object
	cbz	w0, LBB0_6
; %bb.2:
	mov	x0, x23
	bl	_get_object
	bl	_iface_to_jsdisp
	cbz	x0, LBB0_8
; %bb.3:
	mov	x21, x0
Lloh0:
	adrp	x8, _NO_HINT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NO_HINT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x24, _HINT_STRING@GOTPAGE
Lloh4:
	ldr	x24, [x24, _HINT_STRING@GOTPAGEOFF]
	cmp	x8, x22
	b.ne	LBB0_9
; %bb.4:
Lloh5:
	adrp	x8, _JSCLASS_DATE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _JSCLASS_DATE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_is_class
	ldr	x8, [x24]
Lloh8:
	adrp	x9, _HINT_NUMBER@GOTPAGE
Lloh9:
	ldr	x9, [x9, _HINT_NUMBER@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x0, #0
	csel	x22, x9, x8, eq
	b	LBB0_10
LBB0_5:
	mov	x0, x23
	mov	x1, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_jsval_copy
LBB0_6:
	bl	_jsval_null
	str	w0, [x20]
LBB0_7:
Lloh11:
	adrp	x8, _S_OK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh13:
	ldr	w23, [x8]
	b	LBB0_20
LBB0_8:
	mov	x0, x23
	bl	_get_object
	mov	x1, x0
Lloh14:
	adrp	x8, _DISPID_VALUE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DISPID_VALUE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_disp_propget
LBB0_9:
	ldr	x8, [x24]
LBB0_10:
Lloh17:
	adrp	x25, _to_primitive.valueOfW@PAGE
Lloh18:
	add	x25, x25, _to_primitive.valueOfW@PAGEOFF
Lloh19:
	adrp	x26, _to_primitive.toStringW@PAGE
Lloh20:
	add	x26, x26, _to_primitive.toStringW@PAGEOFF
	cmp	x22, x8
	csel	x1, x26, x25, eq
	add	x3, sp, #8
	mov	x0, x21
	mov	w2, #0
	bl	_jsdisp_get_id
	bl	_SUCCEEDED
	cbz	x0, LBB0_14
; %bb.11:
	ldr	w1, [sp, #8]
Lloh21:
	adrp	x8, _DISPATCH_METHOD@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DISPATCH_METHOD@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	add	x5, sp, #12
	mov	x0, x21
	mov	w3, #0
	mov	x4, #0
	bl	_jsdisp_call
	mov	x23, x0
	bl	_FAILED
	cbnz	x0, LBB0_16
; %bb.12:
	ldr	w0, [sp, #12]
	bl	_is_object_instance
	cbz	x0, LBB0_21
; %bb.13:
	ldr	w0, [sp, #12]
	bl	_get_object
	bl	_IDispatch_Release
LBB0_14:
	ldr	x8, [x24]
	cmp	x22, x8
	csel	x1, x25, x26, eq
	add	x3, sp, #8
	mov	x0, x21
	mov	w2, #0
	bl	_jsdisp_get_id
	bl	_SUCCEEDED
	cbz	x0, LBB0_19
; %bb.15:
	ldr	w1, [sp, #8]
Lloh24:
	adrp	x8, _DISPATCH_METHOD@GOTPAGE
Lloh25:
	ldr	x8, [x8, _DISPATCH_METHOD@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	add	x5, sp, #12
	mov	x0, x21
	mov	w3, #0
	mov	x4, #0
	bl	_jsdisp_call
	mov	x23, x0
	bl	_FAILED
	cbz	x0, LBB0_17
LBB0_16:
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	bl	_WARN
	mov	x0, x21
	bl	_jsdisp_release
	b	LBB0_20
LBB0_17:
	ldr	w0, [sp, #12]
	bl	_is_object_instance
	cbz	x0, LBB0_21
; %bb.18:
	ldr	w0, [sp, #12]
	bl	_get_object
	bl	_IDispatch_Release
LBB0_19:
	mov	x0, x21
	bl	_jsdisp_release
Lloh29:
	adrp	x0, l_.str.1@PAGE
Lloh30:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_WARN
Lloh31:
	adrp	x8, _JS_E_TO_PRIMITIVE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _JS_E_TO_PRIMITIVE@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_throw_type_error
	mov	x23, x0
LBB0_20:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_21:
	mov	x0, x21
	bl	_jsdisp_release
	ldr	w8, [sp, #12]
	str	w8, [x20]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_to_primitive.toStringW:                ; @to_primitive.toStringW
	.asciz	"toString"

_to_primitive.valueOfW:                 ; @to_primitive.valueOfW
	.asciz	"valueOf"

	.comm	_S_OK,4,2                       ; @S_OK
	.comm	_DISPID_VALUE,4,2               ; @DISPID_VALUE
	.comm	_NO_HINT,8,3                    ; @NO_HINT
	.comm	_JSCLASS_DATE,4,2               ; @JSCLASS_DATE
	.comm	_HINT_STRING,8,3                ; @HINT_STRING
	.comm	_HINT_NUMBER,8,3                ; @HINT_NUMBER
	.comm	_DISPATCH_METHOD,4,2            ; @DISPATCH_METHOD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"call error - forwarding exception\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed\n"

	.comm	_JS_E_TO_PRIMITIVE,4,2          ; @JS_E_TO_PRIMITIVE
.subsections_via_symbols
