	.file	"extr_gk104.c_gk104_fifo_oneinit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d PBDMA(s)\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"engine %2d: runlist %2d pbdma %2d (%s)\n"
	.text
	.p2align 4
	.type	gk104_fifo_oneinit, @function
gk104_fifo_oneinit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	gk104_fifo@PLT
	mov	rbp, QWORD PTR 32[rax]
	mov	rbx, rax
	lea	r13, 32[rax]
	mov	rdi, rbp
	call	nvkm_bar_bar1_vmm@PLT
	mov	rdi, rbx
	mov	QWORD PTR 40[rsp], rax
	mov	rax, QWORD PTR 48[rbx]
	mov	rax, QWORD PTR 8[rax]
	call	[QWORD PTR [rax]]
	lea	rsi, .LC0[rip]
	mov	rdi, r13
	mov	DWORD PTR [rbx], eax
	mov	edx, eax
	xor	eax, eax
	call	nvkm_debug@PLT
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	edi, DWORD PTR [rbx]
	mov	esi, 4
	call	kcalloc@PLT
	test	rax, rax
	je	.L2
	mov	edx, DWORD PTR [rbx]
	mov	r14, rax
	xor	r12d, r12d
	test	edx, edx
	jle	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	lea	esi, 9104[0+r12*4]
	mov	rdi, rbp
	call	nvkm_rd32@PLT
	mov	DWORD PTR [r14+r12*4], eax
	add	r12, 1
	cmp	DWORD PTR [rbx], r12d
	jg	.L3
.L6:
	lea	rax, 48[rsp]
	mov	QWORD PTR 32[rsp], r13
	xor	esi, esi
	mov	r13, rbx
	mov	QWORD PTR 16[rsp], rax
	lea	rax, 52[rsp]
	mov	QWORD PTR 24[rsp], rax
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rcx, QWORD PTR 16[rsp]
	mov	rdx, QWORD PTR 24[rsp]
	mov	rdi, rbp
	lea	r12d, 1[rsi]
	call	nvkm_top_engine@PLT
	mov	r15d, eax
	test	eax, eax
	js	.L9
	mov	eax, DWORD PTR 0[r13]
	mov	ecx, DWORD PTR 52[rsp]
	test	eax, eax
	jle	.L28
	mov	esi, 1
	lea	edi, -1[rax]
	xor	eax, eax
	sal	esi, cl
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L30:
	lea	rdx, 1[rax]
	cmp	rdi, rax
	je	.L28
	mov	rax, rdx
.L8:
	mov	r8d, eax
	test	DWORD PTR [r14+rax*4], esi
	je	.L30
.L7:
	mov	rax, QWORD PTR nvkm_subdev_name[rip]
	mov	edx, r15d
	mov	rdi, QWORD PTR 32[rsp]
	lea	rsi, .LC1[rip]
	mov	DWORD PTR 12[rsp], r8d
	mov	r9d, DWORD PTR [rax+rdx*4]
	mov	edx, DWORD PTR 48[rsp]
	xor	eax, eax
	call	nvkm_debug@PLT
	movsx	rax, DWORD PTR 48[rsp]
	mov	esi, r15d
	mov	rdi, rbp
	lea	rdx, [rax+rax*2]
	mov	rax, QWORD PTR 56[r13]
	lea	rbx, [rax+rdx*4]
	call	nvkm_device_engine@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	edi, DWORD PTR 4[r13]
	mov	DWORD PTR 8[rbx], eax
	movsx	rax, DWORD PTR 48[rsp]
	lea	rdx, [rax+rax*2]
	mov	rsi, rax
	mov	rax, QWORD PTR 56[r13]
	add	esi, 1
	lea	rax, [rax+rdx*4]
	mov	edx, DWORD PTR 52[rsp]
	mov	DWORD PTR 4[rax], r8d
	mov	DWORD PTR [rax], edx
	call	max@PLT
	mov	ecx, DWORD PTR 48[rsp]
	mov	rdx, QWORD PTR 40[r13]
	mov	DWORD PTR 4[r13], eax
	movsx	rax, DWORD PTR 52[rsp]
	lea	rdi, [rax+rax*2]
	mov	rsi, rax
	mov	eax, 1
	sal	eax, cl
	or	DWORD PTR [rdx+rdi*8], eax
	mov	edi, DWORD PTR 8[r13]
	add	esi, 1
	call	max@PLT
	mov	esi, r12d
	mov	DWORD PTR 8[r13], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L28:
	mov	r8d, -1
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rdi, r14
	mov	rbx, r13
	xor	r14d, r14d
	call	kfree@PLT
	mov	eax, DWORD PTR 8[r13]
	test	eax, eax
	jle	.L12
