	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_trust
_check_trust:                           ## @check_trust
	.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	%esi, %r14d
	movq	%rdi, %r12
	movq	24(%rdi), %r15
	movl	8(%rdi), %edi
	callq	_sk_X509_num
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_DANETLS_HAS_TA
	testl	%r14d, %r14d
	jle	LBB0_4
## %bb.1:
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	cmpl	%r14d, %r13d
	jle	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_check_dane_issuer
	movl	%eax, %ecx
	andl	$-2, %ecx
	cmpl	$128, %ecx
	je	LBB0_23
LBB0_4:
	cmpl	%r14d, %r13d
	jle	LBB0_10
## %bb.5:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r12), %edi
	movl	%r15d, %esi
	callq	_sk_X509_value
	movq	%rax, %rbx
	movq	16(%r12), %rax
	movl	4(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_X509_check_trust
	cmpl	$128, %eax
	je	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$129, %eax
	je	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	%r15d
	cmpl	%r15d, %r13d
	jne	LBB0_6
## %bb.9:
	movq	16(%r12), %rax
	movq	_X509_V_FLAG_PARTIAL_CHAIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	jne	LBB0_17
	jmp	LBB0_22
LBB0_10:
	jne	LBB0_22
## %bb.11:
	movq	16(%r12), %rax
	movq	_X509_V_FLAG_PARTIAL_CHAIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_22
## %bb.12:
	movl	8(%r12), %edi
	xorl	%esi, %esi
	callq	_sk_X509_value
	movq	%rax, %rbx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_lookup_cert_match
	testq	%rax, %rax
	je	LBB0_22
## %bb.13:
	movq	%rax, %r13
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	16(%r12), %rax
	movl	4(%rax), %esi
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_X509_check_trust
	cmpl	$129, %eax
	jne	LBB0_16
## %bb.14:
	movq	%r13, %rdi
	callq	_X509_free
LBB0_15:
	movq	_X509_V_ERR_CERT_REJECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_verify_cb_cert
	movl	%eax, %ecx
	movl	$129, %eax
	testl	%ecx, %ecx
	jne	LBB0_22
	jmp	LBB0_23
LBB0_16:
	movl	8(%r12), %edi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_sk_X509_set
	movq	%rbx, %rdi
	callq	_X509_free
	movq	$0, (%r12)
LBB0_17:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_DANETLS_ENABLED
	testl	%eax, %eax
	je	LBB0_18
## %bb.19:
	cmpl	$0, (%rbx)
	jns	LBB0_21
## %bb.20:
	movl	%r14d, (%rbx)
LBB0_21:
	cmpq	$0, 8(%rbx)
	movl	$128, %eax
	jns	LBB0_23
LBB0_22:
	movq	_X509_TRUST_UNTRUSTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	$128, %eax
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_X509_V_FLAG_PARTIAL_CHAIN,4,2  ## @X509_V_FLAG_PARTIAL_CHAIN
	.comm	_X509_TRUST_UNTRUSTED,4,2       ## @X509_TRUST_UNTRUSTED
	.comm	_X509_V_ERR_CERT_REJECTED,4,2   ## @X509_V_ERR_CERT_REJECTED
	.no_dead_strip	_check_trust
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_trust
_check_trust:                           ; @check_trust
	.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	x19, x1
	mov	x21, x0
	ldr	x20, [x0, #24]
	ldr	w0, [x0, #8]
	bl	_sk_X509_num
	mov	x23, x0
	mov	x0, x20
	bl	_DANETLS_HAS_TA
	cmp	w19, #1
	b.lt	LBB0_3
; %bb.1:
	cmp	x0, #0
	ccmp	w23, w19, #4, ne
	b.le	LBB0_3
; %bb.2:
	mov	x0, x21
	mov	x1, x19
	bl	_check_dane_issuer
	and	w8, w0, #0xfffffffe
	cmp	w8, #128
	b.eq	LBB0_22
LBB0_3:
	cmp	w23, w19
	b.le	LBB0_9
; %bb.4:
	mov	x24, x19
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #8]
	mov	x1, x24
	bl	_sk_X509_value
	mov	x22, x0
	ldr	x8, [x21, #16]
	ldr	w1, [x8, #4]
	mov	w2, #0
	bl	_X509_check_trust
	cmp	w0, #128
	b.eq	LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w0, #129
	b.eq	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w24, w24, #1
	cmp	w23, w24
	b.ne	LBB0_5
; %bb.8:
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _X509_V_FLAG_PARTIAL_CHAIN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _X509_V_FLAG_PARTIAL_CHAIN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_17
	b	LBB0_15
LBB0_9:
	b.ne	LBB0_15
; %bb.10:
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _X509_V_FLAG_PARTIAL_CHAIN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _X509_V_FLAG_PARTIAL_CHAIN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.11:
	ldr	w0, [x21, #8]
	mov	w1, #0
	bl	_sk_X509_value
	mov	x22, x0
	mov	x0, x21
	mov	x1, x22
	bl	_lookup_cert_match
	cbz	x0, LBB0_15
; %bb.12:
	mov	x23, x0
	ldr	x8, [x21, #16]
	ldr	w1, [x8, #4]
	mov	w2, #0
	bl	_X509_check_trust
	cmp	w0, #129
	b.ne	LBB0_16
; %bb.13:
	mov	x0, x23
	bl	_X509_free
	mov	w24, #0
LBB0_14:
Lloh6:
	adrp	x8, _X509_V_ERR_CERT_REJECTED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _X509_V_ERR_CERT_REJECTED@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	bl	_verify_cb_cert
Lloh9:
	adrp	x8, _X509_TRUST_UNTRUSTED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _X509_TRUST_UNTRUSTED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mov	w9, #129
	cmp	w0, #0
	csel	w0, w9, w8, eq
	b	LBB0_22
LBB0_15:
Lloh12:
	adrp	x8, _X509_TRUST_UNTRUSTED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _X509_TRUST_UNTRUSTED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	b	LBB0_22
LBB0_16:
	ldr	w0, [x21, #8]
	mov	w1, #0
	mov	x2, x23
	bl	_sk_X509_set
	mov	x0, x22
	bl	_X509_free
	str	xzr, [x21]
LBB0_17:
	mov	x0, x20
	bl	_DANETLS_ENABLED
	cbz	w0, LBB0_21
; %bb.18:
	ldr	w8, [x20]
	tbz	w8, #31, LBB0_20
; %bb.19:
	str	w19, [x20]
LBB0_20:
	ldr	x8, [x20, #8]
Lloh15:
	adrp	x9, _X509_TRUST_UNTRUSTED@GOTPAGE
Lloh16:
	ldr	x9, [x9, _X509_TRUST_UNTRUSTED@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	x8, #0
	mov	w8, #128
	csel	w0, w8, w9, ge
	b	LBB0_22
LBB0_21:
	mov	w0, #128
LBB0_22:
	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
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_X509_V_FLAG_PARTIAL_CHAIN,4,2  ; @X509_V_FLAG_PARTIAL_CHAIN
	.comm	_X509_TRUST_UNTRUSTED,4,2       ; @X509_TRUST_UNTRUSTED
	.comm	_X509_V_ERR_CERT_REJECTED,4,2   ; @X509_V_ERR_CERT_REJECTED
	.no_dead_strip	_check_trust
.subsections_via_symbols
