	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpi_miller_rabin
_mpi_miller_rabin:                      ## @mpi_miller_rabin
	.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	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	leaq	-80(%rbp), %r14
	movq	%r14, %rdi
	callq	_mbedtls_mpi_init
	leaq	-168(%rbp), %r12
	movq	%r12, %rdi
	callq	_mbedtls_mpi_init
	leaq	-152(%rbp), %rdi
	callq	_mbedtls_mpi_init
	leaq	-120(%rbp), %rdi
	callq	_mbedtls_mpi_init
	leaq	-136(%rbp), %rdi
	callq	_mbedtls_mpi_init
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_mbedtls_mpi_sub_int
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%r14, %rdi
	callq	_mbedtls_mpi_lsb
	movq	%rax, %r15
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_mbedtls_mpi_copy
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_mbedtls_mpi_shift_r
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_mbedtls_mpi_bitlen
	movl	$2, %ecx
	cmpq	$1299, %rax                     ## imm = 0x513
	ja	LBB0_6
## %bb.1:
	movl	$3, %ecx
	cmpq	$849, %rax                      ## imm = 0x351
	ja	LBB0_6
## %bb.2:
	movl	$4, %ecx
	cmpq	$649, %rax                      ## imm = 0x289
	ja	LBB0_6
## %bb.3:
	movl	$8, %ecx
	cmpq	$349, %rax                      ## imm = 0x15D
	ja	LBB0_6
## %bb.4:
	movl	$12, %ecx
	cmpq	$249, %rax
	ja	LBB0_6
## %bb.5:
	xorl	%ecx, %ecx
	cmpq	$150, %rax
	setb	%cl
	leaq	(%rcx,%rcx,8), %rcx
	addq	$18, %rcx
LBB0_6:
	xorl	%eax, %eax
	movq	_ciL@GOTPCREL(%rip), %rbx
	leaq	-120(%rbp), %r13
	leaq	-80(%rbp), %r12
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_20 Depth 2
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movl	(%rbx), %esi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	imull	(%rax), %esi
	movq	%r13, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	callq	_mbedtls_mpi_fill_random
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_mbedtls_mpi_cmp_mpi
	testq	%rax, %rax
	js	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	callq	_mbedtls_mpi_bitlen
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_mbedtls_mpi_bitlen
	subq	%rax, %r14
	incq	%r14
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_mbedtls_mpi_shift_r
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	-112(%rbp), %rax
	orl	$3, (%rax)
	movl	$31, %r15d
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx), %esi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	imull	(%rax), %esi
	movq	%r13, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	callq	_mbedtls_mpi_fill_random
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%r13, %rdi
	callq	_mbedtls_mpi_bitlen
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_mbedtls_mpi_bitlen
	subq	%rax, %r14
	jbe	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_mbedtls_mpi_shift_r
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=2
	subl	$1, %r15d
	jb	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_mbedtls_mpi_cmp_mpi
	testq	%rax, %rax
	movq	_ciL@GOTPCREL(%rip), %rbx
	jns	LBB0_10
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_mbedtls_mpi_cmp_int
	testq	%rax, %rax
	jle	LBB0_10
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	movq	%r13, %rsi
	leaq	-168(%rbp), %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	-136(%rbp), %r8
	callq	_mbedtls_mpi_exp_mod
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_mbedtls_mpi_cmp_mpi
	testq	%rax, %rax
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_26
## %bb.17:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_mbedtls_mpi_cmp_int
	testq	%rax, %rax
	je	LBB0_26
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$2, %r15
	jb	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	$2, %r14d
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r13, %rdi
	leaq	-80(%rbp), %rsi
	callq	_mbedtls_mpi_cmp_mpi
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=2
	leaq	-152(%rbp), %r12
	movq	%r12, %rdi
	movq	%r13, %rbx
	movq	%r13, %rsi
	movq	%r13, %rdx
	callq	_mbedtls_mpi_mul_mpi
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_mbedtls_mpi_mod_mpi
	movl	%eax, %edi
	callq	_MBEDTLS_MPI_CHK
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_mbedtls_mpi_cmp_int
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=2
	leaq	1(%r14), %rax
	cmpq	%r15, %r14
	movq	%rax, %r14
	jb	LBB0_20
LBB0_23:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	leaq	-80(%rbp), %rsi
	callq	_mbedtls_mpi_cmp_mpi
	testq	%rax, %rax
	movq	_ciL@GOTPCREL(%rip), %rbx
	jne	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_mbedtls_mpi_cmp_int
	testq	%rax, %rax
	je	LBB0_25
