	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nes_napi_isr                   ## -- Begin function nes_napi_isr
	.p2align	4, 0x90
_nes_napi_isr:                          ## @nes_napi_isr
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	48(%rdi), %r14
	cmpl	$0, (%rdi)
	je	LBB0_2
## %bb.1:
	movl	4(%rbx), %esi
	jmp	LBB0_3
LBB0_2:
	movq	_NES_INT_STAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	callq	_nes_read32
	movl	%eax, %esi
	movl	%eax, 4(%rbx)
	movl	$1, (%rbx)
LBB0_3:
	xorl	%eax, %eax
	andl	8(%rbx), %esi
	je	LBB0_15
## %bb.4:
	movl	%esi, %ecx
	andl	$65280, %ecx                    ## imm = 0xFF00
	cmpl	%esi, %ecx
	jne	LBB0_15
## %bb.5:
	movl	$0, (%rbx)
	movq	_NES_INT_STAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	movq	_NES_INT_INTF@GOTPCREL(%rip), %rax
	movq	_NES_INT_TIMER@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	orl	(%rax), %ecx
	movq	_NES_INT_MAC0@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_NES_INT_MAC1@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_NES_INT_MAC2@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_NES_INT_MAC3@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, %esi
	callq	_nes_write32
	movq	16(%rbx), %rsi
	movq	48(%rbx), %rax
	shlq	$2, %rsi
	addq	32(%rax), %rsi
	movq	%rbx, %rdi
	callq	_nes_process_ceq
	cmpq	$0, 24(%r14)
	setne	%al
	cmpl	$0, (%r14)
	je	LBB0_7
## %bb.6:
	movq	24(%rbx), %rax
	cmpq	8(%r14), %rax
	setg	%al
LBB0_7:
	movzbl	%al, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movl	8(%rbx), %eax
	movl	(%r15), %ecx
	testl	%eax, %ecx
	jne	LBB0_10
## %bb.9:
	orl	%eax, %ecx
	movl	%ecx, 8(%rbx)
	movq	_NES_TIMER_STAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	movq	48(%rbx), %rax
	movl	16(%rax), %esi
	notl	%esi
	orl	32(%rbx), %esi
	callq	_nes_write32
	movq	_NES_INTF_INT_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	movq	_NES_INTF_PERIODIC_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	36(%rbx), %esi
	notl	%esi
	callq	_nes_write32
LBB0_10:
	movl	(%r14), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	_nes_nic_init_timer
LBB0_12:
	movq	_NES_INT_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	movl	8(%rbx), %esi
	notl	%esi
	orl	$65535, %esi                    ## imm = 0xFFFF
	jmp	LBB0_14
LBB0_13:
	movl	(%r15), %eax
	notl	%eax
	andl	%eax, 8(%rbx)
	movq	_NES_INTF_INT_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	movl	36(%rbx), %esi
	notl	%esi
	callq	_nes_write32
	movq	_NES_INT_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%rbx), %rdi
	movl	8(%rbx), %esi
	notl	%esi
LBB0_14:
	callq	_nes_write32
	movq	$0, 24(%rbx)
	movl	$1, %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NES_INT_STAT,8,3               ## @NES_INT_STAT
	.comm	_NES_INT_INTF,4,2               ## @NES_INT_INTF
	.comm	_NES_INT_TIMER,4,2              ## @NES_INT_TIMER
	.comm	_NES_INT_MAC0,4,2               ## @NES_INT_MAC0
	.comm	_NES_INT_MAC1,4,2               ## @NES_INT_MAC1
	.comm	_NES_INT_MAC2,4,2               ## @NES_INT_MAC2
	.comm	_NES_INT_MAC3,4,2               ## @NES_INT_MAC3
	.comm	_NES_TIMER_STAT,8,3             ## @NES_TIMER_STAT
	.comm	_NES_INTF_INT_MASK,8,3          ## @NES_INTF_INT_MASK
	.comm	_NES_INTF_PERIODIC_TIMER,4,2    ## @NES_INTF_PERIODIC_TIMER
	.comm	_NES_INT_MASK,8,3               ## @NES_INT_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nes_napi_isr                   ; -- Begin function nes_napi_isr
	.p2align	2
