	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function certificate_to_trust_anchor_inner
_certificate_to_trust_anchor_inner:     ## @certificate_to_trust_anchor_inner
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_VEC_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	_dn_append@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %r15
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	callq	_br_x509_decoder_init
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	%r15, %rdi
	callq	_br_x509_decoder_push
	movq	%r15, %rdi
	callq	_br_x509_decoder_get_pkey
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	-28(%rbp), %edi
	callq	_VEC_TOARRAY
	movl	%eax, (%r14)
	movl	-28(%rbp), %edi
	callq	_VEC_LEN
	movl	%eax, 4(%r14)
	movl	-28(%rbp), %edi
	callq	_VEC_CLEAR
	movl	$0, 72(%r14)
	leaq	-32(%rbp), %rdi
	callq	_br_x509_decoder_isCA
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_BR_X509_TA_CA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 72(%r14)
LBB0_4:
	movl	(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_7
## %bb.5:
	cmpl	$128, %eax
	jne	LBB0_8
## %bb.6:
	movl	$128, 8(%r14)
	movl	24(%rbx), %esi
	movl	28(%rbx), %edi
	callq	_xblobdup
	movq	%rax, 64(%r14)
	movl	24(%rbx), %eax
	movl	%eax, 56(%r14)
	movl	16(%rbx), %esi
	movl	20(%rbx), %edi
	callq	_xblobdup
	movq	%rax, 48(%r14)
	movl	16(%rbx), %eax
	movl	%eax, 40(%r14)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	-32(%rbp), %rdi
	callq	_br_x509_decoder_last_error
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movl	-28(%rbp), %edi
	callq	_VEC_CLEAR
	jmp	LBB0_9
LBB0_7:
	movl	$129, 8(%r14)
	movl	12(%rbx), %eax
	movl	%eax, 32(%r14)
	movl	4(%rbx), %esi
	movl	8(%rbx), %edi
	callq	_xblobdup
	movq	%rax, 24(%r14)
	movl	4(%rbx), %eax
	movl	%eax, 16(%r14)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%r14), %edi
	callq	_xfree
LBB0_9:
	movl	$-1, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VEC_INIT,4,2                   ## @VEC_INIT
	.comm	_dn_append,4,2                  ## @dn_append
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR: CA decoding failed with error %d\n"

	.comm	_BR_X509_TA_CA,4,2              ## @BR_X509_TA_CA
L_.str.1:                               ## @.str.1
	.asciz	"ERROR: unsupported public key type in CA\n"

	.no_dead_strip	_certificate_to_trust_anchor_inner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function certificate_to_trust_anchor_inner
_certificate_to_trust_anchor_inner:     ; @certificate_to_trust_anchor_inner
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _VEC_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VEC_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh3:
	adrp	x8, _dn_append@GOTPAGE
Lloh4:
	ldr	x8, [x8, _dn_append@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #12
	add	x2, sp, #8
	bl	_br_x509_decoder_init
	ldp	w2, w1, [x20]
	add	x0, sp, #12
	bl	_br_x509_decoder_push
	add	x0, sp, #12
	bl	_br_x509_decoder_get_pkey
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	w0, [sp, #8]
	bl	_VEC_TOARRAY
	str	w0, [x19]
	ldr	w0, [sp, #8]
	bl	_VEC_LEN
	str	w0, [x19, #4]
	ldr	w0, [sp, #8]
	bl	_VEC_CLEAR
	str	wzr, [x19, #72]
	add	x0, sp, #12
	bl	_br_x509_decoder_isCA
	cbz	x0, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _BR_X509_TA_CA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BR_X509_TA_CA@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	w9, [x19, #72]
	orr	w8, w9, w8
	str	w8, [x19, #72]
LBB0_3:
	ldr	w8, [x20]
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.5:
	str	w8, [x19, #8]
	ldp	w1, w0, [x20, #24]
	bl	_xblobdup
	str	x0, [x19, #64]
	ldr	w8, [x20, #24]
	str	w8, [x19, #56]
	ldp	w1, w0, [x20, #16]
	bl	_xblobdup
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #48]
	ldr	w8, [x20, #16]
	str	w8, [x19, #40]
	b	LBB0_10
LBB0_6:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w19, [x8]
	add	x0, sp, #12
	bl	_br_x509_decoder_last_error
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	ldr	w0, [sp, #8]
	bl	_VEC_CLEAR
	b	LBB0_9
LBB0_7:
	str	w8, [x19, #8]
	ldr	w8, [x20, #12]
	str	w8, [x19, #32]
	ldp	w1, w0, [x20, #4]
	bl	_xblobdup
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #24]
	ldr	w8, [x20, #4]
	str	w8, [x19, #16]
	b	LBB0_10
LBB0_8:
Lloh14:
	adrp	x8, _stderr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	w0, [x19]
	bl	_xfree
LBB0_9:
	mov	w0, #-1
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_VEC_INIT,4,2                   ; @VEC_INIT
	.comm	_dn_append,4,2                  ; @dn_append
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR: CA decoding failed with error %d\n"

	.comm	_BR_X509_TA_CA,4,2              ; @BR_X509_TA_CA
l_.str.1:                               ; @.str.1
	.asciz	"ERROR: unsupported public key type in CA\n"

	.no_dead_strip	_certificate_to_trust_anchor_inner
.subsections_via_symbols
