	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_mmap_ioctl            ## -- Begin function i915_gem_mmap_ioctl
	.p2align	4, 0x90
_i915_gem_mmap_ioctl:                   ## @i915_gem_mmap_ioctl
	.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, %r14
	movl	16(%rsi), %eax
	movq	%rdx, %rsi
	movl	%eax, %edx
	callq	_drm_gem_object_lookup
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.5:
	movq	_current@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	(%rax), %rdi
	callq	_down_write
	movl	(%rbx), %edi
	movl	8(%r14), %r9d
	movl	12(%r14), %edx
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_do_mmap
	movq	%rax, %r12
	movq	(%r13), %rax
	movq	(%rax), %rdi
	callq	_up_write
	movq	%rbx, %rdi
	callq	_drm_gem_object_unreference_unlocked
	movq	%r12, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	%r12d, %r15d
	jmp	LBB0_8
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	%rbx, %rdi
	callq	_drm_gem_object_unreference_unlocked
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_7:
	movq	%r12, (%r14)
LBB0_8:
	movl	%r15d, %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	_EINVAL,4,2                     ## @EINVAL
	.comm	_current,8,3                    ## @current
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_gem_mmap_ioctl            ; -- Begin function i915_gem_mmap_ioctl
	.p2align	2
_i915_gem_mmap_ioctl:                   ; @i915_gem_mmap_ioctl
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x8, x2
	mov	x19, x1
	ldr	w2, [x1, #16]
	mov	x1, x8
	bl	_drm_gem_object_lookup
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_5
; %bb.2:
Lloh0:
	adrp	x22, _current@GOTPAGE
Lloh1:
	ldr	x22, [x22, _current@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x0, [x8]
	bl	_down_write
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w3, w9, w8
Lloh8:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
	ldp	w5, w2, [x19, #8]
	mov	w1, #0
	bl	_do_mmap
	mov	x21, x0
	ldr	x8, [x22]
	ldr	x0, [x8]
	bl	_up_write
	mov	x0, x20
	bl	_drm_gem_object_unreference_unlocked
	mov	x0, x21
	bl	_IS_ERR
	cbnz	x0, LBB0_7
; %bb.3:
	str	x21, [x19]
	mov	w21, #0
	b	LBB0_7
LBB0_4:
Lloh11:
	adrp	x8, _ENOENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_drm_gem_object_unreference_unlocked
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_current,8,3                    ; @current
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
.subsections_via_symbols
