	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nes_port_ibevent               ## -- Begin function nes_port_ibevent
	.p2align	4, 0x90
_nes_port_ibevent:                      ## @nes_port_ibevent
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	48(%rdi), %rax
	movq	56(%rdi), %rcx
	movq	%rcx, -32(%rbp)
	movq	40(%rdi), %rcx
	incq	%rcx
	movq	%rcx, -40(%rbp)
	cmpq	$0, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_IB_EVENT_PORT_ERR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_IB_EVENT_PORT_ACTIVE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r15d
	movl	%r15d, -48(%rbp)
	leaq	8(%rbx), %r14
	cmpq	$0, 24(%rbx)
	je	LBB0_4
## %bb.5:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_NES_EVENT_DELAY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_mod_timer
	jmp	LBB0_6
LBB0_4:
	leaq	-48(%rbp), %rdi
	callq	_ib_dispatch_event
	movl	-48(%rbp), %eax
	movl	%eax, 32(%rbx)
	movq	_nes_handle_delayed_event@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%rbx)
	movq	%rbx, 8(%rbx)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_NES_EVENT_DELAY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	(%rax), %rcx
	movq	%rcx, 16(%rbx)
	movq	%r14, %rdi
	callq	_add_timer
	movl	-48(%rbp), %r15d
LBB0_6:
	movl	%r15d, (%rbx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_EVENT_PORT_ACTIVE,4,2       ## @IB_EVENT_PORT_ACTIVE
	.comm	_IB_EVENT_PORT_ERR,4,2          ## @IB_EVENT_PORT_ERR
	.comm	_nes_handle_delayed_event,8,3   ## @nes_handle_delayed_event
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_NES_EVENT_DELAY,8,3            ## @NES_EVENT_DELAY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nes_port_ibevent               ; -- Begin function nes_port_ibevent
	.p2align	2
_nes_port_ibevent:                      ; @nes_port_ibevent
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	ldp	x9, x8, [x0, #48]
	ldr	x10, [x0, #40]
	add	x10, x10, #1
	stp	x10, x8, [sp, #16]
	ldr	x8, [x9]
Lloh0:
	adrp	x9, _IB_EVENT_PORT_ACTIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_EVENT_PORT_ACTIVE@GOTPAGEOFF]
Lloh2:
	adrp	x10, _IB_EVENT_PORT_ERR@GOTPAGE
Lloh3:
	ldr	x10, [x10, _IB_EVENT_PORT_ERR@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w21, [x8]
	str	w21, [sp, #8]
	add	x20, x0, #8
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _jiffies@GOTPAGE
Lloh5:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _NES_EVENT_DELAY@GOTPAGE
Lloh8:
	ldr	x9, [x9, _NES_EVENT_DELAY@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_mod_timer
	b	LBB0_3
LBB0_2:
	add	x0, sp, #8
	bl	_ib_dispatch_event
	ldr	w8, [sp, #8]
Lloh10:
	adrp	x9, _nes_handle_delayed_event@GOTPAGE
Lloh11:
	ldr	x9, [x9, _nes_handle_delayed_event@GOTPAGEOFF]
	str	w8, [x19, #32]
Lloh12:
	ldr	x8, [x9]
	str	x8, [x19, #24]
Lloh13:
	adrp	x8, _jiffies@GOTPAGE
Lloh14:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _NES_EVENT_DELAY@GOTPAGE
Lloh17:
	ldr	x9, [x9, _NES_EVENT_DELAY@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x8, x9, x8
	stp	x19, x8, [x19, #8]
	mov	x0, x20
	bl	_add_timer
	ldr	w21, [sp, #8]
LBB0_3:
	str	w21, [x19]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_EVENT_PORT_ACTIVE,4,2       ; @IB_EVENT_PORT_ACTIVE
	.comm	_IB_EVENT_PORT_ERR,4,2          ; @IB_EVENT_PORT_ERR
	.comm	_nes_handle_delayed_event,8,3   ; @nes_handle_delayed_event
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_NES_EVENT_DELAY,8,3            ; @NES_EVENT_DELAY
.subsections_via_symbols