.L11:
	lea	r13, [r14+r14*2]
	xor	r12d, r12d
	sal	r13, 3
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdx, QWORD PTR 48[rbx]
	mov	rax, QWORD PTR 40[rbx]
	xor	r8d, r8d
	mov	ecx, 4096
	mov	esi, DWORD PTR NVKM_MEM_TARGET_INST[rip]
	mov	rdi, rbp
	mov	rdx, QWORD PTR [rdx]
	mov	rax, QWORD PTR 16[rax+r13]
	mov	edx, DWORD PTR [rdx]
	imul	edx, DWORD PTR 24[rbx]
	lea	r9, [rax+r12*4]
	add	r12, 1
	add	edx, edx
	call	nvkm_memory_new@PLT
	test	eax, eax
	jne	.L1
.L14:
	mov	rax, QWORD PTR 40[rbx]
	mov	rdi, QWORD PTR 16[rax+r13]
	call	ARRAY_SIZE@PLT
	cmp	eax, r12d
	jg	.L13
	mov	rdi, QWORD PTR 40[rbx]
	add	r14, 1
	add	rdi, r13
	add	rdi, 12
	call	init_waitqueue_head@PLT
	mov	rdi, QWORD PTR 40[rbx]
	add	rdi, r13
	add	rdi, 8
	call	INIT_LIST_HEAD@PLT
	mov	rdi, QWORD PTR 40[rbx]
	add	rdi, r13
	add	rdi, 4
	call	INIT_LIST_HEAD@PLT
	cmp	DWORD PTR 8[rbx], r14d
	jg	.L11