_nes_napi_isr:                          ; @nes_napi_isr
	.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, x0
	ldr	x20, [x0, #48]
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w0, [x19, #4]
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #40]
Lloh0:
	adrp	x9, _NES_INT_STAT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NES_INT_STAT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_nes_read32
	mov	w8, #1
	stp	w8, w0, [x19]
LBB0_3:
	ldr	w8, [x19, #8]
	and	w8, w8, w0
	and	w9, w8, #0xff00
	cmp	w8, #0
	ccmp	w9, w8, #0, ne
	b.eq	LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_15
LBB0_5:
	str	wzr, [x19]
	ldr	x9, [x19, #40]
Lloh3:
	adrp	x10, _NES_INT_STAT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NES_INT_STAT@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	add	x0, x10, x9
Lloh6:
	adrp	x9, _NES_INT_INTF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NES_INT_INTF@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x21, _NES_INT_TIMER@GOTPAGE
Lloh10:
	ldr	x21, [x21, _NES_INT_TIMER@GOTPAGEOFF]
	ldr	w10, [x21]
	orr	w9, w10, w9
Lloh11:
	adrp	x10, _NES_INT_MAC0@GOTPAGE
Lloh12:
	ldr	x10, [x10, _NES_INT_MAC0@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _NES_INT_MAC1@GOTPAGE
Lloh15:
	ldr	x11, [x11, _NES_INT_MAC1@GOTPAGEOFF]
	orr	w9, w9, w10
Lloh16:
	ldr	w10, [x11]
	orr	w9, w9, w10
Lloh17:
	adrp	x10, _NES_INT_MAC2@GOTPAGE
Lloh18:
	ldr	x10, [x10, _NES_INT_MAC2@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	orr	w9, w9, w10
Lloh20:
	adrp	x10, _NES_INT_MAC3@GOTPAGE
Lloh21:
	ldr	x10, [x10, _NES_INT_MAC3@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bic	w1, w8, w9
	bl	_nes_write32
	ldr	x8, [x19, #48]
	ldr	x8, [x8, #32]
	ldr	x9, [x19, #16]
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	bl	_nes_process_ceq
	ldr	x8, [x20, #24]
	cmp	x8, #0
	cset	w0, ne
	ldr	w8, [x20]
	cbz	w8, LBB0_7
; %bb.6:
	ldr	x8, [x19, #24]
	ldr	x9, [x20, #8]
	cmp	x8, x9
	cset	w0, gt
LBB0_7:
	bl	_unlikely
	cbz	x0, LBB0_13
; %bb.8:
	ldr	w8, [x19, #8]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.9:
	orr	w8, w9, w8
	str	w8, [x19, #8]
Lloh23:
	adrp	x8, _NES_TIMER_STAT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _NES_TIMER_STAT@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	ldp	x9, x10, [x19, #40]
	add	x0, x8, x9
	ldr	w8, [x19, #32]
	ldr	w9, [x10, #16]
	orn	w1, w8, w9
	bl	_nes_write32
	ldr	x8, [x19, #40]
Lloh26:
	adrp	x9, _NES_INTF_INT_MASK@GOTPAGE
Lloh27:
	ldr	x9, [x9, _NES_INTF_INT_MASK@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	add	x0, x9, x8
	ldr	w8, [x19, #36]
Lloh29:
	adrp	x9, _NES_INTF_PERIODIC_TIMER@GOTPAGE
Lloh30:
	ldr	x9, [x9, _NES_INTF_PERIODIC_TIMER@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mvn	w1, w8
	bl	_nes_write32
LBB0_10:
	ldr	w0, [x20]
	bl	_unlikely
	cbz	x0, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_nes_nic_init_timer
LBB0_12:
Lloh32:
	adrp	x8, _NES_INT_MASK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _NES_INT_MASK@GOTPAGEOFF]
	ldr	x9, [x19, #40]
Lloh34:
	ldr	x8, [x8]
	add	x0, x8, x9
	ldr	w8, [x19, #8]
	mvn	w8, w8
	orr	w1, w8, #0xffff
	b	LBB0_14
LBB0_13:
	ldr	w8, [x21]
	ldr	w9, [x19, #8]
	bic	w8, w9, w8
	str	w8, [x19, #8]
	ldr	x8, [x19, #40]
Lloh35:
	adrp	x9, _NES_INTF_INT_MASK@GOTPAGE
Lloh36:
	ldr	x9, [x9, _NES_INTF_INT_MASK@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	add	x0, x9, x8
	ldr	w8, [x19, #36]
	mvn	w1, w8
	bl	_nes_write32
	ldr	x8, [x19, #40]
Lloh38:
	adrp	x9, _NES_INT_MASK@GOTPAGE
Lloh39:
	ldr	x9, [x9, _NES_INT_MASK@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	add	x0, x9, x8
	ldr	w8, [x19, #8]
	mvn	w1, w8
LBB0_14:
	bl	_nes_write32
	str	xzr, [x19, #24]
	mov	w0, #1
LBB0_15:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_NES_INT_STAT,8,3               ; @NES_INT_STAT
	.comm	_NES_INT_INTF,4,2               ; @NES_INT_INTF
	.comm	_NES_INT_TIMER,4,2              ; @NES_INT_TIMER
	.comm	_NES_INT_MAC0,4,2               ; @NES_INT_MAC0
	.comm	_NES_INT_MAC1,4,2               ; @NES_INT_MAC1
	.comm	_NES_INT_MAC2,4,2               ; @NES_INT_MAC2
	.comm	_NES_INT_MAC3,4,2               ; @NES_INT_MAC3
	.comm	_NES_TIMER_STAT,8,3             ; @NES_TIMER_STAT
	.comm	_NES_INTF_INT_MASK,8,3          ; @NES_INTF_INT_MASK
	.comm	_NES_INTF_PERIODIC_TIMER,4,2    ; @NES_INTF_PERIODIC_TIMER
	.comm	_NES_INT_MASK,8,3               ; @NES_INT_MASK
.subsections_via_symbols
