	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function joydev_pass_event
_joydev_pass_event:                     ## @joydev_pass_event
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	40(%rdi), %r12
	leaq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	(%rbx), %rax
	movq	32(%rbx), %rcx
	movl	(%r15), %edx
	movl	%edx, (%rcx,%rax,4)
	movq	8(%r12), %rcx
	addq	(%r12), %rcx
	cmpq	%rcx, 8(%rbx)
	jne	LBB0_3
## %bb.1:
	incq	%rax
	movq	_JOYDEV_BUFFER_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	decq	%rcx
	andq	%rax, %rcx
	movq	%rcx, (%rbx)
	movslq	16(%rbx), %rax
	cmpq	%rax, %rcx
	jne	LBB0_3
## %bb.2:
	movq	$0, 8(%rbx)
LBB0_3:
	movq	%r14, %rdi
	callq	_spin_unlock
	addq	$20, %rbx
	movq	_SIGIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_POLL_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kill_fasync                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_JOYDEV_BUFFER_SIZE,4,2         ## @JOYDEV_BUFFER_SIZE
	.comm	_SIGIO,4,2                      ## @SIGIO
	.comm	_POLL_IN,4,2                    ## @POLL_IN
	.no_dead_strip	_joydev_pass_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function joydev_pass_event
_joydev_pass_event:                     ; @joydev_pass_event
	.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	x21, x1
	mov	x19, x0
	ldr	x22, [x0, #40]
	add	x20, x0, #24
	mov	x0, x20
	bl	_spin_lock
	ldr	x9, [x19, #32]
	ldr	w10, [x21]
	ldp	x8, x11, [x19]
	str	w10, [x9, x8, lsl #2]
	ldp	x9, x10, [x22]
	add	x9, x10, x9
	cmp	x11, x9
	b.ne	LBB0_3
; %bb.1:
	add	x8, x8, #1
Lloh0:
	adrp	x9, _JOYDEV_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _JOYDEV_BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	sub	x9, x9, #1
	and	x8, x8, x9
	str	x8, [x19]
	ldrsw	x9, [x19, #16]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	str	xzr, [x19, #8]
LBB0_3:
	mov	x0, x20
	bl	_spin_unlock
	add	x0, x19, #20
Lloh3:
	adrp	x8, _SIGIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIGIO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _POLL_IN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _POLL_IN@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	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
	b	_kill_fasync
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_JOYDEV_BUFFER_SIZE,4,2         ; @JOYDEV_BUFFER_SIZE
	.comm	_SIGIO,4,2                      ; @SIGIO
	.comm	_POLL_IN,4,2                    ; @POLL_IN
	.no_dead_strip	_joydev_pass_event
.subsections_via_symbols
