	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_variant_to_jsval               ## -- Begin function variant_to_jsval
	.p2align	4, 0x90
_variant_to_jsval:                      ## @variant_to_jsval
	.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	%rsi, %r14
	movq	%rdi, %rbx
	callq	_V_VT
	movq	_VT_VARIANT@GOTPCREL(%rip), %rcx
	movq	_VT_BYREF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	cmpl	%edx, %eax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_V_VARIANTREF
	movq	%rax, %rbx
LBB0_2:
	movq	%rbx, %rdi
	callq	_V_VT
                                        ## kill: def $eax killed $eax def $rax
	addl	$-128, %eax
	cmpl	$15, %eax
	ja	LBB0_7
## %bb.3:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movq	%rbx, %rdi
	callq	_V_UNKNOWN
	testl	%eax, %eax
	je	LBB0_31
## %bb.5:
	movq	%rbx, %rdi
	callq	_V_UNKNOWN
	movq	_IID_IDispatch@GOTPCREL(%rip), %rsi
	leaq	-32(%rbp), %rdx
	movl	%eax, %edi
	callq	_IUnknown_QueryInterface
	movl	%eax, %edi
	callq	_SUCCEEDED
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	-32(%rbp), %rdi
	jmp	LBB0_32
LBB0_7:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_jsval_variant
	jmp	LBB0_22
LBB0_8:
	movq	%rbx, %rdi
	callq	_V_UI8
	jmp	LBB0_19
LBB0_9:
	movq	%rbx, %rdi
	callq	_V_UI4
	jmp	LBB0_19
LBB0_10:
	movq	%rbx, %rdi
	callq	_V_UI2
	jmp	LBB0_19
LBB0_11:
	movq	%rbx, %rdi
	callq	_V_UI1
	jmp	LBB0_19
LBB0_12:
	movq	%rbx, %rdi
	callq	_V_R8
	jmp	LBB0_19
LBB0_13:
	movq	%rbx, %rdi
	callq	_V_R4
	jmp	LBB0_19
LBB0_14:
	xorl	%eax, %eax
	callq	_jsval_null
	jmp	LBB0_20
LBB0_15:
	movq	%rbx, %rdi
	callq	_V_INT
	jmp	LBB0_19
LBB0_16:
	movq	%rbx, %rdi
	callq	_V_I4
	jmp	LBB0_19
LBB0_17:
	movq	%rbx, %rdi
	callq	_V_I2
	jmp	LBB0_19
LBB0_18:
	movq	%rbx, %rdi
	callq	_V_I1
LBB0_19:
	movl	%eax, %edi
	callq	_jsval_number
LBB0_20:
	movl	%eax, (%r14)
	movq	_S_OK@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %eax
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	xorl	%eax, %eax
	callq	_jsval_undefined
	jmp	LBB0_20
LBB0_24:
	movq	%rbx, %rdi
	callq	_V_DISPATCH
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movq	%rbx, %rdi
	callq	_V_DISPATCH
	movq	%rax, %rdi
	callq	_IDispatch_AddRef
LBB0_26:
	movq	%rbx, %rdi
	callq	_V_DISPATCH
	movq	%rax, %rdi
	jmp	LBB0_32
LBB0_27:
	movq	%rbx, %rdi
	callq	_V_BSTR
	testl	%eax, %eax
	je	LBB0_33
## %bb.28:
	movq	%rbx, %rdi
	callq	_V_BSTR
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_V_BSTR
	movl	%eax, %edi
	callq	_SysStringLen
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_jsstr_alloc_len
	testq	%rax, %rax
	jne	LBB0_34
## %bb.29:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_30:
	movq	%rbx, %rdi
	callq	_V_BOOL
	movl	%eax, %edi
	callq	_jsval_bool
	jmp	LBB0_20
LBB0_31:
	xorl	%edi, %edi
LBB0_32:
	callq	_jsval_disp
	jmp	LBB0_20
LBB0_33:
	xorl	%eax, %eax
	callq	_jsstr_null_bstr
LBB0_34:
	movq	%rax, %rdi
	callq	_jsval_string
	jmp	LBB0_20
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
.set L0_0_set_27, LBB0_27-LJTI0_0
.set L0_0_set_30, LBB0_30-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_14
	.long	L0_0_set_15
	.long	L0_0_set_16
	.long	L0_0_set_17
	.long	L0_0_set_18
	.long	L0_0_set_23
	.long	L0_0_set_24
	.long	L0_0_set_27
	.long	L0_0_set_30
	.end_data_region
                                        ## -- End function
	.comm	_VT_VARIANT,4,2                 ## @VT_VARIANT
	.comm	_VT_BYREF,4,2                   ## @VT_BYREF
	.comm	_S_OK,4,2                       ## @S_OK
	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
	.comm	_IID_IDispatch,4,2              ## @IID_IDispatch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_variant_to_jsval               ; -- Begin function variant_to_jsval
	.p2align	2
