	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pkey_dh_derive
_pkey_dh_derive:                        ## @pkey_dh_derive
	.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	8(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.3:
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	16(%rdi), %r13
	movq	(%rax), %r12
	movq	(%rcx), %rax
	movq	(%rax), %rsi
	movq	(%r13), %rax
	movq	_EVP_PKEY_DH_KDF_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.4:
	testq	%r15, %r15
	je	LBB0_5
## %bb.6:
	cmpq	$0, 32(%r13)
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_DH_compute_key_padded
	movq	%rax, %rbx
	testl	%ebx, %ebx
	jns	LBB0_10
	jmp	LBB0_24
LBB0_2:
	movq	_DH_F_PKEY_DH_DERIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DH_R_KEYS_NOT_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DHerr
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_11:
	movq	_EVP_PKEY_DH_KDF_X9_42@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.12:
	movq	8(%r13), %rax
	testq	%rax, %rax
	je	LBB0_24
## %bb.13:
	cmpl	$0, 28(%r13)
	je	LBB0_24
## %bb.14:
	testq	%r15, %r15
	je	LBB0_15
## %bb.16:
	cmpq	%rax, (%r14)
	jne	LBB0_24
## %bb.17:
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_DH_size
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_OPENSSL_malloc
	movq	%rax, %rdi
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_18
## %bb.19:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_DH_compute_key_padded
	testq	%rax, %rax
	jle	LBB0_20
## %bb.21:
	movq	(%r14), %rsi
	movl	28(%r13), %r8d
	movl	24(%r13), %r9d
	movl	16(%r13), %eax
	movl	20(%r13), %r10d
	movq	%r15, %rdi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rcx
	pushq	%rax
	pushq	%r10
	callq	_DH_KDF_X9_42
	addq	$16, %rsp
	testl	%eax, %eax
	movq	%r12, %rdi
	je	LBB0_23
## %bb.22:
	movq	8(%r13), %rax
	movq	%rax, (%r14)
	movl	$1, %ebx
	jmp	LBB0_23
LBB0_5:
	movq	%r12, %rdi
	callq	_DH_size
	jmp	LBB0_15
LBB0_8:
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_DH_compute_key
	movl	%eax, %ebx
	testl	%ebx, %ebx
	js	LBB0_24
LBB0_10:
	movl	%ebx, %eax
LBB0_15:
	movq	%rax, (%r14)
	movl	$1, %ebx
LBB0_24:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_20:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_23:
	movq	%r15, %rsi
	callq	_OPENSSL_clear_free
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.comm	_DH_F_PKEY_DH_DERIVE,4,2        ## @DH_F_PKEY_DH_DERIVE
	.comm	_DH_R_KEYS_NOT_SET,4,2          ## @DH_R_KEYS_NOT_SET
	.comm	_EVP_PKEY_DH_KDF_NONE,8,3       ## @EVP_PKEY_DH_KDF_NONE
	.comm	_EVP_PKEY_DH_KDF_X9_42,8,3      ## @EVP_PKEY_DH_KDF_X9_42
	.no_dead_strip	_pkey_dh_derive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pkey_dh_derive
_pkey_dh_derive:                        ; @pkey_dh_derive
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	x9, [x0]
	cbz	x9, LBB0_6
; %bb.2:
	mov	x19, x2
	mov	x20, x1
	ldr	x25, [x0, #16]
	ldr	x21, [x8]
	ldr	x8, [x9]
	ldr	x23, [x8]
	ldr	x8, [x25]
Lloh0:
	adrp	x9, _EVP_PKEY_DH_KDF_NONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EVP_PKEY_DH_KDF_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.3:
	cbz	x20, LBB0_18
; %bb.4:
	ldr	x8, [x25, #32]
	cbz	x8, LBB0_19
; %bb.5:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	bl	_DH_compute_key_padded
	mov	x20, x0
	tbz	w20, #31, LBB0_20
	b	LBB0_8
LBB0_6:
Lloh3:
	adrp	x8, _DH_F_PKEY_DH_DERIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DH_F_PKEY_DH_DERIVE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _DH_R_KEYS_NOT_SET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DH_R_KEYS_NOT_SET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_DHerr
LBB0_7:
	mov	w20, #0
LBB0_8:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh9:
	adrp	x9, _EVP_PKEY_DH_KDF_X9_42@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EVP_PKEY_DH_KDF_X9_42@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.10:
	ldr	x8, [x25, #8]
	cbz	x8, LBB0_7
; %bb.11:
	ldr	w9, [x25, #28]
	cbz	w9, LBB0_7
; %bb.12:
	cbz	x20, LBB0_21
; %bb.13:
	ldr	x9, [x19]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.14:
	mov	x0, x21
	bl	_DH_size
	mov	x22, x0
	bl	_OPENSSL_malloc
	mov	x24, x0
	cbz	x0, LBB0_22
; %bb.15:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x21
	bl	_DH_compute_key_padded
	cmp	x0, #1
	b.lt	LBB0_22
; %bb.16:
	ldr	x1, [x19]
	ldp	w5, w4, [x25, #24]
	ldp	w7, w6, [x25, #16]
	mov	x0, x20
	mov	x2, x24
	mov	x3, x22
	bl	_DH_KDF_X9_42
	cbz	w0, LBB0_22
; %bb.17:
	ldr	x8, [x25, #8]
	str	x8, [x19]
	mov	w20, #1
	b	LBB0_23
LBB0_18:
	mov	x0, x21
	bl	_DH_size
	str	x0, [x19]
	mov	w20, #1
	b	LBB0_8
LBB0_19:
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	bl	_DH_compute_key
	mov	x20, x0
	tbnz	w20, #31, LBB0_8
LBB0_20:
	mov	w8, w20
LBB0_21:
	str	x8, [x19]
	mov	w20, #1
	b	LBB0_8
LBB0_22:
	mov	w20, #0
LBB0_23:
	mov	x0, x24
	mov	x1, x22
	bl	_OPENSSL_clear_free
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DH_F_PKEY_DH_DERIVE,4,2        ; @DH_F_PKEY_DH_DERIVE
	.comm	_DH_R_KEYS_NOT_SET,4,2          ; @DH_R_KEYS_NOT_SET
	.comm	_EVP_PKEY_DH_KDF_NONE,8,3       ; @EVP_PKEY_DH_KDF_NONE
	.comm	_EVP_PKEY_DH_KDF_X9_42,8,3      ; @EVP_PKEY_DH_KDF_X9_42
	.no_dead_strip	_pkey_dh_derive
.subsections_via_symbols
