	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function find_best_state
LCPI0_0:
	.quad	0x3f70000000000000              ## double 0.00390625
LCPI0_1:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_find_best_state:                       ## @find_best_state
	.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
	pushq	%rax
	movl	$8248, %eax                     ## imm = 0x2038
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, -8280(%rbp)               ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14d, %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %edi
	callq	_log2
	movsd	%xmm0, -2096(%rbp,%r14,8)
	incq	%r14
	cmpq	$256, %r14                      ## imm = 0x100
	jne	LBB0_1
## %bb.2:
	leaq	2040(%rbx), %r14
	xorl	%r12d, %r12d
	leaq	-8240(%rbp), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-8264(%rbp), %r12               ## 8-byte Reload
	incq	%r12
	cmpq	$256, %r12                      ## imm = 0x100
	je	LBB0_20
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_7 Depth 3
                                        ##         Child Loop BB0_8 Depth 4
                                        ##         Child Loop BB0_14 Depth 4
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r12d, %xmm0
	movsd	%xmm0, -8248(%rbp)              ## 8-byte Spill
	movl	$2048, %edx                     ## imm = 0x800
	leaq	-4144(%rbp), %rdi
	leaq	L_.memset_pattern(%rip), %rsi
	callq	_memset_pattern16
	movsd	-8248(%rbp), %xmm0              ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	mulsd	LCPI0_0(%rip), %xmm0
	movsd	%xmm0, -8248(%rbp)              ## 8-byte Spill
	leal	-10(%r12), %edi
	movl	$1, %esi
	callq	_FFMAX
	movl	%eax, %r13d
	movq	%r12, -8264(%rbp)               ## 8-byte Spill
	leal	11(%r12), %edi
	movl	%edi, -8252(%rbp)               ## 4-byte Spill
	movl	$256, %esi                      ## imm = 0x100
	callq	_FFMIN
	cmpl	%eax, %r13d
	jge	LBB0_19
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movsd	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero
	subsd	-8248(%rbp), %xmm0              ## 8-byte Folded Reload
	movsd	%xmm0, -8288(%rbp)              ## 8-byte Spill
	movslq	%r13d, %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=2
	incq	%r12
	movl	-8252(%rbp), %edi               ## 4-byte Reload
	movl	$256, %esi                      ## imm = 0x100
	callq	_FFMIN
	cltq
	cmpq	%rax, %r12
	jge	LBB0_19
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_7 Depth 3
                                        ##         Child Loop BB0_8 Depth 4
                                        ##         Child Loop BB0_14 Depth 4
	movl	$2048, %esi                     ## imm = 0x800
	leaq	-6192(%rbp), %rdi
	callq	___bzero
	movabsq	$4607182418800017408, %rax      ## imm = 0x3FF0000000000000
	movq	%rax, -6192(%rbp,%r12,8)
	cmpq	$0, (%rbx,%r12,8)
	je	LBB0_18
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	xorpd	%xmm0, %xmm0
	movsd	%xmm0, -8272(%rbp)              ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=3
	leaq	-6192(%rbp), %rdi
	movq	%r15, %rsi
	movl	$2048, %edx                     ## imm = 0x800
	callq	_memcpy
	incq	%r13
	cmpq	$256, %r13                      ## imm = 0x100
	je	LBB0_18
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_8 Depth 4
                                        ##         Child Loop BB0_14 Depth 4
	movl	$2048, %esi                     ## imm = 0x800
	movq	%r15, %rdi
	callq	___bzero
	movl	$1, %eax
	leaq	-56(%rbp), %rcx
	xorpd	%xmm3, %xmm3
	movsd	-8248(%rbp), %xmm4              ## 8-byte Reload
                                        ## xmm4 = mem[0],zero
	movsd	-8288(%rbp), %xmm5              ## 8-byte Reload
                                        ## xmm5 = mem[0],zero
	movsd	-8272(%rbp), %xmm6              ## 8-byte Reload
                                        ## xmm6 = mem[0],zero
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=4
	incq	%rax
	addq	$-8, %rcx
	cmpq	$256, %rax                      ## imm = 0x100
	je	LBB0_11
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ##       Parent Loop BB0_7 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movsd	-6192(%rbp,%rax,8), %xmm0       ## xmm0 = mem[0],zero
	ucomisd	%xmm3, %xmm0
	jne	LBB0_9
	jnp	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_8 Depth=4
	movsd	(%rcx), %xmm1                   ## xmm1 = mem[0],zero
	mulsd	%xmm5, %xmm1
	movsd	-2096(%rbp,%rax,8), %xmm2       ## xmm2 = mem[0],zero
	mulsd	%xmm4, %xmm2
	addsd	%xmm1, %xmm2
	mulsd	%xmm2, %xmm0
	subsd	%xmm0, %xmm6
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=3
	movsd	-4144(%rbp,%r13,8), %xmm0       ## xmm0 = mem[0],zero
	ucomisd	%xmm6, %xmm0
	jbe	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=3
	movsd	%xmm6, -4144(%rbp,%r13,8)
	movq	-8264(%rbp), %rax               ## 8-byte Reload
	shlq	$11, %rax
	addq	-8280(%rbp), %rax               ## 8-byte Folded Reload
	movq	%r12, (%rax,%r13,8)
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=3
	movsd	%xmm6, -8272(%rbp)              ## 8-byte Spill
	movl	$1, %eax
	movq	%r14, %rcx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=4
	incq	%rax
	addq	$-8, %rcx
	cmpq	$256, %rax                      ## imm = 0x100
	je	LBB0_17
