	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_chain_engine
_get_chain_engine:                      ## @get_chain_engine
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	$4, -24(%rbp)
	movq	_HCCE_CURRENT_USER@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jne	LBB0_4
## %bb.1:
	testl	%esi, %esi
	je	LBB0_11
## %bb.2:
	movq	_default_cu_engine@GOTPCREL(%rip), %r14
	movq	(%r14), %rbx
	testq	%rbx, %rbx
	jne	LBB0_12
## %bb.3:
	movq	_CERT_SYSTEM_STORE_CURRENT_USER@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	%rdi, %rbx
	movq	_HCCE_LOCAL_MACHINE@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jne	LBB0_12
## %bb.5:
	testl	%esi, %esi
	je	LBB0_11
## %bb.6:
	movq	_default_lm_engine@GOTPCREL(%rip), %r14
	movq	(%r14), %rbx
	testq	%rbx, %rbx
	jne	LBB0_12
## %bb.7:
	movq	_CERT_SYSTEM_STORE_LOCAL_MACHINE@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	xorl	%edi, %edi
	callq	_CRYPT_CreateChainEngine
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_InterlockedCompareExchangePointer
	cmpq	%rbx, (%r14)
	je	LBB0_12
## %bb.9:
	movq	%rbx, %rdi
	callq	_CertFreeCertificateChainEngine
	movq	(%r14), %rbx
	jmp	LBB0_12
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HCCE_CURRENT_USER,8,3          ## @HCCE_CURRENT_USER
	.comm	_default_cu_engine,8,3          ## @default_cu_engine
	.comm	_CERT_SYSTEM_STORE_CURRENT_USER,4,2 ## @CERT_SYSTEM_STORE_CURRENT_USER
	.comm	_HCCE_LOCAL_MACHINE,8,3         ## @HCCE_LOCAL_MACHINE
	.comm	_default_lm_engine,8,3          ## @default_lm_engine
	.comm	_CERT_SYSTEM_STORE_LOCAL_MACHINE,4,2 ## @CERT_SYSTEM_STORE_LOCAL_MACHINE
	.no_dead_strip	_get_chain_engine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_chain_engine
_get_chain_engine:                      ; @get_chain_engine
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	w8, #4
	str	w8, [sp, #8]
Lloh0:
	adrp	x8, _HCCE_CURRENT_USER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCCE_CURRENT_USER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ne	LBB0_4
; %bb.1:
	cbz	w1, LBB0_10
; %bb.2:
Lloh3:
	adrp	x20, _default_cu_engine@GOTPAGE
Lloh4:
	ldr	x20, [x20, _default_cu_engine@GOTPAGEOFF]
	ldr	x19, [x20]
	cbnz	x19, LBB0_11
; %bb.3:
Lloh5:
	adrp	x8, _CERT_SYSTEM_STORE_CURRENT_USER@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CERT_SYSTEM_STORE_CURRENT_USER@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	mov	x19, x0
Lloh7:
	adrp	x8, _HCCE_LOCAL_MACHINE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HCCE_LOCAL_MACHINE@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ne	LBB0_11
; %bb.5:
	cbz	w1, LBB0_10
; %bb.6:
Lloh10:
	adrp	x20, _default_lm_engine@GOTPAGE
Lloh11:
	ldr	x20, [x20, _default_lm_engine@GOTPAGEOFF]
	ldr	x19, [x20]
	cbnz	x19, LBB0_11
; %bb.7:
Lloh12:
	adrp	x8, _CERT_SYSTEM_STORE_LOCAL_MACHINE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CERT_SYSTEM_STORE_LOCAL_MACHINE@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, #0
	bl	_CRYPT_CreateChainEngine
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	mov	x2, #0
	bl	_InterlockedCompareExchangePointer
	ldr	x8, [x20]
	cmp	x8, x19
	b.eq	LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_CertFreeCertificateChainEngine
	ldr	x19, [x20]
	b	LBB0_11
LBB0_10:
	mov	x19, #0
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_HCCE_CURRENT_USER,8,3          ; @HCCE_CURRENT_USER
	.comm	_default_cu_engine,8,3          ; @default_cu_engine
	.comm	_CERT_SYSTEM_STORE_CURRENT_USER,4,2 ; @CERT_SYSTEM_STORE_CURRENT_USER
	.comm	_HCCE_LOCAL_MACHINE,8,3         ; @HCCE_LOCAL_MACHINE
	.comm	_default_lm_engine,8,3          ; @default_lm_engine
	.comm	_CERT_SYSTEM_STORE_LOCAL_MACHINE,4,2 ; @CERT_SYSTEM_STORE_LOCAL_MACHINE
	.no_dead_strip	_get_chain_engine
.subsections_via_symbols
