	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gv100_fifo_gpfifo_engine_fini  ## -- Begin function gv100_fifo_gpfifo_engine_fini
	.p2align	4, 0x90
_gv100_fifo_gpfifo_engine_fini:         ## @gv100_fifo_gpfifo_engine_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	callq	_gk104_fifo_chan
	movq	(%rax), %r12
	movq	(%rbx), %rcx
	movq	_NVKM_ENGINE_CE0@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jl	LBB0_2
## %bb.1:
	movq	_NVKM_ENGINE_CE_LAST@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jg	LBB0_2
## %bb.6:
	movq	%rax, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gk104_fifo_gpfifo_kick         ## TAILCALL
LBB0_2:
	movq	%rax, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_gv100_fifo_gpfifo_engine_valid
	movl	%eax, %r14d
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.3:
	testl	%r14d, %r14d
	jne	LBB0_5
LBB0_4:
	movq	%r12, %rdi
	callq	_nvkm_kmap
	movq	%r12, %rdi
	movl	$528, %esi                      ## imm = 0x210
	xorl	%edx, %edx
	callq	_nvkm_wo32
	movq	%r12, %rdi
	movl	$532, %esi                      ## imm = 0x214
	xorl	%edx, %edx
	callq	_nvkm_wo32
	movq	%r12, %rdi
	callq	_nvkm_done
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVKM_ENGINE_CE0,8,3            ## @NVKM_ENGINE_CE0
	.comm	_NVKM_ENGINE_CE_LAST,8,3        ## @NVKM_ENGINE_CE_LAST
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gv100_fifo_gpfifo_engine_fini  ; -- Begin function gv100_fifo_gpfifo_engine_fini
	.p2align	2
_gv100_fifo_gpfifo_engine_fini:         ; @gv100_fifo_gpfifo_engine_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	x21, x2
	mov	x19, x1
	bl	_gk104_fifo_chan
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _NVKM_ENGINE_CE0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NVKM_ENGINE_CE0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _NVKM_ENGINE_CE_LAST@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NVKM_ENGINE_CE_LAST@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #0, ge
	b.le	LBB0_5
; %bb.1:
	ldr	x19, [x0]
	mov	w1, #0
	mov	w2, #0
	bl	_gv100_fifo_gpfifo_engine_valid
	mov	x20, x0
	cbz	w21, LBB0_3
; %bb.2:
	cbnz	w20, LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_nvkm_kmap
	mov	x0, x19
	mov	w1, #528
	mov	w2, #0
	bl	_nvkm_wo32
	mov	x0, x19
	mov	w1, #532
	mov	w2, #0
	bl	_nvkm_wo32
	mov	x0, x19
	bl	_nvkm_done
LBB0_4:
	mov	x0, x20
	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
	ret
LBB0_5:
	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	_gk104_fifo_gpfifo_kick
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NVKM_ENGINE_CE0,8,3            ; @NVKM_ENGINE_CE0
	.comm	_NVKM_ENGINE_CE_LAST,8,3        ; @NVKM_ENGINE_CE_LAST
.subsections_via_symbols
