	.file	"extr_amdgpu_vcn.c_amdgpu_vcn_sw_fini.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	amdgpu_vcn_sw_fini
	.type	amdgpu_vcn_sw_fini, @function
amdgpu_vcn_sw_fini:
.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, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	cmp	QWORD PTR 40[rdi], 0
	jne	.L12
.L2:
	mov	edx, DWORD PTR 0[rbp]
	test	edx, edx
	jle	.L3
	xor	r12d, r12d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	add	r12, 1
	cmp	DWORD PTR 0[rbp], r12d
	jle	.L3
.L7:
	mov	eax, DWORD PTR 4[rbp]
	bt	eax, r12d
	jc	.L4
	mov	rax, QWORD PTR 16[rbp]
	lea	r13, [r12+r12*4]
	sal	r13, 3
	mov	edi, DWORD PTR 32[rax+r13]
	call	kvfree@PLT
	mov	rdi, QWORD PTR 16[rbp]
	add	rdi, r13
	lea	rdx, 20[rdi]
	lea	rsi, 24[rdi]
	add	rdi, 28
	call	amdgpu_bo_free_kernel@PLT
	mov	rdi, QWORD PTR 16[rbp]
	add	rdi, r13
	add	rdi, 16
	call	amdgpu_ring_fini@PLT
	mov	eax, DWORD PTR 8[rbp]
	test	eax, eax
	jle	.L5
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rax, QWORD PTR 16[rbp]
	mov	rax, QWORD PTR 8[rax+r13]
	lea	rdi, [rax+rbx*4]
	add	rbx, 1
	call	amdgpu_ring_fini@PLT
	cmp	DWORD PTR 8[rbp], ebx
	jg	.L6
.L5:
	mov	rdi, QWORD PTR 16[rbp]
	add	r12, 1
	add	rdi, r13
	call	amdgpu_ring_fini@PLT
	cmp	DWORD PTR 0[rbp], r12d
	jg	.L7
.L3:
	mov	edi, DWORD PTR 12[rbp]
	call	release_firmware@PLT
	add	rsp, 8
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	lea	rdx, 24[rdi]
	lea	rsi, 28[rdi]
	lea	rdi, 32[rdi]
	call	amdgpu_bo_free_kernel@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	amdgpu_vcn_sw_fini, .-amdgpu_vcn_sw_fini
	.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_amdgpu_vcn.c_amdgpu_vcn_sw_fini.c"
	.text
	.align	2
	.global	amdgpu_vcn_sw_fini
	.syntax unified
	.arm
	.fpu softvfp
	.type	amdgpu_vcn_sw_fini, %function
amdgpu_vcn_sw_fini:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #32]
	push	{r4, r5, r6, r7, r8, lr}
	cmp	r3, #0
	mov	r5, r0
	bne	.L15
.L2:
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L3
	mov	r6, #0
	b	.L7
.L4:
	add	r6, r6, #1
	cmp	r3, r6
	ble	.L3
.L7:
	ldr	r4, [r5, #4]
	asr	r4, r4, r6
	ands	r4, r4, #1
	bne	.L4
	ldr	r3, [r5, #16]
	rsb	r7, r6, r6, lsl #3
	add	r3, r3, r7, lsl #2
	ldr	r0, [r3, #24]
	bl	kvfree
	ldr	r0, [r5, #16]
	lsl	r7, r7, #2
	add	r0, r0, r7
	add	r2, r0, #12
	add	r1, r0, #16
	add	r0, r0, #20
	bl	amdgpu_bo_free_kernel
	ldr	r0, [r5, #16]
	add	r0, r0, r7
	add	r0, r0, #8
	bl	amdgpu_ring_fini
	ldr	r3, [r5, #8]
	cmp	r3, #0
	ble	.L5
.L6:
	ldr	r3, [r5, #16]
	add	r3, r3, r7
	ldr	r0, [r3, #4]
	add	r0, r0, r4, lsl #2
	bl	amdgpu_ring_fini
	ldr	r3, [r5, #8]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L6
.L5:
	ldr	r0, [r5, #16]
	add	r6, r6, #1
	add	r0, r0, r7
	bl	amdgpu_ring_fini
	ldr	r3, [r5]
	cmp	r3, r6
	bgt	.L7
.L3:
	ldr	r0, [r5, #12]
	bl	release_firmware
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	add	r2, r0, #20
	add	r1, r0, #24
	add	r0, r0, #28
	bl	amdgpu_bo_free_kernel
	b	.L2
	.size	amdgpu_vcn_sw_fini, .-amdgpu_vcn_sw_fini
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
