	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exynos_drm_gem_mmap_buffer
_exynos_drm_gem_mmap_buffer:            ## @exynos_drm_gem_mmap_buffer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	24(%rdi), %rdi
	movq	_VM_PFNMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 24(%rsi)
	movq	$0, 16(%rsi)
	movq	(%rsi), %rax
	subq	8(%rsi), %rax
	cmpq	(%r14), %rax
	jbe	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_2:
	movq	%rsi, %rbx
	callq	_to_dma_dev
	movl	16(%r14), %edx
	movl	12(%r14), %ecx
	movq	(%r14), %r8
	movl	8(%r14), %r9d
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_dma_mmap_attrs
	movl	%eax, %ebx
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jns	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movl	%ebx, %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_PFNMAP,4,2                  ## @VM_PFNMAP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to mmap.\n"

	.no_dead_strip	_exynos_drm_gem_mmap_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_drm_gem_mmap_buffer
_exynos_drm_gem_mmap_buffer:            ; @exynos_drm_gem_mmap_buffer
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	ldr	x0, [x0, #24]
Lloh0:
	adrp	x8, _VM_PFNMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VM_PFNMAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x1, #24]
	bic	w8, w9, w8
	str	w8, [x1, #24]
	str	xzr, [x1, #16]
	ldp	x8, x9, [x1]
	ldr	x10, [x20]
	sub	x8, x8, x9
	cmp	x8, x10
	b.ls	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_5
LBB0_2:
	mov	x19, x1
	bl	_to_dma_dev
	ldp	w3, w2, [x20, #12]
	ldr	x4, [x20]
	ldr	w5, [x20, #8]
	mov	x1, x19
	bl	_dma_mmap_attrs
	tbnz	w0, #31, LBB0_4
; %bb.3:
	mov	w19, #0
	b	LBB0_5
LBB0_4:
	mov	x19, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_PFNMAP,4,2                  ; @VM_PFNMAP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to mmap.\n"

	.no_dead_strip	_exynos_drm_gem_mmap_buffer
.subsections_via_symbols
