	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bbs_init                       ## -- Begin function bbs_init
	.p2align	4, 0x90
_bbs_init:                              ## @bbs_init
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %r15d
	cmpl	$256, %esi                      ## imm = 0x100
	jl	LBB0_5
## %bb.1:
	movl	%ecx, %r13d
	movq	%rdx, %r14
	movq	%rdi, %r12
	movl	%esi, %eax
	movl	%esi, %r15d
	movl	%eax, (%rdi)
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movl	%eax, 4(%r12)
	movl	%eax, %edi
	callq	_assert
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, %rbx
	movl	%ebx, %edi
	callq	_assert
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_BN_set_word
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_assert
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, %rbx
	movl	%ebx, %edi
	callq	_assert
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_BN_set_word
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_assert
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_prng_seed
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	callq	_vkprintf
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movl	%r15d, (%r12)
	leaq	L_.str.1(%rip), %rsi
	movl	$2, %edi
	callq	_vkprintf
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	shrl	%r15d
	movl	%r15d, %r14d
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, %r12
	testq	%r15, %r15
	setne	%al
	testq	%r12, %r12
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	$0, (%rsp)
	xorl	%edi, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	xorl	%r9d, %r9d
	callq	_BN_generate_prime
	movq	%rax, %rbx
	movl	%ebx, %edi
	callq	_assert
	xorl	%eax, %eax
	callq	_BN_value_one
	movq	%r15, %rdi
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_BN_sub
	movq	$0, (%rsp)
	xorl	%edi, %edi
	movl	%r14d, %esi
	xorl	%edx, %edx
	movq	%r13, %rcx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	xorl	%r9d, %r9d
	callq	_BN_generate_prime
	movq	%rax, %r13
	movl	%r13d, %edi
	callq	_assert
	xorl	%eax, %eax
	callq	_BN_value_one
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_BN_sub
	movq	%r15, %rdi
	movq	%r15, %rsi
	callq	_BN_rshift1
	movq	%r12, %rdi
	movq	%r12, %rsi
	callq	_BN_rshift1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %ecx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_BN_gcd
	movq	%r15, %rdi
	callq	_BN_free
	movq	%r12, %rdi
	callq	_BN_free
	movq	%rbx, %rdi
	callq	_BN_is_one
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$2, %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_vkprintf
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_free
	movq	%r13, %rdi
	callq	_BN_free
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_2
LBB0_4:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_free
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_free
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_BN_new
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, 24(%rbx)
	movl	4(%rbx), %ecx
	movq	%rax, %rdi
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%r13, %rdx
	callq	_BN_mul
	movq	%r14, %rdi
	callq	_BN_clear_free
	movq	%r13, %rdi
	callq	_BN_clear_free
	xorl	%eax, %eax
	callq	_BN_RECP_CTX_new
	movl	%eax, 40(%rbx)
	movq	24(%rbx), %rsi
	movl	4(%rbx), %edx
	movl	%eax, %edi
	callq	_BN_RECP_CTX_set
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_assert
	movq	24(%rbx), %rdi
	callq	_BN_num_bytes
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, 8(%rbx)
	leal	3(%rax), %edi
	andl	$-4, %edi
	movl	$1, %esi
	callq	_calloc
	movl	%eax, 12(%rbx)
	movl	%eax, %edi
	callq	_assert
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, 32(%rbx)
	movq	%rax, %rdi
	movl	$239, %esi
	callq	_BN_set_word
	movq	32(%rbx), %rsi
	movq	24(%rbx), %rdx
	movl	4(%rbx), %ecx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_BN_gcd
	movq	%r14, %rdi
	callq	_BN_is_one
	movl	%eax, %edi
	callq	_assert
	movq	%r14, %rdi
	callq	_BN_free
	movq	$0, 16(%rbx)
LBB0_5:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PRNG initialized.\n"

L_.str.1:                               ## @.str.1
	.asciz	"p was generated.\n"

L_.str.2:                               ## @.str.2
	.asciz	"gcd ((p-1)/2, (q-1)/2) isn't 1.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bbs_init                       ; -- Begin function bbs_init
	.p2align	2
_bbs_init:                              ; @bbs_init
	.cfi_startproc
; %bb.0:
	cmp	w1, #256
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #-1
	ret