LBB0_26:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	incq	%rax
                                        ## implicit-def: $r14d
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %rax
	leaq	-80(%rbp), %r12
	jne	LBB0_7
	jmp	LBB0_27
LBB0_13:
	movq	_MBEDTLS_ERR_MPI_NOT_ACCEPTABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_28:
	movl	%r14d, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	_MBEDTLS_ERR_MPI_NOT_ACCEPTABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_27:
	leaq	-80(%rbp), %rdi
	callq	_mbedtls_mpi_free
	leaq	-168(%rbp), %rdi
	callq	_mbedtls_mpi_free
	leaq	-152(%rbp), %rdi
	callq	_mbedtls_mpi_free
	leaq	-120(%rbp), %rdi
	callq	_mbedtls_mpi_free
	leaq	-136(%rbp), %rdi
	callq	_mbedtls_mpi_free
	jmp	LBB0_28
	.cfi_endproc
                                        ## -- End function
	.comm	_ciL,4,2                        ## @ciL
	.comm	_MBEDTLS_ERR_MPI_NOT_ACCEPTABLE,4,2 ## @MBEDTLS_ERR_MPI_NOT_ACCEPTABLE
	.no_dead_strip	_mpi_miller_rabin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpi_miller_rabin
_mpi_miller_rabin:                      ; @mpi_miller_rabin
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	add	x0, sp, #64
	bl	_mbedtls_mpi_init
	add	x0, sp, #48
	bl	_mbedtls_mpi_init
	add	x0, sp, #32
	bl	_mbedtls_mpi_init
	add	x0, sp, #16
	bl	_mbedtls_mpi_init
	mov	x0, sp
	bl	_mbedtls_mpi_init
	add	x0, sp, #64
	mov	x1, x21
	mov	w2, #1
	bl	_mbedtls_mpi_sub_int
	bl	_MBEDTLS_MPI_CHK
	add	x0, sp, #64
	bl	_mbedtls_mpi_lsb
	mov	x22, x0
	add	x0, sp, #48
	add	x1, sp, #64
	bl	_mbedtls_mpi_copy
	bl	_MBEDTLS_MPI_CHK
	add	x0, sp, #48
	mov	x1, x22
	bl	_mbedtls_mpi_shift_r
	bl	_MBEDTLS_MPI_CHK
	mov	x0, x21
	bl	_mbedtls_mpi_bitlen
	cmp	x0, #1299
	b.ls	LBB0_2
; %bb.1:
	mov	w24, #2
	b	LBB0_11
LBB0_2:
	cmp	x0, #849
	b.ls	LBB0_4
; %bb.3:
	mov	w24, #3
	b	LBB0_11
LBB0_4:
	cmp	x0, #649
	b.ls	LBB0_6
; %bb.5:
	mov	w24, #4
	b	LBB0_11
LBB0_6:
	cmp	x0, #349
	b.ls	LBB0_8
; %bb.7:
	mov	w24, #8
	b	LBB0_11
LBB0_8:
	cmp	x0, #249
	b.ls	LBB0_10
; %bb.9:
	mov	w24, #12
	b	LBB0_11
LBB0_10:
	mov	w8, #27
	mov	w9, #18
	cmp	x0, #149
	csel	x24, x9, x8, hi
LBB0_11:
	mov	x25, #0
Lloh0:
	adrp	x26, _ciL@GOTPAGE
Lloh1:
	ldr	x26, [x26, _ciL@GOTPAGEOFF]
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
                                        ;     Child Loop BB0_25 Depth 2
	ldr	w8, [x21]
	ldr	w9, [x26]
	mul	w1, w9, w8
	add	x0, sp, #16
	mov	x2, x20
	mov	x3, x19
	bl	_mbedtls_mpi_fill_random
	bl	_MBEDTLS_MPI_CHK
	add	x0, sp, #16
	add	x1, sp, #64
	bl	_mbedtls_mpi_cmp_mpi
	tbnz	x0, #63, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x0, sp, #16
	bl	_mbedtls_mpi_bitlen
	mov	x23, x0
	add	x0, sp, #64
	bl	_mbedtls_mpi_bitlen
	sub	x8, x23, x0
	add	x1, x8, #1
	add	x0, sp, #16
	bl	_mbedtls_mpi_shift_r
	bl	_MBEDTLS_MPI_CHK
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [sp, #24]
	ldr	w9, [x8]
	orr	w9, w9, #0x3
	str	w9, [x8]
	mov	w27, #31
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=2
	sub	w27, w27, #1
LBB0_16:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x21]
	ldr	w9, [x26]
	mul	w1, w9, w8
	add	x0, sp, #16
	mov	x2, x20
	mov	x3, x19
	bl	_mbedtls_mpi_fill_random
	bl	_MBEDTLS_MPI_CHK
	add	x0, sp, #16
	bl	_mbedtls_mpi_bitlen
	mov	x23, x0
	add	x0, sp, #64
	bl	_mbedtls_mpi_bitlen
	subs	x1, x23, x0
	b.ls	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	add	x0, sp, #16
	bl	_mbedtls_mpi_shift_r
	bl	_MBEDTLS_MPI_CHK
