	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ecp_mod_koblitz
_ecp_mod_koblitz:                       ## @ecp_mod_koblitz
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -144(%rbp)                 ## 8-byte Spill
	movq	%r8, -136(%rbp)                 ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r14
	movq	%rsp, -152(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_P_KOBLITZ_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_P_KOBLITZ_R@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	leaq	(%r12,%r13), %rax
	leaq	8(,%rax,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	movq	(%r14), %r15
	cmpq	%rbx, %r15
	jb	LBB0_16
## %bb.1:
	leaq	(%r12,%r13), %rdx
	incq	%rdx
	movl	$1, -168(%rbp)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, -160(%rbp)
	movq	_P_KOBLITZ_R@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rcx, -176(%rbp)
	movl	$1, -80(%rbp)
	movq	%rax, -72(%rbp)
	movq	%rbx, %rcx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	subq	%r12, %rcx
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	subq	%rcx, %r15
	leaq	(%r12,%rbx), %rcx
	cmpq	%rcx, %r15
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	cmovaeq	%rcx, %r15
	movq	%r15, -88(%rbp)
	shll	$3, %edx
	movq	%rax, %r13
	movq	%rax, %rdi
	xorl	%esi, %esi
	movq	%rdx, -128(%rbp)                ## 8-byte Spill
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memset
	leaq	(,%rbx,8), %rax
	movq	16(%r14), %rsi
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	addq	%rax, %rsi
	leaq	(,%r12,8), %rax
	subq	%rax, %rsi
	leal	(,%r15,8), %edx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_memcpy
	movq	-136(%rbp), %r13                ## 8-byte Reload
	testq	%r13, %r13
	je	LBB0_3
## %bb.2:
	leaq	-88(%rbp), %rdi
	movq	%r13, %rsi
	callq	_mbedtls_mpi_shift_r
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	-88(%rbp), %r15
LBB0_3:
	addq	-96(%rbp), %r15                 ## 8-byte Folded Reload
	movq	%r15, -88(%rbp)
	movq	-144(%rbp), %r15                ## 8-byte Reload
	testq	%r15, %r15
	je	LBB0_5
## %bb.4:
	movq	16(%r14), %rax
	andq	%r15, -8(%rax,%rbx,8)
LBB0_5:
	negq	-64(%rbp)                       ## 8-byte Folded Spill
	cmpq	%rbx, (%r14)
	jbe	LBB0_8
## %bb.6:
	movq	16(%r14), %rax
	movq	%rbx, %rcx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, (%rax,%rcx,8)
	incq	%rcx
	cmpq	(%r14), %rcx
	jb	LBB0_7
LBB0_8:
	leaq	-88(%rbp), %r12
	leaq	-176(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r12, %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_add_abs
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	(%r14), %rax
	subq	-120(%rbp), %rax                ## 8-byte Folded Reload
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	cmpq	%rcx, %rax
	cmovaeq	%rcx, %rax
	movq	%rax, -88(%rbp)
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	-128(%rbp), %rdx                ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memset
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	addq	16(%r14), %rcx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rcx,%rax,8), %rsi
	movl	-88(%rbp), %edx
	shll	$3, %edx
	movq	%r12, %rdi
	callq	_memcpy
	testq	%r13, %r13
	je	LBB0_10
## %bb.9:
	leaq	-88(%rbp), %rdi
	movq	%r13, %rsi
	callq	_mbedtls_mpi_shift_r
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
LBB0_10:
	movq	-176(%rbp), %rax
	addq	%rax, -88(%rbp)
	testq	%r15, %r15
	je	LBB0_12
## %bb.11:
	movq	16(%r14), %rax
	andq	%r15, -8(%rax,%rbx,8)
LBB0_12:
	cmpq	%rbx, (%r14)
	jbe	LBB0_15
## %bb.13:
	movq	16(%r14), %rax
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	cmpq	(%r14), %rbx
	jb	LBB0_14
LBB0_15:
	leaq	-88(%rbp), %rbx
	leaq	-176(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_mbedtls_mpi_mul_mpi
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%r14, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_mbedtls_mpi_add_abs
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
LBB0_16:
	movq	-152(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_P_KOBLITZ_MAX,8,3              ## @P_KOBLITZ_MAX
	.comm	_P_KOBLITZ_R,8,3                ## @P_KOBLITZ_R
	.no_dead_strip	_ecp_mod_koblitz
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ecp_mod_koblitz
_ecp_mod_koblitz:                       ; @ecp_mod_koblitz
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #80
	mov	x21, x5
	mov	x22, x4
	mov	x25, x3
	mov	x20, x2
	mov	x19, x0
	mov	x14, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _P_KOBLITZ_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _P_KOBLITZ_MAX@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x12, _P_KOBLITZ_R@GOTPAGE
Lloh7:
	ldr	x12, [x12, _P_KOBLITZ_R@GOTPAGEOFF]
	ldr	x9, [x12]
	add	x8, x8, x9
	add	x8, x8, #1
	lsl	x9, x8, #3
	add	x10, x9, #15
	and	x13, x10, #0xfffffffffffffff0
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x23, x9, x13
	mov	sp, x23
	ldr	x9, [x0]
	cmp	x9, x2
	b.lo	LBB0_16
; %bb.1:
	mov	w10, #1
	stur	w10, [x29, #-128]
	ldr	x26, [x12]
	stp	x14, x26, [x29, #-144]          ; 8-byte Folded Spill
	stur	w10, [x29, #-104]
	stur	x23, [x29, #-96]
	sub	x10, x20, x25
	stur	x10, [x29, #-152]               ; 8-byte Folded Spill
	sub	x9, x9, x10
	add	x28, x25, x20
	cmp	x9, x28
	csel	x27, x9, x28, lo
	stp	x1, x27, [x29, #-120]
	lsl	w24, w8, #3
	mov	x0, x23
	mov	w1, #0
	mov	x2, x24
	bl	_memset
	ldr	x8, [x19, #16]
	add	x8, x8, x20, lsl #3
	sub	x1, x8, x25, lsl #3
	lsl	w2, w27, #3
	mov	x0, x23
	bl	_memcpy
	cbz	x22, LBB0_3
; %bb.2:
	sub	x0, x29, #112
	mov	x1, x22
	bl	_mbedtls_mpi_shift_r
	bl	_MBEDTLS_MPI_CHK
	ldur	x27, [x29, #-112]
LBB0_3:
	add	x8, x27, x26
	stur	x8, [x29, #-112]
	cbz	x21, LBB0_5
; %bb.4:
	ldr	x8, [x19, #16]
	add	x8, x8, x20, lsl #3
	ldur	x9, [x8, #-8]
	and	x9, x9, x21
	stur	x9, [x8, #-8]
LBB0_5:
	neg	x25, x25
	ldr	x8, [x19]
	cmp	x8, x20
	b.ls	LBB0_8
; %bb.6:
	ldr	x8, [x19, #16]
	mov	x9, x20
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [x8, x9, lsl #3]
	add	x9, x9, #1
	ldr	x10, [x19]
	cmp	x9, x10
	b.lo	LBB0_7
LBB0_8:
	sub	x0, x29, #112
	sub	x1, x29, #112
	sub	x2, x29, #136
	bl	_mbedtls_mpi_mul_mpi
	bl	_MBEDTLS_MPI_CHK
	sub	x2, x29, #112
	mov	x0, x19
	mov	x1, x19
	bl	_mbedtls_mpi_add_abs
	bl	_MBEDTLS_MPI_CHK
	ldr	x8, [x19]
	ldur	x9, [x29, #-152]                ; 8-byte Folded Reload
	sub	x8, x8, x9
	cmp	x8, x28
	csel	x8, x8, x28, lo
	stur	x8, [x29, #-112]
	mov	x0, x23
	mov	w1, #0
	mov	x2, x24
	bl	_memset
	ldr	x8, [x19, #16]
	add	x8, x8, x20, lsl #3
	add	x1, x8, x25, lsl #3
	ldur	w8, [x29, #-112]
	lsl	w2, w8, #3
	mov	x0, x23
	bl	_memcpy
	cbz	x22, LBB0_10
; %bb.9:
	sub	x0, x29, #112
	mov	x1, x22
	bl	_mbedtls_mpi_shift_r
	bl	_MBEDTLS_MPI_CHK
LBB0_10:
	ldur	x8, [x29, #-136]
	ldur	x9, [x29, #-112]
	add	x8, x9, x8
	stur	x8, [x29, #-112]
	cbz	x21, LBB0_12
; %bb.11:
	ldr	x8, [x19, #16]
	add	x8, x8, x20, lsl #3
	ldur	x9, [x8, #-8]
	and	x9, x9, x21
	stur	x9, [x8, #-8]
LBB0_12:
	ldr	x8, [x19]
	cmp	x8, x20
	b.ls	LBB0_15
; %bb.13:
	ldr	x8, [x19, #16]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	str	xzr, [x8, x20, lsl #3]
	add	x20, x20, #1
	ldr	x9, [x19]
	cmp	x20, x9
	b.lo	LBB0_14
LBB0_15:
	sub	x0, x29, #112
	sub	x1, x29, #112
	sub	x2, x29, #136
	bl	_mbedtls_mpi_mul_mpi
	bl	_MBEDTLS_MPI_CHK
	sub	x2, x29, #112
	mov	x0, x19
	mov	x1, x19
	bl	_mbedtls_mpi_add_abs
	bl	_MBEDTLS_MPI_CHK
	ldur	x14, [x29, #-144]               ; 8-byte Folded Reload
LBB0_16:
	mov	sp, x14
	ldur	x8, [x29, #-88]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	mov	w0, #0
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_P_KOBLITZ_MAX,8,3              ; @P_KOBLITZ_MAX
	.comm	_P_KOBLITZ_R,8,3                ; @P_KOBLITZ_R
	.no_dead_strip	_ecp_mod_koblitz
.subsections_via_symbols
