Program: primal-test

x86 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_random_int                 ## -- Begin function get_random_int
	.p2align	4, 0x90
_get_random_int:                        ## @get_random_int
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	callq	_libmin_rand
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	movq	-16(%rbp), %rcx
	subq	-8(%rbp), %rcx
	addq	$1, %rcx
	xorl	%edx, %edx
                                        ## kill: def $rdx killed $edx
	divq	%rcx
	movq	%rdx, %rax
	addq	-8(%rbp), %rax
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.globl	_split_int                      ## -- Begin function split_int
	.p2align	4, 0x90
_split_int:                             ## @split_int
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movq	%rdx, -24(%rbp)
	movq	-8(%rbp), %rax
	movq	$0, (%rax)
	movq	-24(%rbp), %rcx
	subq	$1, %rcx
	movq	-16(%rbp), %rax
	movq	%rcx, (%rax)
LBB1_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	-16(%rbp), %rax
	movq	(%rax), %rax
	andq	$1, %rax
	cmpq	$0, %rax
	jne	LBB1_3
## %bb.2:                               ##   in Loop: Header=BB1_1 Depth=1
	movq	-8(%rbp), %rax
	movq	(%rax), %rcx
	addq	$1, %rcx
	movq	%rcx, (%rax)
	movq	-16(%rbp), %rax
	movq	(%rax), %rcx
	shrq	$1, %rcx
	movq	%rcx, (%rax)
	jmp	LBB1_1
LBB1_3:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.globl	_miller_rabin_int               ## -- Begin function miller_rabin_int
	.p2align	4, 0x90
_miller_rabin_int:                      ## @miller_rabin_int
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$80, %rsp
	movl	%edi, -8(%rbp)
	movl	%esi, -12(%rbp)
	movq	$0, -32(%rbp)
	movl	-8(%rbp), %eax
	andl	$1, %eax
	cmpl	$0, %eax
	jne	LBB2_2
## %bb.1:
	movl	-8(%rbp), %edx
	xorl	%eax, %eax
	movl	$1, %ecx
	cmpl	$2, %edx
	cmovel	%ecx, %eax
	movl	%eax, -4(%rbp)
	jmp	LBB2_25
LBB2_2:
	cmpl	$3, -8(%rbp)
	jne	LBB2_4
## %bb.3:
	movl	$1, -4(%rbp)
	jmp	LBB2_25
LBB2_4:
	cmpl	$3, -8(%rbp)
	jae	LBB2_6
## %bb.5:
	movl	$0, -4(%rbp)
	jmp	LBB2_25
LBB2_6:
	jmp	LBB2_7
LBB2_7:
	movl	-8(%rbp), %eax
	subl	$1, %eax
	movl	%eax, %eax
                                        ## kill: def $rax killed $eax
	movq	%rax, -56(%rbp)
	movl	-8(%rbp), %eax
	movl	%eax, %edx
	leaq	-24(%rbp), %rdi
	leaq	-40(%rbp), %rsi
	callq	_split_int
	movl	$0, -60(%rbp)
LBB2_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB2_13 Depth 2
	movl	-60(%rbp), %eax
	cmpl	-12(%rbp), %eax
	jae	LBB2_24
## %bb.9:                               ##   in Loop: Header=BB2_8 Depth=1
	movl	-8(%rbp), %eax
	subl	$2, %eax
	movl	%eax, %eax
	movl	%eax, %esi
	movl	$2, %edi
	callq	_get_random_int
	movq	%rax, -32(%rbp)
	movq	-32(%rbp), %rdi
	movq	-40(%rbp), %rsi
	movl	-8(%rbp), %edx
	callq	_powm
	movq	%rax, -48(%rbp)
	cmpq	$1, -48(%rbp)
	je	LBB2_11
## %bb.10:                              ##   in Loop: Header=BB2_8 Depth=1
	movq	-48(%rbp), %rax
	cmpq	-56(%rbp), %rax
	jne	LBB2_12
