	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cms_RecipientInfo_kekri_decrypt
_cms_RecipientInfo_kekri_decrypt:       ## @cms_RecipientInfo_kekri_decrypt
	.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
	cmpl	$0, 16(%rbx)
	je	LBB0_1
## %bb.3:
	movq	(%rdi), %rax
	movq	(%rax), %r14
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	callq	_OBJ_obj2nid
	movl	%eax, %edi
	callq	_aes_wrap_keylen
	cmpl	(%rbx), %eax
	jne	LBB0_4
## %bb.5:
	movq	8(%rbx), %rcx
	cmpl	$15, (%rcx)
	jg	LBB0_8
## %bb.6:
	movq	_CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CMS_R_INVALID_ENCRYPTED_KEY_LENGTH@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CMS_R_NO_KEY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CMS_R_INVALID_KEY_LENGTH@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %esi
	callq	_CMSerr
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_8:
	movl	16(%rbx), %edi
	shll	$3, %eax
	leaq	-28(%rbp), %rdx
	movl	%eax, %esi
	callq	_AES_set_decrypt_key
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CMS_R_ERROR_SETTING_KEY@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	callq	_CMSerr
	xorl	%r15d, %r15d
LBB0_14:
	movq	%r15, %rdi
	callq	_OPENSSL_free
	xorl	%ebx, %ebx
LBB0_15:
	leaq	-28(%rbp), %rdi
	movl	$4, %esi
	callq	_OPENSSL_cleanse
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	addl	$-8, %edi
	callq	_OPENSSL_malloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, %r15
	movq	8(%rbx), %rax
	movl	(%rax), %r8d
	movl	4(%rax), %ecx
	leaq	-28(%rbp), %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_AES_unwrap_key
	testl	%eax, %eax
	jle	LBB0_13
## %bb.17:
	movq	%r15, (%r14)
	movl	%eax, 8(%r14)
	movl	$1, %ebx
	jmp	LBB0_15
LBB0_11:
	movq	_CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_13:
	movq	_CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CMS_R_UNWRAP_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_CMSerr
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT,4,2 ## @CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT
	.comm	_CMS_R_NO_KEY,4,2               ## @CMS_R_NO_KEY
	.comm	_CMS_R_INVALID_KEY_LENGTH,4,2   ## @CMS_R_INVALID_KEY_LENGTH
	.comm	_CMS_R_INVALID_ENCRYPTED_KEY_LENGTH,4,2 ## @CMS_R_INVALID_ENCRYPTED_KEY_LENGTH
	.comm	_CMS_R_ERROR_SETTING_KEY,4,2    ## @CMS_R_ERROR_SETTING_KEY
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_CMS_R_UNWRAP_ERROR,4,2         ## @CMS_R_UNWRAP_ERROR
	.no_dead_strip	_cms_RecipientInfo_kekri_decrypt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cms_RecipientInfo_kekri_decrypt
_cms_RecipientInfo_kekri_decrypt:       ; @cms_RecipientInfo_kekri_decrypt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x21, [x1]
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_4
; %bb.1:
	ldr	x8, [x0]
	ldr	x20, [x8]
	ldr	x8, [x21, #24]
	ldr	w0, [x8]
	bl	_OBJ_obj2nid
	bl	_aes_wrap_keylen
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.2:
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	cmp	w8, #15
	b.gt	LBB0_7
; %bb.3:
Lloh0:
	adrp	x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _CMS_R_INVALID_ENCRYPTED_KEY_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMS_R_INVALID_ENCRYPTED_KEY_LENGTH@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
Lloh5:
	adrp	x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _CMS_R_NO_KEY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CMS_R_NO_KEY@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _CMS_R_INVALID_KEY_LENGTH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CMS_R_INVALID_KEY_LENGTH@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	bl	_CMSerr
	mov	w19, #0
	b	LBB0_12
LBB0_7:
	ldr	w8, [x21, #16]
	lsl	w1, w0, #3
	add	x2, sp, #12
	mov	x0, x8
	bl	_AES_set_decrypt_key
	cbz	x0, LBB0_13
; %bb.8:
Lloh15:
	adrp	x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _CMS_R_ERROR_SETTING_KEY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CMS_R_ERROR_SETTING_KEY@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	bl	_CMSerr
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	bl	_OPENSSL_free
	mov	w19, #0
LBB0_11:
	add	x0, sp, #12
	mov	w1, #4
	bl	_OPENSSL_cleanse
LBB0_12:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
LBB0_13:
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	sub	w0, w8, #8
	bl	_OPENSSL_malloc
	mov	x19, x0
	cbz	x0, LBB0_16
; %bb.14:
	ldr	x8, [x21, #8]
	ldp	w4, w3, [x8]
	add	x0, sp, #12
	mov	x1, #0
	mov	x2, x19
	bl	_AES_unwrap_key
	cmp	w0, #0
	b.le	LBB0_17
; %bb.15:
	str	x19, [x20]
	str	w0, [x20, #8]
	mov	w19, #1
	b	LBB0_11
LBB0_16:
Lloh20:
	adrp	x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh25:
	adrp	x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x8, _CMS_R_UNWRAP_ERROR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CMS_R_UNWRAP_ERROR@GOTPAGEOFF]
LBB0_18:
	ldr	w1, [x8]
	bl	_CMSerr
	b	LBB0_10
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT,4,2 ; @CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT
	.comm	_CMS_R_NO_KEY,4,2               ; @CMS_R_NO_KEY
	.comm	_CMS_R_INVALID_KEY_LENGTH,4,2   ; @CMS_R_INVALID_KEY_LENGTH
	.comm	_CMS_R_INVALID_ENCRYPTED_KEY_LENGTH,4,2 ; @CMS_R_INVALID_ENCRYPTED_KEY_LENGTH
	.comm	_CMS_R_ERROR_SETTING_KEY,4,2    ; @CMS_R_ERROR_SETTING_KEY
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_CMS_R_UNWRAP_ERROR,4,2         ; @CMS_R_UNWRAP_ERROR
	.no_dead_strip	_cms_RecipientInfo_kekri_decrypt
.subsections_via_symbols
