	.file	"extr_channv50.c_nv50_fifo_chan_engine_init.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nv50_fifo_chan_engine_init, @function
nv50_fifo_chan_engine_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	nv50_fifo_chan@PLT
	mov	rdx, QWORD PTR 0[rbp]
	mov	rdi, rbp
	mov	rbx, rax
	mov	rax, QWORD PTR 8[rax]
	mov	r12, QWORD PTR [rax+rdx*8]
	call	nv50_fifo_chan_engine_addr@PLT
	test	eax, eax
	js	.L2
	mov	ebp, eax
	mov	r13, QWORD PTR [r12]
	mov	rax, QWORD PTR 8[r12]
	mov	edi, DWORD PTR [rbx]
	add	rax, r13
	mov	r12, rax
	call	nvkm_kmap@PLT
	mov	edi, DWORD PTR [rbx]
	sub	r12, 1
	mov	edx, 1638400
	mov	esi, ebp
	call	nvkm_wo32@PLT
	mov	rdi, r12
	call	lower_32_bits@PLT
	mov	edi, DWORD PTR [rbx]
	lea	esi, 4[rbp]
	mov	edx, eax
	call	nvkm_wo32@PLT
	mov	rdi, r13
	call	lower_32_bits@PLT
	mov	edi, DWORD PTR [rbx]
	lea	esi, 8[rbp]
	mov	edx, eax
	call	nvkm_wo32@PLT
	mov	rdi, r12
	call	upper_32_bits@PLT
	mov	rdi, r13
	mov	r12d, eax
	call	upper_32_bits@PLT
	sal	r12d, 24
	mov	edi, DWORD PTR [rbx]
	lea	esi, 12[rbp]
	mov	edx, r12d
	or	edx, eax
	call	nvkm_wo32@PLT
	mov	edi, DWORD PTR [rbx]
	lea	esi, 16[rbp]
	xor	edx, edx
	call	nvkm_wo32@PLT
	mov	edi, DWORD PTR [rbx]
	lea	esi, 20[rbp]
	xor	edx, edx
	call	nvkm_wo32@PLT
	mov	edi, DWORD PTR [rbx]
	call	nvkm_done@PLT
.L2:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	nv50_fifo_chan_engine_init, .-nv50_fifo_chan_engine_init
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_channv50.c_nv50_fifo_chan_engine_init.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nv50_fifo_chan_engine_init, %function
nv50_fifo_chan_engine_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	bl	nv50_fifo_chan
	ldr	r2, [r5]
	ldr	r3, [r0, #4]
	mov	r4, r0
	mov	r0, r5
	ldr	r6, [r3, r2, lsl #2]
	bl	nv50_fifo_chan_engine_addr
	subs	r5, r0, #0
	blt	.L2
	ldr	r7, [r6]
	ldr	r6, [r6, #4]
	ldr	r0, [r4]
	add	r6, r7, r6
	bl	nvkm_kmap
	sub	r6, r6, #1
	mov	r2, #1638400
	mov	r1, r5
	ldr	r0, [r4]
	bl	nvkm_wo32
	mov	r0, r6
	ldr	r8, [r4]
	bl	lower_32_bits
	add	r1, r5, #4
	mov	r2, r0
	mov	r0, r8
	bl	nvkm_wo32
	mov	r0, r7
	ldr	r8, [r4]
	bl	lower_32_bits
	add	r1, r5, #8
	mov	r2, r0
	mov	r0, r8
	bl	nvkm_wo32
	mov	r0, r6
	ldr	r8, [r4]
	bl	upper_32_bits
	mov	r6, r0
	mov	r0, r7
	bl	upper_32_bits
	add	r1, r5, #12
	orr	r2, r0, r6, lsl #24
	mov	r0, r8
	bl	nvkm_wo32
	mov	r2, #0
	add	r1, r5, #16
	ldr	r0, [r4]
	bl	nvkm_wo32
	mov	r2, #0
	ldr	r0, [r4]
	add	r1, r5, #20
	bl	nvkm_wo32
	ldr	r0, [r4]
	bl	nvkm_done
.L2:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
	.size	nv50_fifo_chan_engine_init, .-nv50_fifo_chan_engine_init
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
