	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_dh_derive_secret        ## -- Begin function crypto_dh_derive_secret
	.p2align	4, 0x90
_crypto_dh_derive_secret:               ## @crypto_dh_derive_secret
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	32(%rbp), %rsi
	movq	24(%rbp), %rdi
	xorl	%edx, %edx
	callq	_BN_bin2bn
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_BN_bin2bn
	movq	%rax, %r14
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	testq	%r14, %r14
	je	LBB0_16
## %bb.3:
	movq	%rbx, %rdi
	callq	_BN_is_zero
	testq	%rax, %rax
	jne	LBB0_16
## %bb.4:
	movq	%rbx, %rdi
	callq	_BN_is_one
	testq	%rax, %rax
	jne	LBB0_16
## %bb.5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_BN_cmp
	testq	%rax, %rax
	jns	LBB0_16
## %bb.6:
	testq	%r15, %r15
	je	LBB0_12
## %bb.7:
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	xorl	%edx, %edx
	callq	_BN_bin2bn
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_BN_new
	movq	%r15, %r8
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	testq	%r15, %r15
	je	LBB0_14
## %bb.8:
	testq	%r8, %r8
	je	LBB0_14
## %bb.9:
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	movq	%rax, %rdi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	callq	_BN_mod_exp
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_is_one
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_BN_clear_free
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_clear_free
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_CTX_free
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_16
LBB0_12:
	movq	16(%rbp), %rcx
	movq	24(%rbp), %rdi
	movq	32(%rbp), %rsi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %r8
	movq	%r12, %r9
	pushq	48(%rbp)
	pushq	40(%rbp)
	callq	_crypto_mod_exp
	addq	$16, %rsp
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_16
LBB0_1:
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
LBB0_16:
	movq	%rbx, %rdi
	callq	_BN_clear_free
	movq	%r14, %rdi
	callq	_BN_clear_free
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%rax, %r12
	movq	%r15, %rdi
	movq	%r8, %r15
	callq	_BN_clear_free
	movq	%r12, %rdi
	callq	_BN_clear_free
	movq	%r15, %rdi
	jmp	LBB0_15
LBB0_13:
	movq	%r15, %rdi
	callq	_BN_clear_free
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_clear_free
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
LBB0_15:
	callq	_BN_CTX_free
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_crypto_dh_derive_secret        ; -- Begin function crypto_dh_derive_secret
	.p2align	2
_crypto_dh_derive_secret:               ; @crypto_dh_derive_secret
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x7
	mov	x21, x6
	mov	x23, x5
	mov	x27, x4
	mov	x28, x3
	mov	x22, x2
	mov	x25, x1
	ldr	x26, [x29, #16]
	mov	x0, x7
	mov	x1, x26
	mov	x2, #0
	bl	_BN_bin2bn
	mov	x19, x0
	mov	x0, x25
	mov	x1, x22
	mov	x2, #0
	bl	_BN_bin2bn
	mov	x20, x0
	cmp	x19, #0
	ccmp	x0, #0, #4, ne
	b.eq	LBB0_14
; %bb.1:
	mov	x0, x19
	bl	_BN_is_zero
	cbnz	x0, LBB0_14
; %bb.2:
	mov	x0, x19
	bl	_BN_is_one
	cbnz	x0, LBB0_14
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_BN_cmp
	tbz	x0, #63, LBB0_14
; %bb.4:
	cbz	x28, LBB0_10
; %bb.5:
	mov	x0, x28
	mov	x1, x27
	mov	x2, #0
	bl	_BN_bin2bn
	mov	x27, x0
	bl	_BN_CTX_new
	mov	x28, x0
	bl	_BN_new
	mov	x8, x28
	mov	x28, x0
	cbz	x27, LBB0_11
; %bb.6:
	cbz	x8, LBB0_11
; %bb.7:
	cbz	x28, LBB0_11
; %bb.8:
	mov	x0, x28
	mov	x1, x19
	mov	x2, x27
	mov	x3, x20
	mov	x4, x8
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	bl	_BN_mod_exp
	cbz	w0, LBB0_12
; %bb.9:
	mov	x0, x28
	bl	_BN_is_one
	str	x0, [sp]                        ; 8-byte Folded Spill
	mov	x0, x27
	bl	_BN_clear_free
	mov	x0, x28
	bl	_BN_clear_free
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	bl	_BN_CTX_free
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	cbz	x8, LBB0_14
LBB0_10:
	ldp	x6, x7, [x29, #24]
	mov	x0, x24
	mov	x1, x26
	mov	x2, x23
	mov	x3, x21
	mov	x4, x25
	mov	x5, x22
	bl	_crypto_mod_exp
	mov	x21, x0
	b	LBB0_15
LBB0_11:
	mov	x0, x27
	mov	x21, x8
	bl	_BN_clear_free
	mov	x0, x28
	bl	_BN_clear_free
	mov	x0, x21
	b	LBB0_13
LBB0_12:
	mov	x0, x27
	bl	_BN_clear_free
	mov	x0, x28
	bl	_BN_clear_free
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
LBB0_13:
	bl	_BN_CTX_free
LBB0_14:
	mov	w21, #-1
LBB0_15:
	mov	x0, x19
	bl	_BN_clear_free
	mov	x0, x20
	bl	_BN_clear_free
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
