	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BN_is_prime_fasttest_ex        ## -- Begin function BN_is_prime_fasttest_ex
	.p2align	4, 0x90
_BN_is_prime_fasttest_ex:               ## @BN_is_prime_fasttest_ex
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movl	%ecx, %ebx
	movq	%rdx, %r13
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	$2, %esi
	callq	_BN_is_word
	movl	$1, %ecx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movq	%r15, %rdi
	movl	$3, %esi
	callq	_BN_is_word
	movl	$1, %ecx
	testl	%eax, %eax
	je	LBB0_3
LBB0_2:
	movl	%ecx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%r15, %rdi
	callq	_BN_is_odd
	testl	%eax, %eax
	je	LBB0_34
## %bb.4:
	xorl	%eax, %eax
	callq	_BN_value_one
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_BN_cmp
	xorl	%ecx, %ecx
	testq	%rax, %rax
	jle	LBB0_2
## %bb.5:
	movq	_BN_prime_checks@GOTPCREL(%rip), %rax
	movl	%r14d, %r12d
	cmpl	%r14d, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_BN_num_bits
	movl	%eax, %edi
	callq	_BN_prime_checks_for_size
	movl	%eax, %r12d
LBB0_7:
	testl	%ebx, %ebx
	movq	%r13, %rbx
	je	LBB0_14
## %bb.8:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_NUMPRIMES@GOTPCREL(%rip), %r14
	cmpl	$2, (%r14)
	jl	LBB0_13
## %bb.9:
	movl	$1, %ebx
	movq	_primes@GOTPCREL(%rip), %r13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r15, %rdi
	callq	_BN_mod_word
	cmpq	$-1, %rax
	je	LBB0_35
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	testq	%rax, %rax
	je	LBB0_38
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_10
LBB0_13:
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	$1, %esi
	movl	$-1, %edx
	callq	_BN_GENCB_call
	testl	%eax, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_35
LBB0_14:
	movq	%rbx, %r13
	testq	%rbx, %rbx
	jne	LBB0_16
## %bb.15:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_39
LBB0_16:
	movq	%r13, %rdi
	callq	_BN_CTX_start
	movq	%r13, %rdi
	callq	_BN_CTX_get
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_BN_CTX_get
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_BN_CTX_get
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_BN_CTX_get
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_36
## %bb.17:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_BN_copy
	testl	%eax, %eax
	je	LBB0_36
## %bb.18:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_BN_sub_word
	testl	%eax, %eax
	je	LBB0_36
## %bb.19:
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_BN_copy
	testl	%eax, %eax
	je	LBB0_36
## %bb.20:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_BN_sub_word
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_43
## %bb.21:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	incl	%r14d
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_BN_is_bit_set
	testl	%eax, %eax
	je	LBB0_22
## %bb.23:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_BN_rshift
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	testl	%eax, %eax
	je	LBB0_42
## %bb.24:
	xorl	%eax, %eax
	callq	_BN_MONT_CTX_new
	testq	%rax, %rax
	je	LBB0_42
## %bb.25:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_BN_MONT_CTX_set
	testl	%eax, %eax
	je	LBB0_44
## %bb.26:
	testl	%r12d, %r12d
	jle	LBB0_45
## %bb.27:
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	-112(%rbp), %r13                ## 8-byte Reload
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	callq	_BN_priv_rand_range
	testl	%eax, %eax
	je	LBB0_49
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_BN_add_word
	testl	%eax, %eax
	je	LBB0_49
## %bb.30:                              ##   in Loop: Header=BB0_28 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rsp)
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	%r14d, %r8d
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	callq	_witness
	testl	%eax, %eax
	jne	LBB0_46
## %bb.31:                              ##   in Loop: Header=BB0_28 Depth=1
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	movl	$1, %esi
	movl	%ebx, %edx
	callq	_BN_GENCB_call
	testl	%eax, %eax
	je	LBB0_49
## %bb.32:                              ##   in Loop: Header=BB0_28 Depth=1
	incl	%ebx
	cmpl	%ebx, %r12d
	jne	LBB0_28
## %bb.33:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_49
LBB0_34:
	xorl	%ecx, %ecx
	jmp	LBB0_2
