	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvc0_fifo_init
_nvc0_fifo_init:                        ## @nvc0_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	addq	$8, %rdi
	callq	_nouveau_fifo_init
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	%r14, %rdi
	movl	$516, %esi                      ## imm = 0x204
	movl	$-1, %edx
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	$8708, %esi                     ## imm = 0x2204
	movl	$-1, %edx
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	$8708, %esi                     ## imm = 0x2204
	callq	_nv_rd32
	movl	%eax, %edi
	callq	_hweight32
	movl	%eax, (%r14)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_nv_debug
	movl	(%r14), %eax
	cmpl	$3, %eax
	jl	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	movl	$8712, %esi                     ## imm = 0x2208
	movl	$-2, %edx
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	$8716, %esi                     ## imm = 0x220C
	movl	$-3, %edx
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	$8720, %esi                     ## imm = 0x2210
	movl	$-3, %edx
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	$8724, %esi                     ## imm = 0x2214
	movl	$-3, %edx
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	$8728, %esi                     ## imm = 0x2218
	movl	$-5, %edx
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	$8732, %esi                     ## imm = 0x221C
	movl	$-3, %edx
	callq	_nv_wr32
	movl	(%r14), %eax
LBB0_3:
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	xorl	%r15d, %r15d
	movl	$262460, %ebx                   ## imm = 0x4013C
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$268435712, %edx                ## imm = 0x10000100
	xorl	%ecx, %ecx
	callq	_nv_mask
	leal	-52(%rbx), %esi
	movq	%r14, %rdi
	movl	$-1, %edx
	callq	_nv_wr32
	leal	-48(%rbx), %esi
	movq	%r14, %rdi
	movl	$-257, %edx                     ## imm = 0xFEFF
	callq	_nv_wr32
	incl	%r15d
	addl	$8192, %ebx                     ## imm = 0x2000
	cmpl	(%r14), %r15d
	jl	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	movl	$8704, %esi                     ## imm = 0x2200
	movl	$1, %edx
	movl	$1, %ecx
	callq	_nv_mask
	movl	4(%r14), %edx
	sarl	$12, %edx
	orl	$268435456, %edx                ## imm = 0x10000000
	movq	%r14, %rdi
	movl	$8788, %esi                     ## imm = 0x2254
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	$10752, %esi                    ## imm = 0x2A00
	movl	$-1, %edx
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	$8448, %esi                     ## imm = 0x2100
	movl	$-1, %edx
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	$8512, %esi                     ## imm = 0x2140
	movl	$1073741823, %edx               ## imm = 0x3FFFFFFF
	callq	_nv_wr32
	movq	%r14, %rdi
	movl	$9768, %esi                     ## imm = 0x2628
	movl	$1, %edx
	callq	_nv_wr32
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d subfifo(s)\n"

	.no_dead_strip	_nvc0_fifo_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvc0_fifo_init
_nvc0_fifo_init:                        ; @nvc0_fifo_init
	.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, x0
	add	x0, x0, #8
	bl	_nouveau_fifo_init
	cbnz	w0, LBB0_7
; %bb.1:
	mov	x0, x19
	mov	w1, #516
	mov	w2, #-1
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #8708
	mov	w2, #-1
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #8708
	bl	_nv_rd32
	bl	_hweight32
	mov	x2, x0
	str	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nv_debug
	ldr	w8, [x19]
	cmp	w8, #3
	b.lt	LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #8712
	mov	w2, #-2
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #8716
	mov	w2, #-3
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #8720
	mov	w2, #-3
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #8724
	mov	w2, #-3
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #8728
	mov	w2, #-5
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #8732
	mov	w2, #-3
	bl	_nv_wr32
	ldr	w8, [x19]
LBB0_3:
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w21, #0
	mov	w20, #316
	movk	w20, #4, lsl #16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #256
	movk	w2, #4096, lsl #16
	mov	w3, #0
	bl	_nv_mask
	sub	w1, w20, #52
	mov	x0, x19
	mov	w2, #-1
	bl	_nv_wr32
	sub	w1, w20, #48
	mov	x0, x19
	mov	w2, #-257
	bl	_nv_wr32
	add	w21, w21, #1
	ldr	w8, [x19]
	add	w20, w20, #2, lsl #12           ; =8192
	cmp	w21, w8
	b.lt	LBB0_5
LBB0_6:
	mov	x0, x19
	mov	w1, #8704
	mov	w2, #1
	mov	w3, #1
	bl	_nv_mask
	ldr	w8, [x19, #4]
	asr	w8, w8, #12
	orr	w2, w8, #0x10000000
	mov	x0, x19
	mov	w1, #8788
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #10752
	mov	w2, #-1
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #8448
	mov	w2, #-1
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #8512
	mov	w2, #1073741823
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #9768
	mov	w2, #1
	bl	_nv_wr32
	mov	w0, #0
LBB0_7:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d subfifo(s)\n"

	.no_dead_strip	_nvc0_fifo_init
.subsections_via_symbols
