	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv40_fifo_init
_nv40_fifo_init:                        ## @nv40_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
	movq	%rdi, %rbx
	callq	_nouveau_fb
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nouveau_fifo_init
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	%rbx, %rdi
	movl	$8256, %esi                     ## imm = 0x2040
	movl	$255, %edx
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$8260, %esi                     ## imm = 0x2044
	movl	$553779199, %edx                ## imm = 0x2101FFFF
	callq	_nv_wr32
	movq	%rbx, %rdi
	movl	$8280, %esi                     ## imm = 0x2058
	movl	$1, %edx
	callq	_nv_wr32
	movq	_NV03_PFIFO_RAMHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	24(%rbx), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %edx
	shll	$16, %ecx
	addl	$-589824, %ecx                  ## imm = 0xFFF70000
	sarl	$8, %edx
	orl	%ecx, %edx
	orl	$50331648, %edx                 ## imm = 0x3000000
	movq	%rbx, %rdi
	callq	_nv_wr32
	movq	_NV03_PFIFO_RAMRO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rax
	movl	(%rax), %edx
	sarl	$8, %edx
	movq	%rbx, %rdi
	callq	_nv_wr32
	movq	%rbx, %rdi
	callq	_nv_device
	movl	(%rax), %eax
	addl	$-64, %eax
	cmpl	$11, %eax
	ja	LBB0_5
## %bb.2:
	movl	$196610, %r12d                  ## imm = 0x30002
	movl	$303, %ecx                      ## imm = 0x12F
	btl	%eax, %ecx
	jb	LBB0_6
## %bb.3:
	movl	$2688, %ecx                     ## imm = 0xA80
	btl	%eax, %ecx
	jae	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	movl	$8752, %esi                     ## imm = 0x2230
	movl	$1, %edx
	callq	_nv_wr32
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	movl	$8752, %esi                     ## imm = 0x2230
	xorl	%edx, %edx
	callq	_nv_wr32
	movl	(%r15), %eax
	movq	8(%rbx), %rcx
	movl	(%rcx), %ecx
	leal	(%rax,%rcx), %r12d
	addl	$-524288, %r12d                 ## imm = 0xFFF80000
	sarl	$16, %r12d
	orl	$196608, %r12d                  ## imm = 0x30000
LBB0_6:
	movq	%rbx, %rdi
	movl	$8736, %esi                     ## imm = 0x2220
	movl	%r12d, %edx
	callq	_nv_wr32
	movq	_NV03_PFIFO_CACHE1_PUSH1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	%rbx, %rdi
	callq	_nv_wr32
	movq	_NV03_PFIFO_INTR_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_nv_wr32
	movq	_NV03_PFIFO_INTR_EN_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$-1, %edx
	callq	_nv_wr32
	movq	_NV03_PFIFO_CACHE1_PUSH0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_nv_wr32
	movq	_NV04_PFIFO_CACHE1_PULL0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_nv_wr32
	movq	_NV03_PFIFO_CACHES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_nv_wr32
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV03_PFIFO_RAMHT,4,2           ## @NV03_PFIFO_RAMHT
	.comm	_NV03_PFIFO_RAMRO,4,2           ## @NV03_PFIFO_RAMRO
	.comm	_NV03_PFIFO_CACHE1_PUSH1,4,2    ## @NV03_PFIFO_CACHE1_PUSH1
	.comm	_NV03_PFIFO_INTR_0,4,2          ## @NV03_PFIFO_INTR_0
	.comm	_NV03_PFIFO_INTR_EN_0,4,2       ## @NV03_PFIFO_INTR_EN_0
	.comm	_NV03_PFIFO_CACHE1_PUSH0,4,2    ## @NV03_PFIFO_CACHE1_PUSH0
	.comm	_NV04_PFIFO_CACHE1_PULL0,4,2    ## @NV04_PFIFO_CACHE1_PULL0
	.comm	_NV03_PFIFO_CACHES,4,2          ## @NV03_PFIFO_CACHES
	.no_dead_strip	_nv40_fifo_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv40_fifo_init
