	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv17_fifo_chan_ctor
_nv17_fifo_chan_ctor:                   ## @nv17_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$7, %r8d
	ja	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_2:
	movq	%r9, %r12
	movq	%rcx, %r14
	movq	%rsi, %r15
	movl	4(%rcx), %eax
	movq	_NVDEV_ENGINE_DMAOBJ@GOTPCREL(%rip), %rsi
	movq	_NVDEV_ENGINE_SW@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$1, %ebx
	shlq	%cl, %rbx
	movb	(%rsi), %cl
	btsq	%rcx, %rbx
	movq	_NVDEV_ENGINE_GR@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsq	%rcx, %rbx
	movq	_NVDEV_ENGINE_MPEG@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsq	%rcx, %rbx
	subq	$8, %rsp
	leaq	-40(%rbp), %r10
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	movl	$8388608, %r8d                  ## imm = 0x800000
	movl	$65536, %r9d                    ## imm = 0x10000
	pushq	%r10
	pushq	%rbx
	pushq	%rax
	callq	_nouveau_fifo_channel_create
	addq	$32, %rsp
	movl	%eax, %ebx
	movq	-40(%rbp), %rdi
	callq	_nv_object
	movq	%rax, (%r12)
	testl	%ebx, %ebx
	jne	LBB0_4
## %bb.3:
	movq	_nv04_fifo_object_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-40(%rbp), %rdi
	callq	_nv_parent
	movl	%ebx, 8(%rax)
	movq	_nv04_fifo_object_detach@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-40(%rbp), %rdi
	callq	_nv_parent
	movl	%ebx, 4(%rax)
	movq	_nv04_fifo_context_attach@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-40(%rbp), %rdi
	callq	_nv_parent
	movl	%ebx, (%rax)
	movq	-40(%rbp), %rax
	movl	8(%rax), %esi
	shll	$6, %esi
	movl	%esi, (%rax)
	movl	(%r15), %edi
	movl	(%r14), %edx
	callq	_nv_wo32
	movl	(%r15), %edi
	movq	-40(%rbp), %rax
	movl	(%rax), %esi
	addl	$4, %esi
	movl	(%r14), %edx
	callq	_nv_wo32
	movl	(%r15), %edi
	movq	-40(%rbp), %rax
	movl	(%rax), %esi
	addl	$12, %esi
	movq	16(%rax), %rax
	movl	(%rax), %edx
	sarl	$4, %edx
	callq	_nv_wo32
	movl	(%r15), %edi
	movq	-40(%rbp), %rax
	movl	(%rax), %esi
	movq	_NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES@GOTPCREL(%rip), %rax
	movq	_NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	addl	$20, %esi
	movq	_NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_nv_wo32
	xorl	%ebx, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_NVDEV_ENGINE_DMAOBJ,8,3        ## @NVDEV_ENGINE_DMAOBJ
	.comm	_NVDEV_ENGINE_SW,8,3            ## @NVDEV_ENGINE_SW
	.comm	_NVDEV_ENGINE_GR,8,3            ## @NVDEV_ENGINE_GR
	.comm	_NVDEV_ENGINE_MPEG,8,3          ## @NVDEV_ENGINE_MPEG
	.comm	_nv04_fifo_object_attach,4,2    ## @nv04_fifo_object_attach
	.comm	_nv04_fifo_object_detach,4,2    ## @nv04_fifo_object_detach
	.comm	_nv04_fifo_context_attach,4,2   ## @nv04_fifo_context_attach
	.comm	_NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES,4,2 ## @NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES
	.comm	_NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES,4,2 ## @NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES
	.comm	_NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8,4,2 ## @NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8
	.comm	_NV_PFIFO_CACHE1_BIG_ENDIAN,4,2 ## @NV_PFIFO_CACHE1_BIG_ENDIAN
	.no_dead_strip	_nv17_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 nv17_fifo_chan_ctor
