	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvc0_fifo_chan_ctor
_nvc0_fifo_chan_ctor:                   ## @nvc0_fifo_chan_ctor
	.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
	movq	%r9, %r13
	movl	%r8d, %ebx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_nouveau_bar
	cmpl	$11, %ebx
	ja	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_2:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	8(%r12), %r8d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %r10d
	movq	_NVDEV_ENGINE_SW@GOTPCREL(%rip), %rcx
	movb	(%rcx), %dl
	movq	_NVDEV_ENGINE_GR@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %ebx
	shlq	%cl, %rbx
	btsq	%rdx, %rbx
	movq	_NVDEV_ENGINE_COPY0@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsq	%rcx, %rbx
	movq	_NVDEV_ENGINE_COPY1@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsq	%rcx, %rbx
	movq	_NVDEV_ENGINE_BSP@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsq	%rcx, %rbx
	movq	_NVDEV_ENGINE_VP@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsq	%rcx, %rbx
	movq	_NVDEV_ENGINE_PPP@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsq	%rcx, %rbx
	subq	$8, %rsp
	leaq	-56(%rbp), %rax
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	movl	$1, %ecx
	movl	$4096, %r9d                     ## imm = 0x1000
	pushq	%rax
	pushq	%rbx
	pushq	%r10
	callq	_nouveau_fifo_channel_create
	addq	$32, %rsp
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi
	callq	_nv_object
	movq	%rax, (%r13)
	testl	%ebx, %ebx
	jne	LBB0_6
