	.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	%r8, %rbx
	movq	32(%rbp), %r8
	movq	$0, -64(%rbp)
	movl	$-1, %r14d
	cmpq	%rdx, %r8
	ja	LBB0_17
## %bb.1:
	movq	%rdx, %r12
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%r9, -96(%rbp)                  ## 8-byte Spill
	movq	24(%rbp), %r15
	jne	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	movq	%rsi, %r13
	movq	%r8, %rdx
	movq	%r8, %r15
	callq	_os_memcmp
	movq	%r15, %r8
	movq	24(%rbp), %r15
	movq	%r13, %rsi
	testq	%rax, %rax
	jns	LBB0_17
LBB0_3:
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	_GCRYMPI_FMT_USG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdi
	movq	%r15, %rdx
	movq	%r8, %r13
	movq	%r8, %rcx
	xorl	%r8d, %r8d
	callq	_gcry_mpi_scan
	movq	_GPG_ERR_NO_ERROR@GOTPCREL(%rip), %rcx
	movl	$-1, %r14d
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.4:
	movq	-64(%rbp), %rdi
	movl	$1, %esi
	callq	_gcry_mpi_cmp_ui
	testq	%rax, %rax
	jle	LBB0_16
## %bb.5:
	cmpq	$0, -88(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_10
## %bb.6:
	movq	$0, -48(%rbp)
	movq	$0, -56(%rbp)
	leaq	(,%r12,8), %rdi
	callq	_gcry_mpi_new
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_GCRYMPI_FMT_USG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-48(%rbp), %rdi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	_gcry_mpi_scan
	movq	_GPG_ERR_NO_ERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.8:
	movl	(%r15), %esi
	leaq	-56(%rbp), %rdi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, %r15
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	callq	_gcry_mpi_scan
	cmpq	(%r15), %rax
	jne	LBB0_11
## %bb.9:
	movq	-64(%rbp), %rsi
	movq	-56(%rbp), %rdx
	movq	-48(%rbp), %rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_gcry_mpi_powm
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_gcry_mpi_cmp_ui
	movq	%rax, %r15
	movq	-48(%rbp), %rdi
	callq	_gcry_mpi_release
	movq	-56(%rbp), %rdi
	callq	_gcry_mpi_release
	movq	%rbx, %rdi
	callq	_gcry_mpi_release
	testq	%r15, %r15
	movq	24(%rbp), %r15
	jne	LBB0_16
LBB0_10:
	movq	16(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movq	%r12, %r9
	pushq	48(%rbp)
	pushq	40(%rbp)
	callq	_crypto_mod_exp
	addq	$16, %rsp
	movl	%eax, %r14d
	jmp	LBB0_16
LBB0_14:
	xorl	%edi, %edi
	callq	_gcry_mpi_release
	xorl	%edi, %edi
	callq	_gcry_mpi_release
	xorl	%edi, %edi
	jmp	LBB0_15
LBB0_12:
	movq	-48(%rbp), %rdi
	callq	_gcry_mpi_release
	xorl	%edi, %edi
	jmp	LBB0_13
LBB0_11:
	movq	-48(%rbp), %rdi
	callq	_gcry_mpi_release
	movq	-56(%rbp), %rdi
LBB0_13:
	callq	_gcry_mpi_release
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
LBB0_15:
	callq	_gcry_mpi_release
LBB0_16:
	movq	-64(%rbp), %rdi
	callq	_gcry_mpi_release
LBB0_17:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GCRYMPI_FMT_USG,4,2            ## @GCRYMPI_FMT_USG
	.comm	_GPG_ERR_NO_ERROR,8,3           ## @GPG_ERR_NO_ERROR
.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, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	ldr	x24, [x29, #16]
	str	xzr, [sp, #24]
	cmp	x24, x2
	b.hi	LBB0_3
; %bb.1:
	mov	x22, x7
	mov	x19, x6
	mov	x21, x5
	mov	x25, x4
	mov	x27, x3
	mov	x20, x2
	mov	x23, x1
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x24
	bl	_os_memcmp
	tbnz	x0, #63, LBB0_4
LBB0_3:
	mov	w19, #-1
	b	LBB0_19
LBB0_4:
Lloh0:
	adrp	x28, _GCRYMPI_FMT_USG@GOTPAGE
Lloh1:
	ldr	x28, [x28, _GCRYMPI_FMT_USG@GOTPAGEOFF]
	ldr	w1, [x28]
	add	x0, sp, #24
	mov	x2, x22
	mov	x3, x24
	mov	x4, #0
	bl	_gcry_mpi_scan
Lloh2:
	adrp	x26, _GPG_ERR_NO_ERROR@GOTPAGE
Lloh3:
	ldr	x26, [x26, _GPG_ERR_NO_ERROR@GOTPAGEOFF]
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.5:
	ldr	x0, [sp, #24]
	mov	w1, #1
	bl	_gcry_mpi_cmp_ui
	cmp	x0, #1
	b.lt	LBB0_17
; %bb.6:
	cbz	x27, LBB0_11
; %bb.7:
	stp	xzr, xzr, [sp, #8]
	lsl	x0, x20, #3
	bl	_gcry_mpi_new
	cbz	x0, LBB0_12
; %bb.8:
	str	x0, [sp]                        ; 8-byte Folded Spill
	ldr	w1, [x28]
	add	x0, sp, #16
	mov	x2, x23
	mov	x3, x20
	mov	x4, #0
	bl	_gcry_mpi_scan
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.9:
	ldr	w1, [x28]
	add	x0, sp, #8
	mov	x2, x27
	mov	x3, x25
	mov	x4, #0
	bl	_gcry_mpi_scan
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.10:
	ldp	x3, x1, [sp, #16]
	ldp	x26, x2, [sp]                   ; 8-byte Folded Reload
	mov	x0, x26
	bl	_gcry_mpi_powm
	mov	x0, x26
	mov	w1, #1
	bl	_gcry_mpi_cmp_ui
	mov	x25, x0
	ldr	x0, [sp, #16]
	bl	_gcry_mpi_release
	ldr	x0, [sp, #8]
	bl	_gcry_mpi_release
	mov	x0, x26
	bl	_gcry_mpi_release
	cbnz	x25, LBB0_17
LBB0_11:
	ldp	x6, x7, [x29, #24]
	mov	x0, x22
	mov	x1, x24
	mov	x2, x21
	mov	x3, x19
	mov	x4, x23
	mov	x5, x20
	bl	_crypto_mod_exp
	mov	x19, x0
	b	LBB0_18
LBB0_12:
	bl	_gcry_mpi_release
	mov	x0, #0
	bl	_gcry_mpi_release
	mov	x0, #0
	b	LBB0_16
LBB0_13:
	ldr	x0, [sp, #16]
	bl	_gcry_mpi_release
	mov	x0, #0
	b	LBB0_15
LBB0_14:
	ldr	x0, [sp, #16]
	bl	_gcry_mpi_release
	ldr	x0, [sp, #8]
LBB0_15:
	bl	_gcry_mpi_release
	ldr	x0, [sp]                        ; 8-byte Folded Reload
LBB0_16:
	bl	_gcry_mpi_release
LBB0_17:
	mov	w19, #-1
LBB0_18:
	ldr	x0, [sp, #24]
	bl	_gcry_mpi_release
LBB0_19:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_GCRYMPI_FMT_USG,4,2            ; @GCRYMPI_FMT_USG
	.comm	_GPG_ERR_NO_ERROR,8,3           ; @GPG_ERR_NO_ERROR
.subsections_via_symbols
