	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gk104_fifo_init
_gk104_fifo_init:                       ## @gk104_fifo_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_gk104_fifo
	movq	%rax, %r14
	movq	8(%rax), %rax
	movq	24(%r14), %r15
	movq	(%rax), %rax
	movq	%r14, %rdi
	callq	*8(%rax)
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.1:
	xorl	%r12d, %r12d
	movl	$262460, %ebx                   ## imm = 0x4013C
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$268435712, %edx                ## imm = 0x10000100
	xorl	%ecx, %ecx
	callq	_nvkm_mask
	leal	-52(%rbx), %esi
	movq	%r15, %rdi
	movl	$-1, %edx
	callq	_nvkm_wr32
	leal	-48(%rbx), %esi
	movq	%r15, %rdi
	movl	$-257, %edx                     ## imm = 0xFEFF
	callq	_nvkm_wr32
	incl	%r12d
	movl	(%r14), %eax
	addl	$8192, %ebx                     ## imm = 0x2000
	cmpl	%eax, %r12d
	jl	LBB0_2
## %bb.3:
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	xorl	%r12d, %r12d
	movl	$262472, %ebx                   ## imm = 0x40148
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$-1, %edx
	callq	_nvkm_wr32
	leal	4(%rbx), %esi
	movq	%r15, %rdi
	movl	$-1, %edx
	callq	_nvkm_wr32
	incl	%r12d
	addl	$8192, %ebx                     ## imm = 0x2000
	cmpl	(%r14), %r12d
	jl	LBB0_5
LBB0_6:
	movq	16(%r14), %rax
	movl	(%rax), %edx
	sarl	$12, %edx
	orl	$268435456, %edx                ## imm = 0x10000000
	movq	%r15, %rdi
	movl	$8788, %esi                     ## imm = 0x2254
	callq	_nvkm_wr32
	movq	8(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	*%rax
LBB0_8:
	movq	%r15, %rdi
	movl	$8448, %esi                     ## imm = 0x2100
	movl	$-1, %edx
	callq	_nvkm_wr32
	movq	%r15, %rdi
	movl	$8512, %esi                     ## imm = 0x2140
	movl	$2147483647, %edx               ## imm = 0x7FFFFFFF
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nvkm_wr32                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gk104_fifo_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gk104_fifo_init
_gk104_fifo_init:                       ; @gk104_fifo_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
	mov	x20, x0
	ldr	x19, [x0, #24]
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x8, [x8, #8]
	blr	x8
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w23, #0
	mov	w22, #316
	movk	w22, #4, lsl #16
	mov	w21, #316
	movk	w21, #4, lsl #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	w2, #256
	movk	w2, #4096, lsl #16
	mov	w3, #0
	bl	_nvkm_mask
	sub	w1, w21, #52
	mov	x0, x19
	mov	w2, #-1
	bl	_nvkm_wr32
	sub	w1, w21, #48
	mov	x0, x19
	mov	w2, #-257
	bl	_nvkm_wr32
	add	w23, w23, #1
	ldr	w8, [x20]
	add	w21, w21, #2, lsl #12           ; =8192
	cmp	w23, w8
	b.lt	LBB0_2
; %bb.3:
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w23, #0
	add	w21, w22, #12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	w2, #-1
	bl	_nvkm_wr32
	add	w1, w21, #4
	mov	x0, x19
	mov	w2, #-1
	bl	_nvkm_wr32
	add	w23, w23, #1
	ldr	w8, [x20]
	add	w21, w21, #2, lsl #12           ; =8192
	cmp	w23, w8
	b.lt	LBB0_5
LBB0_6:
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	asr	w8, w8, #12
	orr	w2, w8, #0x10000000
	mov	x0, x19
	mov	w1, #8788
	bl	_nvkm_wr32
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x20
	blr	x8
LBB0_8:
	mov	x0, x19
	mov	w1, #8448
	mov	w2, #-1
	bl	_nvkm_wr32
	mov	x0, x19
	mov	w1, #8512
	mov	w2, #2147483647
	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_wr32
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gk104_fifo_init
.subsections_via_symbols
