	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _dpu_core_irq_enable
__dpu_core_irq_enable:                  ## @_dpu_core_irq_enable
	.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
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r15
	movq	32(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_4
## %bb.2:
	movq	16(%r15), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	cmpl	$0, 24(%r15)
	je	LBB0_4
## %bb.6:
	movl	%esi, %r14d
	testl	%esi, %esi
	js	LBB0_8
## %bb.7:
	cmpl	%r14d, (%rcx)
	jle	LBB0_8
## %bb.9:
	movl	%r14d, %r12d
	leaq	(%rax,%r12,4), %rdi
	shlq	$2, %r12
	callq	_atomic_read
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_DRM_DEBUG_KMS
	movl	%r14d, %edi
	movl	%ebx, %esi
	callq	_trace_dpu_core_irq_enable_idx
	movq	16(%r15), %rdi
	addq	%r12, %rdi
	callq	_atomic_inc_return
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	jne	LBB0_15
## %bb.10:
	movq	32(%r15), %rdi
	movl	%r14d, %esi
	callq	*8(%rdi)
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.3(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_DPU_ERROR
LBB0_12:
	leaq	L_.str.4(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_DPU_DEBUG
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	addq	8(%r15), %r12
	movq	%r12, %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.5(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_DPU_ERROR
LBB0_14:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_15
LBB0_4:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DPU_ERROR
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_DPU_ERROR
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid params\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"invalid IRQ index: [%d]\n"

L_.str.2:                               ## @.str.2
	.asciz	"irq_idx=%d enable_count=%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Fail to enable IRQ for irq_idx:%d\n"

L_.str.4:                               ## @.str.4
	.asciz	"irq_idx=%d ret=%d\n"

L_.str.5:                               ## @.str.5
	.asciz	"irq_idx=%d enabled with no callback\n"

	.no_dead_strip	__dpu_core_irq_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _dpu_core_irq_enable
__dpu_core_irq_enable:                  ; @_dpu_core_irq_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	cbz	x0, LBB0_12
; %bb.1:
	mov	x19, x0
	ldr	x9, [x0, #32]
	cbz	x9, LBB0_12
; %bb.2:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_12
; %bb.3:
	ldr	w10, [x19, #24]
	cbz	w10, LBB0_12
; %bb.4:
	mov	x20, x1
	tbnz	w1, #31, LBB0_15
; %bb.5:
	ldr	w9, [x9]
	cmp	w9, w20
	b.le	LBB0_15
; %bb.6:
	mov	w22, w20
	lsl	x23, x22, #2
	add	x0, x8, x23
	bl	_atomic_read
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str.2@PAGE
Lloh1:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_DRM_DEBUG_KMS
	mov	x0, x20
	mov	x1, x21
	bl	_trace_dpu_core_irq_enable_idx
	ldr	x8, [x19, #16]
	add	x0, x8, x23
	bl	_atomic_inc_return
	cmp	w0, #1
	b.ne	LBB0_16
; %bb.7:
	ldr	x0, [x19, #32]
	ldr	x8, [x0, #8]
	mov	x1, x20
	blr	x8
	mov	x21, x0
	cbz	w0, LBB0_9
; %bb.8:
	mov	x8, x20
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.3@PAGE
Lloh3:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DPU_ERROR
LBB0_9:
Lloh4:
	adrp	x0, l_.str.4@PAGE
Lloh5:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_DPU_DEBUG
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
	add	x0, x8, x22, lsl #2
	bl	_list_empty
	cbz	x0, LBB0_11
; %bb.10:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh6:
	adrp	x0, l_.str.5@PAGE
Lloh7:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DPU_ERROR
LBB0_11:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	b	LBB0_14
LBB0_12:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
LBB0_13:
	bl	_DPU_ERROR
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_14:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_15:
	str	x20, [sp]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_16:
	mov	w21, #0
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid params\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"invalid IRQ index: [%d]\n"

l_.str.2:                               ; @.str.2
	.asciz	"irq_idx=%d enable_count=%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Fail to enable IRQ for irq_idx:%d\n"

l_.str.4:                               ; @.str.4
	.asciz	"irq_idx=%d ret=%d\n"

l_.str.5:                               ; @.str.5
	.asciz	"irq_idx=%d enabled with no callback\n"

	.no_dead_strip	__dpu_core_irq_enable
.subsections_via_symbols
