	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function whereSortingCost
_whereSortingCost:                      ## @whereSortingCost
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r14
	testl	%edx, %edx
	jle	LBB0_1
## %bb.2:
	movl	$100, %edi
	callq	_sqlite3LogEst
	xorl	%edi, %edi
	cmpl	$66, %eax
	sete	%dil
	jmp	LBB0_3
LBB0_1:
	xorl	%edi, %edi
LBB0_3:
	callq	_assert
	movl	%ebx, %eax
	subl	%r12d, %eax
	imull	$100, %eax, %eax
	cltd
	idivl	%ebx
	movl	%eax, %edi
	callq	_sqlite3LogEst
	movq	_WHERE_USE_LIMIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r15, %rdi
	testl	%ecx, (%r14)
	je	LBB0_5
## %bb.4:
	movq	8(%r14), %rdi
	cmpq	%r15, %rdi
	cmovgeq	%r15, %rdi
LBB0_5:
	movslq	%eax, %rbx
	addq	%r15, %rbx
	callq	_estLog
	addq	%rbx, %rax
	addq	$-50, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WHERE_USE_LIMIT,4,2            ## @WHERE_USE_LIMIT
	.no_dead_strip	_whereSortingCost
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function whereSortingCost
_whereSortingCost:                      ; @whereSortingCost
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	cmp	w2, #1
	b.lt	LBB0_2
; %bb.1:
	mov	w0, #100
	bl	_sqlite3LogEst
	cmp	w0, #66
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	bl	_assert
	sub	w8, w21, w22
	mov	w9, #100
	mul	w8, w8, w9
	sdiv	w0, w8, w21
	bl	_sqlite3LogEst
	ldr	w9, [x20]
Lloh0:
	adrp	x8, _WHERE_USE_LIMIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WHERE_USE_LIMIT@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x8]
	mov	x8, x19
	tst	w10, w9
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x20, #8]
	cmp	x8, x19
	csel	x8, x8, x19, lt
LBB0_5:
	sub	w20, w0, #66
	mov	x0, x8
	bl	_estLog
	add	x8, x19, w20, sxtw
	add	x8, x8, x0
	add	x0, x8, #16
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WHERE_USE_LIMIT,4,2            ; @WHERE_USE_LIMIT
	.no_dead_strip	_whereSortingCost
.subsections_via_symbols
