	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function release_scratch_page_tree
_release_scratch_page_tree:             ## @release_scratch_page_tree
	.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	_GTT_TYPE_PPGTT_PTE_PT@GOTPCREL(%rip), %rax
	movslq	(%rax), %r13
	movq	_GTT_TYPE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r13d
	jge	LBB0_5
## %bb.1:
	movq	%rdi, %r15
	movq	8(%rdi), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %r14
	movq	(%rdi), %rcx
	movq	%r13, %rbx
	shlq	$4, %rbx
	orq	$8, %rbx
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movslq	%eax, %rdx
	addq	$16, %rbx
	cmpq	%rdx, %r13
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rbx)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-8(%rcx,%rbx), %eax
	movq	_I915_GTT_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	shll	%cl, %eax
	movslq	%eax, %rsi
	movl	(%r12), %ecx
	movq	%r14, %rdi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_dma_unmap_page
	movq	(%r15), %rax
	movq	(%rax,%rbx), %rdi
	callq	___free_page
	movq	(%r15), %rcx
	movq	$0, (%rcx,%rbx)
	movl	$0, -8(%rcx,%rbx)
	movq	_GTT_TYPE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_4
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GTT_TYPE_PPGTT_PTE_PT,4,2      ## @GTT_TYPE_PPGTT_PTE_PT
	.comm	_GTT_TYPE_MAX,4,2               ## @GTT_TYPE_MAX
	.comm	_I915_GTT_PAGE_SHIFT,4,2        ## @I915_GTT_PAGE_SHIFT
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ## @PCI_DMA_BIDIRECTIONAL
	.no_dead_strip	_release_scratch_page_tree
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function release_scratch_page_tree
_release_scratch_page_tree:             ; @release_scratch_page_tree
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, _GTT_TYPE_PPGTT_PTE_PT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GTT_TYPE_PPGTT_PTE_PT@GOTPAGEOFF]
Lloh2:
	ldrsw	x21, [x8]
Lloh3:
	adrp	x22, _GTT_TYPE_MAX@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GTT_TYPE_MAX@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w21, w8
	b.ge	LBB0_5
; %bb.1:
	mov	x19, x0
	ldp	x9, x10, [x0]
	ldr	x10, [x10]
	ldr	x20, [x10]
	lsl	x23, x21, #4
Lloh5:
	adrp	x24, _I915_GTT_PAGE_SHIFT@GOTPAGE
Lloh6:
	ldr	x24, [x24, _I915_GTT_PAGE_SHIFT@GOTPAGEOFF]
Lloh7:
	adrp	x25, _PCI_DMA_BIDIRECTIONAL@GOTPAGE
Lloh8:
	ldr	x25, [x25, _PCI_DMA_BIDIRECTIONAL@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	add	x23, x23, #16
	cmp	x21, w8, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x10, x9, x23
	ldr	x10, [x10, #8]
	cbz	x10, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x9, x23]
	ldr	w9, [x24]
	lsl	w8, w8, w9
	sxtw	x1, w8
	ldr	w3, [x25]
	mov	x0, x20
	mov	w2, #4096
	bl	_dma_unmap_page
	ldr	x8, [x19]
	add	x8, x8, x23
	ldr	x0, [x8, #8]
	bl	___free_page
	ldr	x9, [x19]
	add	x8, x9, x23
	str	xzr, [x8, #8]
	str	wzr, [x8]
	ldr	w8, [x22]
	b	LBB0_2
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_GTT_TYPE_PPGTT_PTE_PT,4,2      ; @GTT_TYPE_PPGTT_PTE_PT
	.comm	_GTT_TYPE_MAX,4,2               ; @GTT_TYPE_MAX
	.comm	_I915_GTT_PAGE_SHIFT,4,2        ; @I915_GTT_PAGE_SHIFT
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ; @PCI_DMA_BIDIRECTIONAL
	.no_dead_strip	_release_scratch_page_tree
.subsections_via_symbols
