	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CRYPT_FileOpenStore            ## -- Begin function CRYPT_FileOpenStore
	.p2align	4, 0x90
_CRYPT_FileOpenStore:                   ## @CRYPT_FileOpenStore
	.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	%rdx, %rbx
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	%ebx, -44(%rbp)
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_TRACE
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.3:
	movq	_CERT_STORE_DELETE_FLAG@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_5
LBB0_4:
	movq	_E_INVALIDARG@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ERROR_INVALID_HANDLE@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %edi
	callq	_SetLastError
	xorl	%r15d, %r15d
LBB0_17:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_CERT_STORE_READONLY_FLAG@GOTPCREL(%rip), %r13
	testl	%r12d, (%r13)
	je	LBB0_7
## %bb.6:
	movq	_CERT_FILE_STORE_COMMIT_ENABLE_FLAG@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_4
LBB0_7:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_GetCurrentProcess
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_GetCurrentProcess
	movl	(%r13), %edx
	movq	_GENERIC_READ@GOTPCREL(%rip), %rcx
	movl	$0, %r8d
	andl	%r12d, %edx
	jne	LBB0_9
## %bb.8:
	movq	_GENERIC_WRITE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
LBB0_9:
	orl	(%rcx), %r8d
	movq	_TRUE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movl	$0, (%rsp)
	leaq	-44(%rbp), %rcx
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_DuplicateHandle
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	movq	_CERT_STORE_PROV_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CERT_STORE_CREATE_NEW_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_CertOpenStore
	testq	%rax, %rax
	je	LBB0_16
## %bb.11:
	movq	%rax, %rbx
	movl	-44(%rbp), %edi
	movq	%rax, %rsi
	callq	_CRYPT_ReadSerializedStoreFromFile
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movl	-44(%rbp), %edx
	movq	_CERT_STORE_SAVE_AS_STORE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_CRYPT_CreateFileStore
	movq	%rax, %r15
	testq	%r14, %r14
	je	LBB0_16
## %bb.14:
	movq	_CERT_STORE_NO_CRYPT_RELEASE_FLAG@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_CryptReleaseContext
	jmp	LBB0_16
LBB0_12:
	xorl	%r15d, %r15d
LBB0_16:
	leaq	L_.str.1(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%ld, %08x, %p)\n"

	.comm	_ERROR_INVALID_HANDLE,4,2       ## @ERROR_INVALID_HANDLE
	.comm	_CERT_STORE_DELETE_FLAG,4,2     ## @CERT_STORE_DELETE_FLAG
	.comm	_E_INVALIDARG,4,2               ## @E_INVALIDARG
	.comm	_CERT_STORE_READONLY_FLAG,4,2   ## @CERT_STORE_READONLY_FLAG
	.comm	_CERT_FILE_STORE_COMMIT_ENABLE_FLAG,4,2 ## @CERT_FILE_STORE_COMMIT_ENABLE_FLAG
	.comm	_GENERIC_READ,4,2               ## @GENERIC_READ
	.comm	_GENERIC_WRITE,4,2              ## @GENERIC_WRITE
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_CERT_STORE_PROV_MEMORY,4,2     ## @CERT_STORE_PROV_MEMORY
	.comm	_CERT_STORE_CREATE_NEW_FLAG,4,2 ## @CERT_STORE_CREATE_NEW_FLAG
	.comm	_CERT_STORE_SAVE_AS_STORE,4,2   ## @CERT_STORE_SAVE_AS_STORE
	.comm	_CERT_STORE_NO_CRYPT_RELEASE_FLAG,4,2 ## @CERT_STORE_NO_CRYPT_RELEASE_FLAG
L_.str.1:                               ## @.str.1
	.asciz	"returning %p\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CRYPT_FileOpenStore            ; -- Begin function CRYPT_FileOpenStore
	.p2align	2
