	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ecdh_cms_set_shared_info
_ecdh_cms_set_shared_info:              ## @ecdh_cms_set_shared_info
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	$0, -48(%rbp)
	leaq	-56(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_CMS_RecipientInfo_kari_get0_alg
	xorl	%r12d, %r12d
	testl	%eax, %eax
	je	LBB0_15
## %bb.1:
	movq	-56(%rbp), %rax
	movl	8(%rax), %edi
	callq	_OBJ_obj2nid
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_ecdh_cms_set_kdf_param
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	-56(%rbp), %rax
	movq	(%rax), %rcx
	movq	(%rcx), %rdx
	movq	_V_ASN1_SEQUENCE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_15
## %bb.4:
	movq	8(%rcx), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -64(%rbp)
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movl	8(%rax), %edx
	xorl	%r12d, %r12d
	leaq	-64(%rbp), %rsi
	xorl	%edi, %edi
	callq	_d2i_X509_ALGOR
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_14
## %bb.5:
	movq	%rbx, %rdi
	callq	_CMS_RecipientInfo_kari_get0_ctx
	testq	%rax, %rax
	je	LBB0_14
## %bb.6:
	movq	%rax, %r13
	movl	8(%r15), %edi
	callq	_EVP_get_cipherbyobj
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_EVP_CIPHER_mode
	movq	_EVP_CIPH_WRAP_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.8:
	xorl	%r12d, %r12d
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_EVP_EncryptInit_ex
	testl	%eax, %eax
	je	LBB0_14
## %bb.9:
	movq	(%r15), %rsi
	movq	%r13, %rdi
	callq	_EVP_CIPHER_asn1_to_param
	testq	%rax, %rax
	jle	LBB0_14
## %bb.10:
	movq	%r13, %rdi
	callq	_EVP_CIPHER_CTX_key_length
	movl	%eax, %ebx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_EVP_PKEY_CTX_set_ecdh_kdf_outlen
	testq	%rax, %rax
	jle	LBB0_14
## %bb.11:
	movq	-72(%rbp), %rdx
	leaq	-48(%rbp), %rdi
	movq	%r15, %rsi
	movl	%ebx, %ecx
	callq	_CMS_SharedInfo_encode
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movq	-48(%rbp), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_EVP_PKEY_CTX_set0_ecdh_kdf_ukm
	testq	%rax, %rax
	jle	LBB0_14
## %bb.13:
	movq	$0, -48(%rbp)
	movl	$1, %r12d
LBB0_14:
	movq	%r15, %rdi
	callq	_X509_ALGOR_free
	movq	-48(%rbp), %rdi
	callq	_OPENSSL_free
	jmp	LBB0_15
LBB0_2:
	movq	_EC_F_ECDH_CMS_SET_SHARED_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EC_R_KDF_PARAMETER_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
LBB0_15:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_F_ECDH_CMS_SET_SHARED_INFO,4,2 ## @EC_F_ECDH_CMS_SET_SHARED_INFO
	.comm	_EC_R_KDF_PARAMETER_ERROR,4,2   ## @EC_R_KDF_PARAMETER_ERROR
	.comm	_V_ASN1_SEQUENCE,8,3            ## @V_ASN1_SEQUENCE
	.comm	_EVP_CIPH_WRAP_MODE,8,3         ## @EVP_CIPH_WRAP_MODE
	.no_dead_strip	_ecdh_cms_set_shared_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ecdh_cms_set_shared_info
_ecdh_cms_set_shared_info:              ; @ecdh_cms_set_shared_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x1
	mov	x20, x0
	str	xzr, [sp]
	add	x1, sp, #24
	add	x2, sp, #16
	mov	x0, x21
	bl	_CMS_RecipientInfo_kari_get0_alg
	cbz	w0, LBB0_14
; %bb.1:
	ldr	x8, [sp, #24]
	ldr	w0, [x8, #8]
	bl	_OBJ_obj2nid
	mov	x1, x0
	mov	x0, x20
	bl	_ecdh_cms_set_kdf_param
	cbz	w0, LBB0_13
; %bb.2:
	ldr	x8, [sp, #24]
	ldr	x9, [x8]
	ldr	x10, [x9]
Lloh0:
	adrp	x11, _V_ASN1_SEQUENCE@GOTPAGE
Lloh1:
	ldr	x11, [x11, _V_ASN1_SEQUENCE@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_14
; %bb.3:
	ldr	x9, [x9, #8]
	ldr	x9, [x9]
	str	x9, [sp, #8]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	ldr	w2, [x8, #8]
	add	x1, sp, #8
	mov	x0, #0
	bl	_d2i_X509_ALGOR
	mov	x19, x0
	cbz	x0, LBB0_16
; %bb.4:
	mov	x0, x21
	bl	_CMS_RecipientInfo_kari_get0_ctx
	cbz	x0, LBB0_16
; %bb.5:
	mov	x21, x0
	ldr	w0, [x19, #8]
	bl	_EVP_get_cipherbyobj
	cbz	x0, LBB0_16
; %bb.6:
	mov	x22, x0
	bl	_EVP_CIPHER_mode
Lloh3:
	adrp	x8, _EVP_CIPH_WRAP_MODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EVP_CIPH_WRAP_MODE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.7:
	mov	x0, x21
	mov	x1, x22
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	bl	_EVP_EncryptInit_ex
	cbz	w0, LBB0_16
; %bb.8:
	ldr	x1, [x19]
	mov	x0, x21
	bl	_EVP_CIPHER_asn1_to_param
	cmp	x0, #1
	b.lt	LBB0_16
; %bb.9:
	mov	x0, x21
	bl	_EVP_CIPHER_CTX_key_length
	mov	x21, x0
	mov	x0, x20
	mov	x1, x21
	bl	_EVP_PKEY_CTX_set_ecdh_kdf_outlen
	cmp	x0, #1
	b.lt	LBB0_16
; %bb.10:
	ldr	x2, [sp, #16]
	mov	x0, sp
	mov	x1, x19
	mov	x3, x21
	bl	_CMS_SharedInfo_encode
	cbz	w0, LBB0_16
; %bb.11:
	mov	x2, x0
	ldr	x1, [sp]
	mov	x0, x20
	bl	_EVP_PKEY_CTX_set0_ecdh_kdf_ukm
	cmp	x0, #1
	b.lt	LBB0_16
; %bb.12:
	str	xzr, [sp]
	mov	w20, #1
	b	LBB0_17
LBB0_13:
Lloh6:
	adrp	x8, _EC_F_ECDH_CMS_SET_SHARED_INFO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EC_F_ECDH_CMS_SET_SHARED_INFO@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _EC_R_KDF_PARAMETER_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EC_R_KDF_PARAMETER_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_ECerr
LBB0_14:
	mov	w20, #0
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_16:
	mov	w20, #0
LBB0_17:
	mov	x0, x19
	bl	_X509_ALGOR_free
	ldr	x0, [sp]
	bl	_OPENSSL_free
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_F_ECDH_CMS_SET_SHARED_INFO,4,2 ; @EC_F_ECDH_CMS_SET_SHARED_INFO
	.comm	_EC_R_KDF_PARAMETER_ERROR,4,2   ; @EC_R_KDF_PARAMETER_ERROR
	.comm	_V_ASN1_SEQUENCE,8,3            ; @V_ASN1_SEQUENCE
	.comm	_EVP_CIPH_WRAP_MODE,8,3         ; @EVP_CIPH_WRAP_MODE
	.no_dead_strip	_ecdh_cms_set_shared_info
.subsections_via_symbols
