	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function GeneticSelection
LCPI0_0:
	.long	0x80000000                      ## float -0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_GeneticSelection
	.p2align	4, 0x90
_GeneticSelection:                      ## @GeneticSelection
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edi, %edi
	jle	LBB0_18
## %bb.1:
	movq	%rsi, %r15
	movl	%edi, %r14d
	movl	%edi, %r12d
	leaq	-1(%r12), %rcx
	movl	%r12d, %eax
	andl	$3, %eax
	cmpq	$3, %rcx
	jae	LBB0_3
## %bb.2:
	xorps	%xmm6, %xmm6
	xorl	%ecx, %ecx
	jmp	LBB0_5
LBB0_18:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_random
	jmp	LBB0_17
LBB0_3:
	movl	%r12d, %edx
	andl	$-4, %edx
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	xorps	%xmm6, %xmm6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%r15,%rcx,4), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	movss	4(%r15,%rcx,4), %xmm3           ## xmm3 = mem[0],zero,zero,zero
	movaps	%xmm2, %xmm4
	cmpless	%xmm0, %xmm4
	movaps	%xmm4, %xmm5
	andnps	%xmm2, %xmm5
	andps	%xmm1, %xmm4
	orps	%xmm5, %xmm4
	addss	%xmm6, %xmm4
	movaps	%xmm3, %xmm2
	cmpless	%xmm0, %xmm2
	movaps	%xmm2, %xmm5
	andnps	%xmm3, %xmm5
	andps	%xmm1, %xmm2
	orps	%xmm5, %xmm2
	addss	%xmm4, %xmm2
	movss	8(%r15,%rcx,4), %xmm3           ## xmm3 = mem[0],zero,zero,zero
	movaps	%xmm3, %xmm4
	cmpless	%xmm0, %xmm4
	movaps	%xmm4, %xmm5
	andnps	%xmm3, %xmm5
	andps	%xmm1, %xmm4
	orps	%xmm5, %xmm4
	addss	%xmm2, %xmm4
	movss	12(%r15,%rcx,4), %xmm2          ## xmm2 = mem[0],zero,zero,zero
	movaps	%xmm2, %xmm6
	cmpless	%xmm0, %xmm6
	movaps	%xmm6, %xmm3
	andnps	%xmm2, %xmm3
	andps	%xmm1, %xmm6
	orps	%xmm3, %xmm6
	addss	%xmm4, %xmm6
	addq	$4, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_4
LBB0_5:
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	leaq	(%r15,%rcx,4), %rcx
	xorl	%edx, %edx
	xorps	%xmm0, %xmm0
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%rcx,%rdx,4), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	movaps	%xmm2, %xmm3
	cmpless	%xmm0, %xmm3
	movaps	%xmm3, %xmm4
	andnps	%xmm2, %xmm4
	andps	%xmm1, %xmm3
	orps	%xmm4, %xmm3
	addss	%xmm3, %xmm6
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_7
LBB0_8:
	xorps	%xmm0, %xmm0
	ucomiss	%xmm0, %xmm6
	jbe	LBB0_13
## %bb.9:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	movaps	%xmm6, -48(%rbp)                ## 16-byte Spill
	callq	_random
	xorps	%xmm2, %xmm2
	movaps	-48(%rbp), %xmm1                ## 16-byte Reload
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	je	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movss	(%r15,%rbx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm2
	ja	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	subss	%xmm0, %xmm1
	ucomiss	%xmm1, %xmm2
	jb	LBB0_12
	jmp	LBB0_17
LBB0_13:
	xorl	%eax, %eax
	callq	_random
	xorps	%xmm1, %xmm1
	movl	%eax, %ebx
	imull	%r14d, %ebx
	movl	%r14d, %ecx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rax
	movss	(%r15,%rax,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm0
	jae	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	incl	%ebx
	movl	%ebx, %eax
	cltd
	idivl	%r14d
	movl	%edx, %ebx
	decl	%ecx
	jne	LBB0_14
## %bb.16:
	xorl	%ebx, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GeneticSelection               ; -- Begin function GeneticSelection
	.p2align	2
_GeneticSelection:                      ; @GeneticSelection
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-64]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 b8, -56
	.cfi_offset b9, -64
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	w21, w0
	cmp	w0, #16
	b.hs	LBB0_4
; %bb.2:
	mov	x8, #0
	movi	d8, #0000000000000000
	b	LBB0_7
LBB0_3:
	bl	_random
	b	LBB0_17
LBB0_4:
	and	x8, x21, #0xfffffff0
	add	x9, x19, #32
	movi	d8, #0000000000000000
	movi.4s	v0, #128, lsl #24
	mov	x10, x8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x9, #-32]
	ldp	q3, q4, [x9], #64
	fcmle.4s	v5, v1, #0.0
	fcmle.4s	v6, v2, #0.0
	fcmle.4s	v7, v3, #0.0
	fcmle.4s	v16, v4, #0.0
	bit.16b	v1, v0, v5
	mov	s5, v1[3]
	mov	s17, v1[2]
	mov	s18, v1[1]
	bit.16b	v2, v0, v6
	mov	s6, v2[3]
	mov	s19, v2[2]
	mov	s20, v2[1]
	bit.16b	v3, v0, v7
	mov	s7, v3[3]
	mov	s21, v3[2]
	mov	s22, v3[1]
	bit.16b	v4, v0, v16
	mov	s16, v4[3]
	mov	s23, v4[2]
	mov	s24, v4[1]
	fadd	s1, s8, s1
	fadd	s1, s1, s18
	fadd	s1, s1, s17
	fadd	s1, s1, s5
	fadd	s1, s1, s2
	fadd	s1, s1, s20
	fadd	s1, s1, s19
	fadd	s1, s1, s6
	fadd	s1, s1, s3
	fadd	s1, s1, s22
	fadd	s1, s1, s21
	fadd	s1, s1, s7
	fadd	s1, s1, s4
	fadd	s1, s1, s24
	fadd	s1, s1, s23
	fadd	s8, s1, s16
	subs	x10, x10, #16
	b.ne	LBB0_5
; %bb.6:
	cmp	x8, x21
	b.eq	LBB0_9
LBB0_7:
	add	x9, x19, x8, lsl #2
	sub	x8, x21, x8
	movi.2s	v0, #128, lsl #24
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s1, [x9], #4
	fcmp	s1, #0.0
	fcsel	s1, s0, s1, ls
	fadd	s8, s8, s1
	subs	x8, x8, #1
	b.ne	LBB0_8
LBB0_9:
	fcmp	s8, #0.0
	b.le	LBB0_14
; %bb.10:
	bl	_random
	mov	x0, #0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x0, x0, #1
	cmp	x21, x0
	b.eq	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x19, x0, lsl #2]
	fcmp	s0, #0.0
	b.mi	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	fsub	s8, s8, s0
	fcmp	s8, #0.0
	b.hi	LBB0_11
	b	LBB0_18
LBB0_14:
	bl	_random
	mul	w0, w0, w20
	mov	x8, x20
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x19, w0, sxtw #2]
	fcmp	s0, #0.0
	b.ge	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	add	w9, w0, #1
	sdiv	w10, w9, w20
	msub	w0, w10, w20, w9
	subs	w8, w8, #1
	b.ne	LBB0_15
LBB0_17:
	mov	w0, #0
LBB0_18:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #64               ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
