	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_parent
_find_parent:                           ## @find_parent
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, %r13
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r12d
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	16(%rbp), %rax
	movq	$0, (%rax)
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	leaq	-104(%rbp), %rdi
	callq	__hx509_query_clear
	movl	(%rbx), %edi
	callq	_subject_null_p
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edi
	leaq	-56(%rbp), %rsi
	callq	_find_extension_auth_key_id
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	_HX509_CERTIFICATE_MALFORMED@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rcx
LBB0_4:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_hx509_set_error_string
LBB0_18:
	movl	(%rbx), %eax
	jmp	LBB0_19
LBB0_1:
	movq	_HX509_QUERY_FIND_ISSUER_CERT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -104(%rbp)
	movq	%rbx, %rdi
	callq	__hx509_get_cert
	movl	%eax, -80(%rbp)
	movl	-104(%rbp), %eax
	jmp	LBB0_8
LBB0_5:
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, -88(%rbp)
	movq	_HX509_QUERY_MATCH_SUBJECT_KEY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	movq	%r14, -96(%rbp)
	movq	_HX509_QUERY_NO_MATCH_PATH@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -104(%rbp)
	testq	%r13, %r13
	je	LBB0_12
## %bb.9:
	movl	%r12d, -100(%rbp)
	movq	_HX509_QUERY_MATCH_TIME@GOTPCREL(%rip), %r14
	orl	(%r14), %eax
	movl	%eax, -104(%rbp)
	leaq	-104(%rbp), %rdx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rsi
	movq	16(%rbp), %rcx
	callq	_hx509_certs_find
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, -104(%rbp)
LBB0_12:
	testq	%r15, %r15
	je	LBB0_14
## %bb.13:
	leaq	-104(%rbp), %rdx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, %rsi
	movq	16(%rbp), %rcx
	callq	_hx509_certs_find
	testl	%eax, %eax
	je	LBB0_10
LBB0_14:
	leaq	-56(%rbp), %rdi
	callq	_free_AuthorityKeyIdentifier
	leaq	-60(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_hx509_cert_get_subject
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:
	movl	-60(%rbp), %edi
	leaq	-72(%rbp), %rsi
	callq	_hx509_name_to_string
	movl	%eax, %ebx
	leaq	-60(%rbp), %rdi
	callq	_hx509_name_free
	testl	%ebx, %ebx
	je	LBB0_17
LBB0_16:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_hx509_clear_error_string
	movq	_HX509_ISSUER_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_10:
	leaq	-56(%rbp), %rdi
	callq	_free_AuthorityKeyIdentifier
	xorl	%eax, %eax
LBB0_19:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	-56(%rbp), %rdi
	callq	_free_AuthorityKeyIdentifier
	movq	_HX509_CERTIFICATE_MALFORMED@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rcx
	jmp	LBB0_4
LBB0_17:
	movq	_HX509_ISSUER_NOT_FOUND@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	-72(%rbp), %r8
	leaq	L_.str.2(%rip), %rcx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	movq	-72(%rbp), %rdi
	callq	_free
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_HX509_QUERY_FIND_ISSUER_CERT,4,2 ## @HX509_QUERY_FIND_ISSUER_CERT
	.comm	_HX509_CERTIFICATE_MALFORMED,4,2 ## @HX509_CERTIFICATE_MALFORMED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Subjectless certificate missing AuthKeyID"

L_.str.1:                               ## @.str.1
	.asciz	"Subjectless certificate missing keyIdentifier inside AuthKeyID"

	.comm	_HX509_QUERY_MATCH_SUBJECT_KEY_ID,4,2 ## @HX509_QUERY_MATCH_SUBJECT_KEY_ID
	.comm	_HX509_QUERY_NO_MATCH_PATH,4,2  ## @HX509_QUERY_NO_MATCH_PATH
	.comm	_HX509_QUERY_MATCH_TIME,4,2     ## @HX509_QUERY_MATCH_TIME
	.comm	_HX509_ISSUER_NOT_FOUND,4,2     ## @HX509_ISSUER_NOT_FOUND
L_.str.2:                               ## @.str.2
	.asciz	"Failed to find issuer for certificate with subject: '%s'"

	.no_dead_strip	_find_parent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_parent
_find_parent:                           ; @find_parent
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x21, x6
	mov	x20, x5
	mov	x23, x4
	mov	x25, x3
	mov	x22, x2
	mov	x24, x1
	mov	x19, x0
	str	xzr, [x6]
	add	x0, sp, #56
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x0, sp, #24
	bl	__hx509_query_clear
	ldr	w0, [x20]
	bl	_subject_null_p
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x20]
	add	x1, sp, #56
	bl	_find_extension_auth_key_id
	cbz	w0, LBB0_6
; %bb.2:
Lloh0:
	adrp	x20, _HX509_CERTIFICATE_MALFORMED@GOTPAGE
