	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CRYPT_SysOpenStoreW
_CRYPT_SysOpenStoreW:                   ## @CRYPT_SysOpenStoreW
	.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
	pushq	%rax
	.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, %r15d
	movq	%rdi, %r14
	movq	%rdx, %rdi
	callq	_debugstr_w
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_TRACE
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.1:
	movq	_CERT_SYSTEM_STORE_LOCATION_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r15d, %eax
	andl	$-8, %eax
	cmpl	$128, %eax
	jne	LBB0_15
## %bb.2:
	movq	_TRUE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_3
	jmp	LBB0_17
LBB0_14:
	movq	_ERROR_FILE_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
	jmp	LBB0_17
LBB0_15:
	movq	_ERROR_FILE_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
	movq	_FALSE@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_17
LBB0_3:
	movq	_CERT_STORE_PROV_SYSTEM_REGISTRY_W@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	movq	%rbx, %r8
	callq	_CertOpenStore
	testq	%rax, %rax
	je	LBB0_17
## %bb.4:
	movq	%rax, %r13
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	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, %r12
	movq	_CERT_STORE_READONLY_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG@GOTPCREL(%rip), %rcx
	andl	%r15d, %eax
	jne	LBB0_6
## %bb.5:
	movl	(%rcx), %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_6:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%ecx, %ecx
	callq	_CertAddStoreToCollection
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_CertCloseStore
	movq	_CERT_SYSTEM_STORE_LOCATION_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r15d, %eax
	cmpl	$134, %eax
	jne	LBB0_11
## %bb.7:
	andl	$-135, %r15d
	orl	$132, %r15d
	movq	_CERT_STORE_PROV_SYSTEM_REGISTRY_W@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	movq	%rbx, %r8
	callq	_CertOpenStore
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	%rax, %rbx
	movq	_CERT_STORE_READONLY_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$0, %edx
	andl	%r15d, %eax
	jne	LBB0_10
## %bb.9:
	movq	_CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_10:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_CertAddStoreToCollection
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_CertCloseStore
LBB0_11:
	testq	%r14, %r14
	je	LBB0_18
## %bb.12:
	movq	_CERT_STORE_NO_CRYPT_RELEASE_FLAG@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_18
## %bb.13:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_CryptReleaseContext
	jmp	LBB0_18
LBB0_17:
	xorl	%r12d, %r12d
LBB0_18:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%ld, %08x, %s)\n"

	.comm	_ERROR_FILE_NOT_FOUND,4,2       ## @ERROR_FILE_NOT_FOUND
	.comm	_CERT_SYSTEM_STORE_LOCATION_MASK,4,2 ## @CERT_SYSTEM_STORE_LOCATION_MASK
	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_CERT_STORE_PROV_SYSTEM_REGISTRY_W,4,2 ## @CERT_STORE_PROV_SYSTEM_REGISTRY_W
	.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	_CERT_STORE_READONLY_FLAG,4,2   ## @CERT_STORE_READONLY_FLAG
	.comm	_CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG,4,2 ## @CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG
	.comm	_CERT_STORE_NO_CRYPT_RELEASE_FLAG,4,2 ## @CERT_STORE_NO_CRYPT_RELEASE_FLAG
	.no_dead_strip	_CRYPT_SysOpenStoreW
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CRYPT_SysOpenStoreW
_CRYPT_SysOpenStoreW:                   ; @CRYPT_SysOpenStoreW
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x2
	bl	_debugstr_w
	mov	x3, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_TRACE
	cbz	x21, LBB0_3
; %bb.1:
Lloh2:
	adrp	x24, _CERT_SYSTEM_STORE_LOCATION_MASK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _CERT_SYSTEM_STORE_LOCATION_MASK@GOTPAGEOFF]
	ldr	w8, [x24]
	and	w8, w20, w8
	and	w8, w8, #0xfffffff8
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.2:
Lloh4:
	adrp	x8, _TRUE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	cbnz	x8, LBB0_5
	b	LBB0_12
LBB0_3:
Lloh7:
	adrp	x8, _ERROR_FILE_NOT_FOUND@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERROR_FILE_NOT_FOUND@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_SetLastError
	b	LBB0_12
