	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_gem_shmem_mmap             ## -- Begin function drm_gem_shmem_mmap
	.p2align	4, 0x90
_drm_gem_shmem_mmap:                    ## @drm_gem_shmem_mmap
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_drm_gem_mmap
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movl	8(%r15), %edi
	callq	_to_drm_gem_shmem_obj
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_drm_gem_shmem_get_pages
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_drm_gem_vm_close
	jmp	LBB0_4
LBB0_3:
	movq	_VM_PFNMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	4(%r15), %eax
	movq	_VM_MIXEDMAP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 4(%r15)
	movq	%r14, %rdi
	callq	_drm_vma_node_start
	subl	%eax, (%r15)
	xorl	%ebx, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_PFNMAP,4,2                  ## @VM_PFNMAP
	.comm	_VM_MIXEDMAP,4,2                ## @VM_MIXEDMAP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_gem_shmem_mmap             ; -- Begin function drm_gem_shmem_mmap
	.p2align	2
_drm_gem_shmem_mmap:                    ; @drm_gem_shmem_mmap
	.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	x19, x1
	bl	_drm_gem_mmap
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x19, #8]
	bl	_to_drm_gem_shmem_obj
	mov	x21, x0
	bl	_drm_gem_shmem_get_pages
	mov	x20, x0
	cbz	w0, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_drm_gem_vm_close
	b	LBB0_4
LBB0_3:
Lloh0:
	adrp	x8, _VM_PFNMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VM_PFNMAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
Lloh3:
	adrp	x9, _VM_MIXEDMAP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VM_MIXEDMAP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x21
	bl	_drm_vma_node_start
	ldr	w8, [x19]
	sub	w8, w8, w0
	str	w8, [x19]
LBB0_4:
	mov	x0, x20
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_PFNMAP,4,2                  ; @VM_PFNMAP
	.comm	_VM_MIXEDMAP,4,2                ; @VM_MIXEDMAP
.subsections_via_symbols
