	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CRYPT_BuildAlternateContextFromChain
_CRYPT_BuildAlternateContextFromChain:  ## @CRYPT_BuildAlternateContextFromChain
	.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	%r8, %r14
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	%esi, %edi
	callq	_debugstr_filetime
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	movl	%ebx, %ecx
	movq	%r14, %r8
	xorl	%eax, %eax
	callq	_TRACE
	movslq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	24(%r14), %rcx
	movq	-8(%rcx,%rax,8), %r14
LBB0_2:
	movl	4(%r14), %eax
	cmpl	$1, %eax
	jg	LBB0_5
## %bb.3:
	movq	8(%r14), %rcx
	movq	(%rcx), %rcx
	cmpl	$2, (%rcx)
	jl	LBB0_17
LBB0_5:
	testl	%eax, %eax
	je	LBB0_17
## %bb.6:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	xorl	%ebx, %ebx
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movslq	(%rax), %rcx
	decq	%rcx
	cmpq	%rcx, %r12
	jae	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	8(%rax), %rax
	movq	(%rax,%r12,8), %rcx
	movq	8(%rax,%r12,8), %rax
	movq	%rbx, %r13
	movq	(%rcx), %rbx
	incq	%r12
	movq	(%rax), %rdi
	callq	_CertDuplicateCertificateContext
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	movq	%r13, %rbx
	movq	%rax, %rcx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	leaq	-64(%rbp), %r9
	callq	_CRYPT_GetIssuer
	testq	%rax, %rax
	je	LBB0_8
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	4(%r14), %rax
	cmpq	%rax, %rbx
	jb	LBB0_7
	jmp	LBB0_17
LBB0_11:
	movq	%rax, %r13
	decq	%r12
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_CRYPT_CopyChainToElement
	testq	%rax, %rax
	je	LBB0_17
## %bb.12:
	movq	%rbx, %r12
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	(%rax,%r12,8), %rsi
	movq	-64(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r13, %rdx
	callq	_CRYPT_AddCertToSimpleChain
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_CertFreeCertificateContext
	testq	%r14, %r14
	je	LBB0_16
## %bb.13:
	movl	32(%rbx), %esi
	movq	8(%rbx), %rax
	movq	(%rax,%r12,8), %rcx
	movq	%r15, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_CRYPT_BuildSimpleChain
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	8(%rbx), %rax
	movq	(%rax,%r12,8), %rsi
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_CRYPT_CheckSimpleChain
	movq	%rbx, %rdi
	addq	$16, %rdi
	movq	8(%rbx), %rax
	movq	(%rax,%r12,8), %rsi
	addq	$4, %rsi
	callq	_CRYPT_CombineTrustStatus
	jmp	LBB0_18
LBB0_15:
	movq	%rbx, %rdi
	addq	$16, %rdi
	movq	8(%rbx), %rax
	movq	(%rax,%r12,8), %rsi
	addq	$4, %rsi
	callq	_CRYPT_CombineTrustStatus
LBB0_16:
	movq	%rbx, %rdi
	callq	_CRYPT_FreeChainContext
LBB0_17:
	xorl	%ebx, %ebx
LBB0_18:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_TRACE
	movq	%rbx, %rax
	addq	$24, %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	"(%p, %s, %p, %p)\n"

L_.str.1:                               ## @.str.1
	.asciz	"%p\n"

	.no_dead_strip	_CRYPT_BuildAlternateContextFromChain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CRYPT_BuildAlternateContextFromChain
_CRYPT_BuildAlternateContextFromChain:  ; @CRYPT_BuildAlternateContextFromChain
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x4
	mov	x21, x3
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_debugstr_filetime
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x23, x22, [sp, #8]
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_TRACE
	ldr	w8, [x22]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	x9, [x22, #24]
	sub	w8, w8, #1
	ldr	x22, [x9, w8, sxtw #3]
LBB0_2:
	ldr	w8, [x22, #4]
	cmp	w8, #1
	b.gt	LBB0_4
; %bb.3:
	ldr	x9, [x22, #8]
	ldr	x9, [x9]
	ldr	w9, [x9]
	cmp	w9, #2
	b.lt	LBB0_16
LBB0_4:
	cbz	w8, LBB0_16
; %bb.5:
	mov	x23, #0
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	mov	x25, #0
LBB0_7:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x23, lsl #3]
	ldrsw	x9, [x8]
	sub	x9, x9, #1
	cmp	x25, x9
	b.hs	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x8, #8]
	add	x8, x8, x25, lsl #3
	ldp	x9, x8, [x8]
	ldr	x24, [x9]
	add	x25, x25, #1
	ldr	x0, [x8]
	bl	_CertDuplicateCertificateContext
	mov	x3, x0
	ldr	w1, [x0]
	add	x5, sp, #24
	mov	x0, x20
	mov	x2, x24
	mov	x4, x21
	bl	_CRYPT_GetIssuer
	cbz	x0, LBB0_7
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x22, #4]
	cmp	x23, x8
	b.lo	LBB0_6
	b	LBB0_16
LBB0_10:
	mov	x24, x0
	sub	x2, x25, #1
	mov	x0, x22
	mov	x1, x23
	bl	_CRYPT_CopyChainToElement
	mov	x22, x0
	cbz	x0, LBB0_17
; %bb.11:
	ldr	x8, [x22, #8]
	ldr	x1, [x8, x23, lsl #3]
	ldr	x3, [sp, #24]
	mov	x0, x20
	mov	x2, x24
	bl	_CRYPT_AddCertToSimpleChain
	mov	x25, x0
	mov	x0, x24
	bl	_CertFreeCertificateContext
	cbz	x25, LBB0_15
; %bb.12:
	ldr	w1, [x22, #32]
	ldr	x8, [x22, #8]
	ldr	x3, [x8, x23, lsl #3]
	mov	x0, x20
	mov	x2, x21
	bl	_CRYPT_BuildSimpleChain
	cbz	x0, LBB0_14
; %bb.13:
	ldr	x8, [x22, #8]
	lsl	x21, x23, #3
	ldr	x1, [x8, x21]
	mov	x0, x20
	mov	x2, x19
	bl	_CRYPT_CheckSimpleChain
	add	x0, x22, #16
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x21]
	add	x1, x8, #4
	bl	_CRYPT_CombineTrustStatus
	b	LBB0_17
LBB0_14:
	add	x0, x22, #16
	ldr	x8, [x22, #8]
	ldr	x8, [x8, x23, lsl #3]
	add	x1, x8, #4
	bl	_CRYPT_CombineTrustStatus
LBB0_15:
	mov	x0, x22
	bl	_CRYPT_FreeChainContext
LBB0_16:
	mov	x22, #0
LBB0_17:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_TRACE
	mov	x0, x22
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p, %s, %p, %p)\n"

l_.str.1:                               ; @.str.1
	.asciz	"%p\n"

	.no_dead_strip	_CRYPT_BuildAlternateContextFromChain
.subsections_via_symbols
