	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function minimize_error
_minimize_error:                        ## @minimize_error
	.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	$200, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -224(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r12d
	movq	%rdx, -216(%rbp)                ## 8-byte Spill
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_FLT_MAX@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -172(%rbp)               ## 4-byte Spill
	movl	%r9d, -188(%rbp)                ## 4-byte Spill
	testl	%r9d, %r9d
	movq	%rdi, -200(%rbp)                ## 8-byte Spill
	jle	LBB0_15
## %bb.1:
	leaq	8(%rdi), %rax
	movq	%rax, -240(%rbp)                ## 8-byte Spill
	movl	%r12d, %r14d
	leaq	-1(%r14), %rax
	movq	%rax, -232(%rbp)                ## 8-byte Spill
	movl	%r14d, %r13d
	andl	$3, %r13d
	andl	$-4, %r14d
	xorl	%eax, %eax
	leaq	-156(%rbp), %rbx
	movq	%r15, -184(%rbp)                ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-208(%rbp), %rax                ## 8-byte Reload
	incl	%eax
	cmpl	-188(%rbp), %eax                ## 4-byte Folded Reload
	leaq	-156(%rbp), %rbx
	je	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
	movq	%rax, -208(%rbp)                ## 8-byte Spill
	movq	-240(%rbp), %rdi                ## 8-byte Reload
	movq	%r15, %rsi
	movl	%r12d, %edx
	movq	%rbx, %rcx
	movl	$10000, %r8d                    ## imm = 0x2710
	callq	_get_subset
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	leaq	-144(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_run_estimate_kernel
	movq	%r15, %rdi
	movq	-200(%rbp), %r15                ## 8-byte Reload
	movq	(%r15), %rcx
	movl	%r12d, %esi
	movq	%rbx, %rdx
	callq	_compute_error
	testl	%r12d, %r12d
	jle	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	cmpq	$3, -232(%rbp)                  ## 8-byte Folded Reload
	jae	LBB0_18
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
	movq	-184(%rbp), %r15                ## 8-byte Reload
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorps	%xmm0, %xmm0
	movq	-184(%rbp), %r15                ## 8-byte Reload
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	xorps	%xmm0, %xmm0
	xorl	%ecx, %ecx
	movq	-184(%rbp), %r15                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_2 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_19
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%r13, %r13
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rax,%rcx,8), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorps	%xmm1, %xmm1
	cvtsi2ssq	(%rax,%rcx,8), %xmm1
	addss	%xmm1, %xmm0
	incq	%rcx
	cmpq	%rcx, %r13
	jne	LBB0_11
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movss	-172(%rbp), %xmm1               ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jbe	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movaps	-144(%rbp), %xmm1
	movaps	-128(%rbp), %xmm2
	movaps	-112(%rbp), %xmm3
	movaps	%xmm3, -64(%rbp)
	movaps	%xmm2, -80(%rbp)
	movaps	%xmm1, -96(%rbp)
	movq	-156(%rbp), %rax
	movq	%rax, -168(%rbp)
	movl	-148(%rbp), %eax
	movl	%eax, -160(%rbp)
	movss	%xmm0, -172(%rbp)               ## 4-byte Spill
	jmp	LBB0_14
LBB0_3:
	cmpl	$0, -208(%rbp)                  ## 4-byte Folded Reload
	je	LBB0_4
LBB0_15:
	movaps	-96(%rbp), %xmm0
	movaps	-80(%rbp), %xmm1
	movaps	-64(%rbp), %xmm2
	movq	-224(%rbp), %r8                 ## 8-byte Reload
	movups	%xmm2, 32(%r8)
	movups	%xmm1, 16(%r8)
	movups	%xmm0, (%r8)
	movq	-216(%rbp), %rdx                ## 8-byte Reload
	movq	8(%rdx), %rax
	movl	-168(%rbp), %ecx
	movl	%ecx, (%rax)
	movl	-164(%rbp), %ecx
	movl	%ecx, 4(%rax)
	movl	-160(%rbp), %ecx
	movl	%ecx, 8(%rax)
	movl	$3, (%rdx)
	leaq	-168(%rbp), %rsi
	movq	-200(%rbp), %rdi                ## 8-byte Reload
	movq	%r15, %rdx
	movl	%r12d, %ecx
	movss	-172(%rbp), %xmm0               ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	callq	_optimize_model
	movl	$1, %eax
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.20:
	addq	$200, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FLT_MAX,4,2                    ## @FLT_MAX
	.no_dead_strip	_minimize_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function minimize_error
_minimize_error:                        ; @minimize_error
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #256
	.cfi_def_cfa_offset 256
	stp	d9, d8, [sp, #144]              ; 16-byte Folded Spill
	stp	x28, x27, [sp, #160]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #176]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #192]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #208]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #224]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #240]            ; 16-byte Folded Spill
	add	x29, sp, #240
	.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
	mov	x19, x4
	mov	x20, x3
	mov	x23, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-104]
Lloh3:
	adrp	x8, _FLT_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FLT_MAX@GOTPAGEOFF]
Lloh5:
	ldr	s8, [x8]
	cmp	w5, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x24, x5
	mov	w26, #0
	add	x25, x22, #8
	mov	w27, w20
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w26, w26, #1
	cmp	w26, w24
	b.eq	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	add	x3, sp, #20
	mov	x0, x25
	mov	x1, x21
	mov	x2, x20
	mov	w4, #10000
	bl	_get_subset
	cbz	w0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #20
	add	x1, sp, #32
	bl	_run_estimate_kernel
	ldr	x3, [x22]
	add	x2, sp, #32
	mov	x0, x21
	mov	x1, x20
	bl	_compute_error
	cmp	w20, #1
	b.lt	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x22]
	movi	d0, #0000000000000000
	mov	x9, x27
LBB0_6:                                 ;   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_6
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	fcmp	s0, s8
	b.pl	LBB0_2
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	movi	d0, #0000000000000000
	fcmp	s0, s8
	b.pl	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	q1, q2, [sp, #32]
	stp	q1, q2, [sp, #80]
	ldr	q1, [sp, #64]
	str	q1, [sp, #112]
	ldur	x8, [sp, #20]
	str	x8, [sp, #8]
	ldr	w8, [sp, #28]
	str	w8, [sp, #16]
	fmov	s8, s0
	b	LBB0_2
LBB0_10:
	cbz	w26, LBB0_14
LBB0_11:
	ldr	q2, [sp, #112]
	ldp	q1, q0, [sp, #80]
	stp	q0, q2, [x19, #16]
	str	q1, [x19]
	ldr	x8, [x23, #8]
	ldr	w9, [sp, #8]
	str	w9, [x8]
	ldr	w9, [sp, #12]
	str	w9, [x8, #4]
	ldr	w9, [sp, #16]
	str	w9, [x8, #8]
	mov	w8, #3
	str	w8, [x23]
	add	x1, sp, #8
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	fmov	s0, s8
	mov	x4, x19
	bl	_optimize_model
	mov	w0, #1
LBB0_12:
	ldur	x8, [x29, #-104]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.13:
	ldp	x29, x30, [sp, #240]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #224]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #208]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #192]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #176]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #160]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #144]              ; 16-byte Folded Reload
	add	sp, sp, #256
	ret
LBB0_14:
	mov	w0, #0
	b	LBB0_12
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_FLT_MAX,4,2                    ; @FLT_MAX
	.no_dead_strip	_minimize_error
.subsections_via_symbols
