	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CRYPT_AddCertToSimpleChain
_CRYPT_AddCertToSimpleChain:            ## @CRYPT_AddCertToSimpleChain
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	$4, %edi
	callq	_CryptMemAlloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %rbx
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	8(%r14), %rdi
	leal	8(,%rax,8), %esi
	callq	_CryptMemRealloc
	jmp	LBB0_4
LBB0_2:
	movl	$8, %edi
	callq	_CryptMemAlloc
LBB0_4:
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movslq	(%r14), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%r14)
	movq	%rbx, (%rax,%rcx,8)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	$4, (%rbx)
	movl	%r13d, %edi
	callq	_CertDuplicateCertificateContext
	movl	%eax, 8(%rbx)
	movl	(%r14), %eax
	cmpl	$2, %eax
	jl	LBB0_7
## %bb.6:
	movq	8(%r14), %rcx
	leal	-2(%rax), %edx
	movq	(%rcx,%rdx,8), %rcx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, 4(%rcx)
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	cltd
	idivl	(%r15)
	testl	%edx, %edx
	jne	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_CRYPT_CheckSimpleChainForCycles
	movq	8(%r14), %rax
	movslq	(%r14), %rcx
	movq	-8(%rax,%rcx,8), %rbx
LBB0_9:
	addq	$4, %r14
	addq	$4, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_CRYPT_CombineTrustStatus
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_11
LBB0_10:
	movq	%rbx, %rdi
	callq	_CryptMemFree
LBB0_11:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	_CRYPT_AddCertToSimpleChain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CRYPT_AddCertToSimpleChain
_CRYPT_AddCertToSimpleChain:            ; @CRYPT_AddCertToSimpleChain
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	mov	w0, #4
	bl	_CryptMemAlloc
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	ldr	w8, [x19]
	cbz	w8, LBB0_8
; %bb.2:
	ldr	x0, [x19, #8]
	lsl	w8, w8, #3
	add	w1, w8, #8
	bl	_CryptMemRealloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_9
LBB0_3:
	ldrsw	x8, [x19]
	add	w9, w8, #1
	str	w9, [x19]
	str	x20, [x0, x8, lsl #3]
	mov	w24, #4
	mov	x0, x20
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	str	w24, [x20]
	mov	x0, x23
	bl	_CertDuplicateCertificateContext
	str	w0, [x20, #8]
	ldr	w8, [x19]
	subs	w9, w8, #2
	b.lt	LBB0_5
; %bb.4:
	ldr	x10, [x19, #8]
	ldr	x9, [x10, w9, uxtw #3]
	str	w22, [x9, #4]
LBB0_5:
	ldr	w9, [x21]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cbnz	w8, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_CRYPT_CheckSimpleChainForCycles
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	add	x8, x8, x9, lsl #3
	ldur	x20, [x8, #-8]
LBB0_7:
	add	x0, x19, #4
	add	x1, x20, #4
	bl	_CRYPT_CombineTrustStatus
Lloh3:
	adrp	x8, _TRUE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	b	LBB0_10
LBB0_8:
	mov	w0, #8
	bl	_CryptMemAlloc
	str	x0, [x19, #8]
	cbnz	x0, LBB0_3
LBB0_9:
	mov	x0, x20
	bl	_CryptMemFree
LBB0_10:
	mov	x0, x24
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	_CRYPT_AddCertToSimpleChain
.subsections_via_symbols
