	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_ir_irq
_mtk_ir_irq:                            ## @mtk_ir_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	$0, -48(%rbp)
	movl	8(%rsi), %edi
	callq	_ir_raw_event_reset
	movq	_MTK_CHKDATA_SZ@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mtk_chkdata_reg
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_mtk_r32
	movq	%rax, %r13
	movl	12(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movq	%rax, %rcx
	callq	_dev_dbg
	movq	_MTK_WIDTH_MASK@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	andl	%r13d, %eax
	xorl	%ecx, %ecx
	cmpl	$0, -48(%rbp)
	sete	%cl
	movl	%ecx, -48(%rbp)
	movq	_MTK_IR_SAMPLE@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	incl	%ecx
	imull	%eax, %ecx
	movl	%ecx, -44(%rbp)
	movl	8(%r14), %edi
	leaq	-48(%rbp), %r12
	movq	%r12, %rsi
	callq	_ir_raw_event_store_with_filter
	movq	(%r15), %rax
	shlq	$8, %rax
	andq	%r13, %rax
	shrq	$8, %rax
	xorl	%ecx, %ecx
	cmpl	$0, -48(%rbp)
	sete	%cl
	movl	%ecx, -48(%rbp)
	movq	_MTK_IR_SAMPLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	incl	%ecx
	imull	%eax, %ecx
	movl	%ecx, -44(%rbp)
	movl	8(%r14), %edi
	movq	%r12, %rsi
	callq	_ir_raw_event_store_with_filter
	movq	(%r15), %rax
	shlq	$16, %rax
	andq	%r13, %rax
	shrq	$16, %rax
	xorl	%ecx, %ecx
	cmpl	$0, -48(%rbp)
	sete	%cl
	movl	%ecx, -48(%rbp)
	movq	_MTK_IR_SAMPLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	incl	%ecx
	imull	%eax, %ecx
	movl	%ecx, -44(%rbp)
	movl	8(%r14), %edi
	movq	%r12, %rsi
	callq	_ir_raw_event_store_with_filter
	movq	(%r15), %r15
	shlq	$24, %r15
	andq	%r13, %r15
	shrq	$24, %r15
	xorl	%eax, %eax
	cmpl	$0, -48(%rbp)
	sete	%al
	movl	%eax, -48(%rbp)
	movq	_MTK_IR_SAMPLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%eax
	imull	%r15d, %eax
	movl	%eax, -44(%rbp)
	movl	8(%r14), %edi
	movq	%r12, %rsi
	callq	_ir_raw_event_store_with_filter
	movq	_MTK_CHKDATA_SZ@GOTPCREL(%rip), %rax
	incq	%rbx
	cmpq	(%rax), %rbx
	jl	LBB0_3
## %bb.4:
	movl	-48(%rbp), %esi
	jmp	LBB0_5
LBB0_1:
	xorl	%esi, %esi
	xorl	%r15d, %r15d
LBB0_5:
	movl	%r15d, %edi
	callq	_MTK_IR_END
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	$0, -48(%rbp)
	movq	_MTK_MAX_SAMPLES@GOTPCREL(%rip), %rax
	movq	_MTK_IR_SAMPLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	incl	%ecx
	imull	(%rax), %ecx
	movl	%ecx, -44(%rbp)
	movl	8(%r14), %edi
	leaq	-48(%rbp), %rsi
	callq	_ir_raw_event_store_with_filter
LBB0_7:
	movl	8(%r14), %edi
	callq	_ir_raw_event_handle
	movq	_MTK_IRCLR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_MTK_IRCLR_REG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_mtk_w32_mask
	movq	_MTK_IRINT_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_MTK_IRINT_CLR_REG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_mtk_w32_mask
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_CHKDATA_SZ,8,3             ## @MTK_CHKDATA_SZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"@reg%d=0x%08x\n"

	.comm	_MTK_WIDTH_MASK,8,3             ## @MTK_WIDTH_MASK
	.comm	_MTK_IR_SAMPLE,4,2              ## @MTK_IR_SAMPLE
	.comm	_MTK_MAX_SAMPLES,4,2            ## @MTK_MAX_SAMPLES
	.comm	_MTK_IRCLR,4,2                  ## @MTK_IRCLR
	.comm	_MTK_IRCLR_REG,8,3              ## @MTK_IRCLR_REG
	.comm	_MTK_IRINT_CLR,4,2              ## @MTK_IRINT_CLR
	.comm	_MTK_IRINT_CLR_REG,8,3          ## @MTK_IRINT_CLR_REG
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_mtk_ir_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_ir_irq
_mtk_ir_irq:                            ; @mtk_ir_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	str	xzr, [sp, #8]
	ldr	w0, [x1, #8]
	bl	_ir_raw_event_reset
Lloh0:
	adrp	x24, _MTK_CHKDATA_SZ@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MTK_CHKDATA_SZ@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh2:
	adrp	x23, _MTK_IR_SAMPLE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MTK_IR_SAMPLE@GOTPAGEOFF]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, #0
Lloh4:
	adrp	x21, l_.str@PAGE
Lloh5:
	add	x21, x21, l_.str@PAGEOFF
Lloh6:
	adrp	x25, _MTK_WIDTH_MASK@GOTPAGE
Lloh7:
	ldr	x25, [x25, _MTK_WIDTH_MASK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_mtk_chkdata_reg
	mov	x1, x0
	mov	x0, x19
	bl	_mtk_r32
	mov	x22, x0
	ldr	w0, [x19, #12]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x22
	bl	_dev_dbg
	ldr	w8, [x25]
	and	w8, w8, w22
	ldr	w9, [sp, #8]
	cmp	w9, #0
	cset	w9, eq
	ldr	w10, [x23]
	madd	w8, w8, w10, w8
	stp	w9, w8, [sp, #8]
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	bl	_ir_raw_event_store_with_filter
	ldr	x8, [x25]
	and	x8, x22, x8, lsl #8
	lsr	x8, x8, #8
	ldr	w9, [sp, #8]
	cmp	w9, #0
	cset	w9, eq
	ldr	w10, [x23]
	madd	w8, w8, w10, w8
	stp	w9, w8, [sp, #8]
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	bl	_ir_raw_event_store_with_filter
	ldr	x8, [x25]
	and	x8, x22, x8, lsl #16
	lsr	x8, x8, #16
	ldr	w9, [sp, #8]
	cmp	w9, #0
	cset	w9, eq
	ldr	w10, [x23]
	madd	w8, w8, w10, w8
	stp	w9, w8, [sp, #8]
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	bl	_ir_raw_event_store_with_filter
	ldr	x8, [x25]
	and	x8, x22, x8, lsl #24
	lsr	x22, x8, #24
	ldr	w8, [sp, #8]
	cmp	w8, #0
	cset	w8, eq
	ldr	w9, [x23]
	madd	w9, w22, w9, w22
	stp	w8, w9, [sp, #8]
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	bl	_ir_raw_event_store_with_filter
	add	x20, x20, #1
	ldr	x8, [x24]
	cmp	x20, x8
	b.lt	LBB0_2
; %bb.3:
	ldr	w1, [sp, #8]
	b	LBB0_5
LBB0_4:
	mov	w1, #0
	mov	w22, #0
LBB0_5:
	mov	x0, x22
	bl	_MTK_IR_END
	cbnz	w0, LBB0_7
; %bb.6:
Lloh8:
	adrp	x8, _MTK_MAX_SAMPLES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MTK_MAX_SAMPLES@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x23]
	madd	w8, w8, w9, w8
	stp	wzr, w8, [sp, #8]
	ldr	w0, [x19, #8]
	add	x1, sp, #8
	bl	_ir_raw_event_store_with_filter
LBB0_7:
	ldr	w0, [x19, #8]
	bl	_ir_raw_event_handle
Lloh11:
	adrp	x8, _MTK_IRCLR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MTK_IRCLR@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _MTK_IRCLR_REG@GOTPAGE
Lloh15:
	ldr	x9, [x9, _MTK_IRCLR_REG@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	ldr	w3, [x8, x9, lsl #2]
	mov	x0, x19
	mov	w1, #1
	bl	_mtk_w32_mask
Lloh17:
	adrp	x8, _MTK_IRINT_CLR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MTK_IRINT_CLR@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh20:
	adrp	x9, _MTK_IRINT_CLR_REG@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MTK_IRINT_CLR_REG@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	ldr	w3, [x8, x9, lsl #2]
	mov	x0, x19
	mov	w1, #1
	bl	_mtk_w32_mask
Lloh23:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_CHKDATA_SZ,8,3             ; @MTK_CHKDATA_SZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"@reg%d=0x%08x\n"

	.comm	_MTK_WIDTH_MASK,8,3             ; @MTK_WIDTH_MASK
	.comm	_MTK_IR_SAMPLE,4,2              ; @MTK_IR_SAMPLE
	.comm	_MTK_MAX_SAMPLES,4,2            ; @MTK_MAX_SAMPLES
	.comm	_MTK_IRCLR,4,2                  ; @MTK_IRCLR
	.comm	_MTK_IRCLR_REG,8,3              ; @MTK_IRCLR_REG
	.comm	_MTK_IRINT_CLR,4,2              ; @MTK_IRINT_CLR
	.comm	_MTK_IRINT_CLR_REG,8,3          ; @MTK_IRINT_CLR_REG
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_mtk_ir_irq
.subsections_via_symbols
