	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpu_hw_intr_enable_irq
_dpu_hw_intr_enable_irq:                ## @dpu_hw_intr_enable_irq
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%esi, %ebx
	testl	%esi, %esi
	js	LBB0_4
## %bb.3:
	movq	%rdi, %r12
	movq	_dpu_irq_map@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cmpl	%ebx, %eax
	jle	LBB0_4
## %bb.5:
	movq	(%r14), %r13
	movl	%ebx, %r15d
	movslq	(%r13,%r15,8), %rbx
	movq	_dpu_intr_set@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	8(%r12), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	(%r12), %rax
	movl	(%rax,%rbx,4), %r14d
	movl	4(%r13,%r15,8), %edx
	testl	%r14d, %edx
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rbx
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_err
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	orl	%edx, %r14d
	leaq	12(%r12), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax,%rbx,8), %esi
	callq	_DPU_REG_WRITE
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rbx,8), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_DPU_REG_WRITE
	xorl	%eax, %eax
	callq	_wmb
	movq	(%r12), %rax
	movl	%r14d, (%rax,%rbx,4)
	leaq	L_.str.2(%rip), %rbx
LBB0_8:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	4(%r13,%r15,8), %edx
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rsi
	movl	%r14d, %ecx
	callq	_pr_debug
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_dpu_irq_map,8,3                ## @dpu_irq_map
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid IRQ index: [%d]\n"

	.comm	_dpu_intr_set,8,3               ## @dpu_intr_set
L_.str.1:                               ## @.str.1
	.asciz	"DPU IRQ already set:"

L_.str.2:                               ## @.str.2
	.asciz	"DPU IRQ enabled:"

L_.str.3:                               ## @.str.3
	.asciz	"%s MASK:0x%.8x, CACHE-MASK:0x%.8x\n"

	.no_dead_strip	_dpu_hw_intr_enable_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpu_hw_intr_enable_irq
_dpu_hw_intr_enable_irq:                ; @dpu_hw_intr_enable_irq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x1
	tbnz	w1, #31, LBB0_5
; %bb.2:
	mov	x19, x0
Lloh0:
	adrp	x21, _dpu_irq_map@GOTPAGE
Lloh1:
	ldr	x21, [x21, _dpu_irq_map@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, w20
	b.le	LBB0_5
; %bb.3:
	ldr	x8, [x21]
	add	x23, x8, w20, uxtw #3
	ldrsw	x24, [x23]
Lloh2:
	adrp	x8, _dpu_intr_set@GOTPAGE
Lloh3:
	ldr	x8, [x8, _dpu_intr_set@GOTPAGEOFF]
Lloh4:
	ldr	x25, [x8]
	add	x21, x19, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x19]
	ldr	w20, [x8, x24, lsl #2]
	ldr	w2, [x23, #4]!
	tst	w2, w20
	b.eq	LBB0_8
; %bb.4:
Lloh5:
	adrp	x19, l_.str.1@PAGE
Lloh6:
	add	x19, x19, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_5:
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_err
LBB0_6:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_8:
	orr	w20, w2, w20
	add	x22, x19, #12
	add	x25, x25, x24, lsl #3
	ldr	w1, [x25, #4]
	mov	x0, x22
	bl	_DPU_REG_WRITE
	ldr	w1, [x25]
	mov	x0, x22
	mov	x2, x20
	bl	_DPU_REG_WRITE
	bl	_wmb
	ldr	x8, [x19]
	str	w20, [x8, x24, lsl #2]
Lloh12:
	adrp	x19, l_.str.2@PAGE
Lloh13:
	add	x19, x19, l_.str.2@PAGEOFF
LBB0_9:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w2, [x23]
Lloh14:
	adrp	x0, l_.str.3@PAGE
Lloh15:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	mov	x3, x20
	bl	_pr_debug
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_dpu_irq_map,8,3                ; @dpu_irq_map
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid IRQ index: [%d]\n"

	.comm	_dpu_intr_set,8,3               ; @dpu_intr_set
l_.str.1:                               ; @.str.1
	.asciz	"DPU IRQ already set:"

l_.str.2:                               ; @.str.2
	.asciz	"DPU IRQ enabled:"

l_.str.3:                               ; @.str.3
	.asciz	"%s MASK:0x%.8x, CACHE-MASK:0x%.8x\n"

	.no_dead_strip	_dpu_hw_intr_enable_irq
.subsections_via_symbols
