	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt6397_irq_handle_reg
_mt6397_irq_handle_reg:                 ## @mt6397_irq_handle_reg
	.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
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %r12
	movl	(%rdi), %edi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	je	LBB0_1
## %bb.8:
	movl	8(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	$16, %ebx
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %r13d
	movl	%ebx, %edi
	callq	_BIT
	testl	%r13d, %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r12), %edi
	leal	(%r15,%rbx), %esi
	callq	_irq_find_mapping
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %edi
	callq	_handle_nested_irq
	jmp	LBB0_5
LBB0_6:
	movl	(%r12), %edi
	movl	-44(%rbp), %edx
	movl	%r14d, %esi
	callq	_regmap_write
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read irq status: %d\n"

	.no_dead_strip	_mt6397_irq_handle_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt6397_irq_handle_reg
_mt6397_irq_handle_reg:                 ; @mt6397_irq_handle_reg
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
	add	x2, sp, #12
	bl	_regmap_read
	cbz	w0, LBB0_2
; %bb.1:
	mov	x2, x0
	ldr	w0, [x20, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_8
LBB0_2:
	mov	w22, #0
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #1
	cmp	w22, #16
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w23, [sp, #12]
	mov	x0, x22
	bl	_BIT
	tst	w0, w23
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20, #4]
	add	w1, w21, w22
	bl	_irq_find_mapping
	cbz	w0, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_handle_nested_irq
	b	LBB0_3
LBB0_7:
	ldr	w0, [x20]
	ldr	w2, [sp, #12]
	mov	x1, x19
	bl	_regmap_write
LBB0_8:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read irq status: %d\n"

	.no_dead_strip	_mt6397_irq_handle_reg
.subsections_via_symbols
