	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function irq_handler
_irq_handler:                           ## @irq_handler
	.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, %r12
	cmpq	$0, 96(%rsi)
	je	LBB0_3
## %bb.1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_NGENE_INT_COUNTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ngreadl
	cmpq	(%r12), %rax
	je	LBB0_20
## %bb.2:
	movq	%rax, %r14
	movq	_FORCE_NMI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_ngwritel
	movl	$1, 8(%r12)
	leaq	84(%r12), %rdi
	callq	_wake_up
	movq	%r14, (%r12)
	jmp	LBB0_19
LBB0_3:
	movq	104(%r12), %r14
	movq	_MAX_STREAM@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_FORCE_NMI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_ngwritel
	leaq	80(%r12), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movq	88(%r12), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	cmpq	$0, (%rax)
	je	LBB0_5
LBB0_7:
	movq	$0, 88(%r12)
	movl	$1, 8(%r12)
	leaq	84(%r12), %rdi
	callq	_wake_up
LBB0_8:
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	64(%r12), %rax
	movl	(%rax), %ecx
	testb	$-128, %cl
	je	LBB0_13
## %bb.9:
	movslq	24(%r12), %rdx
	leaq	1(%rdx), %rdi
	movq	_EVENT_QUEUE_SIZE@GOTPCREL(%rip), %rsi
	movslq	(%rsi), %rsi
	decq	%rsi
	andq	%rdi, %rsi
	cmpq	%rsi, 32(%r12)
	jne	LBB0_10
## %bb.11:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	incl	40(%r12)
	movl	$1, 44(%r12)
	movq	64(%r12), %rax
	jmp	LBB0_12
LBB0_10:
	movq	72(%r12), %rdi
	movl	%ecx, (%rdi,%rdx,4)
	movl	%esi, 24(%r12)
LBB0_12:
	andb	$127, (%rax)
	leaq	56(%r12), %rdi
	callq	_tasklet_schedule
LBB0_13:
	testq	%r13, %r13
	jle	LBB0_19
## %bb.14:
	leaq	1(%r13), %rbx
	shlq	$4, %r13
	addq	$-16, %r13
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	addq	%r13, %rdi
	callq	_spin_unlock
	decq	%rbx
	addq	$-16, %r13
	cmpq	$1, %rbx
	jbe	LBB0_19
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	48(%r12), %rdi
	addq	%r13, %rdi
	callq	_spin_lock
	movq	48(%r12), %rdi
	movq	8(%rdi,%r13), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	(%rax), %ecx
	movl	%ecx, %edx
	andl	$192, %edx
	cmpl	$128, %edx
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	orl	$64, %ecx
	movl	%ecx, (%rax)
	addq	%r13, %rdi
	addq	$4, %rdi
	callq	_tasklet_schedule
	movq	48(%r12), %rdi
	jmp	LBB0_18
LBB0_19:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_20:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	16(%r12), %rax
	cmpl	$1, (%rax)
	jne	LBB0_8
## %bb.6:
	cmpl	$0, 4(%rax)
	jne	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_MAX_STREAM,8,3                 ## @MAX_STREAM
	.comm	_NGENE_INT_COUNTS,4,2           ## @NGENE_INT_COUNTS
	.comm	_FORCE_NMI,4,2                  ## @FORCE_NMI
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_EVENT_QUEUE_SIZE,4,2           ## @EVENT_QUEUE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"event overflow\n"

	.no_dead_strip	_irq_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function irq_handler
