	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CRYPT_SavePKCSToMem
_CRYPT_SavePKCSToMem:                   ## @CRYPT_SavePKCSToMem
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%edi, %r15d
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	8(%rdx), %rdx
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movl	(%r14), %esi
	jmp	LBB0_3
LBB0_1:
	xorl	%esi, %esi
LBB0_3:
	movl	(%rax), %r12d
	leaq	L_.str(%rip), %rdi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_TRACE
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_CertEnumCertificatesInStore
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_CertEnumCertificatesInStore
	addl	$16, %r13d
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:
	movl	%ebx, -80(%rbp)
	movl	%r13d, %edi
	callq	_CryptMemAlloc
	movq	%rax, -64(%rbp)
	testq	%rax, %rax
	je	LBB0_26
## %bb.7:
	movq	%rax, %rbx
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_CertEnumCertificatesInStore
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	addq	$4, %rbx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rax), %ecx
	movl	%ecx, (%rbx)
	movl	(%rax), %ecx
	movl	%ecx, -4(%rbx)
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_CertEnumCertificatesInStore
	addq	$8, %rbx
	testq	%rax, %rax
	jne	LBB0_9
	jmp	LBB0_10
LBB0_26:
	movq	_ERROR_OUTOFMEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_10:
	xorl	%r13d, %r13d
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_CertEnumCRLsInStore
	testq	%rax, %rax
	je	LBB0_17
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_CertEnumCRLsInStore
	addl	$16, %r13d
	testq	%rax, %rax
	jne	LBB0_12
## %bb.13:
	movl	%ebx, -76(%rbp)
	movl	%r13d, %edi
	callq	_CryptMemAlloc
	movq	%rax, -72(%rbp)
	testq	%rax, %rax
	je	LBB0_27
## %bb.14:
	movq	%rax, %rbx
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_CertEnumCRLsInStore
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	addq	$4, %rbx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%rax), %ecx
	movl	%ecx, (%rbx)
	movl	(%rax), %ecx
	movl	%ecx, -4(%rbx)
	movl	%r15d, %edi
	movq	%rax, %rsi
	callq	_CertEnumCRLsInStore
	addq	$8, %rbx
	testq	%rax, %rax
	jne	LBB0_16
	jmp	LBB0_17
LBB0_27:
	movq	_ERROR_OUTOFMEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_17:
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	je	LBB0_25
## %bb.18:
	leaq	-80(%rbp), %rdi
	leaq	-48(%rbp), %rdx
	xorl	%esi, %esi
	callq	_CRYPT_AsnEncodeCMSSignedInfo
	testl	%eax, %eax
	je	LBB0_25
## %bb.19:
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_20
## %bb.21:
	movq	-48(%rbp), %rax
	cmpq	%rax, (%r14)
	movq	%rax, (%r14)
	jae	LBB0_23
## %bb.22:
	movq	_ERROR_MORE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SetLastError
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_25
LBB0_20:
	movq	-48(%rbp), %rcx
	movq	%rcx, (%r14)
	jmp	LBB0_24
LBB0_23:
	leaq	-80(%rbp), %rdi
	movq	%r14, %rdx
	callq	_CRYPT_AsnEncodeCMSSignedInfo
LBB0_24:
	movl	%eax, %ebx
LBB0_25:
	movq	-64(%rbp), %rdi
	callq	_CryptMemFree
	movq	-72(%rbp), %rdi
	callq	_CryptMemFree
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_TRACE
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%d, %p)\n"

	.comm	_ERROR_OUTOFMEMORY,4,2          ## @ERROR_OUTOFMEMORY
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_ERROR_MORE_DATA,4,2            ## @ERROR_MORE_DATA
L_.str.1:                               ## @.str.1
	.asciz	"returning %d\n"

	.no_dead_strip	_CRYPT_SavePKCSToMem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CRYPT_SavePKCSToMem