Lloh1:
	ldr	x20, [x20, _HX509_CERTIFICATE_MALFORMED@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh2:
	adrp	x3, l_.str@PAGE
Lloh3:
	add	x3, x3, l_.str@PAGEOFF
LBB0_3:
	mov	x0, x19
	mov	w1, #0
	bl	_hx509_set_error_string
LBB0_4:
	ldr	w0, [x20]
	b	LBB0_17
LBB0_5:
Lloh4:
	adrp	x8, _HX509_QUERY_FIND_ISSUER_CERT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HX509_QUERY_FIND_ISSUER_CERT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [sp, #24]
	orr	w8, w9, w8
	str	w8, [sp, #24]
	mov	x0, x20
	bl	__hx509_get_cert
	str	w0, [sp, #48]
	ldr	w8, [sp, #24]
	b	LBB0_8
LBB0_6:
	ldr	x8, [sp, #56]
	cbz	x8, LBB0_18
; %bb.7:
	str	x8, [sp, #40]
Lloh7:
	adrp	x8, _HX509_QUERY_MATCH_SUBJECT_KEY_ID@GOTPAGE
Lloh8:
	ldr	x8, [x8, _HX509_QUERY_MATCH_SUBJECT_KEY_ID@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
LBB0_8:
	str	x25, [sp, #32]
Lloh10:
	adrp	x9, _HX509_QUERY_NO_MATCH_PATH@GOTPAGE
Lloh11:
	ldr	x9, [x9, _HX509_QUERY_NO_MATCH_PATH@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [sp, #24]
	cbz	x23, LBB0_11
; %bb.9:
Lloh13:
	adrp	x25, _HX509_QUERY_MATCH_TIME@GOTPAGE
Lloh14:
	ldr	x25, [x25, _HX509_QUERY_MATCH_TIME@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w8, w9, w8
	stp	w8, w24, [sp, #24]
	add	x2, sp, #24
	mov	x0, x19
	mov	x1, x23
	mov	x3, x21
	bl	_hx509_certs_find
	cbz	w0, LBB0_16
; %bb.10:
	ldr	w8, [x25]
	ldr	w9, [sp, #24]
	bic	w8, w9, w8
	str	w8, [sp, #24]
LBB0_11:
	cbz	x22, LBB0_13
; %bb.12:
	add	x2, sp, #24
	mov	x0, x19
	mov	x1, x22
	mov	x3, x21
	bl	_hx509_certs_find
	cbz	w0, LBB0_16
LBB0_13:
	add	x0, sp, #56
	bl	_free_AuthorityKeyIdentifier
	add	x1, sp, #20
	mov	x0, x20
	bl	_hx509_cert_get_subject
	cbnz	w0, LBB0_15
; %bb.14:
	ldr	w0, [sp, #20]
	add	x1, sp, #8
	bl	_hx509_name_to_string
	mov	x20, x0
	add	x0, sp, #20
	bl	_hx509_name_free
	cbz	w20, LBB0_19
LBB0_15:
	mov	x0, x19
	bl	_hx509_clear_error_string
Lloh15:
	adrp	x8, _HX509_ISSUER_NOT_FOUND@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HX509_ISSUER_NOT_FOUND@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	b	LBB0_17
LBB0_16:
	add	x0, sp, #56
	bl	_free_AuthorityKeyIdentifier
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_18:
	add	x0, sp, #56
	bl	_free_AuthorityKeyIdentifier
Lloh18:
	adrp	x20, _HX509_CERTIFICATE_MALFORMED@GOTPAGE
Lloh19:
	ldr	x20, [x20, _HX509_CERTIFICATE_MALFORMED@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh20:
	adrp	x3, l_.str.1@PAGE
Lloh21:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_19:
Lloh22:
	adrp	x20, _HX509_ISSUER_NOT_FOUND@GOTPAGE
Lloh23:
	ldr	x20, [x20, _HX509_ISSUER_NOT_FOUND@GOTPAGEOFF]
	ldr	w2, [x20]
	ldr	x8, [sp, #8]
	str	x8, [sp]
Lloh24:
	adrp	x3, l_.str.2@PAGE
Lloh25:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_hx509_set_error_string
	ldr	x0, [sp, #8]
	bl	_free
	b	LBB0_4
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_HX509_QUERY_FIND_ISSUER_CERT,4,2 ; @HX509_QUERY_FIND_ISSUER_CERT
	.comm	_HX509_CERTIFICATE_MALFORMED,4,2 ; @HX509_CERTIFICATE_MALFORMED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Subjectless certificate missing AuthKeyID"

l_.str.1:                               ; @.str.1
	.asciz	"Subjectless certificate missing keyIdentifier inside AuthKeyID"

	.comm	_HX509_QUERY_MATCH_SUBJECT_KEY_ID,4,2 ; @HX509_QUERY_MATCH_SUBJECT_KEY_ID
	.comm	_HX509_QUERY_NO_MATCH_PATH,4,2  ; @HX509_QUERY_NO_MATCH_PATH
	.comm	_HX509_QUERY_MATCH_TIME,4,2     ; @HX509_QUERY_MATCH_TIME
	.comm	_HX509_ISSUER_NOT_FOUND,4,2     ; @HX509_ISSUER_NOT_FOUND
l_.str.2:                               ; @.str.2
	.asciz	"Failed to find issuer for certificate with subject: '%s'"

	.no_dead_strip	_find_parent
.subsections_via_symbols