_irq_handler:                           ; @irq_handler
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldr	x8, [x1, #96]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _NGENE_INT_COUNTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NGENE_INT_COUNTS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_ngreadl
	ldr	x8, [x19]
	cmp	x0, x8
	b.eq	LBB0_18
; %bb.2:
	mov	x21, x0
Lloh6:
	adrp	x8, _FORCE_NMI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FORCE_NMI@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_ngwritel
	mov	w8, #1
	str	w8, [x19, #8]
	add	x0, x19, #84
	bl	_wake_up
	str	x21, [x19]
	b	LBB0_17
LBB0_3:
	ldr	x20, [x19, #104]
Lloh9:
	adrp	x8, _MAX_STREAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_STREAM@GOTPAGEOFF]
Lloh11:
	ldr	x22, [x8]
Lloh12:
	adrp	x8, _FORCE_NMI@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FORCE_NMI@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_ngwritel
	add	x21, x19, #80
	mov	x0, x21
	bl	_spin_lock
	ldr	x8, [x19, #88]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	x8, [x8]
	cbz	x8, LBB0_19
LBB0_5:
	str	xzr, [x19, #88]
	mov	w8, #1
	str	w8, [x19, #8]
	add	x0, x19, #84
	bl	_wake_up
LBB0_6:
	mov	x0, x21
	bl	_spin_unlock
	ldr	x8, [x19, #64]
	ldr	w9, [x8]
	tbz	w9, #7, LBB0_11
; %bb.7:
	ldrsw	x10, [x19, #24]
Lloh15:
	adrp	x11, _EVENT_QUEUE_SIZE@GOTPAGE
Lloh16:
	ldr	x11, [x11, _EVENT_QUEUE_SIZE@GOTPAGEOFF]
	add	x12, x10, #1
Lloh17:
	ldrsw	x11, [x11]
	sub	x11, x11, #1
	and	x11, x11, x12
	ldr	x12, [x19, #32]
	cmp	x12, x11
	b.ne	LBB0_9
; %bb.8:
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w8, [x19, #40]
	add	w8, w8, #1
	mov	w9, #1
	stp	w8, w9, [x19, #40]
	ldr	x8, [x19, #64]
	b	LBB0_10
LBB0_9:
	ldr	x12, [x19, #72]
	str	w9, [x12, x10, lsl #2]
	str	w11, [x19, #24]
LBB0_10:
	ldr	w9, [x8]
	and	w9, w9, #0xffffff7f
	str	w9, [x8]
	add	x0, x19, #56
	bl	_tasklet_schedule
LBB0_11:
	cmp	x22, #1
	b.lt	LBB0_17
; %bb.12:
	add	x20, x22, #1
	lsl	x8, x22, #4
	sub	x21, x8, #8
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	add	x8, x8, x21
	sub	x0, x8, #8
	bl	_spin_unlock
	sub	x20, x20, #1
	sub	x21, x21, #16
	cmp	x20, #1
	b.ls	LBB0_17
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #48]
	add	x8, x8, x21
	sub	x0, x8, #8
	bl	_spin_lock
	ldr	x8, [x19, #48]
	ldr	x9, [x8, x21]
	cbz	x9, LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w10, [x9]
	and	w11, w10, #0xc0
	cmp	w11, #128
	b.ne	LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	orr	w10, w10, #0x40
	str	w10, [x9]
	add	x8, x8, x21
	sub	x0, x8, #4
	bl	_tasklet_schedule
	ldr	x8, [x19, #48]
	b	LBB0_13
LBB0_17:
Lloh20:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh22:
	ldr	w20, [x8]
LBB0_18:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_19:
	ldr	x8, [x19, #16]
	ldr	w9, [x8]
	cmp	w9, #1
	b.ne	LBB0_6
; %bb.20:
	ldr	w8, [x8, #4]
	cbnz	w8, LBB0_5
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_MAX_STREAM,8,3                 ; @MAX_STREAM
	.comm	_NGENE_INT_COUNTS,4,2           ; @NGENE_INT_COUNTS
	.comm	_FORCE_NMI,4,2                  ; @FORCE_NMI
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_EVENT_QUEUE_SIZE,4,2           ; @EVENT_QUEUE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"event overflow\n"

	.no_dead_strip	_irq_handler
.subsections_via_symbols