_CRYPT_SavePKCSToMem:                   ; @CRYPT_SavePKCSToMem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x2
	mov	x20, x0
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
Lloh0:
	adrp	x8, _TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	x8, [x2, #8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w1, [x19]
	b	LBB0_3
LBB0_2:
	mov	w1, #0
LBB0_3:
	str	x8, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	mov	x0, x20
	mov	x1, #0
	bl	_CertEnumCertificatesInStore
	cbz	x0, LBB0_11
; %bb.4:
	mov	x1, x0
	mov	w21, #0
	mov	w23, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w23, w23, #1
	mov	x0, x20
	bl	_CertEnumCertificatesInStore
	mov	x1, x0
	add	w21, w21, #16
	cbnz	x0, LBB0_5
; %bb.6:
	str	w23, [sp, #16]
	mov	x0, x21
	bl	_CryptMemAlloc
	str	x0, [sp, #32]
	cbz	x0, LBB0_10
; %bb.7:
	mov	x21, x0
	mov	x0, x20
	mov	x1, #0
	bl	_CertEnumCertificatesInStore
	cbz	x0, LBB0_11
; %bb.8:
	mov	x1, x0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x1]
	str	d0, [x21], #8
	mov	x0, x20
	bl	_CertEnumCertificatesInStore
	mov	x1, x0
	cbnz	x0, LBB0_9
	b	LBB0_11
LBB0_10:
Lloh5:
	adrp	x8, _ERROR_OUTOFMEMORY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERROR_OUTOFMEMORY@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_SetLastError
Lloh8:
	adrp	x8, _FALSE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
LBB0_11:
	mov	x0, x20
	mov	x1, #0
	bl	_CertEnumCRLsInStore
	cbz	x0, LBB0_18
; %bb.12:
	mov	x1, x0
	mov	w21, #0
	mov	w23, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	w23, w23, #1
	mov	x0, x20
	bl	_CertEnumCRLsInStore
	mov	x1, x0
	add	w21, w21, #16
	cbnz	x0, LBB0_13
; %bb.14:
	str	w23, [sp, #20]
	mov	x0, x21
	bl	_CryptMemAlloc
	str	x0, [sp, #24]
	cbz	x0, LBB0_23
; %bb.15:
	mov	x21, x0
	mov	x0, x20
	mov	x1, #0
	bl	_CertEnumCRLsInStore
	cbz	x0, LBB0_18
; %bb.16:
	mov	x1, x0
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x1]
	str	d0, [x21], #8
	mov	x0, x20
	bl	_CertEnumCRLsInStore
	mov	x1, x0
	cbnz	x0, LBB0_17
LBB0_18:
	cbz	w22, LBB0_24
LBB0_19:
	add	x0, sp, #16
	add	x2, sp, #8
	mov	x1, #0
	bl	_CRYPT_AsnEncodeCMSSignedInfo
	mov	x20, x0
	cbz	w0, LBB0_27
; %bb.20:
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_25
; %bb.21:
	ldr	x8, [x19]
	ldr	x9, [sp, #8]
	str	x9, [x19]
	cmp	x8, x9
	b.hs	LBB0_26
; %bb.22:
Lloh11:
	adrp	x8, _ERROR_MORE_DATA@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ERROR_MORE_DATA@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_SetLastError
Lloh14:
	adrp	x8, _FALSE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh16:
	ldr	w20, [x8]
	b	LBB0_27
LBB0_23:
Lloh17:
	adrp	x8, _ERROR_OUTOFMEMORY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERROR_OUTOFMEMORY@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_SetLastError
Lloh20:
	adrp	x8, _FALSE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh22:
	ldr	w22, [x8]
	cbnz	w22, LBB0_19
LBB0_24:
	mov	w20, #0
	b	LBB0_27
LBB0_25:
	ldr	x8, [sp, #8]
	str	x8, [x19]
	b	LBB0_27
LBB0_26:
	add	x0, sp, #16
	mov	x2, x19
	bl	_CRYPT_AsnEncodeCMSSignedInfo
	mov	x20, x0
LBB0_27:
	ldr	x0, [sp, #32]
	bl	_CryptMemFree
	ldr	x0, [sp, #24]
	bl	_CryptMemFree
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%d, %p)\n"

	.comm	_ERROR_OUTOFMEMORY,4,2          ; @ERROR_OUTOFMEMORY
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_ERROR_MORE_DATA,4,2            ; @ERROR_MORE_DATA
l_.str.1:                               ; @.str.1
	.asciz	"returning %d\n"

	.no_dead_strip	_CRYPT_SavePKCSToMem
.subsections_via_symbols