.L12:
	mov	edx, DWORD PTR 24[rbx]
	mov	esi, DWORD PTR NVKM_MEM_TARGET_INST[rip]
	lea	r9, 16[rbx]
	mov	rdi, rbp
	mov	r8d, 1
	mov	ecx, 4096
	sal	edx, 9
	call	nvkm_memory_new@PLT
	test	eax, eax
	je	.L31
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rcx, QWORD PTR 56[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L32
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
.L31:
	mov	edi, DWORD PTR 16[rbx]
	call	nvkm_memory_size@PLT
	mov	r15, QWORD PTR 40[rsp]
	lea	rcx, 12[rbx]
	mov	esi, 12
	mov	edx, eax
	mov	rdi, r15
	call	nvkm_vmm_get@PLT
	test	eax, eax
	jne	.L1
	mov	ecx, DWORD PTR 12[rbx]
	mov	edi, DWORD PTR 16[rbx]
	xor	r9d, r9d
	xor	r8d, r8d
	mov	rdx, r15
	xor	esi, esi
	call	nvkm_memory_map@PLT
	jmp	.L1
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	gk104_fifo_oneinit, .-gk104_fifo_oneinit
	.comm	nvkm_subdev_name,8,8
	.comm	NVKM_MEM_TARGET_INST,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.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_gk104.c_gk104_fifo_oneinit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%d PBDMA(s)\012\000"
	.align	2
.LC1:
	.ascii	"engine %2d: runlist %2d pbdma %2d (%s)\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gk104_fifo_oneinit, %function
gk104_fifo_oneinit:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L27
	sub	sp, sp, #36
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	gk104_fifo
	ldr	r8, [r0, #24]
	mov	r5, r0
	add	r10, r0, #24
	mov	r0, r8
	bl	nvkm_bar_bar1_vmm
	mov	r2, r0
	ldr	r3, [r5, #32]
	mov	r0, r5
	ldr	r3, [r3, #4]
	str	r2, [sp, #12]
	ldr	r3, [r3]
	blx	r3
	mov	r2, r0
	ldr	r1, .L27+4
	str	r2, [r5]
	mov	r0, r10
	bl	nvkm_debug
	ldr	r3, .L27+8
	mov	r1, #4
	ldr	r2, [r3]
	ldr	r0, [r5]
	bl	kcalloc
	subs	r3, r0, #0
	str	r3, [sp, #8]
	beq	.L2
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L7
	mov	r4, #0
	ldr	r3, [sp, #8]
	sub	r6, r3, #4
.L6:
	lsl	r1, r4, #2
	add	r1, r1, #9088
	mov	r0, r8
	add	r1, r1, #16
	bl	nvkm_rd32
	str	r0, [r6, #4]!
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L6
.L7:
	mov	r7, #0
	mov	r9, #1
	ldr	fp, .L27+12
.L4:
	mov	r1, r7
	mov	r0, r8
	add	r3, sp, #20
	add	r2, sp, #24
	bl	nvkm_top_engine
	subs	r6, r0, #0
	add	r7, r7, #1
	blt	.L10
	ldr	r0, [r5]
	ldr	r3, [sp, #24]
	cmp	r0, #0
	ble	.L23
	ldr	r2, [sp, #8]
	mov	r4, #0
	lsl	ip, r9, r3
	sub	r2, r2, #4
	b	.L9
.L25:
	add	r4, r4, #1
	cmp	r4, r0
	beq	.L23
.L9:
	ldr	r1, [r2, #4]!
	tst	ip, r1
	beq	.L25
.L8:
	ldr	r2, [fp]
	mov	r0, r10
	ldr	r1, [r2, r6, lsl #2]
	ldr	r2, [sp, #20]
	str	r1, [sp, #4]
	str	r4, [sp]
	ldr	r1, .L27+16
	bl	nvkm_debug
	ldr	r3, [sp, #20]
	ldr	r2, [r5, #36]
	mov	r1, r6
	add	r3, r3, r3, lsl #1
	mov	r0, r8
	add	r6, r2, r3, lsl #2
	bl	nvkm_device_engine
	ldr	r1, [sp, #20]
	ldr	r3, [r5, #36]
	add	r2, r1, r1, lsl #1
	ldr	lr, [sp, #24]
	add	ip, r3, r2, lsl #2
	str	r0, [r6, #8]
	add	r1, r1, #1
	str	lr, [r3, r2, lsl #2]
	ldr	r0, [r5, #4]
	str	r4, [ip, #4]
	bl	max
	ldr	r1, [sp, #24]
	ldr	r2, [r5, #28]
	add	ip, r1, r1, lsl #2
	ldr	r3, [r2, ip, lsl #2]
	ldr	lr, [sp, #20]
	str	r0, [r5, #4]
	orr	r3, r3, r9, lsl lr
	ldr	r0, [r5, #8]
	add	r1, r1, #1
	str	r3, [r2, ip, lsl #2]
	bl	max
	str	r0, [r5, #8]
	b	.L4
.L23:
	mvn	r4, #0
	b	.L8
.L10:
	ldr	r0, [sp, #8]
	bl	kfree
	ldr	r3, [r5, #8]
	cmp	r3, #0
	ldrle	r7, .L27+20
	ble	.L13
	mov	r6, #0
	mov	r10, r6
	mov	r9, r6
	ldr	r7, .L27+20
.L12:
	mov	r4, #0
	b	.L15
.L14:
	ldr	r3, [r5, #32]
	ldr	r1, [r5, #20]
	ldr	r2, [r3]
	ldr	r3, [r5, #28]
	ldr	r2, [r2]
	add	r3, r3, r6
	ldr	r3, [r3, #16]
	mul	r2, r1, r2
	add	r3, r3, r4, lsl #2
	str	r3, [sp, #4]
	str	r9, [sp]
	mov	r3, #4096
	mov	r0, r8
	ldr	r1, [r7]
	lsl	r2, r2, #1
	bl	nvkm_memory_new
	cmp	r0, #0
	bne	.L21
	add	r4, r4, #1
.L15:
	ldr	r3, [r5, #28]
	add	r3, r3, r6
	ldr	r0, [r3, #16]
	bl	ARRAY_SIZE
	cmp	r0, r4
	bgt	.L14
	ldr	r0, [r5, #28]
	add	r10, r10, #1
	add	r0, r0, r6
	add	r0, r0, #12
	bl	init_waitqueue_head
	ldr	r0, [r5, #28]
	add	r0, r0, r6
	add	r0, r0, #8
	bl	INIT_LIST_HEAD
	ldr	r0, [r5, #28]
	add	r0, r0, r6
	add	r0, r0, #4
	bl	INIT_LIST_HEAD
	ldr	r3, [r5, #8]
	add	r6, r6, #20
	cmp	r3, r10
	bgt	.L12
.L13:
	mov	ip, #1
	ldr	r2, [r5, #20]
	add	r3, r5, #16
	ldr	r1, [r7]
	mov	r0, r8
	str	r3, [sp, #4]
	str	ip, [sp]
	mov	r3, #4096
	lsl	r2, r2, #9
	bl	nvkm_memory_new
	subs	r1, r0, #0
	bne	.L1
	ldr	r0, [r5, #16]
	bl	nvkm_memory_size
	ldr	r4, [sp, #12]
	mov	r2, r0
	mov	r1, #12
	mov	r0, r4
	add	r3, r5, #12
	bl	nvkm_vmm_get
	subs	r1, r0, #0
	bne	.L1
	ldr	r3, [r5, #12]
	ldr	r0, [r5, #16]
	mov	r2, r4
	str	r1, [sp, #4]
	str	r1, [sp]
	bl	nvkm_memory_map
	mov	r1, r0
	b	.L1
.L21:
	mov	r1, r0
.L1:
	ldr	r3, .L27
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L26
	mov	r0, r1
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, .L27+24
	ldr	r1, [r3]
	rsb	r1, r1, #0
	b	.L1
.L26:
	bl	__stack_chk_fail
.L28:
	.align	2
.L27:
	.word	.LC2
	.word	.LC0
	.word	GFP_KERNEL
	.word	nvkm_subdev_name
	.word	.LC1
	.word	NVKM_MEM_TARGET_INST
	.word	ENOMEM
	.size	gk104_fifo_oneinit, .-gk104_fifo_oneinit
	.comm	nvkm_subdev_name,4,4
	.comm	NVKM_MEM_TARGET_INST,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
