	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_etnaviv_gem_new_userptr        ## -- Begin function etnaviv_gem_new_userptr
	.p2align	4, 0x90
_etnaviv_gem_new_userptr:               ## @etnaviv_gem_new_userptr
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r12d
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_ETNA_BO_CACHED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_etnaviv_gem_userptr_ops@GOTPCREL(%rip), %rax
	leaq	-48(%rbp), %r8
	movl	%ecx, %esi
	movq	%rax, %rcx
	callq	_etnaviv_gem_new_private
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	-48(%rbp), %rdi
	addq	$24, %rdi
	movq	_etnaviv_userptr_lock_class@GOTPCREL(%rip), %rsi
	callq	_lockdep_set_class
	movq	-48(%rbp), %rsi
	movq	%r13, 8(%rsi)
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rsi)
	movq	_ETNA_USERPTR_WRITE@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	andl	(%rax), %r12d
	sete	%cl
	movl	%ecx, 16(%rsi)
	movq	%rbx, %rdi
	callq	_etnaviv_gem_obj_add
	movq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_drm_gem_handle_create
	movl	%eax, %r14d
	movq	-48(%rbp), %rdi
	callq	_drm_gem_object_put_unlocked
LBB0_2:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETNA_BO_CACHED,4,2             ## @ETNA_BO_CACHED
	.comm	_etnaviv_gem_userptr_ops,4,2    ## @etnaviv_gem_userptr_ops
	.comm	_etnaviv_userptr_lock_class,4,2 ## @etnaviv_userptr_lock_class
	.comm	_current,8,3                    ## @current
	.comm	_ETNA_USERPTR_WRITE,4,2         ## @ETNA_USERPTR_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_etnaviv_gem_new_userptr        ; -- Begin function etnaviv_gem_new_userptr
	.p2align	2
_etnaviv_gem_new_userptr:               ; @etnaviv_gem_new_userptr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x5
	mov	x22, x4
	mov	x8, x3
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x9, _ETNA_BO_CACHED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ETNA_BO_CACHED@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
Lloh3:
	adrp	x3, _etnaviv_gem_userptr_ops@GOTPAGE
Lloh4:
	ldr	x3, [x3, _etnaviv_gem_userptr_ops@GOTPAGEOFF]
	add	x4, sp, #8
	mov	x1, x8
	bl	_etnaviv_gem_new_private
	mov	x24, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	x8, [sp, #8]
	add	x0, x8, #24
Lloh5:
	adrp	x1, _etnaviv_userptr_lock_class@GOTPAGE
Lloh6:
	ldr	x1, [x1, _etnaviv_userptr_lock_class@GOTPAGEOFF]
	bl	_lockdep_set_class
	ldr	x1, [sp, #8]
	str	x23, [x1, #8]
Lloh7:
	adrp	x8, _current@GOTPAGE
Lloh8:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _ETNA_USERPTR_WRITE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ETNA_USERPTR_WRITE@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w22
	cset	w9, eq
	stp	w9, w8, [x1, #16]
	mov	x0, x21
	bl	_etnaviv_gem_obj_add
	ldr	x1, [sp, #8]
	mov	x0, x20
	mov	x2, x19
	bl	_drm_gem_handle_create
	mov	x24, x0
	ldr	x0, [sp, #8]
	bl	_drm_gem_object_put_unlocked
LBB0_2:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ETNA_BO_CACHED,4,2             ; @ETNA_BO_CACHED
	.comm	_etnaviv_gem_userptr_ops,4,2    ; @etnaviv_gem_userptr_ops
	.comm	_etnaviv_userptr_lock_class,4,2 ; @etnaviv_userptr_lock_class
	.comm	_current,8,3                    ; @current
	.comm	_ETNA_USERPTR_WRITE,4,2         ; @ETNA_USERPTR_WRITE
.subsections_via_symbols
