	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gv100_fifo_gpfifo_engine_valid
_gv100_fifo_gpfifo_engine_valid:        ## @gv100_fifo_gpfifo_engine_valid
	.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
	movl	%edx, %r12d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	16(%rdi), %r15
	movq	8(%r15), %r14
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	(%rbx), %edi
	callq	_BIT
	movl	%eax, %r13d
	movl	(%rbx), %edi
	callq	_BIT
	movq	%r14, %rdi
	movl	$9776, %esi                     ## imm = 0x2630
	movl	%r13d, %edx
	movl	%eax, %ecx
	callq	_nvkm_mask
	movq	%rbx, %rdi
	callq	_gk104_fifo_gpfifo_kick_locked
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r14d
	xorl	%r12d, %r12d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	setne	%r12b
	shll	$16, %r12d
	addl	$65536, %r12d                   ## imm = 0x10000
	testl	%r14d, %r14d
	cmovnel	%r12d, %r14d
	movl	8(%rbx), %edi
	callq	_nvkm_kmap
	movl	8(%rbx), %edi
	movl	$172, %esi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	callq	_nvkm_mo32
	movl	8(%rbx), %edi
	callq	_nvkm_done
LBB0_2:
	movl	(%rbx), %edi
	callq	_BIT
	movq	%r14, %rdi
	movl	$9776, %esi                     ## imm = 0x2630
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_nvkm_mask
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gv100_fifo_gpfifo_engine_valid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gv100_fifo_gpfifo_engine_valid
_gv100_fifo_gpfifo_engine_valid:        ; @gv100_fifo_gpfifo_engine_valid
	.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	x23, x2
	mov	x24, x1
	mov	x21, x0
	ldr	x19, [x0, #16]
	ldr	x20, [x19, #8]
	mov	x0, x19
	bl	_mutex_lock
	ldr	w0, [x21]
	bl	_BIT
	mov	x22, x0
	ldr	w0, [x21]
	bl	_BIT
	mov	x3, x0
	mov	x0, x20
	mov	w1, #9776
	mov	x2, x22
	bl	_nvkm_mask
	mov	x0, x21
	bl	_gk104_fifo_gpfifo_kick_locked
	mov	x22, x0
	cbnz	w0, LBB0_2
; %bb.1:
	mov	w8, #131072
	mov	w9, #65536
	cmp	w24, #0
	csel	w24, w9, w8, eq
	cmp	w23, #0
	csel	w23, wzr, w24, eq
	ldr	w0, [x21, #8]
	bl	_nvkm_kmap
	ldr	w0, [x21, #8]
	mov	w1, #172
	mov	x2, x24
	mov	x3, x23
	bl	_nvkm_mo32
	ldr	w0, [x21, #8]
	bl	_nvkm_done
LBB0_2:
	ldr	w0, [x21]
	bl	_BIT
	mov	x2, x0
	mov	x0, x20
	mov	w1, #9776
	mov	w3, #0
	bl	_nvkm_mask
	mov	x0, x19
	bl	_mutex_unlock
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gv100_fifo_gpfifo_engine_valid
.subsections_via_symbols
