	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nve0_fifo_chan_ctor
_nve0_fifo_chan_ctor:                   ## @nve0_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movl	%r8d, %ebx
	movq	%rcx, %r13
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_nouveau_bar
	cmpl	$16, %ebx
	jae	LBB0_1
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_FIFO_ENGINE_NR@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jg	LBB0_5
## %bb.2:
	movq	%r15, %r12
	movq	%rcx, %r15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edx
	movl	$1, %r12d
	movl	%ebx, %ecx
	shll	%cl, %r12d
	btl	%ebx, %edx
	jae	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_fifo_engine@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	4(%rax,%rbx,8), %esi
	movq	%r15, %rdi
	callq	_nouveau_engine
	testq	%rax, %rax
	jne	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %eax
	jmp	LBB0_8
LBB0_17:
	movl	%r12d, (%r13)
	movl	(%r14), %eax
LBB0_9:
	movq	%r15, %r12
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_10:
	cmpl	%eax, %ebx
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	jne	LBB0_12
## %bb.11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	8(%rsi), %r8d
	movl	12(%r13), %r10d
	movq	_fifo_engine@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%ebx, %eax
	movl	(%rcx,%rax,8), %eax
	subq	$8, %rsp
	leaq	-56(%rbp), %r11
	movq	%r12, %rdi
	movl	$1, %ecx
	movl	$512, %r9d                      ## imm = 0x200
	pushq	%r11
	pushq	%rax
	pushq	%r10
	callq	_nouveau_fifo_channel_create
	addq	$32, %rsp
	movl	%eax, %r14d
	movq	-56(%rbp), %rdi
	callq	_nv_object
	movq	%rax, (%r15)
	testl	%r14d, %r14d
	jne	LBB0_16
## %bb.13:
	movq	_nve0_fifo_context_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-56(%rbp), %rdi
	callq	_nv_parent
	movl	%r14d, 4(%rax)
	movq	_nve0_fifo_context_detach@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-56(%rbp), %rdi
	callq	_nv_parent
	movl	%r14d, (%rax)
	movq	-56(%rbp), %rax
	movl	%ebx, (%rax)
	movl	4(%rax), %r14d
	shll	$9, %r14d
	movl	4(%r13), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	8(%r13), %eax
	leal	7(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$3, %edi
	callq	_log2i
	movl	%eax, %r13d
	movl	$-4, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	leal	(%r14,%rbx), %esi
	addl	$4, %esi
	xorl	%edx, %edx
	callq	_nv_wo32
	addl	$4, %ebx
	cmpl	$508, %ebx                      ## imm = 0x1FC
	jb	LBB0_14
## %bb.15:
	movq	(%r15), %rax
	movl	(%rax), %edi
	addl	%r14d, %edi
	callq	_lower_32_bits
	movq	%r12, %rdi
	movl	$8, %esi
	movl	%eax, %edx
	callq	_nv_wo32
	movq	(%r15), %rax
	addl	(%rax), %r14d
	movl	%r14d, %edi
	callq	_upper_32_bits
	movq	%r12, %rdi
	movl	$12, %esi
	movl	%eax, %edx
	callq	_nv_wo32
	movq	%r12, %rdi
	movl	$16, %esi
	movl	$64206, %edx                    ## imm = 0xFACE
	callq	_nv_wo32
	movq	%r12, %rdi
	movl	$48, %esi
	movl	$-1790, %edx                    ## imm = 0xF902
	callq	_nv_wo32
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_lower_32_bits
	movq	%r12, %rdi
	movl	$72, %esi
	movl	%eax, %edx
	callq	_nv_wo32
	movl	%ebx, %edi
	callq	_upper_32_bits
	shll	$16, %r13d
	orl	%eax, %r13d
	movq	%r12, %rdi
	movl	$76, %esi
	movl	%r13d, %edx
	callq	_nv_wo32
	movq	%r12, %rdi
	movl	$132, %esi
	movl	$541065216, %edx                ## imm = 0x20400000
	callq	_nv_wo32
	movq	%r12, %rdi
	movl	$148, %esi
	movl	$805306369, %edx                ## imm = 0x30000001
	callq	_nv_wo32
	movq	%r12, %rdi
	movl	$156, %esi
	movl	$256, %edx                      ## imm = 0x100
	callq	_nv_wo32
	movq	%r12, %rdi
	movl	$172, %esi
	movl	$31, %edx
	callq	_nv_wo32
	movq	-56(%rbp), %rax
	movl	4(%rax), %edx
	movq	%r12, %rdi
	movl	$232, %esi
	callq	_nv_wo32
	movq	%r12, %rdi
	movl	$184, %esi
	movl	$-134217728, %edx               ## imm = 0xF8000000
	callq	_nv_wo32
	movq	%r12, %rdi
	movl	$248, %esi
	movl	$268447872, %edx                ## imm = 0x10003080
	callq	_nv_wo32
	movq	%r12, %rdi
	movl	$252, %esi
	movl	$268435472, %edx                ## imm = 0x10000010
	callq	_nv_wo32
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	*(%rdi)
	xorl	%r14d, %r14d
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FIFO_ENGINE_NR,4,2             ## @FIFO_ENGINE_NR
	.comm	_fifo_engine,8,3                ## @fifo_engine
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_nve0_fifo_context_attach,4,2   ## @nve0_fifo_context_attach
	.comm	_nve0_fifo_context_detach,4,2   ## @nve0_fifo_context_detach
	.no_dead_strip	_nve0_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 nve0_fifo_chan_ctor
_nve0_fifo_chan_ctor:                   ; @nve0_fifo_chan_ctor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x5
	mov	x25, x4
	mov	x22, x3
	mov	x24, x2
	mov	x21, x1
	mov	x20, x0
	bl	_nouveau_bar
	cmp	w25, #16
	b.hs	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_2:
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
Lloh2:
	adrp	x27, _FIFO_ENGINE_NR@GOTPAGE
Lloh3:
	ldr	x27, [x27, _FIFO_ENGINE_NR@GOTPAGEOFF]
	ldr	w8, [x27]
Lloh4:
	adrp	x26, _fifo_engine@GOTPAGE
Lloh5:
	ldr	x26, [x26, _fifo_engine@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	str	x19, [sp, #16]                  ; 8-byte Folded Spill
	mov	x25, #0
	mov	w28, #4
	mov	w19, #1
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x25, #1
	add	x28, x28, #8
	cmp	x25, w8, sxtw
	b.ge	LBB0_14
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x22]
	lsl	w23, w19, w25
	tst	w9, w23
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x26]
	ldr	w1, [x8, x28]
	mov	x0, x20
	bl	_nouveau_engine
	cbnz	x0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x27]
	b	LBB0_4
