	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_compute_bitmap_pages           ## -- Begin function compute_bitmap_pages
	.p2align	4, 0x90
_compute_bitmap_pages:                  ## @compute_bitmap_pages
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r14d
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r12
	leaq	-60(%rbp), %rsi
	leaq	-96(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_cost_bitmap_tree_node
	movsd	-96(%rbp), %xmm0                ## xmm0 = mem[0],zero
	mulsd	(%r13), %xmm0
	callq	_clamp_row_est
	movapd	%xmm0, %xmm1
	movl	8(%r13), %edi
	cmpl	$2, %edi
	movl	$1, %eax
	cmovgel	%edi, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	movapd	%xmm0, -128(%rbp)               ## 16-byte Spill
	movapd	%xmm0, %xmm2
	addsd	%xmm0, %xmm2
	movapd	%xmm1, %xmm0
	mulsd	%xmm2, %xmm0
	movsd	%xmm1, -56(%rbp)                ## 8-byte Spill
	addsd	%xmm1, %xmm2
	divsd	%xmm2, %xmm0
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	callq	_Min
	movsd	%xmm0, -88(%rbp)                ## 8-byte Spill
	movq	_work_mem@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	shlq	$10, %rdi
	callq	_tbm_calculate_entries
	movq	%rax, %r15
	cmpl	$2, %r14d
	jl	LBB0_2
## %bb.1:
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14d, %xmm0
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movsd	-56(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	movsd	%xmm1, -104(%rbp)               ## 8-byte Spill
	movl	8(%r13), %r14d
	movq	%rbx, %rdi
	callq	_get_indexpath_pages
	movsd	-104(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movl	%r14d, %edi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_index_pages_fetched
	divsd	-48(%rbp), %xmm0                ## 8-byte Folded Reload
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
LBB0_2:
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r15, %xmm0
	movsd	-88(%rbp), %xmm1                ## 8-byte Reload
                                        ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_3
## %bb.4:
	movapd	%xmm1, %xmm0
	movq	%r15, %rax
	shrq	$63, %rax
	addq	%r15, %rax
	sarq	%rax
	xorps	%xmm1, %xmm1
	cvtsi2sd	%rax, %xmm1
	subsd	%xmm1, %xmm0
	xorl	%edi, %edi
	callq	_Max
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jbe	LBB0_6
## %bb.5:
	movsd	-88(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	movapd	%xmm3, %xmm1
	subsd	%xmm0, %xmm1
	divsd	%xmm3, %xmm1
	mulsd	-96(%rbp), %xmm1
	movsd	(%r13), %xmm2                   ## xmm2 = mem[0],zero
	divsd	%xmm3, %xmm0
	mulsd	%xmm2, %xmm0
	mulsd	%xmm2, %xmm1
	addsd	%xmm0, %xmm1
	movapd	%xmm1, %xmm0
	callq	_clamp_row_est
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	jmp	LBB0_6
LBB0_3:
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
LBB0_6:
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.7:
	movl	-60(%rbp), %eax
	movl	%eax, (%rbx)
LBB0_8:
	testq	%r14, %r14
	je	LBB0_10
## %bb.9:
	movsd	-56(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	%xmm0, (%r14)
LBB0_10:
	movsd	-48(%rbp), %xmm3                ## 8-byte Reload
                                        ## xmm3 = mem[0],zero
	xorps	%xmm1, %xmm1
	roundsd	$10, %xmm3, %xmm1
	movapd	-128(%rbp), %xmm2               ## 16-byte Reload
	movapd	%xmm2, %xmm0
	cmpnlesd	%xmm3, %xmm0
	andpd	%xmm0, %xmm1
	andnpd	%xmm2, %xmm0
	orpd	%xmm1, %xmm0
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_work_mem,8,3                   ## @work_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_compute_bitmap_pages           ; -- Begin function compute_bitmap_pages
	.p2align	2
_compute_bitmap_pages:                  ; @compute_bitmap_pages
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d13, d12, [sp, #16]             ; 16-byte Folded Spill
	stp	d11, d10, [sp, #32]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #48]               ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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 b8, -88
	.cfi_offset b9, -96
	.cfi_offset b10, -104
	.cfi_offset b11, -112
	.cfi_offset b12, -120
	.cfi_offset b13, -128
	mov	x19, x5
	mov	x20, x4
	mov	x24, x3
	mov	x23, x2
	mov	x21, x1
	mov	x22, x0
	add	x1, sp, #12
	mov	x2, sp
	mov	x0, x23
	bl	_cost_bitmap_tree_node
	ldr	d0, [sp]
	ldr	d1, [x21]
	fmul	d0, d0, d1
	bl	_clamp_row_est
	fmov	d8, d0
	ldr	w0, [x21, #8]
	cmp	w0, #1
	csinc	w8, w0, wzr, gt
	scvtf	d11, w8
	fadd	d0, d11, d11
	fmul	d0, d8, d0
	fmov	d1, #2.00000000
	fmadd	d1, d11, d1, d8
	fdiv	d9, d0, d1
	fmov	d0, d9
	bl	_Min
	fmov	d10, d0
Lloh0:
	adrp	x8, _work_mem@GOTPAGE
Lloh1:
	ldr	x8, [x8, _work_mem@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	lsl	x0, x8, #10
	bl	_tbm_calculate_entries
	mov	x25, x0
	cmp	w24, #2
	b.lt	LBB0_2
; %bb.1:
	scvtf	d12, w24
	fmul	d9, d8, d12
	ldr	w24, [x21, #8]
	mov	x0, x23
	bl	_get_indexpath_pages
	mov	x1, x0
	fmov	d0, d9
	mov	x0, x24
	mov	x2, x22
	bl	_index_pages_fetched
	fdiv	d9, d0, d12
LBB0_2:
	scvtf	d0, x25
	fcmp	d10, d0
	b.le	LBB0_5
; %bb.3:
	cmp	x25, #0
	cinc	x8, x25, lt
	asr	x8, x8, #1
	scvtf	d0, x8
	fsub	d0, d10, d0
	mov	w0, #0
	bl	_Max
	fcmp	d0, #0.0
	b.le	LBB0_5
; %bb.4:
	fsub	d1, d10, d0
	ldr	d2, [sp]
	fdiv	d1, d1, d10
	fmul	d1, d1, d2
	ldr	d2, [x21]
	fdiv	d0, d0, d10
	fmul	d0, d0, d2
	fmadd	d0, d1, d2, d0
	bl	_clamp_row_est
	fmov	d8, d0
LBB0_5:
	cbz	x20, LBB0_7
; %bb.6:
	ldr	w8, [sp, #12]
	str	w8, [x20]
LBB0_7:
	cbz	x19, LBB0_9
; %bb.8:
	str	d8, [x19]
LBB0_9:
	frintp	d0, d9
	fcmp	d9, d11
	fcsel	d0, d0, d11, lt
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #32]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_work_mem,8,3                   ; @work_mem
.subsections_via_symbols