LBB2_11:                                ##   in Loop: Header=BB2_8 Depth=1
	jmp	LBB2_23
LBB2_12:                                ##   in Loop: Header=BB2_8 Depth=1
	movq	$1, -72(%rbp)
LBB2_13:                                ##   Parent Loop BB2_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-72(%rbp), %rax
	cmpq	-24(%rbp), %rax
	ja	LBB2_20
## %bb.14:                              ##   in Loop: Header=BB2_13 Depth=2
	movq	-48(%rbp), %rax
	imulq	-48(%rbp), %rax
	movl	-8(%rbp), %ecx
                                        ## kill: def $rcx killed $ecx
	xorl	%edx, %edx
                                        ## kill: def $rdx killed $edx
	divq	%rcx
	movq	%rdx, -48(%rbp)
	cmpq	$1, -48(%rbp)
	jne	LBB2_16
## %bb.15:
	movl	$0, -4(%rbp)
	jmp	LBB2_25
LBB2_16:                                ##   in Loop: Header=BB2_13 Depth=2
	movq	-48(%rbp), %rax
	cmpq	-56(%rbp), %rax
	jne	LBB2_18
## %bb.17:                              ##   in Loop: Header=BB2_8 Depth=1
	jmp	LBB2_20
LBB2_18:                                ##   in Loop: Header=BB2_13 Depth=2
	jmp	LBB2_19
LBB2_19:                                ##   in Loop: Header=BB2_13 Depth=2
	movq	-72(%rbp), %rax
	addq	$1, %rax
	movq	%rax, -72(%rbp)
	jmp	LBB2_13
LBB2_20:                                ##   in Loop: Header=BB2_8 Depth=1
	movq	-48(%rbp), %rax
	cmpq	-56(%rbp), %rax
	je	LBB2_22
## %bb.21:
	movl	$0, -4(%rbp)
	jmp	LBB2_25
LBB2_22:                                ##   in Loop: Header=BB2_8 Depth=1
	jmp	LBB2_23
