	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_cms_unenvelope           ## -- Begin function hx509_cms_unenvelope
	.p2align	4, 0x90
_hx509_cms_unenvelope:                  ## @hx509_cms_unenvelope
	.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	$312, %rsp                      ## imm = 0x138
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movq	%r8, %r15
	movq	%rcx, %r12
	movl	%edx, %r14d
	movl	%esi, -80(%rbp)                 ## 4-byte Spill
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	movq	32(%rbp), %rbx
	leaq	-344(%rbp), %rdi
	movl	$0, -64(%rbp)                   ## 4-byte Folded Spill
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	leaq	-144(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	leaq	-216(%rbp), %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	%rbx, %rdi
	movq	24(%rbp), %rbx
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	_HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r14d, -76(%rbp)                ## 4-byte Spill
	andl	%r14d, %eax
	jne	LBB0_2
## %bb.1:
	movq	_HX509_QUERY_KU_ENCIPHERMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
LBB0_2:
	leaq	-152(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_decode_EnvelopedData
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rcx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	jmp	LBB0_46
LBB0_4:
	cmpq	$0, -96(%rbp)
	je	LBB0_5
## %bb.7:
	movq	-104(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_12
## %bb.11:
	movq	_HX509_CMS_NO_DATA_AVAILABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str.3(%rip), %rcx
	jmp	LBB0_6
LBB0_5:
	movq	_HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str.1(%rip), %rcx
LBB0_6:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	movq	32(%rbp), %r14
LBB0_41:
	leaq	-144(%rbp), %rdi
	callq	_free_EnvelopedData
	leaq	-344(%rbp), %rdi
	callq	_der_free_octet_string
	cmpq	$0, -216(%rbp)
	je	LBB0_43
## %bb.42:
	leaq	-216(%rbp), %rdi
	callq	_der_free_octet_string
LBB0_43:
	testl	%r15d, %r15d
	je	LBB0_44
## %bb.45:
	movq	%rbx, %rdi
	callq	_der_free_oid
	movq	%r14, %rdi
	callq	_der_free_octet_string
	jmp	LBB0_46
LBB0_44:
	xorl	%r15d, %r15d
LBB0_46:
	movl	%r15d, %eax
	addq	$312, %rsp                      ## imm = 0x138
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_9
LBB0_12:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	$0, -56(%rbp)
	movl	$8, %r14d
	xorl	%r12d, %r12d
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	%ebx, %r15d
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r12
	addq	$12, %r14
	cmpq	-96(%rbp), %r12
	jae	LBB0_19
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	-88(%rbp), %rbx
	leaq	(%rbx,%r14), %r13
	addq	$-8, %r13
	movq	_HX509_QUERY_PRIVATE_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	orl	-64(%rbp), %r9d                 ## 4-byte Folded Reload
	movl	%r15d, %edi
	movq	%r13, %rsi
	movl	-80(%rbp), %edx                 ## 4-byte Reload
	movl	16(%rbp), %ecx
	leaq	-56(%rbp), %r8
	callq	_find_CMSIdentifier
	testl	%eax, %eax
	jne	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	leaq	(%rbx,%r14), %rdx
	addq	$-4, %rdx
	addq	%r14, %rbx
	movq	-56(%rbp), %rcx
	movl	%r15d, %edi
	movq	%rbx, %rsi
	leaq	-344(%rbp), %r8
	callq	__hx509_cert_private_decrypt
	movl	%r15d, %ebx
	movl	%eax, %r15d
	movq	-56(%rbp), %rdi
	callq	_hx509_cert_free
	testl	%r15d, %r15d
	je	LBB0_21
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	$0, -56(%rbp)
	movl	%ebx, %edi
	movq	%r13, %rsi
	leaq	-280(%rbp), %rdx
	callq	_unparse_CMSIdentifier
	movl	$1, -60(%rbp)                   ## 4-byte Folded Spill
	testl	%eax, %eax
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_HX509_ERROR_APPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-280(%rbp), %r8
	movl	%ebx, %edi
	movl	%r15d, %edx
	leaq	L_.str.4(%rip), %rcx
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	movq	-280(%rbp), %rdi
	callq	_free
	jmp	LBB0_17
LBB0_19:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_20
LBB0_21:
	cmpq	$0, -56(%rbp)
	movq	32(%rbp), %r14
	movq	24(%rbp), %rbx
	je	LBB0_22
## %bb.23:
	leaq	-112(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_der_copy_oid
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	movl	%eax, %r15d
	leaq	L_.str.7(%rip), %rcx
LBB0_39:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	jmp	LBB0_40
LBB0_9:
	movq	_HX509_CMS_NO_DATA_AVAILABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str.2(%rip), %rcx
	jmp	LBB0_6
LBB0_22:
	movq	_HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_HX509_ERROR_APPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rcx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
LBB0_40:
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	jmp	LBB0_41
LBB0_20:
	movq	_HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPCREL(%rip), %rax
	movl	%r15d, %edi
	movl	(%rax), %r15d
	leaq	L_.str.5(%rip), %rcx
	xorl	%esi, %esi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_hx509_set_error_string
	movq	32(%rbp), %r14
	movq	24(%rbp), %rbx
	jmp	LBB0_41
LBB0_25:
	movq	-120(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_26
## %bb.27:
	movl	8(%rax), %ecx
	movl	%ecx, -272(%rbp)
	movq	(%rax), %rax
	movq	%rax, -280(%rbp)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	leaq	-280(%rbp), %r12
	jmp	LBB0_28
LBB0_26:
	xorl	%r12d, %r12d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
LBB0_28:
	leaq	-128(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	xorl	%esi, %esi
	callq	_hx509_crypto_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_41
## %bb.29:
	movq	_HX509_CMS_UE_ALLOW_WEAK@GOTPCREL(%rip), %rax
	movl	-76(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	je	LBB0_31
## %bb.30:
	movl	-48(%rbp), %edi
	callq	_hx509_crypto_allow_weak
LBB0_31:
	testq	%r12, %r12
	je	LBB0_34
## %bb.32:
	movl	-48(%rbp), %esi
	leaq	-216(%rbp), %rcx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, %rdx
	callq	_hx509_crypto_set_params
	testl	%eax, %eax
	je	LBB0_34
## %bb.33:
	movl	%eax, %r15d
	movl	-48(%rbp), %edi
	callq	_hx509_crypto_destroy
	jmp	LBB0_41
LBB0_34:
	movl	-48(%rbp), %edi
	movl	-336(%rbp), %esi
	movq	-344(%rbp), %rdx
	callq	_hx509_crypto_set_key_data
	movl	-48(%rbp), %edi
	testl	%eax, %eax
	je	LBB0_36
## %bb.35:
	movl	%eax, %r15d
	callq	_hx509_crypto_destroy
	leaq	L_.str.8(%rip), %rcx
	jmp	LBB0_39
LBB0_36:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %esi
	movq	(%rax), %rdx
	movq	-216(%rbp), %rax
	testq	%rax, %rax
	leaq	-216(%rbp), %rcx
	cmoveq	%rax, %rcx
	movq	%r14, %r8
	callq	_hx509_crypto_decrypt
	movl	%eax, %r15d
	movl	-48(%rbp), %edi
	callq	_hx509_crypto_destroy
	testl	%r15d, %r15d
	je	LBB0_37
## %bb.38:
	leaq	L_.str.9(%rip), %rcx
	jmp	LBB0_39
LBB0_37:
	xorl	%r15d, %r15d
	jmp	LBB0_41
	.cfi_endproc
                                        ## -- End function
	.comm	_HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT,4,2 ## @HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT
	.comm	_HX509_QUERY_KU_ENCIPHERMENT,4,2 ## @HX509_QUERY_KU_ENCIPHERMENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to decode EnvelopedData"

	.comm	_HX509_CMS_NO_RECIPIENT_CERTIFICATE,4,2 ## @HX509_CMS_NO_RECIPIENT_CERTIFICATE
L_.str.1:                               ## @.str.1
	.asciz	"No recipient info in enveloped data"

	.comm	_HX509_CMS_NO_DATA_AVAILABLE,4,2 ## @HX509_CMS_NO_DATA_AVAILABLE
L_.str.2:                               ## @.str.2
	.asciz	"Content missing from encrypted data"

L_.str.3:                               ## @.str.3
	.asciz	"Both internal and external encrypted data"

	.comm	_HX509_QUERY_PRIVATE_KEY,4,2    ## @HX509_QUERY_PRIVATE_KEY
	.comm	_HX509_ERROR_APPEND,4,2         ## @HX509_ERROR_APPEND
L_.str.4:                               ## @.str.4
	.asciz	"Failed to decrypt with %s"

L_.str.5:                               ## @.str.5
	.asciz	"No private key matched any certificate"

L_.str.6:                               ## @.str.6
	.asciz	"No private key decrypted the transfer key"

L_.str.7:                               ## @.str.7
	.asciz	"Failed to copy EnvelopedData content oid"

	.comm	_HX509_CMS_UE_ALLOW_WEAK,4,2    ## @HX509_CMS_UE_ALLOW_WEAK
L_.str.8:                               ## @.str.8
	.asciz	"Failed to set key for decryption of EnvelopedData"

L_.str.9:                               ## @.str.9
	.asciz	"Failed to decrypt EnvelopedData"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hx509_cms_unenvelope           ; -- Begin function hx509_cms_unenvelope
	.p2align	2
_hx509_cms_unenvelope:                  ; @hx509_cms_unenvelope
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #416
	.cfi_def_cfa_offset 416
	stp	x28, x27, [sp, #320]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #336]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #352]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #368]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #384]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #400]            ; 16-byte Folded Spill
	add	x29, sp, #400
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x25, x6
	mov	x28, x5
	mov	x24, x4
	mov	x27, x3
	mov	x22, x2
	mov	x26, x1
	mov	x21, x0
	ldr	x23, [x29, #16]
	sub	x0, x29, #152
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	add	x0, sp, #184
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	mov	x0, x23
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	mov	x0, x19
	mov	w1, #0
	mov	w2, #64
	bl	_memset
Lloh0:
	adrp	x8, _HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _HX509_QUERY_KU_ENCIPHERMENT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HX509_QUERY_KU_ENCIPHERMENT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w8, w22
	csel	w20, w9, wzr, eq
	add	x2, sp, #184
	add	x3, sp, #40
	mov	x0, x27
	mov	x1, x24
	bl	_decode_EnvelopedData
	cbz	w0, LBB0_2
; %bb.1:
	mov	x24, x0
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x21
	mov	w1, #0
	mov	x2, x24
	bl	_hx509_set_error_string
	b	LBB0_12
LBB0_2:
	str	w22, [sp, #32]                  ; 4-byte Folded Spill
	add	x22, sp, #176
	ldr	x8, [x22, #56]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	x8, [x22, #48]
	cbz	x8, LBB0_13
; %bb.4:
	cbz	x28, LBB0_15
; %bb.5:
Lloh8:
	adrp	x8, _HX509_CMS_NO_DATA_AVAILABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HX509_CMS_NO_DATA_AVAILABLE@GOTPAGEOFF]
Lloh10:
	ldr	w24, [x8]
Lloh11:
	adrp	x3, l_.str.3@PAGE
Lloh12:
	add	x3, x3, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGEOFF]
Lloh15:
	ldr	w24, [x8]
Lloh16:
	adrp	x3, l_.str.1@PAGE
Lloh17:
	add	x3, x3, l_.str.1@PAGEOFF
LBB0_7:
	mov	x0, x21
	mov	w1, #0
	mov	x2, x24
	bl	_hx509_set_error_string
LBB0_8:
	add	x0, sp, #184
	bl	_free_EnvelopedData
	sub	x0, x29, #152
	bl	_der_free_octet_string
	ldr	x8, [sp, #48]
	cbz	x8, LBB0_10
; %bb.9:
	add	x0, sp, #48
	bl	_der_free_octet_string
LBB0_10:
	cbz	w24, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_der_free_oid
	mov	x0, x23
	bl	_der_free_octet_string
LBB0_12:
	mov	x0, x24
	ldp	x29, x30, [sp, #400]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #384]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #368]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #352]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #336]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #320]            ; 16-byte Folded Reload
	add	sp, sp, #416
	ret
LBB0_13:
	cbnz	x28, LBB0_16
; %bb.14:
Lloh18:
	adrp	x8, _HX509_CMS_NO_DATA_AVAILABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HX509_CMS_NO_DATA_AVAILABLE@GOTPAGEOFF]
Lloh20:
	ldr	w24, [x8]
Lloh21:
	adrp	x3, l_.str.2@PAGE
Lloh22:
	add	x3, x3, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_15:
	mov	x28, x8
LBB0_16:
	stp	x28, x23, [sp, #8]              ; 16-byte Folded Spill
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
	mov	x24, #0
	mov	w23, #0
	str	xzr, [x22]
	mov	w19, #8
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	w23, #1
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x24, x24, #1
	ldr	x8, [x22, #56]
	add	x19, x19, #12
	cmp	x24, x8
	b.hs	LBB0_23
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #64]
	add	x28, x8, x19
	sub	x27, x28, #8
Lloh23:
	adrp	x8, _HX509_QUERY_PRIVATE_KEY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _HX509_QUERY_PRIVATE_KEY@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	orr	w5, w8, w20
	add	x4, sp, #176
	mov	x0, x21
	mov	x1, x27
	mov	x2, x26
	mov	x3, x25
	bl	_find_CMSIdentifier
	cbnz	w0, LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	sub	x2, x28, #4
	ldr	x3, [x22]
	sub	x4, x29, #152
	mov	x0, x21
	mov	x1, x28
	bl	__hx509_cert_private_decrypt
	mov	x28, x0
	ldr	x0, [x22]
	bl	_hx509_cert_free
	cbz	w28, LBB0_24
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	str	xzr, [x22]
	add	x2, sp, #112
	mov	x0, x21
	mov	x1, x27
	bl	_unparse_CMSIdentifier
	cbnz	w0, LBB0_17
; %bb.22:                               ;   in Loop: Header=BB0_19 Depth=1
Lloh26:
	adrp	x8, _HX509_ERROR_APPEND@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HX509_ERROR_APPEND@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldr	x8, [sp, #112]
	str	x8, [sp]
	mov	x0, x21
	mov	x2, x28
Lloh29:
	adrp	x3, l_.str.4@PAGE
Lloh30:
	add	x3, x3, l_.str.4@PAGEOFF
	bl	_hx509_set_error_string
	ldr	x0, [sp, #112]
	bl	_free
	b	LBB0_17
LBB0_23:
	cbz	w23, LBB0_28
LBB0_24:
	ldr	x8, [x22]
	cbz	x8, LBB0_27
; %bb.25:
	add	x8, sp, #184
	add	x0, x8, #32
	ldr	x19, [sp, #24]                  ; 8-byte Folded Reload
	mov	x1, x19
	bl	_der_copy_oid
	ldr	x23, [sp, #16]                  ; 8-byte Folded Reload
	cbz	w0, LBB0_30
; %bb.26:
	mov	x24, x0
Lloh31:
	adrp	x3, l_.str.7@PAGE
Lloh32:
	add	x3, x3, l_.str.7@PAGEOFF
	b	LBB0_7
LBB0_27:
Lloh33:
	adrp	x8, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGEOFF]
Lloh35:
	ldr	w24, [x8]
Lloh36:
	adrp	x8, _HX509_ERROR_APPEND@GOTPAGE
Lloh37:
	ldr	x8, [x8, _HX509_ERROR_APPEND@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x3, l_.str.6@PAGE
Lloh40:
	add	x3, x3, l_.str.6@PAGEOFF
	mov	x0, x21
	b	LBB0_29
LBB0_28:
Lloh41:
	adrp	x8, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _HX509_CMS_NO_RECIPIENT_CERTIFICATE@GOTPAGEOFF]
Lloh43:
	ldr	w24, [x8]
Lloh44:
	adrp	x3, l_.str.5@PAGE
Lloh45:
	add	x3, x3, l_.str.5@PAGEOFF
	mov	x0, x21
	mov	w1, #0
LBB0_29:
	mov	x2, x24
	bl	_hx509_set_error_string
	ldp	x23, x19, [sp, #16]             ; 16-byte Folded Reload
	b	LBB0_8
LBB0_30:
	ldr	x8, [x22, #32]
	cbz	x8, LBB0_32
; %bb.31:
	ldr	w9, [x8, #8]
	str	w9, [sp, #120]
	ldr	x8, [x8]
	str	x8, [sp, #112]
	add	x25, sp, #112
	b	LBB0_33
LBB0_32:
	mov	x25, #0
LBB0_33:
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	add	x8, sp, #184
	add	x2, x8, #16
	add	x3, sp, #36
	mov	x0, x21
	mov	x1, #0
	bl	_hx509_crypto_init
	mov	x24, x0
	cbnz	w0, LBB0_8
; %bb.34:
Lloh46:
	adrp	x8, _HX509_CMS_UE_ALLOW_WEAK@GOTPAGE
Lloh47:
	ldr	x8, [x8, _HX509_CMS_UE_ALLOW_WEAK@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	ldr	w9, [sp, #32]                   ; 4-byte Folded Reload
	tst	w8, w9
	b.eq	LBB0_36
; %bb.35:
	ldr	w0, [sp, #36]
	bl	_hx509_crypto_allow_weak
LBB0_36:
	cbz	x25, LBB0_39
; %bb.37:
	ldr	w1, [sp, #36]
	add	x3, sp, #48
	mov	x0, x21
	mov	x2, x25
	bl	_hx509_crypto_set_params
	cbz	w0, LBB0_39
; %bb.38:
	mov	x24, x0
	ldr	w0, [sp, #36]
	bl	_hx509_crypto_destroy
	b	LBB0_8
LBB0_39:
	ldr	w0, [sp, #36]
	ldur	w1, [x29, #-144]
	ldr	x2, [x22, #72]
	bl	_hx509_crypto_set_key_data
	mov	x24, x0
	ldr	w0, [sp, #36]
	cbz	w24, LBB0_41
; %bb.40:
	bl	_hx509_crypto_destroy
Lloh49:
	adrp	x3, l_.str.8@PAGE
Lloh50:
	add	x3, x3, l_.str.8@PAGEOFF
	b	LBB0_7
LBB0_41:
	ldr	w1, [x20, #8]
	ldr	x2, [x20]
	ldr	x8, [sp, #48]
	add	x9, sp, #48
	cmp	x8, #0
	csel	x3, xzr, x9, eq
	mov	x4, x23
	bl	_hx509_crypto_decrypt
	mov	x24, x0
	ldr	w0, [sp, #36]
	bl	_hx509_crypto_destroy
	cbz	w24, LBB0_8
; %bb.42:
Lloh51:
	adrp	x3, l_.str.9@PAGE
Lloh52:
	add	x3, x3, l_.str.9@PAGEOFF
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT,4,2 ; @HX509_CMS_UE_DONT_REQUIRE_KU_ENCIPHERMENT
	.comm	_HX509_QUERY_KU_ENCIPHERMENT,4,2 ; @HX509_QUERY_KU_ENCIPHERMENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to decode EnvelopedData"

	.comm	_HX509_CMS_NO_RECIPIENT_CERTIFICATE,4,2 ; @HX509_CMS_NO_RECIPIENT_CERTIFICATE
l_.str.1:                               ; @.str.1
	.asciz	"No recipient info in enveloped data"

	.comm	_HX509_CMS_NO_DATA_AVAILABLE,4,2 ; @HX509_CMS_NO_DATA_AVAILABLE
l_.str.2:                               ; @.str.2
	.asciz	"Content missing from encrypted data"

l_.str.3:                               ; @.str.3
	.asciz	"Both internal and external encrypted data"

	.comm	_HX509_QUERY_PRIVATE_KEY,4,2    ; @HX509_QUERY_PRIVATE_KEY
	.comm	_HX509_ERROR_APPEND,4,2         ; @HX509_ERROR_APPEND
l_.str.4:                               ; @.str.4
	.asciz	"Failed to decrypt with %s"

l_.str.5:                               ; @.str.5
	.asciz	"No private key matched any certificate"

l_.str.6:                               ; @.str.6
	.asciz	"No private key decrypted the transfer key"

l_.str.7:                               ; @.str.7
	.asciz	"Failed to copy EnvelopedData content oid"

	.comm	_HX509_CMS_UE_ALLOW_WEAK,4,2    ; @HX509_CMS_UE_ALLOW_WEAK
l_.str.8:                               ; @.str.8
	.asciz	"Failed to set key for decryption of EnvelopedData"

l_.str.9:                               ; @.str.9
	.asciz	"Failed to decrypt EnvelopedData"

.subsections_via_symbols
