	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk104_fifo_gpfifo_init         ## -- Begin function gk104_fifo_gpfifo_init
	.p2align	4, 0x90
_gk104_fifo_gpfifo_init:                ## @gk104_fifo_gpfifo_init
	.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
	callq	_gk104_fifo_chan
	movq	%rax, %r13
	movq	32(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r15
	movq	24(%r13), %rax
	movl	(%rax), %ebx
	sarl	$12, %ebx
	movl	(%r13), %ecx
	movl	16(%r13), %r14d
	leal	8388612(,%r14,8), %r12d
	shll	$16, %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$983040, %edx                   ## imm = 0xF0000
	callq	_nvkm_mask
	leal	8388608(,%r14,8), %esi
	orl	$-2147483648, %ebx              ## imm = 0x80000000
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_nvkm_wr32
	leaq	8(%r13), %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpl	$0, 4(%r13)
	je	LBB0_3
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_gk104_fifo_runlist_insert
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$1024, %edx                     ## imm = 0x400
	movl	$1024, %ecx                     ## imm = 0x400
	callq	_nvkm_mask
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_gk104_fifo_runlist_update
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$1024, %edx                     ## imm = 0x400
	movl	$1024, %ecx                     ## imm = 0x400
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_mask                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gk104_fifo_gpfifo_init         ; -- Begin function gk104_fifo_gpfifo_init
	.p2align	2
_gk104_fifo_gpfifo_init:                ; @gk104_fifo_gpfifo_init
	.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
	bl	_gk104_fifo_chan
	mov	x21, x0
	ldp	x8, x20, [x0, #24]
	ldr	x19, [x20]
	ldr	w8, [x8]
	asr	w23, w8, #12
	ldr	w8, [x0, #16]
	lsl	w24, w8, #3
	add	w8, w24, #2048, lsl #12         ; =8388608
	add	w22, w8, #4
	ldr	w8, [x0]
	lsl	w3, w8, #16
	mov	x0, x19
	mov	x1, x22
	mov	w2, #983040
	bl	_nvkm_mask
	add	w1, w24, #2048, lsl #12         ; =8388608
	orr	w2, w23, #0x80000000
	mov	x0, x19
	bl	_nvkm_wr32
	add	x0, x21, #8
	bl	_list_empty
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_3
LBB0_2:
	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_3:
	mov	x0, x20
	mov	x1, x21
	bl	_gk104_fifo_runlist_insert
	mov	x0, x19
	mov	x1, x22
	mov	w2, #1024
	mov	w3, #1024
	bl	_nvkm_mask
	ldr	w1, [x21]
	mov	x0, x20
	bl	_gk104_fifo_runlist_update
	mov	x0, x19
	mov	x1, x22
	mov	w2, #1024
	mov	w3, #1024
	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
	b	_nvkm_mask
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
