	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mdp5_kms_destroy
_mdp5_kms_destroy:                      ## @mdp5_kms_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_mdp_kms
	movl	%eax, %edi
	callq	_to_mdp5_kms
	movq	%rax, %r15
	movq	(%r14), %r14
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_mdp5_mixer_destroy
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	cmpl	$0, 4(%r15)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_mdp5_pipe_destroy
	incq	%rbx
	movslq	4(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	testq	%r14, %r14
	je	LBB0_7
## %bb.8:
	movq	(%r14), %r15
	movq	(%r15), %rax
	movq	(%rax), %r12
	movq	_iommu_ports@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	*%r12
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msm_gem_address_space_put      ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_iommu_ports,4,2                ## @iommu_ports
	.no_dead_strip	_mdp5_kms_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mdp5_kms_destroy
_mdp5_kms_destroy:                      ; @mdp5_kms_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
	mov	x19, x0
	bl	_to_mdp_kms
	bl	_to_mdp5_kms
	mov	x20, x0
	ldr	x19, [x19]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x21, lsl #2]
	bl	_mdp5_mixer_destroy
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.lt	LBB0_2
LBB0_3:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x21, lsl #2]
	bl	_mdp5_pipe_destroy
	add	x21, x21, #1
	ldrsw	x8, [x20, #4]
	cmp	x21, x8
	b.lt	LBB0_5
LBB0_6:
	cbz	x19, LBB0_8
; %bb.7:
	ldr	x20, [x19]
	ldr	x8, [x20]
	ldr	x22, [x8]
Lloh0:
	adrp	x8, _iommu_ports@GOTPAGE
Lloh1:
	ldr	x8, [x8, _iommu_ports@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	blr	x22
	mov	x0, x19
	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
	b	_msm_gem_address_space_put
LBB0_8:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_iommu_ports,4,2                ; @iommu_ports
	.no_dead_strip	_mdp5_kms_destroy
.subsections_via_symbols
