	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv84_fence_create              ## -- Begin function nv84_fence_create
	.p2align	4, 0x90
_nv84_fence_create:                     ## @nv84_fence_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	%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	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_nv84_fence_destroy@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rbx)
	movq	_nv84_fence_suspend@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_nv84_fence_resume@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_nv84_fence_context_new@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_nv84_fence_context_del@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	$1, 8(%rbx)
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_mutex_init
	leaq	8(%r14), %rdi
	cmpq	$0, 8(%r14)
	je	LBB0_3
## %bb.4:
	movq	_TTM_PL_FLAG_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_11
LBB0_3:
	movq	_TTM_PL_FLAG_TT@GOTPCREL(%rip), %rax
	movq	_TTM_PL_FLAG_UNCACHED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
LBB0_5:
	movl	(%r14), %esi
	shll	$4, %esi
	movq	%rbx, 16(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	xorl	%edx, %edx
	movl	%r12d, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_nouveau_bo_new
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movl	(%rbx), %edi
	xorl	%r13d, %r13d
	movl	%r12d, %esi
	xorl	%edx, %edx
	callq	_nouveau_bo_pin
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movl	(%rbx), %edi
	callq	_nouveau_bo_map
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_nouveau_bo_unpin
LBB0_9:
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_nouveau_bo_ref
LBB0_10:
	movq	%r14, %rdi
	callq	_nv84_fence_destroy
	movl	%r15d, %r13d
LBB0_11:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nv84_fence_suspend,4,2         ## @nv84_fence_suspend
	.comm	_nv84_fence_resume,4,2          ## @nv84_fence_resume
	.comm	_nv84_fence_context_new,4,2     ## @nv84_fence_context_new
	.comm	_nv84_fence_context_del,4,2     ## @nv84_fence_context_del
	.comm	_TTM_PL_FLAG_VRAM,4,2           ## @TTM_PL_FLAG_VRAM
	.comm	_TTM_PL_FLAG_TT,4,2             ## @TTM_PL_FLAG_TT
	.comm	_TTM_PL_FLAG_UNCACHED,4,2       ## @TTM_PL_FLAG_UNCACHED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv84_fence_create              ; -- Begin function nv84_fence_create
	.p2align	2
_nv84_fence_create:                     ; @nv84_fence_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _nv84_fence_destroy@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nv84_fence_destroy@GOTPAGEOFF]
Lloh5:
	adrp	x9, _nv84_fence_suspend@GOTPAGE
Lloh6:
	ldr	x9, [x9, _nv84_fence_suspend@GOTPAGEOFF]
	str	x8, [x0, #32]
Lloh7:
	ldr	w8, [x9]
	str	w8, [x0, #24]
Lloh8:
	adrp	x8, _nv84_fence_resume@GOTPAGE
Lloh9:
	ldr	x8, [x8, _nv84_fence_resume@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _nv84_fence_context_new@GOTPAGE
Lloh12:
	ldr	x9, [x9, _nv84_fence_context_new@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	adrp	x10, _nv84_fence_context_del@GOTPAGE
Lloh15:
	ldr	x10, [x10, _nv84_fence_context_del@GOTPAGEOFF]
	stp	w9, w8, [x0, #16]
Lloh16:
	ldr	w8, [x10]
	mov	w9, #1
	stp	w9, w8, [x0, #8]
	add	x0, x0, #4
	bl	_mutex_init
	mov	x0, x19
	ldr	x8, [x0, #8]!
Lloh17:
	adrp	x9, _TTM_PL_FLAG_VRAM@GOTPAGE
Lloh18:
	ldr	x9, [x9, _TTM_PL_FLAG_VRAM@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _TTM_PL_FLAG_TT@GOTPAGE
Lloh21:
	ldr	x10, [x10, _TTM_PL_FLAG_TT@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
Lloh23:
	adrp	x11, _TTM_PL_FLAG_UNCACHED@GOTPAGE
Lloh24:
	ldr	x11, [x11, _TTM_PL_FLAG_UNCACHED@GOTPAGEOFF]
Lloh25:
	ldr	w11, [x11]
	orr	w10, w11, w10
	cmp	x8, #0
	csel	w22, w10, w9, eq
	ldr	w8, [x19]
	lsl	w1, w8, #4
	str	x20, [sp]
	mov	w2, #0
	mov	x3, x22
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	mov	x7, #0
	bl	_nouveau_bo_new
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	w0, [x20]
	mov	x1, x22
	mov	w2, #0
	bl	_nouveau_bo_pin
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x20]
	bl	_nouveau_bo_map
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.4:
	ldr	w0, [x20]
	bl	_nouveau_bo_unpin
LBB0_5:
	mov	x0, #0
	mov	x1, x20
	bl	_nouveau_bo_ref
LBB0_6:
	mov	x0, x19
	bl	_nv84_fence_destroy
	b	LBB0_8
LBB0_7:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nv84_fence_suspend,4,2         ; @nv84_fence_suspend
	.comm	_nv84_fence_resume,4,2          ; @nv84_fence_resume
	.comm	_nv84_fence_context_new,4,2     ; @nv84_fence_context_new
	.comm	_nv84_fence_context_del,4,2     ; @nv84_fence_context_del
	.comm	_TTM_PL_FLAG_VRAM,4,2           ; @TTM_PL_FLAG_VRAM
	.comm	_TTM_PL_FLAG_TT,4,2             ; @TTM_PL_FLAG_TT
	.comm	_TTM_PL_FLAG_UNCACHED,4,2       ; @TTM_PL_FLAG_UNCACHED
.subsections_via_symbols
