	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_mmap_gtt              ## -- Begin function i915_gem_mmap_gtt
	.p2align	4, 0x90
_i915_gem_mmap_gtt:                     ## @i915_gem_mmap_gtt
	.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	%rcx, %r14
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	8(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_i915_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_drm_gem_object_lookup
	movl	%eax, %edi
	callq	_to_intel_bo
	movq	%rax, %r13
	leaq	8(%rax), %r15
	movq	8(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%rcx), %rax
	jle	LBB0_4
## %bb.2:
	movq	_E2BIG@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_4:
	movq	(%r13), %rax
	movq	_I915_MADV_WILLNEED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movq	%r13, %rdi
	callq	_i915_gem_object_create_mmap_offset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	16(%r13), %eax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movq	%r15, %rdi
	callq	_drm_gem_object_unreference
	movq	%r12, %rdi
	callq	_mutex_unlock
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
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_E2BIG,4,2                      ## @E2BIG
	.comm	_I915_MADV_WILLNEED,8,3         ## @I915_MADV_WILLNEED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempting to mmap a purgeable buffer\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_mmap_gtt              ; -- Begin function i915_gem_mmap_gtt
	.p2align	2
_i915_gem_mmap_gtt:                     ; @i915_gem_mmap_gtt
	.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, x3
	mov	x21, x2
	mov	x19, x1
	mov	x23, x0
	ldr	x24, [x1, #8]
	mov	x0, x1
	bl	_i915_mutex_lock_interruptible
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.1:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_drm_gem_object_lookup
	bl	_to_intel_bo
	mov	x21, x0
	ldr	x8, [x21, #8]!
	ldr	x9, [x24]
	cmp	x8, x9
	b.le	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _E2BIG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	mov	x23, x0
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _I915_MADV_WILLNEED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _I915_MADV_WILLNEED@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x23
	bl	_i915_gem_object_create_mmap_offset
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	w8, [x23, #16]
Lloh5:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	str	w8, [x20]
	b	LBB0_8
LBB0_6:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x21
	bl	_drm_gem_object_unreference
	mov	x0, x19
	bl	_mutex_unlock
LBB0_9:
	mov	x0, x22
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_E2BIG,4,2                      ; @E2BIG
	.comm	_I915_MADV_WILLNEED,8,3         ; @I915_MADV_WILLNEED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempting to mmap a purgeable buffer\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
.subsections_via_symbols
