	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dh_derive
_dh_derive:                             ## @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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	$0, -48(%rbp)
	movq	(%rdi), %rdi
	xorl	%r12d, %r12d
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	cmpq	$0, 16(%rbx)
	je	LBB0_11
## %bb.2:
	movq	%rcx, %r13
	movq	%rdx, %r14
	movq	%rsi, %r15
	callq	_DH_size
	testq	%r15, %r15
	je	LBB0_10
## %bb.3:
	cmpq	%r13, %rax
	ja	LBB0_11
## %bb.4:
	movq	16(%rbx), %rdi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_DH_get0_key
	cmpq	$0, 8(%rbx)
	movq	-48(%rbp), %rsi
	movq	(%rbx), %rdx
	movq	%r15, %rdi
	je	LBB0_6
## %bb.5:
	callq	_DH_compute_key_padded
	testl	%eax, %eax
	jle	LBB0_8
LBB0_9:
	movl	%eax, %eax
LBB0_10:
	movq	%rax, (%r14)
	movl	$1, %r12d
LBB0_11:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	_DH_compute_key
	testl	%eax, %eax
	jg	LBB0_9
LBB0_8:
	xorl	%r12d, %r12d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_dh_derive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dh_derive
_dh_derive:                             ; @dh_derive
	.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
	mov	x21, x0
	str	xzr, [sp, #8]
	ldr	x0, [x0]
	cbz	x0, LBB0_10
; %bb.1:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_4
; %bb.2:
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	bl	_DH_size
	cbz	x20, LBB0_9
; %bb.3:
	cmp	x0, x22
	b.ls	LBB0_5
LBB0_4:
	mov	w0, #0
	b	LBB0_10
LBB0_5:
	ldr	x0, [x21, #16]
	add	x1, sp, #8
	mov	x2, #0
	bl	_DH_get0_key
	ldr	x1, [sp, #8]
	ldp	x2, x8, [x21]
	mov	x0, x20
	cbz	x8, LBB0_7
; %bb.6:
	bl	_DH_compute_key_padded
	cmp	w0, #1
	b.ge	LBB0_8
	b	LBB0_4
LBB0_7:
	bl	_DH_compute_key
	cmp	w0, #1
	b.lt	LBB0_4
LBB0_8:
	mov	w0, w0
LBB0_9:
	str	x0, [x19]
	mov	w0, #1
LBB0_10:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_dh_derive
.subsections_via_symbols