LBB0_4:
Lloh10:
	adrp	x8, _ERROR_FILE_NOT_FOUND@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERROR_FILE_NOT_FOUND@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_SetLastError
Lloh13:
	adrp	x8, _FALSE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
LBB0_5:
Lloh16:
	adrp	x25, _CERT_STORE_PROV_SYSTEM_REGISTRY_W@GOTPAGE
Lloh17:
	ldr	x25, [x25, _CERT_STORE_PROV_SYSTEM_REGISTRY_W@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	w1, #0
	mov	w2, #0
	mov	x3, x20
	mov	x4, x21
	bl	_CertOpenStore
	cbz	x0, LBB0_12
; %bb.6:
	mov	x23, x0
Lloh18:
	adrp	x8, _CERT_STORE_PROV_COLLECTION@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CERT_STORE_PROV_COLLECTION@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x8, _CERT_STORE_CREATE_NEW_FLAG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CERT_STORE_CREATE_NEW_FLAG@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
	mov	w1, #0
	mov	w2, #0
	mov	x4, #0
	bl	_CertOpenStore
	mov	x22, x0
Lloh24:
	adrp	x26, _CERT_STORE_READONLY_FLAG@GOTPAGE
Lloh25:
	ldr	x26, [x26, _CERT_STORE_READONLY_FLAG@GOTPAGEOFF]
	ldr	w8, [x26]
Lloh26:
	adrp	x27, _CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG@GOTPAGE
Lloh27:
	ldr	x27, [x27, _CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG@GOTPAGEOFF]
	ldr	w9, [x27]
	tst	w8, w20
	csel	w2, w9, wzr, eq
	mov	x1, x23
	mov	w3, #0
	bl	_CertAddStoreToCollection
	mov	x0, x23
	mov	w1, #0
	bl	_CertCloseStore
	ldr	w8, [x24]
	and	w8, w8, w20
	cmp	w8, #134
	b.ne	LBB0_9
; %bb.7:
	and	w8, w20, #0xfffffff9
	mov	w9, #132
	orr	w20, w8, w9
	ldr	w0, [x25]
	mov	w1, #0
	mov	w2, #0
	mov	x3, x20
	mov	x4, x21
	bl	_CertOpenStore
	cbz	x0, LBB0_9
; %bb.8:
	mov	x21, x0
	ldr	w8, [x26]
	ldr	w9, [x27]
	tst	w8, w20
	csel	w2, w9, wzr, eq
	mov	x0, x22
	mov	x1, x21
	mov	w3, #0
	bl	_CertAddStoreToCollection
	mov	x0, x21
	mov	w1, #0
	bl	_CertCloseStore
LBB0_9:
	cbz	x19, LBB0_13
; %bb.10:
Lloh28:
	adrp	x8, _CERT_STORE_NO_CRYPT_RELEASE_FLAG@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CERT_STORE_NO_CRYPT_RELEASE_FLAG@GOTPAGEOFF]
Lloh30:
	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	x22, #0
LBB0_13:
	mov	x0, x22
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%ld, %08x, %s)\n"

	.comm	_ERROR_FILE_NOT_FOUND,4,2       ; @ERROR_FILE_NOT_FOUND
	.comm	_CERT_SYSTEM_STORE_LOCATION_MASK,4,2 ; @CERT_SYSTEM_STORE_LOCATION_MASK
	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_CERT_STORE_PROV_SYSTEM_REGISTRY_W,4,2 ; @CERT_STORE_PROV_SYSTEM_REGISTRY_W
	.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	_CERT_STORE_READONLY_FLAG,4,2   ; @CERT_STORE_READONLY_FLAG
	.comm	_CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG,4,2 ; @CERT_PHYSICAL_STORE_ADD_ENABLE_FLAG
	.comm	_CERT_STORE_NO_CRYPT_RELEASE_FLAG,4,2 ; @CERT_STORE_NO_CRYPT_RELEASE_FLAG
	.no_dead_strip	_CRYPT_SysOpenStoreW
.subsections_via_symbols
