	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_dhm_calc_secret        ## -- Begin function mbedtls_dhm_calc_secret
	.p2align	4, 0x90
_mbedtls_dhm_calc_secret:               ## @mbedtls_dhm_calc_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%rdi, %rbx
	cmpq	%rdx, (%rdi)
	jbe	LBB0_3
LBB0_2:
	movq	_MBEDTLS_ERR_DHM_BAD_INPUT_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_3:
	movq	%r9, %r14
	movq	%r8, %r13
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leaq	28(%rbx), %r15
	leaq	12(%rbx), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_dhm_check_range
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	leaq	-44(%rbp), %rdi
	callq	_mbedtls_mpi_init
	testq	%r13, %r13
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_dhm_update_blinding
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	leaq	32(%rbx), %rdx
	leaq	-44(%rbp), %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mbedtls_mpi_mul_mpi
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%r14, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_mbedtls_mpi_mod_mpi
	jmp	LBB0_7
LBB0_6:
	leaq	-44(%rbp), %rdi
	movq	%r15, %rsi
	callq	_mbedtls_mpi_copy
LBB0_7:
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	leaq	8(%rbx), %r15
	leaq	24(%rbx), %rdx
	leaq	20(%rbx), %r8
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	movq	%r12, %rcx
	callq	_mbedtls_mpi_exp_mod
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	testq	%r13, %r13
	je	LBB0_9
## %bb.8:
	addq	$16, %rbx
	movq	%r15, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_mbedtls_mpi_mul_mpi
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%r15, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_mbedtls_mpi_mod_mpi
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
LBB0_9:
	movq	%r15, %rdi
	callq	_mbedtls_mpi_size
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	%r15, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rax, %rdx
	callq	_mbedtls_mpi_write_binary
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	leaq	-44(%rbp), %rdi
	callq	_mbedtls_mpi_free
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ERR_DHM_BAD_INPUT_DATA,4,2 ## @MBEDTLS_ERR_DHM_BAD_INPUT_DATA
	.comm	_MBEDTLS_ERR_DHM_CALC_SECRET_FAILED,4,2 ## @MBEDTLS_ERR_DHM_CALC_SECRET_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_dhm_calc_secret        ; -- Begin function mbedtls_dhm_calc_secret
	.p2align	2
_mbedtls_dhm_calc_secret:               ; @mbedtls_dhm_calc_secret
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	cbz	x0, LBB0_2
; %bb.1:
	mov	x23, x0
	ldr	x8, [x0]
	cmp	x8, x2
	b.ls	LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _MBEDTLS_ERR_DHM_BAD_INPUT_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBEDTLS_ERR_DHM_BAD_INPUT_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_10
LBB0_3:
	mov	x25, x5
	mov	x22, x4
	mov	x20, x3
	mov	x19, x1
	add	x24, x23, #28
	add	x21, x23, #12
	mov	x0, x24
	mov	x1, x21
	bl	_dhm_check_range
	cbnz	w0, LBB0_10
; %bb.4:
	add	x0, sp, #12
	bl	_mbedtls_mpi_init
	cbz	x22, LBB0_6
; %bb.5:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x25
	bl	_dhm_update_blinding
	bl	_MBEDTLS_MPI_CHK
	add	x2, x23, #32
	add	x0, sp, #12
	mov	x1, x24
	bl	_mbedtls_mpi_mul_mpi
	bl	_MBEDTLS_MPI_CHK
	add	x0, sp, #12
	add	x1, sp, #12
	mov	x2, x21
	bl	_mbedtls_mpi_mod_mpi
	b	LBB0_7
LBB0_6:
	add	x0, sp, #12
	mov	x1, x24
	bl	_mbedtls_mpi_copy
LBB0_7:
	bl	_MBEDTLS_MPI_CHK
	add	x24, x23, #8
	add	x2, x23, #24
	add	x4, x23, #20
	add	x1, sp, #12
	mov	x0, x24
	mov	x3, x21
	bl	_mbedtls_mpi_exp_mod
	bl	_MBEDTLS_MPI_CHK
	cbz	x22, LBB0_9
; %bb.8:
	add	x2, x23, #16
	mov	x0, x24
	mov	x1, x24
	bl	_mbedtls_mpi_mul_mpi
	bl	_MBEDTLS_MPI_CHK
	mov	x0, x24
	mov	x1, x24
	mov	x2, x21
	bl	_mbedtls_mpi_mod_mpi
	bl	_MBEDTLS_MPI_CHK
LBB0_9:
	mov	x0, x24
	bl	_mbedtls_mpi_size
	mov	x2, x0
	str	x0, [x20]
	mov	x0, x24
	mov	x1, x19
	bl	_mbedtls_mpi_write_binary
	bl	_MBEDTLS_MPI_CHK
	add	x0, sp, #12
	bl	_mbedtls_mpi_free
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ERR_DHM_BAD_INPUT_DATA,4,2 ; @MBEDTLS_ERR_DHM_BAD_INPUT_DATA
	.comm	_MBEDTLS_ERR_DHM_CALC_SECRET_FAILED,4,2 ; @MBEDTLS_ERR_DHM_CALC_SECRET_FAILED
.subsections_via_symbols
