	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _dpu_kms_hw_destroy
__dpu_kms_hw_destroy:                   ## @_dpu_kms_hw_destroy
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 72(%rdi)
	je	LBB0_24
## %bb.1:
	movq	%rdi, %r14
	movq	64(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_dpu_hw_intr_destroy
LBB0_3:
	movq	$0, 64(%r14)
	movq	%r14, %rdi
	callq	__dpu_kms_mmu_destroy
	movq	40(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.5:
	cmpl	$0, (%rdi)
	jle	LBB0_11
## %bb.6:
	xorl	%ebx, %ebx
	movq	_VBIF_MAX@GOTPCREL(%rip), %r15
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	(%rdi), %rax
	cmpq	%rax, %rbx
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rdi), %rax
	movq	(%rax,%rbx,8), %rax
	cmpq	(%r15), %rax
	jae	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	56(%r14), %rcx
	movq	(%rcx,%rax,8), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rdi
	callq	_dpu_hw_vbif_destroy
	movq	40(%r14), %rdi
	jmp	LBB0_10
LBB0_4:
	xorl	%edi, %edi
LBB0_11:
	cmpl	$0, (%r14)
	je	LBB0_13
## %bb.12:
	leaq	48(%r14), %rdi
	callq	_dpu_rm_destroy
	movq	40(%r14), %rdi
LBB0_13:
	movl	$0, (%r14)
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.14:
	callq	_dpu_hw_catalog_deinit
LBB0_15:
	movq	$0, 40(%r14)
	movq	32(%r14), %rax
	movq	_VBIF_NRT@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	(%rax,%rcx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.16:
	movq	16(%r14), %rdi
	callq	_devm_iounmap
	movq	32(%r14), %rax
	movq	(%rbx), %rcx
LBB0_17:
	movq	$0, (%rax,%rcx,8)
	movq	32(%r14), %rax
	movq	_VBIF_RT@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	movq	(%rax,%rcx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_19
## %bb.18:
	movq	16(%r14), %rdi
	callq	_devm_iounmap
	movq	32(%r14), %rax
	movq	(%rbx), %rcx
LBB0_19:
	movq	$0, (%rax,%rcx,8)
	movq	24(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.20:
	callq	_dpu_hw_mdp_destroy
LBB0_21:
	movq	$0, 24(%r14)
	movq	8(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_23
## %bb.22:
	movq	16(%r14), %rdi
	callq	_devm_iounmap
LBB0_23:
	movq	$0, 8(%r14)
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VBIF_MAX,8,3                   ## @VBIF_MAX
	.comm	_VBIF_NRT,8,3                   ## @VBIF_NRT
	.comm	_VBIF_RT,8,3                    ## @VBIF_RT
	.no_dead_strip	__dpu_kms_hw_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _dpu_kms_hw_destroy
__dpu_kms_hw_destroy:                   ; @_dpu_kms_hw_destroy
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #72]
	cbz	x8, LBB0_23
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0, #64]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_dpu_hw_intr_destroy
LBB0_3:
	str	xzr, [x19, #64]
	mov	x0, x19
	bl	__dpu_kms_mmu_destroy
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_10
; %bb.4:
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.5:
	mov	x20, #0
Lloh0:
	adrp	x21, _VBIF_MAX@GOTPAGE
Lloh1:
	ldr	x21, [x21, _VBIF_MAX@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x0]
	cmp	x20, x8
	b.ge	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x0, #8]
	ldr	x8, [x8, x20, lsl #3]
	ldr	x9, [x21]
	cmp	x8, x9
	b.hs	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x19, #56]
	ldr	x8, [x9, x8, lsl #3]
	cbz	x8, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x8
	bl	_dpu_hw_vbif_destroy
	ldr	x0, [x19, #40]
	b	LBB0_6
LBB0_10:
	ldr	w8, [x19]
	cbz	w8, LBB0_12
; %bb.11:
	add	x0, x19, #48
	bl	_dpu_rm_destroy
	ldr	x0, [x19, #40]
LBB0_12:
	str	wzr, [x19]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_dpu_hw_catalog_deinit
LBB0_14:
	str	xzr, [x19, #40]
	ldr	x8, [x19, #32]
Lloh2:
	adrp	x20, _VBIF_NRT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _VBIF_NRT@GOTPAGEOFF]
	ldr	x9, [x20]
	ldr	x1, [x8, x9, lsl #3]
	cbz	x1, LBB0_16
; %bb.15:
	ldr	x0, [x19, #16]
	bl	_devm_iounmap
	ldr	x8, [x19, #32]
	ldr	x9, [x20]
LBB0_16:
	str	xzr, [x8, x9, lsl #3]
	ldr	x8, [x19, #32]
Lloh4:
	adrp	x20, _VBIF_RT@GOTPAGE
Lloh5:
	ldr	x20, [x20, _VBIF_RT@GOTPAGEOFF]
	ldr	x9, [x20]
	ldr	x1, [x8, x9, lsl #3]
	cbz	x1, LBB0_18
; %bb.17:
	ldr	x0, [x19, #16]
	bl	_devm_iounmap
	ldr	x8, [x19, #32]
	ldr	x9, [x20]
LBB0_18:
	str	xzr, [x8, x9, lsl #3]
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_20
; %bb.19:
	bl	_dpu_hw_mdp_destroy
LBB0_20:
	str	xzr, [x19, #24]
	ldr	x1, [x19, #8]
	cbz	x1, LBB0_22
; %bb.21:
	ldr	x0, [x19, #16]
	bl	_devm_iounmap
LBB0_22:
	str	xzr, [x19, #8]
LBB0_23:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_VBIF_MAX,8,3                   ; @VBIF_MAX
	.comm	_VBIF_NRT,8,3                   ; @VBIF_NRT
	.comm	_VBIF_RT,8,3                    ; @VBIF_RT
	.no_dead_strip	__dpu_kms_hw_destroy
.subsections_via_symbols