LBB0_8:
	mov	w25, #0
	cmp	w25, w8
	b.eq	LBB0_15
LBB0_9:
	ldr	w4, [x21, #8]
	ldr	w6, [x22, #12]
	ldr	x8, [x26]
	mov	w9, w25
	lsl	x9, x9, #3
	ldr	w7, [x8, x9]
	add	x8, sp, #24
	str	x8, [sp]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x24
	mov	w3, #1
	mov	w5, #512
	bl	_nouveau_fifo_channel_create
	mov	x24, x0
	ldr	x0, [sp, #24]
	bl	_nv_object
	str	x0, [x19]
	cbnz	w24, LBB0_17
; %bb.10:
Lloh6:
	adrp	x8, _nve0_fifo_context_attach@GOTPAGE
Lloh7:
	ldr	x8, [x8, _nve0_fifo_context_attach@GOTPAGEOFF]
Lloh8:
	ldr	w19, [x8]
	ldr	x0, [sp, #24]
	bl	_nv_parent
	str	w19, [x0, #4]
Lloh9:
	adrp	x8, _nve0_fifo_context_detach@GOTPAGE
Lloh10:
	ldr	x8, [x8, _nve0_fifo_context_detach@GOTPAGEOFF]
Lloh11:
	ldr	w19, [x8]
	ldr	x0, [sp, #24]
	bl	_nv_parent
	str	w19, [x0]
	ldr	x8, [sp, #24]
	str	w25, [x8]
	ldr	w8, [x8, #4]
	lsl	w24, w8, #9
	ldp	w23, w8, [x22, #4]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #3
	bl	_log2i
	mov	x22, x0
	mov	w19, #-4
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	add	w8, w24, w19
	add	w1, w8, #4
	mov	w2, #0
	bl	_nv_wo32
	add	w19, w19, #4
	cmp	w19, #508
	b.lo	LBB0_11
; %bb.12:
	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, #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, #172
	mov	w2, #31
	bl	_nv_wo32
	ldr	x8, [sp, #24]
	ldr	w2, [x8, #4]
	mov	x0, x20
	mov	w1, #232
	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	x0, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [x0]
	blr	x8
	mov	w24, #0
	b	LBB0_17
LBB0_13:
	str	w23, [x22]
	ldr	w8, [x27]
LBB0_14:
	ldr	x19, [sp, #16]                  ; 8-byte Folded Reload
	cmp	w25, w8
	b.ne	LBB0_9
LBB0_15:
Lloh12:
	adrp	x8, _ENODEV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_17:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FIFO_ENGINE_NR,4,2             ; @FIFO_ENGINE_NR
	.comm	_fifo_engine,8,3                ; @fifo_engine
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_nve0_fifo_context_attach,4,2   ; @nve0_fifo_context_attach
	.comm	_nve0_fifo_context_detach,4,2   ; @nve0_fifo_context_detach
	.no_dead_strip	_nve0_fifo_chan_ctor
.subsections_via_symbols
