	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv20_graph_context_fini        ## -- Begin function nv20_graph_context_fini
	.p2align	4, 0x90
_nv20_graph_context_fini:               ## @nv20_graph_context_fini
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movq	%rbx, %rdi
	movl	$4196128, %esi                  ## imm = 0x400720
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_nv_mask
	movq	%rbx, %rdi
	movl	$4194628, %esi                  ## imm = 0x400144
	callq	_nv_rd32
	movl	%eax, %ecx
	movl	$-1, %eax
	testl	$65536, %ecx                    ## imm = 0x10000
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$4194632, %esi                  ## imm = 0x400148
	callq	_nv_rd32
	shrl	$24, %eax
	andl	$31, %eax
LBB0_2:
	cmpl	%eax, (%r15)
	jne	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_nv_gpuobj
	movl	(%rax), %edx
	sarl	$4, %edx
	movq	%rbx, %rdi
	movl	$4196228, %esi                  ## imm = 0x400784
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$4196232, %esi                  ## imm = 0x400788
	movl	$2, %edx
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$4196096, %esi                  ## imm = 0x400700
	movl	$-1, %edx
	xorl	%ecx, %ecx
	callq	_nv_wait
	movq	%rbx, %rdi
	movl	$4194628, %esi                  ## imm = 0x400144
	movl	$268435456, %edx                ## imm = 0x10000000
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$4194632, %esi                  ## imm = 0x400148
	movl	$-16777216, %edx                ## imm = 0xFF000000
	movl	$520093696, %ecx                ## imm = 0x1F000000
	callq	_nv_mask
LBB0_4:
	movq	%rbx, %rdi
	movl	$4196128, %esi                  ## imm = 0x400720
	movl	$1, %edx
	movl	$1, %ecx
	callq	_nv_mask
	movl	(%rbx), %edi
	movl	(%r15), %esi
	shll	$2, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	addq	$4, %r15
	movq	%r15, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nouveau_graph_context_fini     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nv20_graph_context_fini        ; -- Begin function nv20_graph_context_fini
	.p2align	2
_nv20_graph_context_fini:               ; @nv20_graph_context_fini
	.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	x19, x1
	mov	x20, x0
	mov	w22, #324
	movk	w22, #64, lsl #16
	ldr	x21, [x0]
	add	w1, w22, #1500
	mov	x0, x21
	mov	w2, #1
	mov	w3, #0
	bl	_nv_mask
	mov	x0, x21
	mov	w1, #324
	movk	w1, #64, lsl #16
	bl	_nv_rd32
	tbnz	w0, #16, LBB0_2
; %bb.1:
	mov	w8, #-1
	b	LBB0_3
LBB0_2:
	add	w1, w22, #4
	mov	x0, x21
	bl	_nv_rd32
	ubfx	w8, w0, #24, #5
LBB0_3:
	ldr	w9, [x20]
	cmp	w9, w8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_nv_gpuobj
	ldr	w8, [x0]
	asr	w2, w8, #4
	add	w1, w22, #1600
	mov	x0, x21
	bl	_nv_wr32
	add	w1, w22, #1604
	mov	x0, x21
	mov	w2, #2
	bl	_nv_wr32
	add	w1, w22, #1468
	mov	x0, x21
	mov	w2, #-1
	mov	w3, #0
	bl	_nv_wait
	mov	x0, x21
	mov	w1, #324
	movk	w1, #64, lsl #16
	mov	w2, #268435456
	bl	_nv_wr32
	add	w1, w22, #4
	mov	x0, x21
	mov	w2, #-16777216
	mov	w3, #520093696
	bl	_nv_mask
LBB0_5:
	add	w1, w22, #1500
	mov	x0, x21
	mov	w2, #1
	mov	w3, #1
	bl	_nv_mask
	ldr	w0, [x21]
	ldr	w8, [x20], #4
	lsl	w1, w8, #2
	mov	w2, #0
	bl	_nv_wo32
	mov	x0, x20
	mov	x1, x19
	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	_nouveau_graph_context_fini
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
