	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_CMSIdentifier
_find_CMSIdentifier:                    ## @find_CMSIdentifier
	.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
	movl	%r9d, %r12d
	movq	%r8, %r14
	movq	%rcx, %r13
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movl	%edi, %r15d
	leaq	-68(%rbp), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	leaq	-112(%rbp), %rdi
	callq	__hx509_query_clear
	movq	$0, (%r14)
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$129, %eax
	jne	LBB0_3
## %bb.2:
	leaq	8(%rbx), %rax
	leaq	12(%rbx), %rcx
	movq	%rcx, -80(%rbp)
	movq	%rax, -88(%rbp)
	movq	_HX509_QUERY_MATCH_SERIALNUMBER@GOTPCREL(%rip), %rcx
	movq	_HX509_QUERY_MATCH_ISSUER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	leaq	4(%rbx), %rax
	movq	%rax, -96(%rbp)
	movq	_HX509_QUERY_MATCH_SUBJECT_KEY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	orl	%r12d, %eax
	movq	_HX509_QUERY_MATCH_TIME@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -112(%rbp)
	testq	%r13, %r13
	jne	LBB0_8
## %bb.7:
	xorl	%edi, %edi
	callq	_time
	movq	%rax, %r13
LBB0_8:
	movq	%r13, -104(%rbp)
	leaq	-112(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	movl	%r15d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_hx509_certs_find
	movq	_HX509_CERT_NOT_FOUND@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.9:
	leaq	-56(%rbp), %rdx
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_unparse_CMSIdentifier
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%r15d, %edi
	callq	_hx509_clear_error_string
	jmp	LBB0_12
LBB0_3:
	movq	_HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rcx
	movl	%r15d, %edi
	xorl	%esi, %esi
	jmp	LBB0_4
LBB0_13:
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movq	_HX509_ERROR_APPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str.2(%rip), %rcx
	movl	%r15d, %edi
LBB0_4:
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	movl	(%rbx), %eax
	jmp	LBB0_16
LBB0_10:
	movq	_HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %r8
	leaq	L_.str.1(%rip), %rcx
	movl	%r15d, %edi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_hx509_set_error_string
LBB0_12:
	movq	_HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_15:
	movq	-64(%rbp), %rax
	movq	%rax, (%r14)
	xorl	%eax, %eax
LBB0_16:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HX509_QUERY_MATCH_SERIALNUMBER,4,2 ## @HX509_QUERY_MATCH_SERIALNUMBER
	.comm	_HX509_QUERY_MATCH_ISSUER_NAME,4,2 ## @HX509_QUERY_MATCH_ISSUER_NAME
	.comm	_HX509_QUERY_MATCH_SUBJECT_KEY_ID,4,2 ## @HX509_QUERY_MATCH_SUBJECT_KEY_ID
	.comm	_HX509_CMS_NO_RECIPIENT_CERTIFICATE,4,2 ## @HX509_CMS_NO_RECIPIENT_CERTIFICATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown CMS identifier element"

	.comm	_HX509_QUERY_MATCH_TIME,4,2     ## @HX509_QUERY_MATCH_TIME
	.comm	_HX509_CERT_NOT_FOUND,4,2       ## @HX509_CERT_NOT_FOUND
L_.str.1:                               ## @.str.1
	.asciz	"Failed to find %s"

	.comm	_HX509_ERROR_APPEND,4,2         ## @HX509_ERROR_APPEND
L_.str.2:                               ## @.str.2
	.asciz	"Failed to find CMS id in cert store"

	.no_dead_strip	_find_CMSIdentifier
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_CMSIdentifier
_find_CMSIdentifier:                    ; @find_CMSIdentifier
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	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
	mov	x24, x5
	mov	x20, x4
	mov	x23, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	add	x0, sp, #28
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	add	x0, sp, #40
	bl	__hx509_query_clear
	str	xzr, [x20]
	ldr	w8, [x21]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.2:
	add	x8, x21, #8
	add	x9, x21, #12
Lloh0:
	adrp	x10, _HX509_QUERY_MATCH_SERIALNUMBER@GOTPAGE
Lloh1:
	ldr	x10, [x10, _HX509_QUERY_MATCH_SERIALNUMBER@GOTPAGEOFF]
	stp	x8, x9, [sp, #64]
Lloh2:
	ldr	w8, [x10]
Lloh3:
	adrp	x9, _HX509_QUERY_MATCH_ISSUER_NAME@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HX509_QUERY_MATCH_ISSUER_NAME@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_4
LBB0_3:
	add	x8, x21, #4
	str	x8, [sp, #56]
Lloh6:
	adrp	x8, _HX509_QUERY_MATCH_SUBJECT_KEY_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HX509_QUERY_MATCH_SUBJECT_KEY_ID@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
LBB0_4:
	orr	w8, w8, w24
Lloh9:
	adrp	x9, _HX509_QUERY_MATCH_TIME@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HX509_QUERY_MATCH_TIME@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp, #40]
	cbnz	x23, LBB0_6
; %bb.5:
	mov	x0, #0
	bl	_time
	mov	x23, x0
LBB0_6:
	str	x23, [sp, #48]
	add	x2, sp, #40
	add	x3, sp, #32
	mov	x0, x19
	mov	x1, x22
	bl	_hx509_certs_find
Lloh12:
	adrp	x8, _HX509_CERT_NOT_FOUND@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HX509_CERT_NOT_FOUND@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.7:
	add	x2, sp, #16
	mov	x0, x19
	mov	x1, x21
	bl	_unparse_CMSIdentifier
	cbz	w0, LBB0_13
; %bb.8:
	mov	x0, x19
	bl	_hx509_clear_error_string
	b	LBB0_14
LBB0_9:
Lloh15:
	adrp	x20, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGE
Lloh16:
	ldr	x20, [x20, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh17:
	adrp	x3, l_.str@PAGE
Lloh18:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	b	LBB0_12
LBB0_10:
	cbz	w0, LBB0_15
; %bb.11:
Lloh19:
	adrp	x8, _HX509_ERROR_APPEND@GOTPAGE
Lloh20:
	ldr	x8, [x8, _HX509_ERROR_APPEND@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x20, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGE
Lloh23:
	ldr	x20, [x20, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh24:
	adrp	x3, l_.str.2@PAGE
Lloh25:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
LBB0_12:
	bl	_hx509_set_error_string
	ldr	w0, [x20]
	b	LBB0_16
LBB0_13:
Lloh26:
	adrp	x8, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	ldr	x8, [sp, #16]
	str	x8, [sp]
Lloh29:
	adrp	x3, l_.str.1@PAGE
Lloh30:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w1, #0
	bl	_hx509_set_error_string
LBB0_14:
Lloh31:
	adrp	x8, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	b	LBB0_16
LBB0_15:
	ldr	x8, [sp, #32]
	str	x8, [x20]
LBB0_16:
	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
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_HX509_QUERY_MATCH_SERIALNUMBER,4,2 ; @HX509_QUERY_MATCH_SERIALNUMBER
	.comm	_HX509_QUERY_MATCH_ISSUER_NAME,4,2 ; @HX509_QUERY_MATCH_ISSUER_NAME
	.comm	_HX509_QUERY_MATCH_SUBJECT_KEY_ID,4,2 ; @HX509_QUERY_MATCH_SUBJECT_KEY_ID
	.comm	_HX509_CMS_NO_RECIPIENT_CERTIFICATE,4,2 ; @HX509_CMS_NO_RECIPIENT_CERTIFICATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown CMS identifier element"

	.comm	_HX509_QUERY_MATCH_TIME,4,2     ; @HX509_QUERY_MATCH_TIME
	.comm	_HX509_CERT_NOT_FOUND,4,2       ; @HX509_CERT_NOT_FOUND
l_.str.1:                               ; @.str.1
	.asciz	"Failed to find %s"

	.comm	_HX509_ERROR_APPEND,4,2         ; @HX509_ERROR_APPEND
l_.str.2:                               ; @.str.2
	.asciz	"Failed to find CMS id in cert store"

	.no_dead_strip	_find_CMSIdentifier
.subsections_via_symbols