LBB0_2:
	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
	mov	x20, x3
	mov	x24, x2
	mov	x23, x1
	mov	x19, x0
	str	w1, [x0]
	bl	_BN_CTX_new
	str	w0, [x19, #4]
	bl	_assert
	bl	_BN_new
	mov	x21, x0
	bl	_assert
	mov	x0, x21
	mov	w1, #3
	bl	_BN_set_word
	cmp	w0, #1
	cset	w0, eq
	bl	_assert
	bl	_BN_new
	mov	x22, x0
	bl	_assert
	mov	x0, x22
	mov	w1, #4
	bl	_BN_set_word
	cmp	w0, #1
	cset	w0, eq
	bl	_assert
	mov	x0, x24
	mov	x1, x20
	bl	_prng_seed
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	bl	_vkprintf
	str	w23, [x19]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #2
	bl	_vkprintf
	bl	_BN_new
	mov	x20, x0
	lsr	w23, w23, #1
Lloh4:
	adrp	x24, l_.str.2@PAGE
Lloh5:
	add	x24, x24, l_.str.2@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	bl	_BN_new
	mov	x27, x0
	bl	_BN_new
	mov	x28, x0
	cmp	x27, #0
	ccmp	x0, #0, #4, ne
	cset	w0, ne
	bl	_assert
	mov	x0, #0
	mov	x1, x23
	mov	w2, #0
	mov	x3, x22
	mov	x4, x21
	mov	x5, #0
	mov	x6, #0
	bl	_BN_generate_prime
	mov	x25, x0
	bl	_assert
	bl	_BN_value_one
	mov	x2, x0
	mov	x0, x27
	mov	x1, x25
	bl	_BN_sub
	mov	x0, #0
	mov	x1, x23
	mov	w2, #0
	mov	x3, x22
	mov	x4, x21
	mov	x5, #0
	mov	x6, #0
	bl	_BN_generate_prime
	mov	x26, x0
	bl	_assert
	bl	_BN_value_one
	mov	x2, x0
	mov	x0, x28
	mov	x1, x26
	bl	_BN_sub
	mov	x0, x27
	mov	x1, x27
	bl	_BN_rshift1
	mov	x0, x28
	mov	x1, x28
	bl	_BN_rshift1
	ldr	w3, [x19, #4]
	mov	x0, x20
	mov	x1, x27
	mov	x2, x28
	bl	_BN_gcd
	mov	x0, x27
	bl	_BN_free
	mov	x0, x28
	bl	_BN_free
	mov	x0, x20
	bl	_BN_is_one
	cbnz	w0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #2
	mov	x1, x24
	bl	_vkprintf
	mov	x0, x25
	bl	_BN_free
	mov	x0, x26
	bl	_BN_free
	b	LBB0_3
LBB0_5:
	mov	x0, x21
	bl	_BN_free
	mov	x0, x22
	bl	_BN_free
	bl	_BN_new
	str	x0, [x19, #24]
	ldr	w3, [x19, #4]
	mov	x1, x25
	mov	x2, x26
	bl	_BN_mul
	mov	x0, x25
	bl	_BN_clear_free
	mov	x0, x26
	bl	_BN_clear_free
	bl	_BN_RECP_CTX_new
	str	w0, [x19, #40]
	ldr	x1, [x19, #24]
	ldr	w2, [x19, #4]
	bl	_BN_RECP_CTX_set
	cmp	w0, #1
	cset	w0, eq
	bl	_assert
	ldr	x0, [x19, #24]
	bl	_BN_num_bytes
	str	w0, [x19, #8]
	add	w8, w0, #3
	and	w0, w8, #0xfffffffc
	mov	w1, #1
	bl	_calloc
	str	w0, [x19, #12]
	bl	_assert
	bl	_BN_new
	str	x0, [x19, #32]
	mov	w1, #239
	bl	_BN_set_word
	ldp	x2, x1, [x19, #24]
	ldr	w3, [x19, #4]
	mov	x0, x20
	bl	_BN_gcd
	mov	x0, x20
	bl	_BN_is_one
	bl	_assert
	mov	x0, x20
	bl	_BN_free
	mov	w0, #0
	str	xzr, [x19, #16]
	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
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PRNG initialized.\n"

l_.str.1:                               ; @.str.1
	.asciz	"p was generated.\n"

l_.str.2:                               ; @.str.2
	.asciz	"gcd ((p-1)/2, (q-1)/2) isn't 1.\n"

.subsections_via_symbols
