	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mdp4_destroy
_mdp4_destroy:                          ## @mdp4_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	%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
	movq	%rdi, %r15
	callq	_to_mdp_kms
	movl	%eax, %edi
	callq	_to_mdp4_kms
	movq	%rax, %rbx
	movq	24(%rax), %rax
	movq	(%rax), %r14
	movq	(%r15), %r15
	cmpq	$0, 16(%rbx)
	je	LBB0_2
## %bb.1:
	movl	8(%rbx), %edi
	movq	%r15, %rsi
	callq	_msm_gem_unpin_iova
LBB0_2:
	movl	8(%rbx), %edi
	callq	_drm_gem_object_put_unlocked
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	movq	(%r15), %r12
	movq	(%r12), %rax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r14
	movq	_iommu_ports@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r13d, %edi
	callq	_ARRAY_SIZE
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	*%r14
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_msm_gem_address_space_put
LBB0_4:
	cmpq	$0, (%rbx)
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_pm_runtime_disable
LBB0_6:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_iommu_ports,4,2                ## @iommu_ports
	.no_dead_strip	_mdp4_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mdp4_destroy
_mdp4_destroy:                          ; @mdp4_destroy
	.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	x21, x0
	bl	_to_mdp_kms
	bl	_to_mdp4_kms
	mov	x19, x0
	ldp	x9, x8, [x0, #16]
	ldr	x20, [x8]
	ldr	x21, [x21]
	cbz	x9, LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
	mov	x1, x21
	bl	_msm_gem_unpin_iova
LBB0_2:
	ldr	w0, [x19, #8]
	bl	_drm_gem_object_put_unlocked
	cbz	x21, LBB0_4
; %bb.3:
	ldr	x22, [x21]
	ldr	x8, [x22]
	ldr	x24, [x8]
Lloh0:
	adrp	x8, _iommu_ports@GOTPAGE
Lloh1:
	ldr	x8, [x8, _iommu_ports@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	blr	x24
	mov	x0, x21
	bl	_msm_gem_address_space_put
LBB0_4:
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_pm_runtime_disable
LBB0_6:
	mov	x0, x19
	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
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_iommu_ports,4,2                ; @iommu_ports
	.no_dead_strip	_mdp4_destroy
.subsections_via_symbols
