	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function malidp_mmu_prefetch_select_mode
_malidp_mmu_prefetch_select_mode:       ## @malidp_mmu_prefetch_select_mode
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	(%rsi), %ebx
	movq	_MALIDP_MMU_PREFETCH_FULL_PGSIZES@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%ebx, %r12d
	je	LBB0_5
## %bb.1:
	movq	_MALIDP_PREFETCH_MODE_FULL@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	callq	___fls
	movl	$1, %ebx
	movl	%eax, %ecx
	shll	%cl, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_malidp_check_pages_threshold
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	subl	%ebx, %r12d
	jne	LBB0_3
## %bb.4:
	movl	(%r14), %ebx
LBB0_5:
	movq	_MALIDP_MMU_PREFETCH_PARTIAL_PGSIZES@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	8(%r15), %rax
	movq	8(%rax), %rcx
	movl	(%rcx), %edi
	movl	(%rax), %esi
	movl	(%r15), %edx
	callq	_malidp_partial_prefetch_supported
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	andl	%ebx, %r12d
	movl	%r12d, %edi
	callq	___ffs
	movl	$1, %ebx
	movl	%eax, %ecx
	shll	%cl, %ebx
	movq	_MALIDP_PREFETCH_MODE_PARTIAL@GOTPCREL(%rip), %r13
	jmp	LBB0_8
LBB0_6:
	movq	_MALIDP_PREFETCH_MODE_NONE@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, (%r14)
	movl	(%r13), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MALIDP_MMU_PREFETCH_FULL_PGSIZES,4,2 ## @MALIDP_MMU_PREFETCH_FULL_PGSIZES
	.comm	_MALIDP_PREFETCH_MODE_FULL,4,2  ## @MALIDP_PREFETCH_MODE_FULL
	.comm	_MALIDP_MMU_PREFETCH_PARTIAL_PGSIZES,4,2 ## @MALIDP_MMU_PREFETCH_PARTIAL_PGSIZES
	.comm	_MALIDP_PREFETCH_MODE_PARTIAL,4,2 ## @MALIDP_PREFETCH_MODE_PARTIAL
	.comm	_MALIDP_PREFETCH_MODE_NONE,4,2  ## @MALIDP_PREFETCH_MODE_NONE
	.no_dead_strip	_malidp_mmu_prefetch_select_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function malidp_mmu_prefetch_select_mode
_malidp_mmu_prefetch_select_mode:       ; @malidp_mmu_prefetch_select_mode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w21, [x1]
Lloh0:
	adrp	x8, _MALIDP_MMU_PREFETCH_FULL_PGSIZES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MALIDP_MMU_PREFETCH_FULL_PGSIZES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ands	w22, w8, w21
	b.eq	LBB0_5
; %bb.1:
	mov	w24, #1
Lloh3:
	adrp	x23, _MALIDP_PREFETCH_MODE_FULL@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MALIDP_PREFETCH_MODE_FULL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	___fls
	lsl	w21, w24, w0
	mov	x0, x20
	mov	x1, x21
	bl	_malidp_check_pages_threshold
	cbnz	x0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	subs	w22, w22, w21
	b.ne	LBB0_2
; %bb.4:
	ldr	w21, [x19]
LBB0_5:
Lloh5:
	adrp	x8, _MALIDP_MMU_PREFETCH_PARTIAL_PGSIZES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MALIDP_MMU_PREFETCH_PARTIAL_PGSIZES@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	ldr	x8, [x20, #8]
	ldr	x9, [x8, #8]
	ldr	w0, [x9]
	ldr	w1, [x8]
	ldr	w2, [x20]
	bl	_malidp_partial_prefetch_supported
	cbz	x0, LBB0_7
; %bb.6:
	and	w0, w22, w21
	bl	___ffs
	mov	w8, #1
	lsl	w21, w8, w0
Lloh8:
	adrp	x23, _MALIDP_PREFETCH_MODE_PARTIAL@GOTPAGE
Lloh9:
	ldr	x23, [x23, _MALIDP_PREFETCH_MODE_PARTIAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
	mov	w21, #0
Lloh10:
	adrp	x23, _MALIDP_PREFETCH_MODE_NONE@GOTPAGE
Lloh11:
	ldr	x23, [x23, _MALIDP_PREFETCH_MODE_NONE@GOTPAGEOFF]
LBB0_8:
	str	w21, [x19]
	ldr	w0, [x23]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MALIDP_MMU_PREFETCH_FULL_PGSIZES,4,2 ; @MALIDP_MMU_PREFETCH_FULL_PGSIZES
	.comm	_MALIDP_PREFETCH_MODE_FULL,4,2  ; @MALIDP_PREFETCH_MODE_FULL
	.comm	_MALIDP_MMU_PREFETCH_PARTIAL_PGSIZES,4,2 ; @MALIDP_MMU_PREFETCH_PARTIAL_PGSIZES
	.comm	_MALIDP_PREFETCH_MODE_PARTIAL,4,2 ; @MALIDP_PREFETCH_MODE_PARTIAL
	.comm	_MALIDP_PREFETCH_MODE_NONE,4,2  ; @MALIDP_PREFETCH_MODE_NONE
	.no_dead_strip	_malidp_mmu_prefetch_select_mode
.subsections_via_symbols