LBB2_23:                                ##   in Loop: Header=BB2_8 Depth=1
	movl	-60(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -60(%rbp)
	jmp	LBB2_8
LBB2_24:
	movl	$2, -4(%rbp)
LBB2_25:
	movl	-4(%rbp), %eax
	addq	$80, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function powm
_powm:                                  ## @powm
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	%rdi, -8(%rbp)
	movq	%rsi, -16(%rbp)
	movl	%edx, -20(%rbp)
	movq	$1, -32(%rbp)
LBB3_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -16(%rbp)
	je	LBB3_5
## %bb.2:                               ##   in Loop: Header=BB3_1 Depth=1
	movq	-16(%rbp), %rax
	andq	$1, %rax
	cmpq	$1, %rax
	jne	LBB3_4
## %bb.3:                               ##   in Loop: Header=BB3_1 Depth=1
	movq	-32(%rbp), %rax
	imulq	-8(%rbp), %rax
	movl	-20(%rbp), %ecx
                                        ## kill: def $rcx killed $ecx
	xorl	%edx, %edx
                                        ## kill: def $rdx killed $edx
	divq	%rcx
	movq	%rdx, -32(%rbp)
LBB3_4:                                 ##   in Loop: Header=BB3_1 Depth=1
	movq	-8(%rbp), %rax
	imulq	-8(%rbp), %rax
	movl	-20(%rbp), %ecx
                                        ## kill: def $rcx killed $ecx
	xorl	%edx, %edx
                                        ## kill: def $rdx killed $edx
	divq	%rcx
	movq	%rdx, -8(%rbp)
	movq	-16(%rbp), %rax
	shrq	$1, %rax
	movq	%rax, -16(%rbp)
	jmp	LBB3_1
LBB3_5:
	movq	-32(%rbp), %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function main
LCPI4_0:
	.quad	0x4010000000000000              ## double 4
LCPI4_1:
	.quad	0x4030000000000000              ## double 16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_main
	.p2align	4, 0x90
_main:                                  ## @main
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$32, %rsp
	movl	$0, -4(%rbp)
	movl	$42, %edi
	callq	_libmin_srand
	movl	$3, -8(%rbp)
	movl	$0, -12(%rbp)
LBB4_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$200, -12(%rbp)
	jge	LBB4_8
## %bb.2:                               ##   in Loop: Header=BB4_1 Depth=1
	movl	-8(%rbp), %edi
	movl	$16, %esi
	callq	_miller_rabin_int
	movl	%eax, -16(%rbp)
	cmpl	$0, -16(%rbp)
	setne	%al
	andb	$1, %al
	movzbl	%al, %eax
	movl	%eax, -20(%rbp)
	cmpl	$0, -20(%rbp)
	je	LBB4_6
## %bb.3:                               ##   in Loop: Header=BB4_1 Depth=1
	movl	-8(%rbp), %edx
	movslq	_q_head(%rip), %rcx
	movq	_q@GOTPCREL(%rip), %rax
	movl	%edx, (%rax,%rcx,8)
	movl	-16(%rbp), %edx
	movslq	_q_head(%rip), %rcx
	movq	_q@GOTPCREL(%rip), %rax
	movl	%edx, 4(%rax,%rcx,8)
	movl	_q_head(%rip), %eax
	addl	$1, %eax
	cmpl	$64, %eax
	jge	LBB4_5
## %bb.4:                               ##   in Loop: Header=BB4_1 Depth=1
	movl	_q_head(%rip), %eax
	addl	$1, %eax
	movl	%eax, _q_head(%rip)
LBB4_5:                                 ##   in Loop: Header=BB4_1 Depth=1
	jmp	LBB4_6
LBB4_6:                                 ##   in Loop: Header=BB4_1 Depth=1
	callq	_libmin_rand
	movl	%eax, -8(%rbp)
## %bb.7:                               ##   in Loop: Header=BB4_1 Depth=1
	movl	-12(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -12(%rbp)
	jmp	LBB4_1
LBB4_8:
	movl	_q_head(%rip), %esi
	leaq	L_.str(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	movl	$0, -24(%rbp)
LBB4_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	-24(%rbp), %eax
	cmpl	_q_head(%rip), %eax
	jge	LBB4_17
## %bb.10:                              ##   in Loop: Header=BB4_9 Depth=1
	movslq	-24(%rbp), %rcx
	movq	_q@GOTPCREL(%rip), %rax
	cmpl	$1, 4(%rax,%rcx,8)
	jne	LBB4_12
## %bb.11:                              ##   in Loop: Header=BB4_9 Depth=1
	movslq	-24(%rbp), %rcx
	movq	_q@GOTPCREL(%rip), %rax
	movl	(%rax,%rcx,8), %esi
	leaq	L_.str.1(%rip), %rdi
	movb	$0, %al
	callq	_libmin_printf
	jmp	LBB4_15
LBB4_12:                                ##   in Loop: Header=BB4_9 Depth=1
	movslq	-24(%rbp), %rcx
	movq	_q@GOTPCREL(%rip), %rax
	cmpl	$2, 4(%rax,%rcx,8)
	jne	LBB4_14
## %bb.13:                              ##   in Loop: Header=BB4_9 Depth=1
	movslq	-24(%rbp), %rcx
	movq	_q@GOTPCREL(%rip), %rax
	movl	(%rax,%rcx,8), %eax
	movl	%eax, -28(%rbp)                 ## 4-byte Spill
	movsd	LCPI4_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movsd	LCPI4_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	callq	_libmin_pow
	movl	-28(%rbp), %esi                 ## 4-byte Reload
	leaq	L_.str.2(%rip), %rdi
	movb	$1, %al
	callq	_libmin_printf
LBB4_14:                                ##   in Loop: Header=BB4_9 Depth=1
	jmp	LBB4_15
LBB4_15:                                ##   in Loop: Header=BB4_9 Depth=1
	jmp	LBB4_16
LBB4_16:                                ##   in Loop: Header=BB4_9 Depth=1
	movl	-24(%rbp), %eax
	addl	$1, %eax
	movl	%eax, -24(%rbp)
	jmp	LBB4_9
LBB4_17:
	callq	_libmin_success
	xorl	%eax, %eax
	addq	$32, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.globl	_q_head                         ## @q_head
.zerofill __DATA,__common,_q_head,4,2
	.comm	_q,512,4                        ## @q
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Primality tests found %d primes...\n"

L_.str.1:                               ## @.str.1
	.asciz	"Value %u is `prime' with failure probability (0)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Value %u is `likely prime' with failure probability (1 in %.0lf)\n"

.subsections_via_symbols


ARM64 assembly:
	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_random_int                 ; -- Begin function get_random_int
	.p2align	2
_get_random_int:                        ; @get_random_int
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	str	x0, [sp, #8]
	str	x1, [sp]
	bl	_libmin_rand
	mov	w8, w0
                                        ; kill: def $x8 killed $w8
	ldr	x9, [sp]
	ldr	x10, [sp, #8]
	subs	x9, x9, x10
	add	x10, x9, #1
	udiv	x9, x8, x10
	mul	x9, x9, x10
	subs	x8, x8, x9
	ldr	x9, [sp, #8]
	add	x0, x8, x9
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_split_int                      ; -- Begin function split_int
	.p2align	2
_split_int:                             ; @split_int
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	str	x0, [sp, #24]
	str	x1, [sp, #16]
	str	x2, [sp, #8]
	ldr	x8, [sp, #24]
	str	xzr, [x8]
	ldr	x8, [sp, #8]
	subs	x8, x8, #1
	ldr	x9, [sp, #16]
	str	x8, [x9]
	b	LBB1_1
LBB1_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #16]
	ldr	x8, [x8]
	ands	x8, x8, #0x1
	cset	w8, ne
	tbnz	w8, #0, LBB1_3
	b	LBB1_2
LBB1_2:                                 ;   in Loop: Header=BB1_1 Depth=1
	ldr	x9, [sp, #24]
	ldr	x8, [x9]
	add	x8, x8, #1
	str	x8, [x9]
	ldr	x9, [sp, #16]
	ldr	x8, [x9]
	mov	x10, #2
	udiv	x8, x8, x10
	str	x8, [x9]
	b	LBB1_1
LBB1_3:
	add	sp, sp, #32
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_miller_rabin_int               ; -- Begin function miller_rabin_int
	.p2align	2
_miller_rabin_int:                      ; @miller_rabin_int
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	stur	w0, [x29, #-8]
	stur	w1, [x29, #-12]
	stur	xzr, [x29, #-32]
	ldur	w8, [x29, #-8]
	ands	w8, w8, #0x1
	cset	w8, ne
	tbnz	w8, #0, LBB2_2
	b	LBB2_1
LBB2_1:
	ldur	w8, [x29, #-8]
	subs	w8, w8, #2
	cset	w8, eq
	and	w9, w8, #0x1
	mov	w8, #0
	ands	w9, w9, #0x1
	csinc	w8, w8, wzr, eq
	stur	w8, [x29, #-4]
	b	LBB2_25
LBB2_2:
	ldur	w8, [x29, #-8]
	subs	w8, w8, #3
	cset	w8, ne
	tbnz	w8, #0, LBB2_4
	b	LBB2_3
LBB2_3:
	mov	w8, #1
	stur	w8, [x29, #-4]
	b	LBB2_25
LBB2_4:
	ldur	w8, [x29, #-8]
	subs	w8, w8, #3
	cset	w8, hs
	tbnz	w8, #0, LBB2_6
	b	LBB2_5
LBB2_5:
	stur	wzr, [x29, #-4]
	b	LBB2_25
LBB2_6:
	b	LBB2_7
LBB2_7:
	ldur	w8, [x29, #-8]
	subs	w8, w8, #1
                                        ; kill: def $x8 killed $w8
	str	x8, [sp, #24]
	ldur	w8, [x29, #-8]
	mov	x2, x8
	sub	x0, x29, #24
	add	x1, sp, #40
	bl	_split_int
	str	wzr, [sp, #20]
	b	LBB2_8
LBB2_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB2_13 Depth 2
	ldr	w8, [sp, #20]
	ldur	w9, [x29, #-12]
	subs	w8, w8, w9
	cset	w8, hs
	tbnz	w8, #0, LBB2_24
	b	LBB2_9
LBB2_9:                                 ;   in Loop: Header=BB2_8 Depth=1
	ldur	w8, [x29, #-8]
	subs	w8, w8, #2
	mov	x1, x8
	mov	x0, #2
	bl	_get_random_int
	stur	x0, [x29, #-32]
	ldur	x0, [x29, #-32]
	ldr	x1, [sp, #40]
	ldur	w2, [x29, #-8]
	bl	_powm
	str	x0, [sp, #32]
	ldr	x8, [sp, #32]
	subs	x8, x8, #1
	cset	w8, eq
	tbnz	w8, #0, LBB2_11
	b	LBB2_10
LBB2_10:                                ;   in Loop: Header=BB2_8 Depth=1
	ldr	x8, [sp, #32]
	ldr	x9, [sp, #24]
	subs	x8, x8, x9
	cset	w8, ne
	tbnz	w8, #0, LBB2_12
	b	LBB2_11
LBB2_11:                                ;   in Loop: Header=BB2_8 Depth=1
	b	LBB2_23
LBB2_12:                                ;   in Loop: Header=BB2_8 Depth=1
	mov	x8, #1
	str	x8, [sp, #8]
	b	LBB2_13
LBB2_13:                                ;   Parent Loop BB2_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [sp, #8]
	ldur	x9, [x29, #-24]
	subs	x8, x8, x9
	cset	w8, hi
	tbnz	w8, #0, LBB2_20
	b	LBB2_14
LBB2_14:                                ;   in Loop: Header=BB2_13 Depth=2
	ldr	x8, [sp, #32]
	ldr	x9, [sp, #32]
	mul	x8, x8, x9
	ldur	w9, [x29, #-8]
	mov	x10, x9
	udiv	x9, x8, x10
	mul	x9, x9, x10
	subs	x8, x8, x9
	str	x8, [sp, #32]
	ldr	x8, [sp, #32]
	subs	x8, x8, #1
	cset	w8, ne
	tbnz	w8, #0, LBB2_16
	b	LBB2_15
LBB2_15:
	stur	wzr, [x29, #-4]
	b	LBB2_25
LBB2_16:                                ;   in Loop: Header=BB2_13 Depth=2
	ldr	x8, [sp, #32]
	ldr	x9, [sp, #24]
	subs	x8, x8, x9
	cset	w8, ne
	tbnz	w8, #0, LBB2_18
	b	LBB2_17
LBB2_17:                                ;   in Loop: Header=BB2_8 Depth=1
	b	LBB2_20
LBB2_18:                                ;   in Loop: Header=BB2_13 Depth=2
	b	LBB2_19
LBB2_19:                                ;   in Loop: Header=BB2_13 Depth=2
	ldr	x8, [sp, #8]
	add	x8, x8, #1
	str	x8, [sp, #8]
	b	LBB2_13
LBB2_20:                                ;   in Loop: Header=BB2_8 Depth=1
	ldr	x8, [sp, #32]
	ldr	x9, [sp, #24]
	subs	x8, x8, x9
	cset	w8, eq
	tbnz	w8, #0, LBB2_22
	b	LBB2_21
LBB2_21:
	stur	wzr, [x29, #-4]
	b	LBB2_25
LBB2_22:                                ;   in Loop: Header=BB2_8 Depth=1
	b	LBB2_23
LBB2_23:                                ;   in Loop: Header=BB2_8 Depth=1
	ldr	w8, [sp, #20]
	add	w8, w8, #1
	str	w8, [sp, #20]
	b	LBB2_8
LBB2_24:
	mov	w8, #2
	stur	w8, [x29, #-4]
	b	LBB2_25
LBB2_25:
	ldur	w0, [x29, #-4]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function powm
_powm:                                  ; @powm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	str	x0, [sp, #24]
	str	x1, [sp, #16]
	str	w2, [sp, #12]
	mov	x8, #1
	str	x8, [sp]
	b	LBB3_1
LBB3_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #16]
	subs	x8, x8, #0
	cset	w8, eq
	tbnz	w8, #0, LBB3_5
	b	LBB3_2
LBB3_2:                                 ;   in Loop: Header=BB3_1 Depth=1
	ldr	x8, [sp, #16]
	and	x8, x8, #0x1
	subs	x8, x8, #1
	cset	w8, ne
	tbnz	w8, #0, LBB3_4
	b	LBB3_3
LBB3_3:                                 ;   in Loop: Header=BB3_1 Depth=1
	ldr	x8, [sp]
	ldr	x9, [sp, #24]
	mul	x8, x8, x9
	ldr	w9, [sp, #12]
	mov	x10, x9
	udiv	x9, x8, x10
	mul	x9, x9, x10
	subs	x8, x8, x9
	str	x8, [sp]
	b	LBB3_4
LBB3_4:                                 ;   in Loop: Header=BB3_1 Depth=1
	ldr	x8, [sp, #24]
	ldr	x9, [sp, #24]
	mul	x8, x8, x9
	ldr	w9, [sp, #12]
	mov	x10, x9
	udiv	x9, x8, x10
	mul	x9, x9, x10
	subs	x8, x8, x9
	str	x8, [sp, #24]
	ldr	x8, [sp, #16]
	mov	x9, #2
	udiv	x8, x8, x9
	str	x8, [sp, #16]
	b	LBB3_1
LBB3_5:
	ldr	x0, [sp]
	add	sp, sp, #32
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	adrp	x8, _q@GOTPAGE
	ldr	x8, [x8, _q@GOTPAGEOFF]
	str	x8, [sp, #32]                   ; 8-byte Folded Spill
	stur	wzr, [x29, #-4]
	mov	w0, #42
	bl	_libmin_srand
	mov	w8, #3
	stur	w8, [x29, #-8]
	stur	wzr, [x29, #-12]
	b	LBB4_1
LBB4_1:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x29, #-12]
	subs	w8, w8, #200
	cset	w8, ge
	tbnz	w8, #0, LBB4_8
	b	LBB4_2
LBB4_2:                                 ;   in Loop: Header=BB4_1 Depth=1
	ldur	w0, [x29, #-8]
	mov	w1, #16
	bl	_miller_rabin_int
	stur	w0, [x29, #-16]
	ldur	w8, [x29, #-16]
	subs	w8, w8, #0
	cset	w8, ne
	and	w8, w8, #0x1
	stur	w8, [x29, #-20]
	ldur	w8, [x29, #-20]
	subs	w8, w8, #0
	cset	w8, eq
	tbnz	w8, #0, LBB4_6
	b	LBB4_3
LBB4_3:                                 ;   in Loop: Header=BB4_1 Depth=1
	ldr	x10, [sp, #32]                  ; 8-byte Folded Reload
	ldur	w9, [x29, #-8]
	adrp	x8, _q_head@PAGE
	ldrsw	x11, [x8, _q_head@PAGEOFF]
	lsl	x11, x11, #3
	str	w9, [x10, x11]
	ldur	w9, [x29, #-16]
	ldrsw	x11, [x8, _q_head@PAGEOFF]
	add	x10, x10, x11, lsl #3
	str	w9, [x10, #4]
	ldr	w8, [x8, _q_head@PAGEOFF]
	add	w8, w8, #1
	subs	w8, w8, #64
	cset	w8, ge
	tbnz	w8, #0, LBB4_5
	b	LBB4_4
LBB4_4:                                 ;   in Loop: Header=BB4_1 Depth=1
	adrp	x9, _q_head@PAGE
	ldr	w8, [x9, _q_head@PAGEOFF]
	add	w8, w8, #1
	str	w8, [x9, _q_head@PAGEOFF]
	b	LBB4_5
LBB4_5:                                 ;   in Loop: Header=BB4_1 Depth=1
	b	LBB4_6
LBB4_6:                                 ;   in Loop: Header=BB4_1 Depth=1
	bl	_libmin_rand
	stur	w0, [x29, #-8]
	b	LBB4_7
LBB4_7:                                 ;   in Loop: Header=BB4_1 Depth=1
	ldur	w8, [x29, #-12]
	add	w8, w8, #1
	stur	w8, [x29, #-12]
	b	LBB4_1
LBB4_8:
	adrp	x8, _q_head@PAGE
	ldr	w9, [x8, _q_head@PAGEOFF]
                                        ; implicit-def: $x8
	mov	x8, x9
	mov	x9, sp
	str	x8, [x9]
	adrp	x0, l_.str@PAGE
	add	x0, x0, l_.str@PAGEOFF
	bl	_libmin_printf
	stur	wzr, [x29, #-24]
	b	LBB4_9
LBB4_9:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x29, #-24]
	adrp	x9, _q_head@PAGE
	ldr	w9, [x9, _q_head@PAGEOFF]
	subs	w8, w8, w9
	cset	w8, ge
	tbnz	w8, #0, LBB4_17
	b	LBB4_10
LBB4_10:                                ;   in Loop: Header=BB4_9 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldursw	x9, [x29, #-24]
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
	subs	w8, w8, #1
	cset	w8, ne
	tbnz	w8, #0, LBB4_12
	b	LBB4_11
LBB4_11:                                ;   in Loop: Header=BB4_9 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldursw	x9, [x29, #-24]
	lsl	x9, x9, #3
	ldr	w9, [x8, x9]
                                        ; implicit-def: $x8
	mov	x8, x9
	mov	x9, sp
	str	x8, [x9]
	adrp	x0, l_.str.1@PAGE
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_libmin_printf
	b	LBB4_15
LBB4_12:                                ;   in Loop: Header=BB4_9 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldursw	x9, [x29, #-24]
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
	subs	w8, w8, #2
	cset	w8, ne
	tbnz	w8, #0, LBB4_14
	b	LBB4_13
LBB4_13:                                ;   in Loop: Header=BB4_9 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldursw	x9, [x29, #-24]
	lsl	x9, x9, #3
	ldr	w9, [x8, x9]
                                        ; implicit-def: $x8
	mov	x8, x9
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	fmov	d0, #4.00000000
	fmov	d1, #16.00000000
	bl	_libmin_pow
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	mov	x8, sp
	str	x9, [x8]
	str	d0, [x8, #8]
	adrp	x0, l_.str.2@PAGE
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_libmin_printf
	b	LBB4_14
LBB4_14:                                ;   in Loop: Header=BB4_9 Depth=1
	b	LBB4_15
LBB4_15:                                ;   in Loop: Header=BB4_9 Depth=1
	b	LBB4_16
LBB4_16:                                ;   in Loop: Header=BB4_9 Depth=1
	ldur	w8, [x29, #-24]
	add	w8, w8, #1
	stur	w8, [x29, #-24]
	b	LBB4_9
LBB4_17:
	bl	_libmin_success
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.globl	_q_head                         ; @q_head
.zerofill __DATA,__common,_q_head,4,2
	.comm	_q,512,2                        ; @q
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Primality tests found %d primes...\n"

l_.str.1:                               ; @.str.1
	.asciz	"Value %u is `prime' with failure probability (0)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Value %u is `likely prime' with failure probability (1 in %.0lf)\n"

.subsections_via_symbols