_variant_to_jsval:                      ; @variant_to_jsval
	.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, x1
	mov	x20, x0
	bl	_V_VT
Lloh0:
	adrp	x8, _VT_VARIANT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VT_VARIANT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _VT_BYREF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VT_BYREF@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_V_VARIANTREF
	mov	x20, x0
LBB0_2:
	mov	x0, x20
	bl	_V_VT
	sub	w8, w0, #128
	cmp	w8, #15
	b.hi	LBB0_7
; %bb.3:
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
	mov	x0, x20
	bl	_V_UNKNOWN
	cbz	w0, LBB0_27
; %bb.5:
	mov	x0, x20
	bl	_V_UNKNOWN
Lloh8:
	adrp	x1, _IID_IDispatch@GOTPAGE
Lloh9:
	ldr	x1, [x1, _IID_IDispatch@GOTPAGEOFF]
	add	x2, sp, #8
	bl	_IUnknown_QueryInterface
	bl	_SUCCEEDED
	cbz	w0, LBB0_7
; %bb.6:
	ldr	x0, [sp, #8]
	b	LBB0_28
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_jsval_variant
	b	LBB0_33
LBB0_8:
	mov	x0, x20
	bl	_V_UI8
	bl	_jsval_number
	b	LBB0_31
LBB0_9:
	mov	x0, x20
	bl	_V_UI4
	bl	_jsval_number
	b	LBB0_31
LBB0_10:
	mov	x0, x20
	bl	_V_UI2
	bl	_jsval_number
	b	LBB0_31
LBB0_11:
	mov	x0, x20
	bl	_V_UI1
	bl	_jsval_number
	b	LBB0_31
LBB0_12:
	mov	x0, x20
	bl	_V_R8
	bl	_jsval_number
	b	LBB0_31
LBB0_13:
	mov	x0, x20
	bl	_V_R4
	bl	_jsval_number
	b	LBB0_31
LBB0_14:
	bl	_jsval_null
	b	LBB0_31
LBB0_15:
	mov	x0, x20
	bl	_V_INT
	bl	_jsval_number
	b	LBB0_31
LBB0_16:
	mov	x0, x20
	bl	_V_I4
	bl	_jsval_number
	b	LBB0_31
LBB0_17:
	mov	x0, x20
	bl	_V_I2
	bl	_jsval_number
	b	LBB0_31
LBB0_18:
	mov	x0, x20
	bl	_V_I1
	bl	_jsval_number
	b	LBB0_31
LBB0_19:
	bl	_jsval_undefined
	b	LBB0_31
LBB0_20:
	mov	x0, x20
	bl	_V_DISPATCH
	cbz	x0, LBB0_22
; %bb.21:
	mov	x0, x20
	bl	_V_DISPATCH
	bl	_IDispatch_AddRef
LBB0_22:
	mov	x0, x20
	bl	_V_DISPATCH
	b	LBB0_28
LBB0_23:
	mov	x0, x20
	bl	_V_BSTR
	cbz	w0, LBB0_29
; %bb.24:
	mov	x0, x20
	bl	_V_BSTR
	mov	x21, x0
	mov	x0, x20
	bl	_V_BSTR
	bl	_SysStringLen
	mov	x1, x0
	mov	x0, x21
	bl	_jsstr_alloc_len
	cbnz	x0, LBB0_30
; %bb.25:
Lloh10:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
	b	LBB0_32
LBB0_26:
	mov	x0, x20
	bl	_V_BOOL
	bl	_jsval_bool
	b	LBB0_31
LBB0_27:
	mov	x0, #0
LBB0_28:
	bl	_jsval_disp
	b	LBB0_31
LBB0_29:
	bl	_jsstr_null_bstr
LBB0_30:
	bl	_jsval_string
LBB0_31:
	str	w0, [x19]
Lloh12:
	adrp	x8, _S_OK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
LBB0_32:
	ldr	w0, [x8]
LBB0_33:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_10-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
	.byte	(LBB0_12-LBB0_4)>>2
	.byte	(LBB0_13-LBB0_4)>>2
	.byte	(LBB0_14-LBB0_4)>>2
	.byte	(LBB0_15-LBB0_4)>>2
	.byte	(LBB0_16-LBB0_4)>>2
	.byte	(LBB0_17-LBB0_4)>>2
	.byte	(LBB0_18-LBB0_4)>>2
	.byte	(LBB0_19-LBB0_4)>>2
	.byte	(LBB0_20-LBB0_4)>>2
	.byte	(LBB0_23-LBB0_4)>>2
	.byte	(LBB0_26-LBB0_4)>>2
                                        ; -- End function
	.comm	_VT_VARIANT,4,2                 ; @VT_VARIANT
	.comm	_VT_BYREF,4,2                   ; @VT_BYREF
	.comm	_S_OK,4,2                       ; @S_OK
	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
	.comm	_IID_IDispatch,4,2              ; @IID_IDispatch
.subsections_via_symbols
