	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_gtt_prepare_pages     ## -- Begin function i915_gem_gtt_prepare_pages
	.p2align	4, 0x90
_i915_gem_gtt_prepare_pages:            ## @i915_gem_gtt_prepare_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_DMA_ATTR_NO_WARN@GOTPCREL(%rip), %r13
	movq	_I915_SHRINK_BOUND@GOTPCREL(%rip), %r14
	movq	_I915_SHRINK_UNBOUND@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	movq	(%rax), %rdi
	movl	(%r15), %edx
	movl	4(%r15), %esi
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r13), %r8d
	callq	_dma_map_sg_attrs
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%edi, %edi
	cmpq	%r15, (%rbx)
	sete	%dil
	callq	_GEM_BUG_ON
	movq	16(%rbx), %rdi
	callq	_to_i915
	movl	8(%rbx), %esi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	sarl	%cl, %esi
	movl	(%r12), %ecx
	orl	(%r14), %ecx
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_i915_gem_shrink
	testq	%rax, %rax
	jne	LBB0_1
## %bb.4:
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	xorl	%eax, %eax
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ## @PCI_DMA_BIDIRECTIONAL
	.comm	_DMA_ATTR_NO_WARN,4,2           ## @DMA_ATTR_NO_WARN
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_I915_SHRINK_BOUND,4,2          ## @I915_SHRINK_BOUND
	.comm	_I915_SHRINK_UNBOUND,4,2        ## @I915_SHRINK_UNBOUND
	.comm	_ENOSPC,4,2                     ## @ENOSPC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_gtt_prepare_pages     ; -- Begin function i915_gem_gtt_prepare_pages
	.p2align	2
_i915_gem_gtt_prepare_pages:            ; @i915_gem_gtt_prepare_pages
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _PCI_DMA_BIDIRECTIONAL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PCI_DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh2:
	adrp	x22, _DMA_ATTR_NO_WARN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _DMA_ATTR_NO_WARN@GOTPAGEOFF]
Lloh4:
	adrp	x23, _PAGE_SHIFT@GOTPAGE
Lloh5:
	ldr	x23, [x23, _PAGE_SHIFT@GOTPAGEOFF]
Lloh6:
	adrp	x24, _I915_SHRINK_BOUND@GOTPAGE
Lloh7:
	ldr	x24, [x24, _I915_SHRINK_BOUND@GOTPAGEOFF]
Lloh8:
	adrp	x25, _I915_SHRINK_UNBOUND@GOTPAGE
Lloh9:
	ldr	x25, [x25, _I915_SHRINK_UNBOUND@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	x0, [x8]
	ldp	w2, w1, [x19]
	ldr	w3, [x21]
	ldr	w4, [x22]
	bl	_dma_map_sg_attrs
	cbnz	x0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20]
	cmp	x8, x19
	cset	w0, eq
	bl	_GEM_BUG_ON
	ldr	x0, [x20, #16]
	bl	_to_i915
	ldr	w8, [x20, #8]
	ldr	w9, [x23]
	asr	w1, w8, w9
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w3, w9, w8
	mov	x2, #0
	bl	_i915_gem_shrink
	cbnz	x0, LBB0_1
; %bb.3:
Lloh10:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	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	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ; @PCI_DMA_BIDIRECTIONAL
	.comm	_DMA_ATTR_NO_WARN,4,2           ; @DMA_ATTR_NO_WARN
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_I915_SHRINK_BOUND,4,2          ; @I915_SHRINK_BOUND
	.comm	_I915_SHRINK_UNBOUND,4,2        ; @I915_SHRINK_UNBOUND
	.comm	_ENOSPC,4,2                     ; @ENOSPC
.subsections_via_symbols
