	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dh_cms_set_shared_info
_dh_cms_set_shared_info:                ## @dh_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	$24, %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
	leaq	-56(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_CMS_RecipientInfo_kari_get0_alg
	testl	%eax, %eax
	je	LBB0_17
## %bb.1:
	movq	-56(%rbp), %rax
	movl	8(%rax), %edi
	callq	_OBJ_obj2nid
	movq	_NID_id_smime_alg_ESDH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.2:
	movq	_EVP_PKEY_DH_KDF_X9_42@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_EVP_PKEY_CTX_set_dh_kdf_type
	testq	%rax, %rax
	jle	LBB0_17
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_EVP_sha1
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_EVP_PKEY_CTX_set_dh_kdf_md
	testq	%rax, %rax
	jle	LBB0_20
## %bb.4:
	movq	-56(%rbp), %rax
	movq	(%rax), %rcx
	movq	(%rcx), %rdx
	movq	_V_ASN1_SEQUENCE@GOTPCREL(%rip), %rsi
	xorl	%r13d, %r13d
	movl	$0, %r15d
	movl	$0, %r12d
	cmpq	(%rsi), %rdx
	jne	LBB0_19
## %bb.5:
	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
	testq	%rax, %rax
	je	LBB0_20
## %bb.6:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_CMS_RecipientInfo_kari_get0_ctx
	testq	%rax, %rax
	je	LBB0_21
## %bb.7:
	movq	%rax, %rbx
	movl	8(%r15), %edi
	callq	_EVP_get_cipherbyobj
	testq	%rax, %rax
	je	LBB0_21
## %bb.8:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_EVP_CIPHER_mode
	movq	_EVP_CIPH_WRAP_MODE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.9:
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_EVP_EncryptInit_ex
	testl	%eax, %eax
	je	LBB0_18
## %bb.10:
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	callq	_EVP_CIPHER_asn1_to_param
	testq	%rax, %rax
	jle	LBB0_21
## %bb.11:
	movq	%rbx, %rdi
	callq	_EVP_CIPHER_CTX_key_length
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_EVP_PKEY_CTX_set_dh_kdf_outlen
	testq	%rax, %rax
	jle	LBB0_21
## %bb.12:
	movq	%r12, %rdi
	callq	_EVP_CIPHER_type
	movl	%eax, %edi
	callq	_OBJ_nid2obj
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_EVP_PKEY_CTX_set0_dh_kdf_oid
	testq	%rax, %rax
	jle	LBB0_21
## %bb.13:
	movq	-48(%rbp), %rdi
	xorl	%r12d, %r12d
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.14:
	callq	_ASN1_STRING_length
	movq	%rax, %r13
	movq	-48(%rbp), %rdi
	callq	_ASN1_STRING_get0_data
	movl	%eax, %edi
	movq	%r13, %rsi
	callq	_OPENSSL_memdup
	testq	%rax, %rax
	je	LBB0_25
## %bb.15:
	movq	%rax, %rbx
	movq	%r13, %r12
	jmp	LBB0_24
LBB0_16:
	movq	_DH_F_DH_CMS_SET_SHARED_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DH_R_KDF_PARAMETER_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DHerr
LBB0_17:
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
LBB0_18:
	xorl	%r12d, %r12d
LBB0_19:
	movq	%r15, %rdi
	callq	_X509_ALGOR_free
	movq	%r13, %rdi
	callq	_OPENSSL_free
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	jmp	LBB0_19
LBB0_21:
	xorl	%r13d, %r13d
	jmp	LBB0_18
LBB0_23:
	xorl	%ebx, %ebx
LBB0_24:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_EVP_PKEY_CTX_set0_dh_kdf_ukm
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	testq	%rax, %rax
	setg	%r12b
	cmovleq	%rbx, %r13
	jmp	LBB0_19
LBB0_25:
	xorl	%r13d, %r13d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_NID_id_smime_alg_ESDH,8,3      ## @NID_id_smime_alg_ESDH
	.comm	_DH_F_DH_CMS_SET_SHARED_INFO,4,2 ## @DH_F_DH_CMS_SET_SHARED_INFO
	.comm	_DH_R_KDF_PARAMETER_ERROR,4,2   ## @DH_R_KDF_PARAMETER_ERROR
	.comm	_EVP_PKEY_DH_KDF_X9_42,4,2      ## @EVP_PKEY_DH_KDF_X9_42
	.comm	_V_ASN1_SEQUENCE,8,3            ## @V_ASN1_SEQUENCE
	.comm	_EVP_CIPH_WRAP_MODE,8,3         ## @EVP_CIPH_WRAP_MODE
	.no_dead_strip	_dh_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 dh_cms_set_shared_info
_dh_cms_set_shared_info:                ; @dh_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
	add	x1, sp, #24
	add	x2, sp, #16
	mov	x0, x21
	bl	_CMS_RecipientInfo_kari_get0_alg
	cbz	w0, LBB0_17
; %bb.1:
	ldr	x8, [sp, #24]
	ldr	w0, [x8, #8]
	bl	_OBJ_obj2nid
Lloh0:
	adrp	x8, _NID_id_smime_alg_ESDH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NID_id_smime_alg_ESDH@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.2:
Lloh3:
	adrp	x8, _EVP_PKEY_DH_KDF_X9_42@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EVP_PKEY_DH_KDF_X9_42@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_EVP_PKEY_CTX_set_dh_kdf_type
	cmp	x0, #1
	b.lt	LBB0_17
; %bb.3:
	bl	_EVP_sha1
	mov	x1, x0
	mov	x0, x20
	bl	_EVP_PKEY_CTX_set_dh_kdf_md
	cmp	x0, #1
	b.lt	LBB0_17
; %bb.4:
	ldr	x8, [sp, #24]
	ldr	x9, [x8]
	ldr	x10, [x9]
Lloh6:
	adrp	x11, _V_ASN1_SEQUENCE@GOTPAGE
Lloh7:
	ldr	x11, [x11, _V_ASN1_SEQUENCE@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_17
; %bb.5:
	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_20
; %bb.6:
	mov	x0, x21
	bl	_CMS_RecipientInfo_kari_get0_ctx
	cbz	x0, LBB0_20
; %bb.7:
	mov	x22, x0
	ldr	w0, [x19, #8]
	bl	_EVP_get_cipherbyobj
	mov	x21, x0
	cbz	x0, LBB0_21
; %bb.8:
	mov	x0, x21
	bl	_EVP_CIPHER_mode
Lloh9:
	adrp	x8, _EVP_CIPH_WRAP_MODE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EVP_CIPH_WRAP_MODE@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_20
; %bb.9:
	mov	x0, x22
	mov	x1, x21
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	bl	_EVP_EncryptInit_ex
	cbz	w0, LBB0_20
; %bb.10:
	ldr	x1, [x19]
	mov	x0, x22
	bl	_EVP_CIPHER_asn1_to_param
	cmp	x0, #1
	b.lt	LBB0_20
; %bb.11:
	mov	x0, x22
	bl	_EVP_CIPHER_CTX_key_length
	mov	x1, x0
	mov	x0, x20
	bl	_EVP_PKEY_CTX_set_dh_kdf_outlen
	cmp	x0, #1
	b.lt	LBB0_20
; %bb.12:
	mov	x0, x21
	bl	_EVP_CIPHER_type
	bl	_OBJ_nid2obj
	mov	x1, x0
	mov	x0, x20
	bl	_EVP_PKEY_CTX_set0_dh_kdf_oid
	cmp	x0, #1
	b.lt	LBB0_20
; %bb.13:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_22
; %bb.14:
	bl	_ASN1_STRING_length
	mov	x21, x0
	ldr	x0, [sp, #16]
	bl	_ASN1_STRING_get0_data
	mov	x1, x21
	bl	_OPENSSL_memdup
	cbz	x0, LBB0_20
; %bb.15:
	mov	x22, x0
	b	LBB0_23
LBB0_16:
Lloh12:
	adrp	x8, _DH_F_DH_CMS_SET_SHARED_INFO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DH_F_DH_CMS_SET_SHARED_INFO@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _DH_R_KDF_PARAMETER_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DH_R_KDF_PARAMETER_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_DHerr
LBB0_17:
	mov	x20, #0
	mov	x19, #0
LBB0_18:
	mov	w21, #0
LBB0_19:
	mov	x0, x19
	bl	_X509_ALGOR_free
	mov	x0, x20
	bl	_OPENSSL_free
	mov	x0, x21
	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_20:
	mov	x20, #0
	b	LBB0_18
LBB0_21:
	mov	x20, #0
	b	LBB0_19
LBB0_22:
	mov	x21, #0
	mov	x22, #0
LBB0_23:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_EVP_PKEY_CTX_set0_dh_kdf_ukm
	cmp	x0, #0
	cset	w21, gt
	cmp	x0, #1
	csel	x20, x22, xzr, lt
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_NID_id_smime_alg_ESDH,8,3      ; @NID_id_smime_alg_ESDH
	.comm	_DH_F_DH_CMS_SET_SHARED_INFO,4,2 ; @DH_F_DH_CMS_SET_SHARED_INFO
	.comm	_DH_R_KDF_PARAMETER_ERROR,4,2   ; @DH_R_KDF_PARAMETER_ERROR
	.comm	_EVP_PKEY_DH_KDF_X9_42,4,2      ; @EVP_PKEY_DH_KDF_X9_42
	.comm	_V_ASN1_SEQUENCE,8,3            ; @V_ASN1_SEQUENCE
	.comm	_EVP_CIPH_WRAP_MODE,8,3         ; @EVP_CIPH_WRAP_MODE
	.no_dead_strip	_dh_cms_set_shared_info
.subsections_via_symbols
