	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nj_irq
_nj_irq:                                ## @nj_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, %r13
	leaq	8(%rsi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_NJ_IRQSTAT0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%r13), %edi
	callq	_inb
	movl	%eax, %r15d
	movq	_NJ_IRQSTAT1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%r13), %edi
	callq	_inb
	movl	%eax, %ebx
	movq	_NJ_ISACIRQ@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_3
## %bb.1:
	testl	%r15d, %r15d
	jne	LBB0_3
## %bb.2:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rbx
	jmp	LBB0_13
LBB0_3:
	movl	64(%r13), %esi
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_pr_debug
	incl	72(%r13)
	testl	%ebx, (%r12)
	jne	LBB0_6
## %bb.4:
	movq	_ISAC_ISTA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_ReadISAC_nj
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	68(%r13), %rdi
	movl	%eax, %esi
	callq	_mISDNisac_irq
LBB0_6:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rbx
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.7:
	movq	_NJ_IRQSTAT0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r13), %esi
	movl	%r15d, %edi
	callq	_outb
	movq	_NJ_DMA_WRITE_ADR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%r13), %edi
	callq	_inl
	movl	%eax, 40(%r13)
	movslq	%eax, %rcx
	subl	48(%r13), %eax
	sarl	$2, %eax
	movl	%eax, 44(%r13)
	xorl	%ebx, %ebx
	cmpq	%rcx, 56(%r13)
	setg	%bl
	movq	_NJ_DMA_READ_ADR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%r13), %edi
	callq	_inl
	movl	%eax, 16(%r13)
	movslq	%eax, %rcx
	subl	24(%r13), %eax
	sarl	$2, %eax
	movl	%eax, 20(%r13)
	xorl	%edx, %edx
	cmpq	%rcx, 32(%r13)
	setg	%dl
	leal	(%rdx,%rbx,4), %r12d
	addl	$5, %r12d
	movl	64(%r13), %esi
	movl	4(%r13), %r8d
	movl	44(%r13), %r9d
	movl	%eax, (%rsp)
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_pr_debug
	movl	4(%r13), %eax
	cmpl	%eax, %r12d
	je	LBB0_12
## %bb.8:
	movq	_NJ_IRQM0_RD_MASK@GOTPCREL(%rip), %rcx
	xorl	%r12d, %eax
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_send_tiger
	movl	4(%r13), %eax
	xorl	%r12d, %eax
LBB0_10:
	movq	_NJ_IRQM0_WR_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_recv_tiger
LBB0_12:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rbx
LBB0_13:
	movq	%r14, %rdi
	callq	_spin_unlock
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NJ_IRQSTAT0,4,2                ## @NJ_IRQSTAT0
	.comm	_NJ_IRQSTAT1,4,2                ## @NJ_IRQSTAT1
	.comm	_NJ_ISACIRQ,4,2                 ## @NJ_ISACIRQ
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: IRQSTAT0 %02x IRQSTAT1 %02x\n"

	.comm	_ISAC_ISTA,4,2                  ## @ISAC_ISTA
	.comm	_NJ_DMA_WRITE_ADR,4,2           ## @NJ_DMA_WRITE_ADR
	.comm	_NJ_DMA_READ_ADR,4,2            ## @NJ_DMA_READ_ADR
L_.str.1:                               ## @.str.1
	.asciz	"%s: DMA Status %02x/%02x/%02x %d/%d\n"

	.comm	_NJ_IRQM0_RD_MASK,4,2           ## @NJ_IRQM0_RD_MASK
	.comm	_NJ_IRQM0_WR_MASK,4,2           ## @NJ_IRQM0_WR_MASK
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_nj_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nj_irq
_nj_irq:                                ; @nj_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	add	x19, x1, #8
	mov	x0, x19
	bl	_spin_lock
	ldr	w8, [x20]
Lloh0:
	adrp	x23, _NJ_IRQSTAT0@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NJ_IRQSTAT0@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w0, w9, w8
	bl	_inb
	mov	x21, x0
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _NJ_IRQSTAT1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NJ_IRQSTAT1@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_inb
Lloh5:
	adrp	x24, _NJ_ISACIRQ@GOTPAGE
Lloh6:
	ldr	x24, [x24, _NJ_ISACIRQ@GOTPAGEOFF]
	ldr	w8, [x24]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w21, #0, #0, ne
	b.eq	LBB0_11