LBB0_18:                                ;   in Loop: Header=BB0_16 Depth=2
	cbz	w27, LBB0_31
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=2
	add	x0, sp, #16
	add	x1, sp, #64
	bl	_mbedtls_mpi_cmp_mpi
	tbz	x0, #63, LBB0_15
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=2
	add	x0, sp, #16
	mov	w1, #1
	bl	_mbedtls_mpi_cmp_int
	cmp	x0, #0
	b.le	LBB0_15
; %bb.21:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x0, sp, #16
	add	x1, sp, #16
	add	x2, sp, #48
	mov	x4, sp
	mov	x3, x21
	bl	_mbedtls_mpi_exp_mod
	bl	_MBEDTLS_MPI_CHK
	add	x0, sp, #16
	add	x1, sp, #64
	bl	_mbedtls_mpi_cmp_mpi
	cbz	x0, LBB0_30
; %bb.22:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x0, sp, #16
	mov	w1, #1
	bl	_mbedtls_mpi_cmp_int
	cbz	x0, LBB0_30
; %bb.23:                               ;   in Loop: Header=BB0_12 Depth=1
	cmp	x22, #2
	b.lo	LBB0_28
; %bb.24:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	w23, #2
LBB0_25:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x0, sp, #16
	add	x1, sp, #64
	bl	_mbedtls_mpi_cmp_mpi
	cbz	x0, LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=2
	add	x0, sp, #32
	add	x1, sp, #16
	add	x2, sp, #16
	bl	_mbedtls_mpi_mul_mpi
	bl	_MBEDTLS_MPI_CHK
	add	x0, sp, #16
	add	x1, sp, #32
	mov	x2, x21
	bl	_mbedtls_mpi_mod_mpi
	bl	_MBEDTLS_MPI_CHK
	add	x0, sp, #16
	mov	w1, #1
	bl	_mbedtls_mpi_cmp_int
	cbz	x0, LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_25 Depth=2
	add	x8, x23, #1
	cmp	x23, x22
	mov	x23, x8
	b.lo	LBB0_25
LBB0_28:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x0, sp, #16
	add	x1, sp, #64
	bl	_mbedtls_mpi_cmp_mpi
	cbnz	x0, LBB0_33
; %bb.29:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x0, sp, #16
	mov	w1, #1
	bl	_mbedtls_mpi_cmp_int
	cbz	x0, LBB0_33
LBB0_30:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x25, x25, #1
                                        ; implicit-def: $w23
	cmp	x25, x24
	b.ne	LBB0_12
	b	LBB0_34
LBB0_31:
Lloh2:
	adrp	x8, _MBEDTLS_ERR_MPI_NOT_ACCEPTABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MBEDTLS_ERR_MPI_NOT_ACCEPTABLE@GOTPAGEOFF]
Lloh4:
	ldr	w23, [x8]
LBB0_32:
	mov	x0, x23
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_33:
Lloh5:
	adrp	x8, _MBEDTLS_ERR_MPI_NOT_ACCEPTABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MBEDTLS_ERR_MPI_NOT_ACCEPTABLE@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
LBB0_34:
	add	x0, sp, #64
	bl	_mbedtls_mpi_free
	add	x0, sp, #48
	bl	_mbedtls_mpi_free
	add	x0, sp, #32
	bl	_mbedtls_mpi_free
	add	x0, sp, #16
	bl	_mbedtls_mpi_free
	mov	x0, sp
	bl	_mbedtls_mpi_free
	b	LBB0_32
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ciL,4,2                        ; @ciL
	.comm	_MBEDTLS_ERR_MPI_NOT_ACCEPTABLE,4,2 ; @MBEDTLS_ERR_MPI_NOT_ACCEPTABLE
	.no_dead_strip	_mpi_miller_rabin
.subsections_via_symbols