LBB0_36:
	xorl	%r14d, %r14d
LBB0_52:
	movq	%r13, %rdi
	callq	_BN_CTX_end
	testq	%rbx, %rbx
	jne	LBB0_54
## %bb.53:
	movq	%r13, %rdi
	callq	_BN_CTX_free
	jmp	LBB0_54
LBB0_35:
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
	xorl	%r14d, %r14d
	jmp	LBB0_54
LBB0_38:
	movq	(%r13), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r15, %rdi
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_BN_is_word                     ## TAILCALL
LBB0_39:
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
LBB0_54:
	movq	%r14, %rdi
	callq	_BN_MONT_CTX_free
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_2
LBB0_42:
	xorl	%r14d, %r14d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_51
LBB0_43:
	xorl	%r14d, %r14d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_52
LBB0_44:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_50
LBB0_45:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_50
LBB0_46:
	cmpl	$-1, %eax
	jne	LBB0_48
## %bb.47:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_49
LBB0_48:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_49:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %r13                 ## 8-byte Reload
LBB0_50:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_51:
	testq	%r13, %r13
	jne	LBB0_52
	jmp	LBB0_54
	.cfi_endproc
                                        ## -- End function
	.comm	_BN_prime_checks,4,2            ## @BN_prime_checks
	.comm	_NUMPRIMES,4,2                  ## @NUMPRIMES
	.comm	_primes,8,3                     ## @primes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BN_is_prime_fasttest_ex        ; -- Begin function BN_is_prime_fasttest_ex
	.p2align	2
_BN_is_prime_fasttest_ex:               ; @BN_is_prime_fasttest_ex
	.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
	mov	x20, x4
	mov	x22, x3
	mov	x19, x2
	mov	x23, x1
	mov	x21, x0
	mov	w1, #2
	bl	_BN_is_word
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	w1, #3
	bl	_BN_is_word
	cbz	w0, LBB0_4
LBB0_2:
	mov	w25, #1
LBB0_3:
	mov	x0, x25
	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
LBB0_4:
	mov	x0, x21
	bl	_BN_is_odd
	cbz	w0, LBB0_34
; %bb.5:
	bl	_BN_value_one
	mov	x1, x0
	mov	x0, x21
	bl	_BN_cmp
	cmp	x0, #1
	b.lt	LBB0_34
; %bb.6:
Lloh0:
	adrp	x8, _BN_prime_checks@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BN_prime_checks@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w23
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x21
	bl	_BN_num_bits
	bl	_BN_prime_checks_for_size
	mov	x23, x0
LBB0_8:
	cbz	w22, LBB0_15
; %bb.9:
Lloh3:
	adrp	x22, _NUMPRIMES@GOTPAGE
