	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CRYPT_CreateChainEngine        ## -- Begin function CRYPT_CreateChainEngine
	.p2align	4, 0x90
_CRYPT_CreateChainEngine:               ## @CRYPT_CreateChainEngine
	.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	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	testq	%rdi, %rdi
	jne	LBB0_8
## %bb.1:
	cmpl	$64, (%r14)
	jb	LBB0_4
## %bb.2:
	movq	56(%r14), %rdi
	testq	%rdi, %rdi
	jne	LBB0_3
LBB0_4:
	movq	48(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
LBB0_3:
	callq	_CertDuplicateStore
	jmp	LBB0_6
LBB0_5:
	movq	_CERT_STORE_PROV_SYSTEM_W@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_rootW@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	callq	_CertOpenStore
LBB0_6:
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_7
LBB0_8:
	movl	$48, %edi
	callq	_CryptMemAlloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r12
	movl	$1, (%rax)
	movq	%rbx, 40(%rax)
	movq	_CERT_STORE_PROV_COLLECTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CERT_STORE_CREATE_NEW_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_CertOpenStore
	movq	%rax, 32(%r12)
	movq	40(%r12), %rdi
	callq	_CertDuplicateStore
	movq	%rax, -80(%rbp)
	movq	_CERT_STORE_PROV_SYSTEM_W@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	_CRYPT_CreateChainEngine.caW(%rip), %r8
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	callq	_CertOpenStore
	movq	%rax, -72(%rbp)
	movl	(%rbx), %edi
	leaq	_CRYPT_CreateChainEngine.myW(%rip), %r8
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	callq	_CertOpenStore
	movq	%rax, -64(%rbp)
	movl	(%rbx), %edi
	leaq	_CRYPT_CreateChainEngine.trustW(%rip), %r8
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	callq	_CertOpenStore
	movq	%rax, -56(%rbp)
	movq	32(%r12), %rbx
	leaq	-80(%rbp), %r15
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_CRYPT_AddStoresToCollection
	movq	32(%r12), %rdi
	movl	40(%r14), %esi
	movq	32(%r14), %rdx
	callq	_CRYPT_AddStoresToCollection
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_CRYPT_CloseStores
	movl	24(%r14), %eax
	movl	%eax, 24(%r12)
	movl	20(%r14), %eax
	movl	%eax, 20(%r12)
	movl	16(%r14), %eax
	movl	%eax, 16(%r12)
	movq	8(%r14), %rax
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:
	movq	_DEFAULT_CYCLE_MODULUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_12:
	movq	%rax, 8(%r12)
	jmp	LBB0_13
LBB0_9:
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_CertCloseStore
	jmp	LBB0_13
LBB0_7:
	xorl	%r12d, %r12d
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movq	%r12, %rax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
_CRYPT_CreateChainEngine.caW:           ## @CRYPT_CreateChainEngine.caW
	.asciz	"CA"

_CRYPT_CreateChainEngine.myW:           ## @CRYPT_CreateChainEngine.myW
	.asciz	"My"

_CRYPT_CreateChainEngine.trustW:        ## @CRYPT_CreateChainEngine.trustW
	.asciz	"Trust"

	.comm	_CERT_STORE_PROV_SYSTEM_W,4,2   ## @CERT_STORE_PROV_SYSTEM_W
	.comm	_rootW,8,3                      ## @rootW
	.comm	_CERT_STORE_PROV_COLLECTION,4,2 ## @CERT_STORE_PROV_COLLECTION
	.comm	_CERT_STORE_CREATE_NEW_FLAG,4,2 ## @CERT_STORE_CREATE_NEW_FLAG
	.comm	_DEFAULT_CYCLE_MODULUS,8,3      ## @DEFAULT_CYCLE_MODULUS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CRYPT_CreateChainEngine        ; -- Begin function CRYPT_CreateChainEngine
	.p2align	2
_CRYPT_CreateChainEngine:               ; @CRYPT_CreateChainEngine
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	cbnz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #64
	b.lo	LBB0_3
; %bb.2:
	ldr	x0, [x19, #56]
	cbnz	x0, LBB0_4
LBB0_3:
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_10
LBB0_4:
	bl	_CertDuplicateStore
	mov	x22, x0
	cbz	x0, LBB0_11
LBB0_5:
	mov	w0, #48
	bl	_CryptMemAlloc
	mov	x21, x0
	cbz	x0, LBB0_9
; %bb.6:
	mov	w8, #1
	str	w8, [x21]
	str	x22, [x21, #40]
Lloh3:
	adrp	x8, _CERT_STORE_PROV_COLLECTION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CERT_STORE_PROV_COLLECTION@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _CERT_STORE_CREATE_NEW_FLAG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CERT_STORE_CREATE_NEW_FLAG@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	w1, #0
	mov	w2, #0
	mov	x4, #0
	bl	_CertOpenStore
	str	x0, [x21, #32]
	ldr	x0, [x21, #40]
	bl	_CertDuplicateStore
	str	x0, [sp, #8]
Lloh9:
	adrp	x22, _CERT_STORE_PROV_SYSTEM_W@GOTPAGE
Lloh10:
	ldr	x22, [x22, _CERT_STORE_PROV_SYSTEM_W@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh11:
	adrp	x4, _CRYPT_CreateChainEngine.caW@PAGE
Lloh12:
	add	x4, x4, _CRYPT_CreateChainEngine.caW@PAGEOFF
	mov	w1, #0
	mov	w2, #0
	mov	x3, x20
	bl	_CertOpenStore
	str	x0, [sp, #16]
	ldr	w0, [x22]
Lloh13:
	adrp	x4, _CRYPT_CreateChainEngine.myW@PAGE
Lloh14:
	add	x4, x4, _CRYPT_CreateChainEngine.myW@PAGEOFF
	mov	w1, #0
	mov	w2, #0
	mov	x3, x20
	bl	_CertOpenStore
	str	x0, [sp, #24]
	ldr	w0, [x22]
Lloh15:
	adrp	x4, _CRYPT_CreateChainEngine.trustW@PAGE
Lloh16:
	add	x4, x4, _CRYPT_CreateChainEngine.trustW@PAGEOFF
	mov	w1, #0
	mov	w2, #0
	mov	x3, x20
	bl	_CertOpenStore
	str	x0, [sp, #32]
	ldr	x20, [x21, #32]
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x20
	bl	_CRYPT_AddStoresToCollection
	ldr	x0, [x21, #32]
	ldr	w1, [x19, #40]
	ldr	x2, [x19, #32]
	bl	_CRYPT_AddStoresToCollection
	add	x0, sp, #8
	bl	_ARRAY_SIZE
	add	x1, sp, #8
	bl	_CRYPT_CloseStores
	ldr	w8, [x19, #24]
	str	w8, [x21, #24]
	ldr	d0, [x19, #16]
	str	d0, [x21, #16]
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_8
; %bb.7:
Lloh17:
	adrp	x8, _DEFAULT_CYCLE_MODULUS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DEFAULT_CYCLE_MODULUS@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
LBB0_8:
	str	x8, [x21, #8]
	b	LBB0_12
LBB0_9:
	mov	x0, x22
	mov	w1, #0
	bl	_CertCloseStore
	b	LBB0_12
LBB0_10:
Lloh20:
	adrp	x8, _CERT_STORE_PROV_SYSTEM_W@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CERT_STORE_PROV_SYSTEM_W@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x8, _rootW@GOTPAGE
Lloh24:
	ldr	x8, [x8, _rootW@GOTPAGEOFF]
Lloh25:
	ldr	x4, [x8]
	mov	w1, #0
	mov	w2, #0
	mov	x3, x20
	bl	_CertOpenStore
	mov	x22, x0
	cbnz	x0, LBB0_5
LBB0_11:
	mov	x21, #0
LBB0_12:
	ldr	x8, [sp, #40]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x21
	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
	add	sp, sp, #96
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_CRYPT_CreateChainEngine.caW:           ; @CRYPT_CreateChainEngine.caW
	.asciz	"CA"

_CRYPT_CreateChainEngine.myW:           ; @CRYPT_CreateChainEngine.myW
	.asciz	"My"

_CRYPT_CreateChainEngine.trustW:        ; @CRYPT_CreateChainEngine.trustW
	.asciz	"Trust"

	.comm	_CERT_STORE_PROV_SYSTEM_W,4,2   ; @CERT_STORE_PROV_SYSTEM_W
	.comm	_rootW,8,3                      ; @rootW
	.comm	_CERT_STORE_PROV_COLLECTION,4,2 ; @CERT_STORE_PROV_COLLECTION
	.comm	_CERT_STORE_CREATE_NEW_FLAG,4,2 ; @CERT_STORE_CREATE_NEW_FLAG
	.comm	_DEFAULT_CYCLE_MODULUS,8,3      ; @DEFAULT_CYCLE_MODULUS
.subsections_via_symbols
