	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _bt_bestsplitloc
__bt_bestsplitloc:                      ## @_bt_bestsplitloc
	.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
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movl	20(%rdi), %esi
	movl	24(%rdi), %edi
	callq	_Min
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%eax, %eax
	shlq	$4, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rsi
	addq	%r12, %rsi
	movq	%r13, %rdi
	callq	__bt_split_penalty
	cmpl	-52(%rbp), %eax                 ## 4-byte Folded Reload
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%ebx, %eax
	cmovll	%eax, %ebx
	cmovll	%r15d, %r14d
	incl	%r15d
	addq	$16, %r12
	cmpq	%r12, -72(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_2
	jmp	LBB0_6
LBB0_4:
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_5:
	movl	%r15d, %r14d
LBB0_6:
	movq	8(%r13), %rcx
	movslq	%r14d, %rdx
	shlq	$4, %rdx
	leaq	(%rcx,%rdx), %rax
	movq	_SPLIT_MANY_DUPLICATES@GOTPCREL(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	cmpq	%rdi, (%rsi)
	jne	LBB0_9
## %bb.7:
	cmpl	$0, 16(%r13)
	jne	LBB0_9
## %bb.11:
	cmpl	$0, (%rax)
	je	LBB0_13
LBB0_9:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_10:
	movl	(%rax), %ecx
	movl	%ecx, (%rbx)
	movq	8(%rax), %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	8(%rcx,%rdx), %rdx
	movq	(%r13), %rsi
	cmpq	%rsi, %rdx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jl	LBB0_10
## %bb.14:
	movq	_MAX_LEAF_INTERVAL@GOTPCREL(%rip), %rdi
	addq	(%rdi), %rsi
	cmpq	%rsi, %rdx
	cmovlq	%rcx, %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_SPLIT_MANY_DUPLICATES,8,3      ## @SPLIT_MANY_DUPLICATES
	.comm	_MAX_LEAF_INTERVAL,8,3          ## @MAX_LEAF_INTERVAL
	.no_dead_strip	__bt_bestsplitloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _bt_bestsplitloc
__bt_bestsplitloc:                      ; @_bt_bestsplitloc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x3
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	ldr	w0, [x0, #24]
	ldr	w1, [x20, #20]
	bl	_Min
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x25, #0
	mov	w24, #0
	mov	w23, #0
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	mov	w8, w0
	lsl	x27, x8, #4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x1, x8, x25
	mov	x0, x20
	bl	__bt_split_penalty
	cmp	w0, w22
	b.le	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, w26
	csel	w26, w0, w26, lt
	csel	w23, w24, w23, lt
	add	w24, w24, #1
	add	x25, x25, #16
	cmp	x27, x25
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w23, #0
	b	LBB0_6
LBB0_5:
	mov	x23, x24
LBB0_6:
	ldr	x9, [x20, #8]
	add	x8, x9, w23, sxtw #4
Lloh3:
	adrp	x10, _SPLIT_MANY_DUPLICATES@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SPLIT_MANY_DUPLICATES@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x10, x21
	b.ne	LBB0_11
; %bb.7:
	ldr	w10, [x20, #16]
	cbnz	w10, LBB0_11
; %bb.8:
	ldr	w10, [x8]
	cbnz	w10, LBB0_11
; %bb.9:
	sxtw	x10, w23
	add	x10, x9, x10, lsl #4
	ldr	x10, [x10, #8]
	ldr	x11, [x20]
	cmp	x10, x11
	b.lt	LBB0_11
; %bb.10:
Lloh6:
	adrp	x12, _MAX_LEAF_INTERVAL@GOTPAGE
Lloh7:
	ldr	x12, [x12, _MAX_LEAF_INTERVAL@GOTPAGEOFF]
Lloh8:
	ldr	x12, [x12]
	add	x11, x12, x11
	cmp	x10, x11
	csel	x8, x9, x8, lt
LBB0_11:
	ldr	w9, [x8]
	str	w9, [x19]
	ldr	x0, [x8, #8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_SPLIT_MANY_DUPLICATES,8,3      ; @SPLIT_MANY_DUPLICATES
	.comm	_MAX_LEAF_INTERVAL,8,3          ; @MAX_LEAF_INTERVAL
	.no_dead_strip	__bt_bestsplitloc
.subsections_via_symbols