## %bb.3:
	movq	_nvc0_fifo_context_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-56(%rbp), %rdi
	callq	_nv_parent
	movl	%ebx, 4(%rax)
	movq	_nvc0_fifo_context_detach@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-56(%rbp), %rdi
	callq	_nv_parent
	movl	%ebx, (%rax)
	movq	-56(%rbp), %rax
	movl	(%rax), %r14d
	shll	$12, %r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ebx
	movl	4(%rax), %eax
	leal	7(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$3, %edi
	callq	_log2i
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	$-4, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	leal	(%r14,%r13), %esi
	addl	$4, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	addl	$4, %r13d
	cmpl	$4092, %r13d                    ## imm = 0xFFC
	jb	LBB0_4
## %bb.5:
	movq	(%r12), %rax
	movl	(%rax), %edi
	addl	%r14d, %edi
	callq	_lower_32_bits
	movq	%r15, %rdi
	movl	$8, %esi
	movl	%eax, %edx
	callq	_nv_wo32
	movq	(%r12), %rax
	addl	(%rax), %r14d
	movl	%r14d, %edi
	callq	_upper_32_bits
	movq	%r15, %rdi
	movl	$12, %esi
	movl	%eax, %edx
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$16, %esi
	movl	$64206, %edx                    ## imm = 0xFACE
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$48, %esi
	movl	$-1790, %edx                    ## imm = 0xF902
	callq	_nv_wo32
	movl	%ebx, %edi
	callq	_lower_32_bits
	movq	%r15, %rdi
	movl	$72, %esi
	movl	%eax, %edx
	callq	_nv_wo32
	movl	%ebx, %edi
	callq	_upper_32_bits
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	shll	$16, %edx
	orl	%eax, %edx
	movq	%r15, %rdi
	movl	$76, %esi
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$84, %esi
	movl	$2, %edx
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$132, %esi
	movl	$541065216, %edx                ## imm = 0x20400000
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$148, %esi
	movl	$805306369, %edx                ## imm = 0x30000001
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$156, %esi
	movl	$256, %edx                      ## imm = 0x100
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$164, %esi
	movl	$522133279, %edx                ## imm = 0x1F1F1F1F
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$168, %esi
	movl	$522133279, %edx                ## imm = 0x1F1F1F1F
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$172, %esi
	movl	$31, %edx
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$184, %esi
	movl	$-134217728, %edx               ## imm = 0xF8000000
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$248, %esi
	movl	$268447872, %edx                ## imm = 0x10003080
	callq	_nv_wo32
	movq	%r15, %rdi
	movl	$252, %esi
	movl	$268435472, %edx                ## imm = 0x10000010
	callq	_nv_wo32
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	*(%rdi)
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NVDEV_ENGINE_SW,8,3            ## @NVDEV_ENGINE_SW
	.comm	_NVDEV_ENGINE_GR,8,3            ## @NVDEV_ENGINE_GR
	.comm	_NVDEV_ENGINE_COPY0,8,3         ## @NVDEV_ENGINE_COPY0
	.comm	_NVDEV_ENGINE_COPY1,8,3         ## @NVDEV_ENGINE_COPY1
	.comm	_NVDEV_ENGINE_BSP,8,3           ## @NVDEV_ENGINE_BSP
	.comm	_NVDEV_ENGINE_VP,8,3            ## @NVDEV_ENGINE_VP
	.comm	_NVDEV_ENGINE_PPP,8,3           ## @NVDEV_ENGINE_PPP
	.comm	_nvc0_fifo_context_attach,4,2   ## @nvc0_fifo_context_attach
	.comm	_nvc0_fifo_context_detach,4,2   ## @nvc0_fifo_context_detach
	.no_dead_strip	_nvc0_fifo_chan_ctor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvc0_fifo_chan_ctor
_nvc0_fifo_chan_ctor:                   ; @nvc0_fifo_chan_ctor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x5
	mov	x25, x4
	mov	x22, x3
	mov	x24, x2
	mov	x21, x1
	mov	x20, x0
	bl	_nouveau_bar
	cmp	w25, #11
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_6
LBB0_2:
	mov	x19, x0
	ldr	w4, [x21, #8]
Lloh3:
	adrp	x8, _NVDEV_ENGINE_SW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NVDEV_ENGINE_SW@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	mov	w9, #1
Lloh6:
	adrp	x10, _NVDEV_ENGINE_GR@GOTPAGE
Lloh7:
	ldr	x10, [x10, _NVDEV_ENGINE_GR@GOTPAGEOFF]
	lsl	x8, x9, x8
Lloh8:
	ldr	x10, [x10]
	lsl	x10, x9, x10
	orr	x8, x10, x8
Lloh9:
	adrp	x10, _NVDEV_ENGINE_COPY0@GOTPAGE
Lloh10:
	ldr	x10, [x10, _NVDEV_ENGINE_COPY0@GOTPAGEOFF]
	ldr	w6, [x22, #8]
Lloh11:
	ldr	x10, [x10]
	lsl	x10, x9, x10
	orr	x8, x8, x10
Lloh12:
	adrp	x10, _NVDEV_ENGINE_COPY1@GOTPAGE
Lloh13:
	ldr	x10, [x10, _NVDEV_ENGINE_COPY1@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	lsl	x10, x9, x10
	orr	x8, x8, x10
Lloh15:
	adrp	x10, _NVDEV_ENGINE_BSP@GOTPAGE
Lloh16:
	ldr	x10, [x10, _NVDEV_ENGINE_BSP@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	lsl	x10, x9, x10
	orr	x8, x8, x10
Lloh18:
	adrp	x10, _NVDEV_ENGINE_VP@GOTPAGE
Lloh19:
	ldr	x10, [x10, _NVDEV_ENGINE_VP@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	lsl	x10, x9, x10
	orr	x8, x8, x10
Lloh21:
	adrp	x10, _NVDEV_ENGINE_PPP@GOTPAGE
Lloh22:
	ldr	x10, [x10, _NVDEV_ENGINE_PPP@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	lsl	x9, x9, x10
	orr	x7, x8, x9
	add	x8, sp, #8
	str	x8, [sp]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x24
	mov	w3, #1
	mov	w5, #4096
	bl	_nouveau_fifo_channel_create
	mov	x24, x0
	ldr	x0, [sp, #8]
	bl	_nv_object
	str	x0, [x23]
	cbnz	w24, LBB0_6
; %bb.3:
Lloh24:
	adrp	x8, _nvc0_fifo_context_attach@GOTPAGE
Lloh25:
	ldr	x8, [x8, _nvc0_fifo_context_attach@GOTPAGEOFF]
Lloh26:
	ldr	w23, [x8]
	ldr	x0, [sp, #8]
	bl	_nv_parent
	str	w23, [x0, #4]
Lloh27:
	adrp	x8, _nvc0_fifo_context_detach@GOTPAGE
Lloh28:
	ldr	x8, [x8, _nvc0_fifo_context_detach@GOTPAGEOFF]
Lloh29:
	ldr	w23, [x8]
	ldr	x0, [sp, #8]
	bl	_nv_parent
	str	w23, [x0]
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	lsl	w24, w8, #12
	ldp	w23, w8, [x22]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #3
	bl	_log2i
	mov	x22, x0
	mov	w25, #-4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	add	w8, w24, w25
	add	w1, w8, #4
	mov	w2, #0
	bl	_nv_wo32
	add	w25, w25, #4
	cmp	w25, #4092
	b.lo	LBB0_4
; %bb.5:
	ldr	x8, [x21]
	ldr	w8, [x8]
	add	w0, w8, w24
	bl	_lower_32_bits
	mov	x2, x0
	mov	x0, x20
	mov	w1, #8
	bl	_nv_wo32
	ldr	x8, [x21]
	ldr	w8, [x8]
	add	w0, w8, w24
	bl	_upper_32_bits
	mov	x2, x0
	mov	x0, x20
	mov	w1, #12
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #16
	mov	w2, #64206
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #48
	mov	w2, #-1790
	bl	_nv_wo32
	mov	x0, x23
	bl	_lower_32_bits
	mov	x2, x0
	mov	x0, x20
	mov	w1, #72
	bl	_nv_wo32
	mov	x0, x23
	bl	_upper_32_bits
	orr	w2, w0, w22, lsl #16
	mov	x0, x20
	mov	w1, #76
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #84
	mov	w2, #2
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #132
	mov	w2, #541065216
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #148
	mov	w2, #1
	movk	w2, #12288, lsl #16
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #156
	mov	w2, #256
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #164
	mov	w2, #522133279
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #168
	mov	w2, #522133279
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #172
	mov	w2, #31
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #184
	mov	w2, #-134217728
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #248
	mov	w2, #12416
	movk	w2, #4096, lsl #16
	bl	_nv_wo32
	mov	x0, x20
	mov	w1, #252
	mov	w2, #16
	movk	w2, #4096, lsl #16
	bl	_nv_wo32
	ldr	x8, [x19]
	mov	x0, x19
	blr	x8
	mov	w24, #0
LBB0_6:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NVDEV_ENGINE_SW,8,3            ; @NVDEV_ENGINE_SW
	.comm	_NVDEV_ENGINE_GR,8,3            ; @NVDEV_ENGINE_GR
	.comm	_NVDEV_ENGINE_COPY0,8,3         ; @NVDEV_ENGINE_COPY0
	.comm	_NVDEV_ENGINE_COPY1,8,3         ; @NVDEV_ENGINE_COPY1
	.comm	_NVDEV_ENGINE_BSP,8,3           ; @NVDEV_ENGINE_BSP
	.comm	_NVDEV_ENGINE_VP,8,3            ; @NVDEV_ENGINE_VP
	.comm	_NVDEV_ENGINE_PPP,8,3           ; @NVDEV_ENGINE_PPP
	.comm	_nvc0_fifo_context_attach,4,2   ; @nvc0_fifo_context_attach
	.comm	_nvc0_fifo_context_detach,4,2   ; @nvc0_fifo_context_detach
	.no_dead_strip	_nvc0_fifo_chan_ctor
.subsections_via_symbols