_nv17_fifo_chan_ctor:                   ; @nv17_fifo_chan_ctor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cmp	w4, #7
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_4
LBB0_2:
	mov	x21, x5
	mov	x20, x3
	mov	x19, x1
	ldr	w6, [x3, #4]
Lloh3:
	adrp	x8, _NVDEV_ENGINE_DMAOBJ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NVDEV_ENGINE_DMAOBJ@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	mov	w9, #1
	lsl	x8, x9, x8
Lloh6:
	adrp	x10, _NVDEV_ENGINE_SW@GOTPAGE
Lloh7:
	ldr	x10, [x10, _NVDEV_ENGINE_SW@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	lsl	x10, x9, x10
	orr	x8, x10, x8
Lloh9:
	adrp	x10, _NVDEV_ENGINE_GR@GOTPAGE
Lloh10:
	ldr	x10, [x10, _NVDEV_ENGINE_GR@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	lsl	x10, x9, x10
	orr	x8, x8, x10
Lloh12:
	adrp	x10, _NVDEV_ENGINE_MPEG@GOTPAGE
Lloh13:
	ldr	x10, [x10, _NVDEV_ENGINE_MPEG@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	lsl	x9, x9, x10
	orr	x7, x8, x9
	add	x8, sp, #8
	str	x8, [sp]
	mov	w3, #0
	mov	w4, #8388608
	mov	w5, #65536
	bl	_nouveau_fifo_channel_create
	mov	x22, x0
	ldr	x0, [sp, #8]
	bl	_nv_object
	str	x0, [x21]
	cbnz	w22, LBB0_4
; %bb.3:
Lloh15:
	adrp	x8, _nv04_fifo_object_attach@GOTPAGE
Lloh16:
	ldr	x8, [x8, _nv04_fifo_object_attach@GOTPAGEOFF]
Lloh17:
	ldr	w21, [x8]
	ldr	x0, [sp, #8]
	bl	_nv_parent
	str	w21, [x0, #8]
Lloh18:
	adrp	x8, _nv04_fifo_object_detach@GOTPAGE
Lloh19:
	ldr	x8, [x8, _nv04_fifo_object_detach@GOTPAGEOFF]
Lloh20:
	ldr	w21, [x8]
	ldr	x0, [sp, #8]
	bl	_nv_parent
	str	w21, [x0, #4]
Lloh21:
	adrp	x8, _nv04_fifo_context_attach@GOTPAGE
Lloh22:
	ldr	x8, [x8, _nv04_fifo_context_attach@GOTPAGEOFF]
Lloh23:
	ldr	w21, [x8]
	ldr	x0, [sp, #8]
	bl	_nv_parent
	str	w21, [x0]
	ldr	x8, [sp, #8]
	ldr	w9, [x8, #8]
	lsl	w1, w9, #6
	str	w1, [x8]
	ldr	w0, [x19]
	ldr	w2, [x20]
	bl	_nv_wo32
	ldr	w0, [x19]
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	add	w1, w8, #4
	ldr	w2, [x20]
	bl	_nv_wo32
	ldr	w0, [x19]
	ldr	x8, [sp, #8]
	ldr	w9, [x8]
	add	w1, w9, #12
	ldr	x8, [x8, #16]
	ldr	w8, [x8]
	asr	w2, w8, #4
	bl	_nv_wo32
	ldr	w0, [x19]
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
	add	w1, w8, #20
Lloh24:
	adrp	x8, _NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES@GOTPAGE
Lloh25:
	ldr	x8, [x8, _NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES@GOTPAGE
Lloh28:
	ldr	x9, [x9, _NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh30:
	adrp	x9, _NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8@GOTPAGE
Lloh31:
	ldr	x9, [x9, _NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w2, w8, w9
	bl	_nv_wo32
LBB0_4:
	mov	x0, x22
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_NVDEV_ENGINE_DMAOBJ,8,3        ; @NVDEV_ENGINE_DMAOBJ
	.comm	_NVDEV_ENGINE_SW,8,3            ; @NVDEV_ENGINE_SW
	.comm	_NVDEV_ENGINE_GR,8,3            ; @NVDEV_ENGINE_GR
	.comm	_NVDEV_ENGINE_MPEG,8,3          ; @NVDEV_ENGINE_MPEG
	.comm	_nv04_fifo_object_attach,4,2    ; @nv04_fifo_object_attach
	.comm	_nv04_fifo_object_detach,4,2    ; @nv04_fifo_object_detach
	.comm	_nv04_fifo_context_attach,4,2   ; @nv04_fifo_context_attach
	.comm	_NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES,4,2 ; @NV_PFIFO_CACHE1_DMA_FETCH_TRIG_128_BYTES
	.comm	_NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES,4,2 ; @NV_PFIFO_CACHE1_DMA_FETCH_SIZE_128_BYTES
	.comm	_NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8,4,2 ; @NV_PFIFO_CACHE1_DMA_FETCH_MAX_REQS_8
	.comm	_NV_PFIFO_CACHE1_BIG_ENDIAN,4,2 ; @NV_PFIFO_CACHE1_BIG_ENDIAN
	.no_dead_strip	_nv17_fifo_chan_ctor
.subsections_via_symbols