Lloh4:
	ldr	x22, [x22, _NUMPRIMES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #2
	b.lt	LBB0_14
; %bb.10:
	mov	w24, #1
Lloh5:
	adrp	x25, _primes@GOTPAGE
Lloh6:
	ldr	x25, [x25, _primes@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	w1, [x8, x24, lsl #2]
	mov	x0, x21
	bl	_BN_mod_word
	cmn	x0, #1
	b.eq	LBB0_38
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cbz	x0, LBB0_41
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x22]
	cmp	x24, x8
	b.lt	LBB0_11
LBB0_14:
	mov	w25, #-1
	mov	x0, x20
	mov	w1, #1
	mov	w2, #-1
	bl	_BN_GENCB_call
	cbz	w0, LBB0_39
LBB0_15:
	mov	x22, x19
	cbnz	x19, LBB0_17
; %bb.16:
	bl	_BN_CTX_new
	mov	x22, x0
	cbz	x0, LBB0_38
LBB0_17:
	mov	x0, x22
	bl	_BN_CTX_start
	mov	x0, x22
	bl	_BN_CTX_get
	mov	x26, x0
	mov	x0, x22
	bl	_BN_CTX_get
	mov	x25, x0
	mov	x0, x22
	bl	_BN_CTX_get
	mov	x24, x0
	mov	x0, x22
	bl	_BN_CTX_get
	cbz	x0, LBB0_35
; %bb.18:
	mov	x28, x0
	mov	x0, x26
	mov	x1, x21
	bl	_BN_copy
	cbz	w0, LBB0_35
; %bb.19:
	mov	x0, x26
	mov	w1, #1
	bl	_BN_sub_word
	cbz	w0, LBB0_35
; %bb.20:
	mov	x0, x25
	mov	x1, x21
	bl	_BN_copy
	cbz	w0, LBB0_35
; %bb.21:
	mov	x0, x25
	mov	w1, #3
	bl	_BN_sub_word
	cbz	w0, LBB0_35
; %bb.22:
	mov	w27, #0
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	add	w27, w27, #1
	mov	x0, x26
	mov	x1, x27
	bl	_BN_is_bit_set
	cbz	w0, LBB0_23
; %bb.24:
	mov	x0, x24
	mov	x1, x26
	mov	x2, x27
	bl	_BN_rshift
	cbz	w0, LBB0_42
; %bb.25:
	str	x24, [sp, #16]                  ; 8-byte Folded Spill
	bl	_BN_MONT_CTX_new
	mov	x24, x0
	cbz	x0, LBB0_43
; %bb.26:
	mov	x0, x24
	mov	x1, x21
	mov	x2, x22
	bl	_BN_MONT_CTX_set
	cbz	w0, LBB0_43
; %bb.27:
	cmp	w23, #1
	b.lt	LBB0_45
; %bb.28:
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
	str	wzr, [sp, #28]                  ; 4-byte Folded Spill
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x28
	ldr	x1, [sp, #8]                    ; 8-byte Folded Reload
	bl	_BN_priv_rand_range
	cbz	w0, LBB0_43
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	mov	x0, x28
	mov	w1, #2
	bl	_BN_add_word
	ldr	w25, [sp, #28]                  ; 4-byte Folded Reload
	cbz	w0, LBB0_43
; %bb.31:                               ;   in Loop: Header=BB0_29 Depth=1
	mov	x0, x28
	mov	x1, x21
	mov	x2, x26
	ldr	x3, [sp, #16]                   ; 8-byte Folded Reload
	mov	x4, x27
	mov	x5, x22
	mov	x6, x24
	bl	_witness
	cbnz	w0, LBB0_46
; %bb.32:                               ;   in Loop: Header=BB0_29 Depth=1
	mov	x0, x20
	mov	w1, #1
	mov	x2, x25
	bl	_BN_GENCB_call
	cbz	w0, LBB0_43
; %bb.33:                               ;   in Loop: Header=BB0_29 Depth=1
	add	w8, w25, #1
	mov	w25, #1
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	cmp	w23, w8
	b.ne	LBB0_29
	b	LBB0_44
LBB0_34:
	mov	w25, #0
	b	LBB0_3
LBB0_35:
	mov	x24, #0
	mov	w25, #-1
LBB0_36:
	mov	x0, x22
	bl	_BN_CTX_end
	cbnz	x19, LBB0_40
; %bb.37:
	mov	x0, x22
	bl	_BN_CTX_free
	b	LBB0_40
LBB0_38:
	mov	x24, #0
	mov	w25, #-1
	b	LBB0_40
LBB0_39:
	mov	x24, #0
LBB0_40:
	mov	x0, x24
	bl	_BN_MONT_CTX_free
	b	LBB0_3
LBB0_41:
	ldr	x8, [x25]
	ldr	w1, [x8, x24, lsl #2]
	mov	x0, x21
	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
	b	_BN_is_word
LBB0_42:
	mov	x24, #0
LBB0_43:
	mov	w25, #-1
LBB0_44:
	cbnz	x22, LBB0_36
	b	LBB0_40
LBB0_45:
	mov	w25, #1
	b	LBB0_44
LBB0_46:
	cmn	w0, #1
	csel	w25, w0, wzr, eq
	b	LBB0_44
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_BN_prime_checks,4,2            ; @BN_prime_checks
	.comm	_NUMPRIMES,4,2                  ; @NUMPRIMES
	.comm	_primes,8,3                     ; @primes
.subsections_via_symbols
