	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function optimize_model
LCPI0_0:
	.long	0x3c23d70a                      ## float 0.00999999977
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_1:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_optimize_model:                        ## @optimize_model
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -184(%rbp)                 ## 8-byte Spill
	movq	%rdx, -200(%rbp)                ## 8-byte Spill
	movq	%rsi, -136(%rbp)                ## 8-byte Spill
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%ecx, -116(%rbp)                ## 4-byte Spill
	movl	%ecx, %r14d
	leaq	-1(%r14), %rax
	movq	%rax, -192(%rbp)                ## 8-byte Spill
	movl	%r14d, %r15d
	andl	$3, %r15d
	andl	$-4, %r14d
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movl	$1, %esi
	xorl	%edx, %edx
	movl	$0, -104(%rbp)                  ## 4-byte Folded Spill
	movaps	%xmm1, -160(%rbp)               ## 16-byte Spill
	movaps	%xmm1, %xmm5
	movl	-116(%rbp), %ebx                ## 4-byte Reload
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movaps	-96(%rbp), %xmm1
	movaps	-80(%rbp), %xmm2
	movaps	-64(%rbp), %xmm3
	movq	-184(%rbp), %rax                ## 8-byte Reload
	movups	%xmm3, 32(%rax)
	movups	%xmm2, 16(%rax)
	movups	%xmm1, (%rax)
	movl	%edx, %eax
	movl	%edx, -104(%rbp)                ## 4-byte Spill
LBB0_21:                                ##   in Loop: Header=BB0_1 Depth=1
	incl	%edx
	cmpl	$200, %edx
	je	LBB0_22
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
                                        ##     Child Loop BB0_9 Depth 2
	movss	%xmm0, -124(%rbp)               ## 4-byte Spill
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movaps	-160(%rbp), %xmm1               ## 16-byte Reload
	movl	%esi, -100(%rbp)                ## 4-byte Spill
	testl	%esi, %esi
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movaps	%xmm5, %xmm1
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movaps	%xmm5, -176(%rbp)               ## 16-byte Spill
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	movq	(%rdi), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm1, -120(%rbp)               ## 4-byte Spill
	addss	%xmm1, %xmm0
	movss	%xmm0, (%rax)
	leaq	-96(%rbp), %r13
	movq	%r13, %rsi
	callq	_run_estimate_kernel
	movq	(%r12), %rcx
	movq	-200(%rbp), %rdi                ## 8-byte Reload
	movl	%ebx, %esi
	movq	%r13, %rdx
	callq	_compute_error
	testl	%ebx, %ebx
	jle	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rax
	cmpq	$3, -192(%rbp)                  ## 8-byte Folded Reload
	jae	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	movaps	LCPI0_1(%rip), %xmm4            ## xmm4 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	movaps	-176(%rbp), %xmm5               ## 16-byte Reload
	movl	-100(%rbp), %esi                ## 4-byte Reload
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	xorps	%xmm0, %xmm0
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	movaps	LCPI0_1(%rip), %xmm4            ## xmm4 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	movaps	-176(%rbp), %xmm5               ## 16-byte Reload
	movl	-100(%rbp), %esi                ## 4-byte Reload
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_1 Depth=1
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	movaps	LCPI0_1(%rip), %xmm4            ## xmm4 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	movaps	-176(%rbp), %xmm5               ## 16-byte Reload
	movl	-100(%rbp), %esi                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorps	%xmm1, %xmm1
	cvtsi2ssq	(%rax,%rcx,8), %xmm1
	xorps	%xmm2, %xmm2
	cvtsi2ssq	8(%rax,%rcx,8), %xmm2
	addss	%xmm0, %xmm1
	xorps	%xmm3, %xmm3
	cvtsi2ssq	16(%rax,%rcx,8), %xmm3
	addss	%xmm1, %xmm2
	xorps	%xmm0, %xmm0
	cvtsi2ssq	24(%rax,%rcx,8), %xmm0
	addss	%xmm2, %xmm3
	addss	%xmm3, %xmm0
	addq	$4, %rcx
	cmpq	%rcx, %r14
	jne	LBB0_13
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	testq	%r15, %r15
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	(%rax,%rcx,8), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorps	%xmm1, %xmm1
	cvtsi2ssq	(%rax,%rcx,8), %xmm1
	addss	%xmm1, %xmm0
	incq	%rcx
	cmpq	%rcx, %r15
	jne	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movss	-124(%rbp), %xmm2               ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm2
	ja	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_1 Depth=1
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movq	(%rax), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	subss	-120(%rbp), %xmm0               ## 4-byte Folded Reload
	movss	%xmm0, (%rax)
	movl	%edx, %eax
	subl	-104(%rbp), %eax                ## 4-byte Folded Reload
	cmpl	$4, %eax
	jg	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_1 Depth=1
	movaps	%xmm5, %xmm0
	xorps	%xmm4, %xmm0
	testl	%esi, %esi
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_1 Depth=1
	movaps	%xmm0, %xmm1
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_1 Depth=1
	movaps	-160(%rbp), %xmm1               ## 16-byte Reload
	xorps	%xmm4, %xmm1
	movaps	%xmm1, -160(%rbp)               ## 16-byte Spill
	movaps	%xmm5, %xmm1
