	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vcn_v2_5_hw_fini
_vcn_v2_5_hw_fini:                      ## @vcn_v2_5_hw_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_16
## %bb.1:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	movq	_VCN@GOTPCREL(%rip), %r15
	movq	_mmUVD_STATUS@GOTPCREL(%rip), %r12
	jmp	LBB0_2
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %eax
	leaq	(%rax,%rax,2), %rax
	movl	$0, (%r8,%rax,8)
	movl	(%r14), %eax
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_16
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
	movl	4(%r14), %ecx
	btl	%ebx, %ecx
	jb	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r14), %r13
	movl	(%r15), %edi
	movl	(%r12), %edx
	movl	%ebx, %esi
	callq	_RREG32_SOC15
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_AMD_PG_STATE_GATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_vcn_v2_5_set_powergating_state
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %rax
	leaq	(%rax,%rax,2), %rax
	movl	$0, 16(%r13,%rax,8)
	movl	8(%r14), %ebx
	movq	16(%r14), %r8
	testl	%ebx, %ebx
	jle	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	-1(%rbx), %rcx
	movl	%ebx, %edx
	andl	$3, %edx
	cmpq	$3, %rcx
	jae	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %esi
	andl	$-4, %esi
	leaq	80(%r8), %rdi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-72(%rdi), %rax
	movl	$0, (%rax,%rcx,4)
	movq	-48(%rdi), %rax
	movl	$0, 4(%rax,%rcx,4)
	movq	-24(%rdi), %rax
	movl	$0, 8(%rax,%rcx,4)
	movq	(%rdi), %rax
	movl	$0, 12(%rax,%rcx,4)
	addq	$4, %rcx
	addq	$96, %rdi
	cmpq	%rcx, %rsi
	jne	LBB0_10
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	testq	%rdx, %rdx
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rcx,%rcx,2), %rax
	leaq	(%r8,%rax,8), %rsi
	addq	$8, %rsi
	addq	%rdx, %rdx
	leaq	(%rdx,%rdx,2), %rdx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rsi,%rdi,4), %rax
	movl	$0, (%rax,%rcx,4)
	incq	%rcx
	addq	$6, %rdi
	cmpq	%rdi, %rdx
	jne	LBB0_13
	jmp	LBB0_14
LBB0_16:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCN,4,2                        ## @VCN
	.comm	_mmUVD_STATUS,4,2               ## @mmUVD_STATUS
	.comm	_AMD_PG_STATE_GATE,4,2          ## @AMD_PG_STATE_GATE
	.no_dead_strip	_vcn_v2_5_hw_fini
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vcn_v2_5_hw_fini
_vcn_v2_5_hw_fini:                      ; @vcn_v2_5_hw_fini
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x19, x0
	mov	w20, #0
Lloh0:
	adrp	x21, _VCN@GOTPAGE
Lloh1:
	ldr	x21, [x21, _VCN@GOTPAGEOFF]
Lloh2:
	adrp	x22, _mmUVD_STATUS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _mmUVD_STATUS@GOTPAGEOFF]
	mov	w23, #24
Lloh4:
	adrp	x24, _AMD_PG_STATE_GATE@GOTPAGE
Lloh5:
	ldr	x24, [x24, _AMD_PG_STATE_GATE@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w20, #0
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	umull	x9, w20, w23
	str	wzr, [x8, x9]
	ldr	w8, [x19]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w20, w20, #1
	cmp	w20, w8
	b.ge	LBB0_16
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
                                        ;     Child Loop BB0_15 Depth 2
	ldr	w9, [x19, #4]
	lsr	w9, w9, w20
	tbnz	w9, #0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x25, [x19, #16]
	ldr	w0, [x21]
	ldr	w2, [x22]
	mov	x1, x20
	bl	_RREG32_SOC15
	cbz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_vcn_v2_5_set_powergating_state
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x8, w20
	madd	x8, x8, x23, x25
	str	wzr, [x8, #16]
	ldr	w20, [x19, #8]
	ldr	x8, [x19, #16]
	cmp	w20, #1
	b.lt	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w20, #4
	b.hs	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x9, #0
	b	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x10, #0
	and	x9, x20, #0xfffffffc
	add	x11, x8, #56
	lsl	x12, x20, #2
	and	x12, x12, #0x3fffffff0
LBB0_12:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	x13, [x11, #-48]
	ldur	x14, [x11, #-24]
	ldr	x15, [x11]
	ldr	x16, [x11, #24]
	add	x14, x14, x10
	add	x15, x15, x10
	add	x16, x16, x10
	str	wzr, [x13, x10]
	str	wzr, [x14, #4]
	str	wzr, [x15, #8]
	str	wzr, [x16, #12]
	add	x10, x10, #16
	add	x11, x11, #96
	cmp	x12, x10
	b.ne	LBB0_12
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	x9, x20
	b.eq	LBB0_3
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	madd	x10, x9, x23, x8
	add	x10, x10, #8
LBB0_15:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x11, [x10], #24
	str	wzr, [x11, x9, lsl #2]
	add	x9, x9, #1
	cmp	x20, x9
	b.ne	LBB0_15
	b	LBB0_3
LBB0_16:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_VCN,4,2                        ; @VCN
	.comm	_mmUVD_STATUS,4,2               ; @mmUVD_STATUS
	.comm	_AMD_PG_STATE_GATE,4,2          ; @AMD_PG_STATE_GATE
	.no_dead_strip	_vcn_v2_5_hw_fini
.subsections_via_symbols