LBB0_14:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ##       Parent Loop BB0_7 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movsd	-6192(%rbp,%rax,8), %xmm0       ## xmm0 = mem[0],zero
	ucomisd	%xmm3, %xmm0
	jne	LBB0_15
	jnp	LBB0_16
LBB0_15:                                ##   in Loop: Header=BB0_14 Depth=4
	movq	(%rbx,%rax,8), %rdx
	movapd	%xmm0, %xmm1
	mulsd	%xmm4, %xmm1
	addsd	-8240(%rbp,%rdx,8), %xmm1
	movsd	%xmm1, -8240(%rbp,%rdx,8)
	movl	$256, %edx                      ## imm = 0x100
	subq	(%rcx), %rdx
	mulsd	%xmm5, %xmm0
	addsd	-8240(%rbp,%rdx,8), %xmm0
	movsd	%xmm0, -8240(%rbp,%rdx,8)
	jmp	LBB0_16
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	addq	$8248, %rsp                     ## imm = 0x2038
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @.memset_pattern
L_.memset_pattern:
	.quad	0x41d0000000000000              ## double 1073741824
	.quad	0x41d0000000000000              ## double 1073741824

	.no_dead_strip	_find_best_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_best_state
_find_best_state:                       ; @find_best_state
	.cfi_startproc