LBB0_18:                                ##   in Loop: Header=BB0_1 Depth=1
	xorl	%esi, %esi
	ucomiss	%xmm5, %xmm0
	ja	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %esi
LBB0_20:                                ##   in Loop: Header=BB0_1 Depth=1
	movaps	%xmm2, %xmm0
	movaps	%xmm1, %xmm5
	jmp	LBB0_21
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_optimize_model
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function optimize_model
_optimize_model:                        ; @optimize_model
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	d11, d10, [sp, #64]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #80]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x19, x4
	mov	x20, x3
	mov	x21, x2
	fmov	s8, s0
	mov	x22, x1
	mov	x23, x0
	mov	w24, #0
	mov	w27, #0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	mov	w25, w3
	mov	w26, #1
	mov	w8, #55050
	movk	w8, #15395, lsl #16
	fmov	s9, w8
	mov	w28, #1
	fmov	s10, s9
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldur	q1, [sp, #8]
	ldur	q2, [sp, #24]
	stp	q1, q2, [x19]
	ldur	q1, [sp, #40]
	str	q1, [x19, #32]
	mov	x27, x24
	fmov	s8, s0
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w24, #1
	cmp	w24, #200
	b.eq	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	x8, [x22]
	ldr	s0, [x8]
	cmp	w28, #0
	fcsel	s11, s9, s10, eq
	fadd	s0, s11, s0
	str	s0, [x8]
	add	x1, sp, #8
	mov	x0, x22
	bl	_run_estimate_kernel
	ldr	x3, [x23]
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x20
	bl	_compute_error
	cmp	w20, #1
	b.lt	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23]
	movi	d0, #0000000000000000
	mov	x9, x25
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x10, [x8], #8
	scvtf	s1, x10
	fadd	s0, s0, s1
	subs	x9, x9, #1
	b.ne	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	fcmp	s0, s8
	b.mi	LBB0_1
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	movi	d0, #0000000000000000
	fcmp	s0, s8
	b.mi	LBB0_1
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	ldr	s0, [x8]
	fsub	s0, s0, s11
	str	s0, [x8]
	sub	w8, w24, w27
	cmp	w8, #4
	b.gt	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	fneg	s0, s10
	fneg	s1, s9
	cmp	w28, #0
	fcsel	s0, s10, s0, eq
	fcsel	s9, s1, s9, eq
	fcmp	s10, #0.0
	csel	w28, wzr, w26, mi
	fmov	s10, s0
	b	LBB0_2
LBB0_10:
	ldr	x8, [sp, #56]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #80]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_optimize_model
.subsections_via_symbols
