	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_vcn_sw_fini             ## -- Begin function amdgpu_vcn_sw_fini
	.p2align	4, 0x90
_amdgpu_vcn_sw_fini:                    ## @amdgpu_vcn_sw_fini
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	cmpq	$0, 40(%rdi)
	je	LBB0_2
## %bb.1:
	leaq	32(%r14), %rdi
	leaq	28(%r14), %rsi
	leaq	24(%r14), %rdx
	callq	_amdgpu_bo_free_kernel
LBB0_2:
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.3:
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%r15,%r15,4), %rdi
	shlq	$3, %rdi
	addq	16(%r14), %rdi
	callq	_amdgpu_ring_fini
	movl	(%r14), %eax
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	movslq	%eax, %rcx
	cmpq	%rcx, %r15
	jge	LBB0_10
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movl	4(%r14), %ecx
	btl	%r15d, %ecx
	jb	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r14), %rax
	leaq	(,%r15,8), %rcx
	leaq	(%rcx,%rcx,4), %rbx
	movl	32(%rax,%rbx), %edi
	callq	_kvfree
	movq	16(%r14), %rax
	leaq	(%rax,%rbx), %rdi
	addq	$28, %rdi
	leaq	(%rax,%rbx), %rsi
	addq	$24, %rsi
	leaq	(%rax,%rbx), %rdx
	addq	$20, %rdx
	callq	_amdgpu_bo_free_kernel
	movq	16(%r14), %rax
	leaq	(%rax,%rbx), %rdi
	addq	$16, %rdi
	callq	_amdgpu_ring_fini
	cmpl	$0, 8(%r14)
	jle	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r14), %rax
	leaq	(%r15,%r15,4), %rcx
	movq	8(%rax,%rcx,8), %rdi
	addq	%r12, %rdi
	callq	_amdgpu_ring_fini
	incq	%rbx
	movslq	8(%r14), %rax
	addq	$4, %r12
	cmpq	%rax, %rbx
	jl	LBB0_7
	jmp	LBB0_8
LBB0_10:
	movl	12(%r14), %edi
	callq	_release_firmware
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_vcn_sw_fini             ; -- Begin function amdgpu_vcn_sw_fini
	.p2align	2
_amdgpu_vcn_sw_fini:                    ; @amdgpu_vcn_sw_fini
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_2
; %bb.1:
	add	x0, x19, #32
	add	x1, x19, #28
	add	x2, x19, #24
	bl	_amdgpu_bo_free_kernel
LBB0_2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.3:
	mov	x20, #0
	mov	w21, #40
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #16]
	madd	x0, x20, x21, x8
	bl	_amdgpu_ring_fini
	ldr	w8, [x19]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_10
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	w9, [x19, #4]
	lsr	w9, w9, w20
	tbnz	w9, #0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #16]
	add	x9, x20, x20, lsl #2
	lsl	x22, x9, #3
	add	x8, x8, x22
	ldr	w0, [x8, #32]
	bl	_kvfree
	ldr	x8, [x19, #16]
	add	x8, x8, x22
	add	x0, x8, #28
	add	x1, x8, #24
	add	x2, x8, #20
	bl	_amdgpu_bo_free_kernel
	ldr	x8, [x19, #16]
	add	x8, x8, x22
	add	x0, x8, #16
	bl	_amdgpu_ring_fini
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x22, #0
	mov	x23, #0
LBB0_9:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #16]
	madd	x8, x20, x21, x8
	ldr	x8, [x8, #8]
	add	x0, x8, x22
	bl	_amdgpu_ring_fini
	add	x23, x23, #1
	ldrsw	x8, [x19, #8]
	add	x22, x22, #4
	cmp	x23, x8
	b.lt	LBB0_9
	b	LBB0_4
LBB0_10:
	ldr	w0, [x19, #12]
	bl	_release_firmware
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
