	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_scratch_page
_setup_scratch_page:                    ## @setup_scratch_page
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_I915_GTT_PAGE_SIZE_4K@GOTPCREL(%rip), %r14
	movq	(%r14), %r13
	callq	_i915_vm_is_4lvl
	testq	%rax, %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.1:
	movl	16(%rbx), %edi
	movq	_I915_GTT_PAGE_SIZE_64K@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	callq	_HAS_PAGE_SIZES
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	(%rbx), %r13
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
LBB0_3:
	movq	___GFP_ZERO@GOTPCREL(%rip), %rax
	movq	___GFP_RETRY_MAYFAIL@GOTPCREL(%rip), %rcx
	orl	(%rax), %r15d
	orl	(%rcx), %r15d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_get_order
	movl	%eax, %r12d
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_alloc_pages
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %edi
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_DMA_ATTR_NO_WARN@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_DMA_ATTR_SKIP_CPU_SYNC@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movq	%rbx, %rsi
	xorl	%edx, %edx
	movq	%r13, %rcx
	callq	_dma_map_page_attrs
	movl	4(%r14), %edi
	movl	%eax, %r14d
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r14d, %edi
	movq	%r13, %rsi
	callq	_IS_ALIGNED
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %esi
	movq	%r13, %rdx
	callq	_dma_unmap_page
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	___free_pages
	movq	_I915_GTT_PAGE_SIZE_4K@GOTPCREL(%rip), %r14
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rax
	cmpq	%rax, %r13
	je	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %r15d
	movq	%rax, %r13
	jmp	LBB0_4
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rax
	movq	%rbx, 8(%rax)
	movl	%r14d, (%rax)
	movl	%r12d, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_I915_GTT_PAGE_SIZE_4K,8,3      ## @I915_GTT_PAGE_SIZE_4K
	.comm	_I915_GTT_PAGE_SIZE_64K,8,3     ## @I915_GTT_PAGE_SIZE_64K
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.comm	___GFP_RETRY_MAYFAIL,4,2        ## @__GFP_RETRY_MAYFAIL
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ## @PCI_DMA_BIDIRECTIONAL
	.comm	_DMA_ATTR_SKIP_CPU_SYNC,4,2     ## @DMA_ATTR_SKIP_CPU_SYNC
	.comm	_DMA_ATTR_NO_WARN,4,2           ## @DMA_ATTR_NO_WARN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_setup_scratch_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_scratch_page
_setup_scratch_page:                    ; @setup_scratch_page
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x25, _I915_GTT_PAGE_SIZE_4K@GOTPAGE
Lloh1:
	ldr	x25, [x25, _I915_GTT_PAGE_SIZE_4K@GOTPAGEOFF]
	ldr	x20, [x25]
	bl	_i915_vm_is_4lvl
Lloh2:
	adrp	x26, ___GFP_NOWARN@GOTPAGE
Lloh3:
	ldr	x26, [x26, ___GFP_NOWARN@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x19, #16]
Lloh4:
	adrp	x22, _I915_GTT_PAGE_SIZE_64K@GOTPAGE
Lloh5:
	ldr	x22, [x22, _I915_GTT_PAGE_SIZE_64K@GOTPAGEOFF]
	ldr	x1, [x22]
	bl	_HAS_PAGE_SIZES
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x20, [x22]
	ldr	w8, [x26]
	orr	w21, w8, w21
LBB0_3:
Lloh6:
	adrp	x8, ___GFP_ZERO@GOTPAGE
Lloh7:
	ldr	x8, [x8, ___GFP_ZERO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, ___GFP_RETRY_MAYFAIL@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___GFP_RETRY_MAYFAIL@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w21
	orr	w21, w8, w9
Lloh12:
	adrp	x27, _PCI_DMA_BIDIRECTIONAL@GOTPAGE
Lloh13:
	ldr	x27, [x27, _PCI_DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh14:
	adrp	x28, _DMA_ATTR_NO_WARN@GOTPAGE
Lloh15:
	ldr	x28, [x28, _DMA_ATTR_NO_WARN@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_get_order
	mov	x22, x0
	mov	x0, x21
	mov	x1, x22
	bl	_alloc_pages
	mov	x23, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #4]
	ldr	w4, [x27]
Lloh16:
	adrp	x8, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DMA_ATTR_SKIP_CPU_SYNC@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x28]
	orr	w5, w9, w8
	mov	x1, x23
	mov	w2, #0
	mov	x3, x20
	bl	_dma_map_page_attrs
	mov	x24, x0
	ldr	w0, [x19, #4]
	mov	x1, x24
	bl	_dma_mapping_error
	bl	_unlikely
	cbnz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	mov	x1, x20
	bl	_IS_ALIGNED
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19, #4]
	ldr	w3, [x27]
	mov	x1, x24
	mov	x2, x20
	bl	_dma_unmap_page
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	mov	x1, x22
	bl	___free_pages
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	cmp	x20, x8
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x26]
	bic	w21, w21, w9
	mov	x20, x8
	b	LBB0_4
LBB0_11:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_13:
	ldr	x8, [x19, #8]
	str	x23, [x8, #8]
	str	w24, [x8]
	str	w22, [x19]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_I915_GTT_PAGE_SIZE_4K,8,3      ; @I915_GTT_PAGE_SIZE_4K
	.comm	_I915_GTT_PAGE_SIZE_64K,8,3     ; @I915_GTT_PAGE_SIZE_64K
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.comm	___GFP_RETRY_MAYFAIL,4,2        ; @__GFP_RETRY_MAYFAIL
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ; @PCI_DMA_BIDIRECTIONAL
	.comm	_DMA_ATTR_SKIP_CPU_SYNC,4,2     ; @DMA_ATTR_SKIP_CPU_SYNC
	.comm	_DMA_ATTR_NO_WARN,4,2           ; @DMA_ATTR_NO_WARN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_setup_scratch_page
.subsections_via_symbols