; %bb.1:
	mov	x22, x0
	ldr	w1, [x20, #64]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x22
	bl	_pr_debug
	ldr	w8, [x20, #72]
	add	w8, w8, #1
	str	w8, [x20, #72]
	ldr	w8, [x24]
	tst	w8, w22
	b.ne	LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _ISAC_ISTA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ISAC_ISTA@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ReadISAC_nj
	cbz	w0, LBB0_4
; %bb.3:
	mov	x1, x0
	add	x0, x20, #68
	bl	_mISDNisac_irq
LBB0_4:
	cbz	w21, LBB0_10
; %bb.5:
	ldr	w8, [x20]
	ldr	w9, [x23]
	orr	w1, w9, w8
	mov	x0, x21
	bl	_outb
	ldr	w8, [x20]
Lloh12:
	adrp	x9, _NJ_DMA_WRITE_ADR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NJ_DMA_WRITE_ADR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_inl
	ldr	w8, [x20, #48]
	sub	w8, w0, w8
	asr	w8, w8, #2
	stp	w0, w8, [x20, #40]
	ldr	x8, [x20, #56]
	cmp	x8, w0, sxtw
	mov	w8, #4
	mov	w9, #8
	csel	w22, w9, w8, gt
	ldr	w8, [x20]
Lloh15:
	adrp	x9, _NJ_DMA_READ_ADR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NJ_DMA_READ_ADR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_inl
	ldr	w8, [x20, #24]
	sub	w8, w0, w8
	asr	w8, w8, #2
	stp	w0, w8, [x20, #16]
	ldr	x9, [x20, #32]
	cmp	x9, w0, sxtw
	mov	w9, #1
	cinc	w9, w9, gt
	orr	w22, w9, w22
	ldr	w1, [x20, #64]
	ldr	w9, [x20, #4]
	ldr	w10, [x20, #44]
	stp	x10, x8, [sp, #8]
	str	x9, [sp]
Lloh18:
	adrp	x0, l_.str.1@PAGE
Lloh19:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x21
	mov	x3, x22
	bl	_pr_debug
	ldr	w8, [x20, #4]
	cmp	w22, w8
	b.eq	LBB0_10
; %bb.6:
Lloh20:
	adrp	x9, _NJ_IRQM0_RD_MASK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _NJ_IRQM0_RD_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	eor	w8, w8, w22
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, x22
	bl	_send_tiger
	ldr	w8, [x20, #4]
	eor	w8, w8, w22
LBB0_8:
Lloh23:
	adrp	x9, _NJ_IRQM0_WR_MASK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _NJ_IRQM0_WR_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w8, w9
	b.eq	LBB0_10
; %bb.9:
	mov	x0, x20
	mov	x1, x22
	bl	_recv_tiger
LBB0_10:
Lloh26:
	adrp	x20, _IRQ_HANDLED@GOTPAGE
Lloh27:
	ldr	x20, [x20, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh28:
	adrp	x20, _IRQ_NONE@GOTPAGE
Lloh29:
	ldr	x20, [x20, _IRQ_NONE@GOTPAGEOFF]
LBB0_12:
	mov	x0, x19
	bl	_spin_unlock
	ldr	w0, [x20]
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_NJ_IRQSTAT0,4,2                ; @NJ_IRQSTAT0
	.comm	_NJ_IRQSTAT1,4,2                ; @NJ_IRQSTAT1
	.comm	_NJ_ISACIRQ,4,2                 ; @NJ_ISACIRQ
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: IRQSTAT0 %02x IRQSTAT1 %02x\n"

	.comm	_ISAC_ISTA,4,2                  ; @ISAC_ISTA
	.comm	_NJ_DMA_WRITE_ADR,4,2           ; @NJ_DMA_WRITE_ADR
	.comm	_NJ_DMA_READ_ADR,4,2            ; @NJ_DMA_READ_ADR
l_.str.1:                               ; @.str.1
	.asciz	"%s: DMA Status %02x/%02x/%02x %d/%d\n"

	.comm	_NJ_IRQM0_RD_MASK,4,2           ; @NJ_IRQM0_RD_MASK
	.comm	_NJ_IRQM0_WR_MASK,4,2           ; @NJ_IRQM0_WR_MASK
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_nj_irq
.subsections_via_symbols
