	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ggtt_probe_common
_ggtt_probe_common:                     ## @ggtt_probe_common
	.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, %r14d
	movq	%rdi, %r15
	movq	16(%rdi), %r12
	movq	(%r12), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movq	%rax, %r13
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rbx
	addq	%r13, %rbx
	movq	%r12, %rdi
	callq	_IS_GEN9_LP
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_INTEL_GEN
	cmpl	$10, %eax
	jl	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_ioremap_nocache
	jmp	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_ioremap_wc
LBB0_4:
	movl	%eax, 24(%r15)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	_GFP_DMA32@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_setup_scratch_page
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
	movl	24(%r15), %edi
	callq	_iounmap
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_8:
	movq	(%r15), %rdi
	movq	8(%r15), %r14
	callq	_px_dma
	movq	_I915_CACHE_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	*%r14
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to map the ggtt page table\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_DMA32,4,2                  ## @GFP_DMA32
L_.str.1:                               ## @.str.1
	.asciz	"Scratch setup failed\n"

	.comm	_I915_CACHE_NONE,4,2            ## @I915_CACHE_NONE
	.no_dead_strip	_ggtt_probe_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ggtt_probe_common
_ggtt_probe_common:                     ; @ggtt_probe_common
	.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	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #16]
	ldr	x22, [x21]
	mov	x0, x22
	mov	w1, #0
	bl	_pci_resource_start
	mov	x23, x0
	mov	x0, x22
	mov	w1, #0
	bl	_pci_resource_len
	cmp	w0, #0
	cinc	w8, w0, lt
	asr	w8, w8, #1
	add	x22, x23, w8, sxtw
	mov	x0, x21
	bl	_IS_GEN9_LP
	cbnz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_INTEL_GEN
	cmp	w0, #10
	b.lt	LBB0_6
LBB0_2:
	mov	x0, x22
	mov	x1, x20
	bl	_ioremap_nocache
	str	w0, [x19, #24]
	cbz	w0, LBB0_7
LBB0_3:
Lloh0:
	adrp	x8, _GFP_DMA32@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_DMA32@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_setup_scratch_page
	cbz	w0, LBB0_5
; %bb.4:
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	ldr	w0, [x19, #24]
	bl	_iounmap
	b	LBB0_8
LBB0_5:
	ldp	x0, x20, [x19]
	bl	_px_dma
Lloh5:
	adrp	x8, _I915_CACHE_NONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I915_CACHE_NONE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	blr	x20
	mov	w20, #0
	ldr	x8, [x19]
	str	w0, [x8]
	b	LBB0_8
LBB0_6:
	mov	x0, x22
	mov	x1, x20
	bl	_ioremap_wc
	str	w0, [x19, #24]
	cbnz	w0, LBB0_3
LBB0_7:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x20
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to map the ggtt page table\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_DMA32,4,2                  ; @GFP_DMA32
l_.str.1:                               ; @.str.1
	.asciz	"Scratch setup failed\n"

	.comm	_I915_CACHE_NONE,4,2            ; @I915_CACHE_NONE
	.no_dead_strip	_ggtt_probe_common
.subsections_via_symbols
