	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_gem_shmem_create           ## -- Begin function drm_gem_shmem_create
	.p2align	4, 0x90
_drm_gem_shmem_create:                  ## @drm_gem_shmem_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
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_PAGE_ALIGN
	movq	%rax, %r15
	movq	(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	*%rax
	jmp	LBB0_3
LBB0_2:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$12, %edi
	callq	_kzalloc
LBB0_3:
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	cmpq	$0, 8(%rbx)
	jne	LBB0_8
## %bb.7:
	movq	_drm_gem_shmem_funcs@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
LBB0_8:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_drm_gem_object_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.9:
	movq	%rbx, %rdi
	callq	_drm_gem_create_mmap_offset
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_drm_gem_object_release
LBB0_11:
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r14d, %edi
	jmp	LBB0_5
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_12:
	movq	%rbx, %rdi
	callq	_to_drm_gem_shmem_obj
	movq	%rax, %r14
	leaq	8(%rax), %rdi
	callq	_mutex_init
	leaq	4(%r14), %rdi
	callq	_mutex_init
	movq	%r14, %rdi
	callq	_INIT_LIST_HEAD
	movq	(%rbx), %rax
	movq	_GFP_HIGHUSER@GOTPCREL(%rip), %rcx
	movq	___GFP_RETRY_MAYFAIL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movl	(%rax), %edi
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	callq	_mapping_set_gfp_mask
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_drm_gem_shmem_funcs,4,2        ## @drm_gem_shmem_funcs
	.comm	_GFP_HIGHUSER,4,2               ## @GFP_HIGHUSER
	.comm	___GFP_RETRY_MAYFAIL,4,2        ## @__GFP_RETRY_MAYFAIL
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_gem_shmem_create           ; -- Begin function drm_gem_shmem_create
	.p2align	2
_drm_gem_shmem_create:                  ; @drm_gem_shmem_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	x20, x0
	mov	x0, x1
	bl	_PAGE_ALIGN
	mov	x21, x0
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	blr	x8
	mov	x19, x0
	cbz	x0, LBB0_9
LBB0_2:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _drm_gem_shmem_funcs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _drm_gem_shmem_funcs@GOTPAGEOFF]
	str	x8, [x19, #8]
LBB0_4:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_drm_gem_object_init
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_drm_gem_create_mmap_offset
	cbz	w0, LBB0_11
; %bb.6:
	mov	x20, x0
	mov	x0, x19
	bl	_drm_gem_object_release
LBB0_7:
	mov	x0, x19
	bl	_kfree
	mov	x0, x20
	b	LBB0_10
LBB0_8:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #12
	bl	_kzalloc
	mov	x19, x0
	cbnz	x0, LBB0_2
LBB0_9:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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_11:
	mov	x0, x19
	bl	_to_drm_gem_shmem_obj
	mov	x20, x0
	add	x0, x0, #8
	bl	_mutex_init
	add	x0, x20, #4
	bl	_mutex_init
	mov	x0, x20
	bl	_INIT_LIST_HEAD
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _GFP_HIGHUSER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_HIGHUSER@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, ___GFP_RETRY_MAYFAIL@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___GFP_RETRY_MAYFAIL@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, ___GFP_NOWARN@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___GFP_NOWARN@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w1, w8, w9
	bl	_mapping_set_gfp_mask
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_drm_gem_shmem_funcs,4,2        ; @drm_gem_shmem_funcs
	.comm	_GFP_HIGHUSER,4,2               ; @GFP_HIGHUSER
	.comm	___GFP_RETRY_MAYFAIL,4,2        ; @__GFP_RETRY_MAYFAIL
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
.subsections_via_symbols