_nv40_fifo_init:                        ; @nv40_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
	mov	x19, x0
	bl	_nouveau_fb
	mov	x21, x0
	mov	x0, x19
	bl	_nouveau_fifo_init
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.1:
	mov	x0, x19
	mov	w1, #8256
	mov	w2, #255
	bl	_nv_wr32
	mov	x0, x19
	mov	w1, #8260
	mov	w2, #553779199
	bl	_nv_wr32
	mov	w23, #1
	mov	x0, x19
	mov	w1, #8280
	mov	w2, #1
	bl	_nv_wr32
Lloh0:
	adrp	x8, _NV03_PFIFO_RAMHT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NV03_PFIFO_RAMHT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x8, [x19, #24]
	ldp	w9, w8, [x8]
	lsl	w9, w9, #16
	sub	w9, w9, #144, lsl #12           ; =589824
	orr	w8, w9, w8, asr #8
	orr	w2, w8, #0x3000000
	mov	x0, x19
	bl	_nv_wr32
Lloh3:
	adrp	x8, _NV03_PFIFO_RAMRO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NV03_PFIFO_RAMRO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
	asr	w2, w8, #8
	mov	x0, x19
	bl	_nv_wr32
	mov	x0, x19
	bl	_nv_device
	ldr	w8, [x0]
	sub	w8, w8, #64
	cmp	w8, #11
	b.hi	LBB0_5
; %bb.2:
	mov	w22, #2
	movk	w22, #3, lsl #16
	lsl	w9, w23, w8
	mov	w10, #303
	tst	w9, w10
	b.ne	LBB0_6
; %bb.3:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #2688
	tst	w8, w9
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #8752
	mov	w2, #1
	bl	_nv_wr32
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	mov	w1, #8752
	mov	w2, #0
	bl	_nv_wr32
	ldr	w8, [x21]
	ldr	x9, [x19, #8]
	ldr	w9, [x9]
	add	w8, w8, w9
	sub	w8, w8, #128, lsl #12           ; =524288
	asr	w8, w8, #16
	orr	w22, w8, #0x30000
LBB0_6:
	mov	x0, x19
	mov	w1, #8736
	mov	x2, x22
	bl	_nv_wr32
Lloh6:
	adrp	x8, _NV03_PFIFO_CACHE1_PUSH1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NV03_PFIFO_CACHE1_PUSH1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_nv_wr32
Lloh9:
	adrp	x8, _NV03_PFIFO_INTR_0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NV03_PFIFO_INTR_0@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_nv_wr32
Lloh12:
	adrp	x8, _NV03_PFIFO_INTR_EN_0@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NV03_PFIFO_INTR_EN_0@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-1
	bl	_nv_wr32
Lloh15:
	adrp	x8, _NV03_PFIFO_CACHE1_PUSH0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NV03_PFIFO_CACHE1_PUSH0@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_nv_wr32
Lloh18:
	adrp	x8, _NV04_PFIFO_CACHE1_PULL0@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NV04_PFIFO_CACHE1_PULL0@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_nv_wr32
Lloh21:
	adrp	x8, _NV03_PFIFO_CACHES@GOTPAGE
Lloh22:
	ldr	x8, [x8, _NV03_PFIFO_CACHES@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_nv_wr32
LBB0_7:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NV03_PFIFO_RAMHT,4,2           ; @NV03_PFIFO_RAMHT
	.comm	_NV03_PFIFO_RAMRO,4,2           ; @NV03_PFIFO_RAMRO
	.comm	_NV03_PFIFO_CACHE1_PUSH1,4,2    ; @NV03_PFIFO_CACHE1_PUSH1
	.comm	_NV03_PFIFO_INTR_0,4,2          ; @NV03_PFIFO_INTR_0
	.comm	_NV03_PFIFO_INTR_EN_0,4,2       ; @NV03_PFIFO_INTR_EN_0
	.comm	_NV03_PFIFO_CACHE1_PUSH0,4,2    ; @NV03_PFIFO_CACHE1_PUSH0
	.comm	_NV04_PFIFO_CACHE1_PULL0,4,2    ; @NV04_PFIFO_CACHE1_PULL0
	.comm	_NV03_PFIFO_CACHES,4,2          ; @NV03_PFIFO_CACHES
	.no_dead_strip	_nv40_fifo_init
.subsections_via_symbols
