	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_exynos_drm_gem_create          ## -- Begin function exynos_drm_gem_create
	.p2align	4, 0x90
_exynos_drm_gem_create:                 ## @exynos_drm_gem_create
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_EXYNOS_BO_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%esi, %eax
	je	LBB0_4
## %bb.1:
	movl	(%rbx), %edi
	movl	%r15d, %edx
	leaq	L_.str(%rip), %rsi
	callq	_DRM_DEV_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_2:
	subl	(%rax), %ebx
LBB0_3:
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_4:
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.5:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdx, %rdi
	callq	_roundup
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_exynos_drm_gem_init
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_10
## %bb.6:
	movq	%rbx, %rdi
	callq	_is_drm_iommu_supported
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	_EXYNOS_BO_NONCONTIG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r15d, %eax
	je	LBB0_9
## %bb.8:
	notl	%eax
	andl	%eax, %r15d
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_WARN
LBB0_9:
	movl	%r15d, (%r14)
	movq	%r14, %rdi
	callq	_exynos_drm_alloc_buf
	testl	%eax, %eax
	js	LBB0_12
LBB0_10:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_DRM_DEV_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_12:
	movl	%eax, %ebx
	movq	%r14, %rdi
	addq	$4, %rdi
	callq	_drm_gem_object_release
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EXYNOS_BO_MASK,4,2             ## @EXYNOS_BO_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid GEM buffer flags: %u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"invalid GEM buffer size: %lu\n"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_EXYNOS_BO_NONCONTIG,4,2        ## @EXYNOS_BO_NONCONTIG
L_.str.2:                               ## @.str.2
	.asciz	"Non-contiguous allocation is not supported without IOMMU, falling back to contiguous buffer\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_exynos_drm_gem_create          ; -- Begin function exynos_drm_gem_create
	.p2align	2
_exynos_drm_gem_create:                 ; @exynos_drm_gem_create
	.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
	mov	x21, x0
Lloh0:
	adrp	x8, _EXYNOS_BO_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXYNOS_BO_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bics	wzr, w1, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	w0, [x21]
	mov	w2, w19
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	bl	_DRM_DEV_ERROR
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_3:
	mov	x0, x19
	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
	b	_ERR_PTR
LBB0_4:
	cbz	x2, LBB0_11
; %bb.5:
Lloh8:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x2
	bl	_roundup
	mov	x1, x0
	mov	x0, x21
	bl	_exynos_drm_gem_init
	mov	x20, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_10
; %bb.6:
	mov	x0, x21
	bl	_is_drm_iommu_supported
	cbnz	w0, LBB0_9
; %bb.7:
Lloh11:
	adrp	x8, _EXYNOS_BO_NONCONTIG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EXYNOS_BO_NONCONTIG@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_9
; %bb.8:
	bic	w19, w19, w8
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_WARN
LBB0_9:
	str	w19, [x20]
	mov	x0, x20
	bl	_exynos_drm_alloc_buf
	tbnz	w0, #31, LBB0_12
LBB0_10:
	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
LBB0_11:
	ldr	w0, [x21]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_12:
	mov	x19, x0
	add	x0, x20, #4
	bl	_drm_gem_object_release
	mov	x0, x20
	bl	_kfree
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EXYNOS_BO_MASK,4,2             ; @EXYNOS_BO_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid GEM buffer flags: %u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"invalid GEM buffer size: %lu\n"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_EXYNOS_BO_NONCONTIG,4,2        ; @EXYNOS_BO_NONCONTIG
l_.str.2:                               ; @.str.2
	.asciz	"Non-contiguous allocation is not supported without IOMMU, falling back to contiguous buffer\n"

.subsections_via_symbols
