	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpu_core_irq_uninstall         ## -- Begin function dpu_core_irq_uninstall
	.p2align	4, 0x90
_dpu_core_irq_uninstall:                ## @dpu_core_irq_uninstall
	.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	40(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.5:
	movq	%rdi, %r15
	movq	32(%rdi), %rdi
	callq	_pm_runtime_get_sync
	cmpl	$0, (%r15)
	jle	LBB0_11
## %bb.6:
	leaq	L_.str.2(%rip), %r14
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DPU_ERROR
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	addq	$4, %r12
	cmpq	%rax, %rbx
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rdi
	addq	%r12, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	24(%r15), %rdi
	addq	%r12, %rdi
	callq	_list_empty
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_9
LBB0_11:
	movq	%r15, %rdi
	callq	_dpu_clear_all_irqs
	movq	%r15, %rdi
	callq	_dpu_disable_all_irqs
	movq	32(%r15), %rdi
	callq	_pm_runtime_put_sync
	movq	24(%r15), %rdi
	callq	_kfree
	movq	16(%r15), %rdi
	callq	_kfree
	movq	8(%r15), %rdi
	callq	_kfree
	movl	$0, (%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movq	$0, 24(%r15)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DPU_ERROR                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid drm device\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid device private\n"

L_.str.2:                               ## @.str.2
	.asciz	"irq_idx=%d still enabled/registered\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dpu_core_irq_uninstall         ; -- Begin function dpu_core_irq_uninstall
	.p2align	2
_dpu_core_irq_uninstall:                ; @dpu_core_irq_uninstall
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_9
; %bb.1:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.2:
	mov	x19, x0
	ldr	x0, [x0, #32]
	bl	_pm_runtime_get_sync
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x21, #0
	mov	x22, #0
Lloh0:
	adrp	x20, l_.str.2@PAGE
Lloh1:
	add	x20, x20, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	x22, [sp]
	mov	x0, x20
	bl	_DPU_ERROR
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x21, x21, #4
	cmp	x22, x8
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	add	x0, x8, x21
	bl	_atomic_read
	cbnz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #24]
	add	x0, x8, x21
	bl	_list_empty
	cbnz	w0, LBB0_5
	b	LBB0_4
LBB0_8:
	mov	x0, x19
	bl	_dpu_clear_all_irqs
	mov	x0, x19
	bl	_dpu_disable_all_irqs
	ldr	x0, [x19, #32]
	bl	_pm_runtime_put_sync
	ldr	x0, [x19, #24]
	bl	_kfree
	ldr	x0, [x19, #16]
	bl	_kfree
	ldr	x0, [x19, #8]
	bl	_kfree
	str	wzr, [x19]
	stp	xzr, xzr, [x19, #16]
	str	xzr, [x19, #8]
	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
	add	sp, sp, #64
	ret
LBB0_9:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_11:
	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
	add	sp, sp, #64
	b	_DPU_ERROR
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid drm device\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid device private\n"

l_.str.2:                               ; @.str.2
	.asciz	"irq_idx=%d still enabled/registered\n"

.subsections_via_symbols
