	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	16(%rdi), %edi
	callq	_nouveau_fifo
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	movq	%rax, 8(%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, 28(%rbx)
	movq	_nv84_fence_resume@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_nv84_fence_context_new@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_nv84_fence_context_del@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	leaq	12(%rbx), %rdi
	callq	_init_waitqueue_head
	movl	$1, 8(%rbx)
	movl	(%r14), %edi
	movl	(%r15), %esi
	shll	$4, %esi
	addl	$16, %esi
	movq	_TTM_PL_FLAG_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %r13
	addq	$4, %r13
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%r13
	pushq	$0
	callq	_nouveau_bo_new
	addq	$16, %rsp
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.3:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edi
	movq	_TTM_PL_FLAG_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_nouveau_bo_pin
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r12d
	jmp	LBB0_12
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_14
LBB0_5:
	movl	(%r13), %edi
	callq	_nouveau_bo_map
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_6
LBB0_11:
	movl	(%r13), %edi
	callq	_nouveau_bo_unpin
LBB0_12:
	xorl	%edi, %edi
	movq	%r13, %rsi
	callq	_nouveau_bo_ref
LBB0_13:
	movq	%r14, %rdi
	callq	_nv84_fence_destroy
LBB0_14:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r14), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	shll	$4, %esi
	addl	$16, %esi
	movq	_TTM_PL_FLAG_TT@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	$0
	callq	_nouveau_bo_new
	addq	$16, %rsp
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movl	(%rbx), %edi
	movl	(%r15), %esi
	callq	_nouveau_bo_pin
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r12d
	movq	%rbx, %r13
	jmp	LBB0_12
LBB0_9:
	movl	(%rbx), %edi
	callq	_nouveau_bo_map
	testl	%eax, %eax
	je	LBB0_15
## %bb.10:
	movl	%eax, %r12d
	movq	%rbx, %r13
	jmp	LBB0_11
LBB0_15:
	xorl	%r12d, %r12d
	jmp	LBB0_14
	.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
.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:
	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	x19, x0
	ldr	w0, [x0, #16]
	bl	_nouveau_fifo
	mov	x21, 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, #8]
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _nv84_fence_destroy@GOTPAGE
Lloh4:
	ldr	x8, [x8, _nv84_fence_destroy@GOTPAGEOFF]
	str	x8, [x0, #32]
Lloh5:
	adrp	x8, _nv84_fence_suspend@GOTPAGE
Lloh6:
	ldr	x8, [x8, _nv84_fence_suspend@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _nv84_fence_resume@GOTPAGE
Lloh9:
	ldr	x9, [x9, _nv84_fence_resume@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #24]
Lloh11:
	adrp	x8, _nv84_fence_context_new@GOTPAGE
Lloh12:
	ldr	x8, [x8, _nv84_fence_context_new@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _nv84_fence_context_del@GOTPAGE
Lloh15:
	ldr	x9, [x9, _nv84_fence_context_del@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #16]
	add	x0, x0, #12
	bl	_init_waitqueue_head
	mov	w8, #1
	str	w8, [x20, #8]
	ldr	w0, [x19]
	ldr	w8, [x21]
	lsl	w8, w8, #4
	add	w1, w8, #16
Lloh17:
	adrp	x24, _TTM_PL_FLAG_VRAM@GOTPAGE
Lloh18:
	ldr	x24, [x24, _TTM_PL_FLAG_VRAM@GOTPAGEOFF]
	ldr	w3, [x24]
	add	x23, x20, #4
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	mov	x7, x23
	bl	_nouveau_bo_new
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	w0, [x23]
	ldr	w1, [x24]
	bl	_nouveau_bo_pin
	cbz	w0, LBB0_5
; %bb.3:
	mov	x22, x0
	b	LBB0_7
LBB0_4:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
LBB0_5:
	ldr	w0, [x23]
	bl	_nouveau_bo_map
	mov	x22, x0
	cbz	w0, LBB0_10
LBB0_6:
	ldr	w0, [x23]
	bl	_nouveau_bo_unpin
LBB0_7:
	mov	x0, #0
	mov	x1, x23
	bl	_nouveau_bo_ref
LBB0_8:
	mov	x0, x19
	bl	_nv84_fence_destroy
LBB0_9:
	mov	x0, x22
	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
LBB0_10:
	ldr	w0, [x19]
	ldr	w8, [x21]
	lsl	w8, w8, #4
	add	w1, w8, #16
Lloh22:
	adrp	x21, _TTM_PL_FLAG_TT@GOTPAGE
Lloh23:
	ldr	x21, [x21, _TTM_PL_FLAG_TT@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	w2, #0
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	mov	x7, x20
	bl	_nouveau_bo_new
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.11:
	ldr	w0, [x20]
	ldr	w1, [x21]
	bl	_nouveau_bo_pin
	cbz	w0, LBB0_13
; %bb.12:
	mov	x22, x0
	mov	x23, x20
	b	LBB0_7
LBB0_13:
	ldr	w0, [x20]
	bl	_nouveau_bo_map
	mov	x22, x0
	cbz	w0, LBB0_9
; %bb.14:
	mov	x23, x20
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.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	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.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
.subsections_via_symbols
