	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msm_gem_new_impl
_msm_gem_new_impl:                      ## @msm_gem_new_impl
	.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
	movl	%edx, %r12d
	movq	%rdi, %r15
	movq	_MSM_BO_CACHE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%r12d, %edx
	leal	-128(%rdx), %eax
	cmpl	$3, %eax
	jae	LBB0_1
## %bb.2:
	movl	%r8d, %r13d
	movq	%rcx, %r14
	movq	8(%r15), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$28, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %rbx
	leaq	24(%rax), %rdi
	callq	_mutex_init
	movl	%r12d, (%rbx)
	movq	_MSM_MADV_WILLNEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	leaq	16(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	leaq	12(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_mutex_is_locked
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	leaq	8(%rbx), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add_tail
	jmp	LBB0_8
LBB0_1:
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_DRM_DEV_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_7:
	movq	%r15, %rdi
	callq	_mutex_lock
	leaq	8(%rbx), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_list_add_tail
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_8:
	addq	$4, %rbx
	movq	%rbx, (%r14)
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSM_BO_CACHE_MASK,4,2          ## @MSM_BO_CACHE_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid cache flag: %x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MSM_MADV_WILLNEED,4,2          ## @MSM_MADV_WILLNEED
	.no_dead_strip	_msm_gem_new_impl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msm_gem_new_impl
_msm_gem_new_impl:                      ; @msm_gem_new_impl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x24, x2
	mov	x21, x0
Lloh0:
	adrp	x8, _MSM_BO_CACHE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSM_BO_CACHE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w2, w8, w2
	sub	w8, w2, #128
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.1:
	mov	x23, x4
	mov	x19, x3
	ldr	x22, [x21, #8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #28
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	add	x0, x0, #24
	bl	_mutex_init
	str	w24, [x20]
Lloh6:
	adrp	x8, _MSM_MADV_WILLNEED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSM_MADV_WILLNEED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x20, #20]
	add	x0, x20, #16
	bl	_INIT_LIST_HEAD
	add	x0, x20, #12
	bl	_INIT_LIST_HEAD
	cbz	w23, LBB0_7
; %bb.3:
	mov	x0, x21
	bl	_mutex_is_locked
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	add	x0, x20, #8
	mov	x1, x22
	bl	_list_add_tail
	b	LBB0_8
LBB0_4:
	ldr	w0, [x21, #4]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
	mov	x0, x21
	bl	_mutex_lock
	add	x0, x20, #8
	mov	x1, x22
	bl	_list_add_tail
	mov	x0, x21
	bl	_mutex_unlock
LBB0_8:
	mov	w0, #0
	add	x8, x20, #4
	str	x8, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MSM_BO_CACHE_MASK,4,2          ; @MSM_BO_CACHE_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid cache flag: %x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MSM_MADV_WILLNEED,4,2          ; @MSM_MADV_WILLNEED
	.no_dead_strip	_msm_gem_new_impl
.subsections_via_symbols
