	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_next_box_id_to_split
_get_next_box_id_to_split:              ## @get_next_box_id_to_split
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %r8d
	movl	4(%rdi), %ecx
	subl	8(%rdi), %ecx
	movl	$-1, %eax
	cmpl	%ecx, %r8d
	je	LBB0_11
## %bb.1:
	testl	%r8d, %r8d
	jle	LBB0_11
## %bb.2:
	movq	%rdi, %r15
	movl	$-1, %r9d
	xorl	%esi, %esi
	movl	$-1, %eax
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$-1, (%rbx)
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%rsi
	movslq	%r8d, %rcx
	cmpq	%rcx, %rsi
	jge	LBB0_11
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	24(%r15), %rcx
	movq	%rsi, %rdx
	shlq	$4, %rdx
	cmpl	$2, (%rcx,%rdx)
	leaq	4(%rcx,%rdx), %rbx
	jl	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %r14d
	cmpl	$-1, %r14d
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	leaq	(%rcx,%rdx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rcx,%rdx), %r13
	addq	$8, %r13
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r15), %rax
	movslq	(%r13), %rcx
	addq	%r12, %rcx
	movq	(%rax,%rcx,8), %rbx
	movl	4(%rbx), %edi
	movl	4(%r13), %esi
	callq	_diff
	imull	(%rbx), %eax
	addl	%eax, %r14d
	incq	%r12
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%rax), %r12d
	jl	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %r8d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, (%rax)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r9d, %r14d
	cmovgl	%esi, %eax
	cmovgl	%r14d, %r9d
	jmp	LBB0_10
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_get_next_box_id_to_split
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_next_box_id_to_split
_get_next_box_id_to_split:              ; @get_next_box_id_to_split
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x0
	ldp	w8, w9, [x0]
	ldr	w10, [x0, #8]
	mov	w11, #-1
	sub	w9, w9, w10
	cmp	w8, w9
	ccmp	w8, #1, #8, ne
	mov	w0, #-1
	b.ge	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_2:
	mov	x22, #0
	mov	w23, #-1
	mov	w0, #-1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	w11, [x25]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_1
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x9, [x19, #24]
	add	x26, x9, x22, lsl #4
	mov	x25, x26
	ldr	w10, [x25], #4
	cmp	w10, #2
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w24, [x25]
	cmn	w24, #1
	b.ne	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	mov	x27, #0
	mov	w24, #0
	add	x8, x9, x22, lsl #4
	add	x28, x8, #8
	add	x21, x8, #12
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #16]
	ldrsw	x9, [x28]
	add	x9, x27, x9
	ldr	x20, [x8, x9, lsl #3]
	ldr	w0, [x20, #4]
	ldr	w1, [x21]
	bl	_diff
	ldr	w8, [x20]
	madd	w24, w8, w0, w24
	ldr	w8, [x26]
	add	x27, x27, #1
	cmp	w27, w8
	b.lt	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19]
	str	w24, [x25]
	mov	w11, #-1
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w24, w23
	csel	w0, w22, w0, gt
	csel	w23, w24, w23, gt
	b	LBB0_4
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_get_next_box_id_to_split
.subsections_via_symbols
