	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gen6_ppgtt_clear_range
_gen6_ppgtt_clear_range:                ## @gen6_ppgtt_clear_range
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	_I915_PPGTT_PT_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	8(%rdi), %esi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	12(%rdi), %edi
	movq	_I915_CACHE_LLC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_gen6_pte_encode
	testl	%r15d, %r15d
	je	LBB0_15
## %bb.1:
	movl	%eax, %r13d
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ebx
	movl	%eax, %r12d
	movl	%edx, %ebx
	movd	%r13d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	movdqa	%xmm0, -64(%rbp)                ## 16-byte Spill
	movq	_KM_USER0@GOTPCREL(%rip), %rdx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_KM_USER0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%rax, %rdi
	callq	_kunmap_atomic
	movq	%rbx, %rdx
	incl	%r12d
	xorl	%ebx, %ebx
	subl	%r14d, %r15d
	je	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
	addl	%ebx, %r15d
	movq	_I915_PPGTT_PT_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	cmpl	%r14d, %r15d
	cmovbl	%r15d, %r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	%r12d, %ecx
	movl	(%rax,%rcx,4), %edi
	movl	(%rdx), %esi
	callq	_kmap_atomic
	cmpl	%r14d, %ebx
	jae	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %ecx
	movl	%r14d, %edx
	movq	%rdx, %r9
	subq	%rcx, %r9
	cmpq	$8, %r9
	jb	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r9, %r8
	andq	$-8, %r8
	leaq	-8(%r8), %rsi
	movq	%rsi, %rbx
	shrq	$3, %rbx
	incq	%rbx
	movl	%ebx, %r10d
	andl	$3, %r10d
	cmpq	$24, %rsi
	jae	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%esi, %esi
	movdqa	-64(%rbp), %xmm0                ## 16-byte Reload
	jmp	LBB0_8
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	andq	$-4, %rbx
	leaq	(%rax,%rcx,4), %rdi
	addq	$112, %rdi
	xorl	%esi, %esi
	movdqa	-64(%rbp), %xmm0                ## 16-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	%xmm0, -112(%rdi,%rsi,4)
	movdqu	%xmm0, -96(%rdi,%rsi,4)
	movdqu	%xmm0, -80(%rdi,%rsi,4)
	movdqu	%xmm0, -64(%rdi,%rsi,4)
	movdqu	%xmm0, -48(%rdi,%rsi,4)
	movdqu	%xmm0, -32(%rdi,%rsi,4)
	movdqu	%xmm0, -16(%rdi,%rsi,4)
	movdqu	%xmm0, (%rdi,%rsi,4)
	addq	$32, %rsi
	addq	$-4, %rbx
	jne	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%r10, %r10
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	%rcx, %rsi
	leaq	(%rax,%rsi,4), %rsi
	addq	$16, %rsi
	shlq	$5, %r10
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	%xmm0, -16(%rsi,%rdi)
	movdqu	%xmm0, (%rsi,%rdi)
	addq	$32, %rdi
	cmpq	%rdi, %r10
	jne	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%r8, %r9
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	addq	%r8, %rcx
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r13d, (%rax,%rcx,4)
	incq	%rcx
	cmpq	%rcx, %rdx
	jne	LBB0_13
	jmp	LBB0_14
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_PPGTT_PT_ENTRIES,4,2      ## @I915_PPGTT_PT_ENTRIES
	.comm	_I915_CACHE_LLC,4,2             ## @I915_CACHE_LLC
	.comm	_KM_USER0,4,2                   ## @KM_USER0
	.no_dead_strip	_gen6_ppgtt_clear_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gen6_ppgtt_clear_range
_gen6_ppgtt_clear_range:                ; @gen6_ppgtt_clear_range
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _I915_PPGTT_PT_ENTRIES@GOTPAGE
Lloh1:
	ldr	x23, [x23, _I915_PPGTT_PT_ENTRIES@GOTPAGEOFF]
	ldr	w25, [x23]
	ldr	w0, [x0, #12]
	ldr	w1, [x19, #8]
Lloh2:
	adrp	x8, _I915_CACHE_LLC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I915_CACHE_LLC@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_gen6_pte_encode
	cbz	w21, LBB0_11
; %bb.1:
	mov	x20, x0
	udiv	w24, w22, w25
	msub	w26, w24, w25, w22
	dup.4s	v0, w0
	str	q0, [sp]                        ; 16-byte Folded Spill
Lloh5:
	adrp	x22, _KM_USER0@GOTPAGE
Lloh6:
	ldr	x22, [x22, _KM_USER0@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x22]
	bl	_kunmap_atomic
	mov	w26, #0
	add	w24, w24, #1
	subs	w21, w21, w25
	b.eq	LBB0_11
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
	ldr	w8, [x23]
	add	w21, w26, w21
	cmp	w21, w8
	csel	w25, w21, w8, lo
	ldr	x8, [x19]
	ldr	w0, [x8, w24, uxtw #2]
	ldr	w1, [x22]
	bl	_kmap_atomic
	cmp	w26, w25
	b.hs	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w11, w26
	sub	x9, x25, x11
	cmp	x9, #16
	b.hs	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x8, x11
	b	LBB0_9
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	and	x10, x9, #0xfffffffffffffff0
	add	x8, x10, x11
	add	x11, x0, x11, lsl #2
	add	x11, x11, #32
	mov	x12, x10
	ldr	q0, [sp]                        ; 16-byte Folded Reload
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	stp	q0, q0, [x11, #-32]
	stp	q0, q0, [x11], #64
	subs	x12, x12, #16
	b.ne	LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x9, x10
	b.eq	LBB0_2
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x0, x8, lsl #2
	sub	x8, x25, x8
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	w20, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_10
	b	LBB0_2
LBB0_11:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_PPGTT_PT_ENTRIES,4,2      ; @I915_PPGTT_PT_ENTRIES
	.comm	_I915_CACHE_LLC,4,2             ; @I915_CACHE_LLC
	.comm	_KM_USER0,4,2                   ; @KM_USER0
	.no_dead_strip	_gen6_ppgtt_clear_range
.subsections_via_symbols