_CRYPT_FileOpenStore:                   ; @CRYPT_FileOpenStore
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	str	w21, [sp, #28]
	stp	x20, x2, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_TRACE
	cbz	x21, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _CERT_STORE_DELETE_FLAG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CERT_STORE_DELETE_FLAG@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_4
LBB0_2:
Lloh5:
	adrp	x8, _E_INVALIDARG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _E_INVALIDARG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_SetLastError
	mov	x21, #0
	b	LBB0_14
LBB0_3:
Lloh8:
	adrp	x8, _ERROR_INVALID_HANDLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERROR_INVALID_HANDLE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_SetLastError
	b	LBB0_14
LBB0_4:
Lloh11:
	adrp	x23, _CERT_STORE_READONLY_FLAG@GOTPAGE
Lloh12:
	ldr	x23, [x23, _CERT_STORE_READONLY_FLAG@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.5:
Lloh13:
	adrp	x8, _CERT_FILE_STORE_COMMIT_ENABLE_FLAG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CERT_FILE_STORE_COMMIT_ENABLE_FLAG@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_2
LBB0_6:
	bl	_GetCurrentProcess
	mov	x22, x0
	bl	_GetCurrentProcess
	mov	x2, x0
	ldr	w8, [x23]
Lloh16:
	adrp	x9, _GENERIC_READ@GOTPAGE
Lloh17:
	ldr	x9, [x9, _GENERIC_READ@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _GENERIC_WRITE@GOTPAGE
Lloh20:
	ldr	x10, [x10, _GENERIC_WRITE@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	tst	w8, w20
	csel	w8, w10, wzr, eq
	orr	w4, w8, w9
Lloh22:
	adrp	x8, _TRUE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh24:
	ldr	w5, [x8]
	add	x3, sp, #28
	mov	x0, x22
	mov	x1, x21
	mov	w6, #0
	bl	_DuplicateHandle
	cbz	x0, LBB0_12
; %bb.7:
Lloh25:
	adrp	x8, _CERT_STORE_PROV_MEMORY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CERT_STORE_PROV_MEMORY@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x8, _CERT_STORE_CREATE_NEW_FLAG@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CERT_STORE_CREATE_NEW_FLAG@GOTPAGEOFF]
Lloh30:
	ldr	w3, [x8]
	mov	w1, #0
	mov	w2, #0
	mov	x4, #0
	bl	_CertOpenStore
	mov	x21, x0
	cbz	x0, LBB0_13
; %bb.8:
	ldr	w0, [sp, #28]
	mov	x1, x21
	bl	_CRYPT_ReadSerializedStoreFromFile
	cbz	x0, LBB0_12
; %bb.9:
	ldr	w2, [sp, #28]
Lloh31:
	adrp	x8, _CERT_STORE_SAVE_AS_STORE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CERT_STORE_SAVE_AS_STORE@GOTPAGEOFF]
Lloh33:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_CRYPT_CreateFileStore
	mov	x21, x0
	cbz	x19, LBB0_13
; %bb.10:
Lloh34:
	adrp	x8, _CERT_STORE_NO_CRYPT_RELEASE_FLAG@GOTPAGE
Lloh35:
	ldr	x8, [x8, _CERT_STORE_NO_CRYPT_RELEASE_FLAG@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_13
; %bb.11:
	mov	x0, x19
	mov	w1, #0
	bl	_CryptReleaseContext
	b	LBB0_13
LBB0_12:
	mov	x21, #0
LBB0_13:
Lloh37:
	adrp	x0, l_.str.1@PAGE
Lloh38:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_TRACE
LBB0_14:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%ld, %08x, %p)\n"

	.comm	_ERROR_INVALID_HANDLE,4,2       ; @ERROR_INVALID_HANDLE
	.comm	_CERT_STORE_DELETE_FLAG,4,2     ; @CERT_STORE_DELETE_FLAG
	.comm	_E_INVALIDARG,4,2               ; @E_INVALIDARG
	.comm	_CERT_STORE_READONLY_FLAG,4,2   ; @CERT_STORE_READONLY_FLAG
	.comm	_CERT_FILE_STORE_COMMIT_ENABLE_FLAG,4,2 ; @CERT_FILE_STORE_COMMIT_ENABLE_FLAG
	.comm	_GENERIC_READ,4,2               ; @GENERIC_READ
	.comm	_GENERIC_WRITE,4,2              ; @GENERIC_WRITE
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_CERT_STORE_PROV_MEMORY,4,2     ; @CERT_STORE_PROV_MEMORY
	.comm	_CERT_STORE_CREATE_NEW_FLAG,4,2 ; @CERT_STORE_CREATE_NEW_FLAG
	.comm	_CERT_STORE_SAVE_AS_STORE,4,2   ; @CERT_STORE_SAVE_AS_STORE
	.comm	_CERT_STORE_NO_CRYPT_RELEASE_FLAG,4,2 ; @CERT_STORE_NO_CRYPT_RELEASE_FLAG
l_.str.1:                               ; @.str.1
	.asciz	"returning %p\n"

.subsections_via_symbols
