	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edi, %edi
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	movl	%edi, %r14d
	movl	%edi, %eax
	leaq	-1(%rax), %rdx
	movl	%eax, %ecx
	andl	$3, %ecx
	cmpq	$3, %rdx
	jae	LBB0_4
## %bb.3:
	xorps	%xmm0, %xmm0
	xorl	%edx, %edx
	jmp	LBB0_6
LBB0_1:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_random
	jmp	LBB0_18
LBB0_4:
	movl	%eax, %esi
	andl	$-4, %esi
	xorps	%xmm1, %xmm1
	xorl	%edx, %edx
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%r15,%rdx,4), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	movss	4(%r15,%rdx,4), %xmm4           ## xmm4 = mem[0],zero,zero,zero
	movaps	%xmm3, %xmm5
	cmpless	%xmm1, %xmm5
	movaps	%xmm5, %xmm6
	andnps	%xmm3, %xmm6
	andps	%xmm2, %xmm5
	orps	%xmm6, %xmm5
	addss	%xmm0, %xmm5
	movaps	%xmm4, %xmm0
	cmpless	%xmm1, %xmm0
	movaps	%xmm0, %xmm3
	andnps	%xmm4, %xmm3
	andps	%xmm2, %xmm0
	orps	%xmm3, %xmm0
	addss	%xmm5, %xmm0
	movss	8(%r15,%rdx,4), %xmm3           ## xmm3 = mem[0],zero,zero,zero
	movaps	%xmm3, %xmm4
	cmpless	%xmm1, %xmm4
	movaps	%xmm4, %xmm5
	andnps	%xmm3, %xmm5
	andps	%xmm2, %xmm4
	orps	%xmm5, %xmm4
	addss	%xmm0, %xmm4
	movss	12(%r15,%rdx,4), %xmm3          ## xmm3 = mem[0],zero,zero,zero
	movaps	%xmm3, %xmm0
	cmpless	%xmm1, %xmm0
	movaps	%xmm0, %xmm5
	andnps	%xmm3, %xmm5
	andps	%xmm2, %xmm0
	orps	%xmm5, %xmm0
	addss	%xmm4, %xmm0
	addq	$4, %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_5
LBB0_6:
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.7:
	leaq	(%r15,%rdx,4), %rdx
	xorl	%esi, %esi
	xorps	%xmm1, %xmm1
	movss	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%rdx,%rsi,4), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	movaps	%xmm3, %xmm4
	cmpless	%xmm1, %xmm4
	movaps	%xmm4, %xmm5
	andnps	%xmm3, %xmm5
	andps	%xmm2, %xmm4
	orps	%xmm5, %xmm4
	addss	%xmm4, %xmm0
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_8
LBB0_9:
	xorps	%xmm2, %xmm2
	ucomiss	%xmm2, %xmm0
	jbe	LBB0_14
## %bb.10:
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%rbx
	cmpq	%rbx, %rax
	je	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movss	(%r15,%rbx,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm1, %xmm2
	ja	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	subss	%xmm1, %xmm0
	ucomiss	%xmm0, %xmm2
	jb	LBB0_13
	jmp	LBB0_18
LBB0_14:
	xorl	%eax, %eax
	callq	_random
	xorps	%xmm1, %xmm1
	movl	%eax, %ebx
	imull	%r14d, %ebx
	movl	%r14d, %ecx
	.p2align	4, 0x90
LBB0_15:                                ## =>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_18
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	incl	%ebx
	movl	%ebx, %eax
	cltd
	idivl	%r14d
	movl	%edx, %ebx
	decl	%ecx
	jne	LBB0_15
## %bb.17:
	xorl	%ebx, %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	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	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cmp	w0, #0
	b.le	LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	w8, w0
	cmp	w0, #16
	b.hs	LBB0_4
; %bb.2:
	mov	x9, #0
	movi	d0, #0000000000000000
	b	LBB0_7
LBB0_3:
	bl	_random
	b	LBB0_17
LBB0_4:
	and	x9, x8, #0xfffffff0
	add	x10, x19, #32
	movi	d0, #0000000000000000
	movi.4s	v1, #128, lsl #24
	mov	x11, x9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q2, q3, [x10, #-32]
	ldp	q4, q5, [x10], #64
	fcmle.4s	v6, v2, #0.0
	fcmle.4s	v7, v3, #0.0
	fcmle.4s	v16, v4, #0.0
	fcmle.4s	v17, v5, #0.0
	bit.16b	v2, v1, v6
	mov	s6, v2[3]
	mov	s18, v2[2]
	mov	s19, v2[1]
	bit.16b	v3, v1, v7
	mov	s7, v3[3]
	mov	s20, v3[2]
	mov	s21, v3[1]
	bit.16b	v4, v1, v16
	mov	s16, v4[3]
	mov	s22, v4[2]
	mov	s23, v4[1]
	bit.16b	v5, v1, v17
	mov	s17, v5[3]
	mov	s24, v5[2]
	mov	s25, v5[1]
	fadd	s0, s0, s2
	fadd	s0, s0, s19
	fadd	s0, s0, s18
	fadd	s0, s0, s6
	fadd	s0, s0, s3
	fadd	s0, s0, s21
	fadd	s0, s0, s20
	fadd	s0, s0, s7
	fadd	s0, s0, s4
	fadd	s0, s0, s23
	fadd	s0, s0, s22
	fadd	s0, s0, s16
	fadd	s0, s0, s5
	fadd	s0, s0, s25
	fadd	s0, s0, s24
	fadd	s0, s0, s17
	subs	x11, x11, #16
	b.ne	LBB0_5
; %bb.6:
	cmp	x9, x8
	b.eq	LBB0_9
LBB0_7:
	add	x10, x19, x9, lsl #2
	sub	x9, x8, x9
	movi.2s	v1, #128, lsl #24
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s2, [x10], #4
	fcmp	s2, #0.0
	fcsel	s2, s1, s2, ls
	fadd	s0, s0, s2
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_9:
	fcmp	s0, #0.0
	b.le	LBB0_14
; %bb.10:
	mov	x0, #0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x0, x0, #1
	cmp	x8, x0
	b.eq	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	s1, [x19, x0, lsl #2]
	fcmp	s1, #0.0
	b.mi	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	fsub	s0, s0, s1
	fcmp	s0, #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, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