; %bb.0:
	stp	d11, d10, [sp, #-128]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	mov	w9, #8224
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #2, lsl #12             ; =8192
	sub	sp, sp, #32
	mov	x19, x1
	mov	x20, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-128]
	mov	w21, #1
	mov	x22, #4571153621781053440
	add	x23, sp, #1, lsl #12            ; =4096
	add	x23, x23, #2064
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	scvtf	d0, w21
	fmov	d1, x22
	fmul	d0, d0, d1
	fcvtzs	w0, d0
	bl	_log2
	str	d0, [x23, x21, lsl #3]
	add	x21, x21, #1
	cmp	x21, #256
	b.ne	LBB0_1
; %bb.2:
	mov	x24, #0
	add	x25, sp, #1, lsl #12            ; =4096
	add	x25, x25, #16
	mov	w27, #256
	fmov	d8, #1.00000000
	add	x28, sp, #2064
	add	x21, sp, #16
	add	x26, sp, #1, lsl #12            ; =4096
	add	x26, x26, #2064
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	cmp	x24, #256
	b.eq	LBB0_20
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;         Child Loop BB0_12 Depth 4
                                        ;         Child Loop BB0_18 Depth 4
	add	x0, sp, #1, lsl #12             ; =4096
	add	x0, x0, #16
Lloh5:
	adrp	x1, l_.memset_pattern@PAGE
Lloh6:
	add	x1, x1, l_.memset_pattern@PAGEOFF
	mov	w2, #2048
	bl	_memset_pattern16
	sub	w0, w24, #10
	mov	w1, #1
	bl	_FFMAX
	mov	x23, x0
	add	w0, w24, #11
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	mov	w1, #256
	bl	_FFMIN
	cmp	w23, w0
	b.ge	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	scvtf	d0, w24
	mov	x8, #4571153621781053440
	fmov	d1, x8
	fmul	d9, d0, d1
	fsub	d10, d8, d9
	sxtw	x23, w23
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x23, x23, #1
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	mov	w1, #256
	bl	_FFMIN
	cmp	x23, w0, sxtw
	b.ge	LBB0_3
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
                                        ;         Child Loop BB0_12 Depth 4
                                        ;         Child Loop BB0_18 Depth 4
	add	x0, sp, #2064
	mov	w1, #2048
	bl	_bzero
	lsl	x8, x23, #3
	mov	x9, #4607182418800017408
	str	x9, [x28, x8]
	ldr	x8, [x19, x8]
	cbz	x8, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x22, #0
	movi	d11, #0000000000000000
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=3
	add	x0, sp, #2064
	add	x1, sp, #16
	mov	w2, #2048
	bl	_memcpy
	add	x22, x22, #1
	cmp	x22, #256
	b.eq	LBB0_6
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_12 Depth 4
                                        ;         Child Loop BB0_18 Depth 4
	add	x0, sp, #16
	mov	w1, #2048
	bl	_bzero
	mov	w8, #8
	mov	w9, #2040
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=4
	add	x8, x8, #8
	subs	x9, x9, #8
	b.eq	LBB0_14
LBB0_12:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ;       Parent Loop BB0_10 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldr	d0, [x28, x8]
	fcmp	d0, #0.0
	b.eq	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=4
	ldr	d1, [x26, x8]
	ldr	d2, [x26, x9]
	fmul	d2, d10, d2
	fmadd	d1, d9, d1, d2
	fmsub	d11, d0, d1, d11
	b	LBB0_11
LBB0_14:                                ;   in Loop: Header=BB0_10 Depth=3
	ldr	d0, [x25, x22, lsl #3]
	fcmp	d11, d0
	b.pl	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_10 Depth=3
	lsl	x8, x22, #3
	str	d11, [x25, x8]
	add	x9, x20, x24, lsl #11
	str	x23, [x9, x8]
LBB0_16:                                ;   in Loop: Header=BB0_10 Depth=3
	mov	w8, #8
	mov	w9, #2040
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=4
	add	x8, x8, #8
	subs	x9, x9, #8
	b.eq	LBB0_9
LBB0_18:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ;       Parent Loop BB0_10 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldr	d0, [x28, x8]
	fcmp	d0, #0.0
	b.eq	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=4
	ldr	x10, [x19, x8]
	lsl	x10, x10, #3
	ldr	d1, [x21, x10]
	fmadd	d1, d0, d9, d1
	str	d1, [x21, x10]
	ldr	x10, [x19, x9]
	sub	x10, x27, x10
	lsl	x10, x10, #3
	ldr	d1, [x21, x10]
	fmadd	d0, d0, d10, d1
	str	d0, [x21, x10]
	b	LBB0_17
LBB0_20:
	ldur	x8, [x29, #-128]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	add	sp, sp, #2, lsl #12             ; =8192
	add	sp, sp, #32
	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
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp], #128            ; 16-byte Folded Reload
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; @.memset_pattern
l_.memset_pattern:
	.quad	0x41d0000000000000              ; double 1073741824
	.quad	0x41d0000000000000              ; double 1073741824

	.no_dead_strip	_find_best_state
.subsections_via_symbols
