	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LinuxJoyHandleEvents
_LinuxJoyHandleEvents:                  ## @LinuxJoyHandleEvents
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	cmpl	$-1, %edi
	je	LBB0_12
## %bb.1:
	leaq	-56(%rbp), %rsi
	movl	$24, %edx
	callq	_read
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movq	_JS_EVENT_AXIS@GOTPCREL(%rip), %r15
	movq	_THRESHOLD@GOTPCREL(%rip), %r12
	leaq	-56(%rbp), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	cmpl	%ecx, %eax
	setle	%dl
	leal	(%rdx,%rdx), %eax
	decl	%eax
	movl	%eax, -40(%rbp)
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-40(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-56(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	callq	_PACKEVENT
	movl	%eax, %edi
	callq	_PerKeyDown
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movl	$24, %edx
	callq	_read
	testq	%rax, %rax
	je	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rax
	cmpq	(%r15), %rax
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rax
	cmpq	8(%rbx), %rax
	jae	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbx), %rcx
	movl	(%rcx,%rax,4), %eax
	movl	-40(%rbp), %ecx
	movl	%eax, %edx
	subl	%ecx, %edx
	movl	%edx, %esi
	negl	%esi
	cmovsl	%edx, %esi
	cmpl	(%r12), %esi
	jge	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$0, -40(%rbp)
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, -40(%rbp)
	jne	LBB0_10
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-40(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-56(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	callq	_PACKEVENT
	movl	%eax, %edi
	callq	_PerKeyUp
	movq	-40(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-56(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	callq	_PACKEVENT
	orl	$65536, %eax                    ## imm = 0x10000
	movl	%eax, %edi
	callq	_PerKeyUp
	jmp	LBB0_11
LBB0_12:
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JS_EVENT_AXIS,8,3              ## @JS_EVENT_AXIS
	.comm	_THRESHOLD,4,2                  ## @THRESHOLD
	.no_dead_strip	_LinuxJoyHandleEvents
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LinuxJoyHandleEvents
_LinuxJoyHandleEvents:                  ; @LinuxJoyHandleEvents
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
	ldr	w0, [x0]
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.1:
	add	x1, sp, #24
	mov	w2, #24
	bl	_read
	cbz	x0, LBB0_12
; %bb.2:
Lloh0:
	adrp	x20, _JS_EVENT_AXIS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _JS_EVENT_AXIS@GOTPAGEOFF]
Lloh2:
	adrp	x21, _THRESHOLD@GOTPAGE
Lloh3:
	ldr	x21, [x21, _THRESHOLD@GOTPAGEOFF]
	mov	w22, #-1
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	cmp	w8, w9
	cneg	w8, w22, le
	str	w8, [sp, #40]
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldur	q0, [sp, #24]
	str	q0, [sp]
	ldr	x8, [sp, #40]
	str	x8, [sp, #16]
	mov	x0, sp
	bl	_PACKEVENT
	bl	_PerKeyDown
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x19]
	add	x1, sp, #24
	mov	w2, #24
	bl	_read
	cbz	x0, LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #24]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #32]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.hs	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x19, #16]
	ldr	w8, [x9, x8, lsl #2]
	ldr	w9, [sp, #40]
	subs	w10, w8, w9
	cneg	w10, w10, mi
	ldr	w11, [x21]
	cmp	w10, w11
	b.ge	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	str	wzr, [sp, #40]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [sp, #40]
	cbnz	w8, LBB0_4
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldur	q0, [sp, #24]
	str	q0, [sp]
	ldr	x8, [sp, #40]
	str	x8, [sp, #16]
	mov	x0, sp
	bl	_PACKEVENT
	bl	_PerKeyUp
	ldur	q0, [sp, #24]
	str	q0, [sp]
	ldr	x8, [sp, #40]
	str	x8, [sp, #16]
	mov	x0, sp
	bl	_PACKEVENT
	orr	w0, w0, #0x10000
	bl	_PerKeyUp
	b	LBB0_5
LBB0_12:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_JS_EVENT_AXIS,8,3              ; @JS_EVENT_AXIS
	.comm	_THRESHOLD,4,2                  ; @THRESHOLD
	.no_dead_strip	_LinuxJoyHandleEvents
.subsections_via_symbols
