	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function LinuxJoyInit
_LinuxJoyInit:                          ## @LinuxJoyInit
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXAXIS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_open
	movl	%eax, (%rbx)
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.1:
	movl	$0, 4(%rbx)
	leaq	-72(%rbp), %rsi
	movl	%eax, %edi
	movl	$24, %edx
	callq	_read
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	_JS_EVENT_AXIS@GOTPCREL(%rip), %r13
	movq	_JS_EVENT_INIT@GOTPCREL(%rip), %r12
	leaq	-72(%rbp), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %edi
	movq	%r14, %rsi
	movl	$24, %edx
	callq	_read
	testq	%rax, %rax
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	orl	(%r13), %eax
	cmpl	%eax, -72(%rbp)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-56(%rbp), %ecx
	movq	-64(%rbp), %rax
	movl	%ecx, (%r15,%rax,4)
	incq	%rax
	movslq	4(%rbx), %rcx
	cmpq	%rcx, %rax
	jbe	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, 4(%rbx)
	jmp	LBB0_6
LBB0_7:
	movl	4(%rbx), %edi
	movq	_MAXAXIS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edi
	jle	LBB0_9
## %bb.8:
	movl	%eax, 4(%rbx)
	movl	%eax, %edi
LBB0_9:
	shll	$2, %edi
	callq	_malloc
	movq	%rax, 8(%rbx)
	cmpl	$0, 4(%rbx)
	jle	LBB0_12
## %bb.10:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15,%rcx,4), %edx
	movl	%edx, (%rax,%rcx,4)
	incq	%rcx
	movslq	4(%rbx), %rdx
	cmpq	%rdx, %rcx
	jl	LBB0_11
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXAXIS,4,2                    ## @MAXAXIS
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_JS_EVENT_AXIS,4,2              ## @JS_EVENT_AXIS
	.comm	_JS_EVENT_INIT,4,2              ## @JS_EVENT_INIT
	.no_dead_strip	_LinuxJoyInit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function LinuxJoyInit
_LinuxJoyInit:                          ; @LinuxJoyInit
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #32
	mov	x12, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x21, _MAXAXIS@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MAXAXIS@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh7:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x12
	bl	_open
	str	w0, [x19]
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.1:
	str	wzr, [x19, #4]
	sub	x1, x29, #80
	mov	w2, #24
	bl	_read
	cbz	x0, LBB0_7
; %bb.2:
Lloh13:
	adrp	x22, _JS_EVENT_AXIS@GOTPAGE
Lloh14:
	ldr	x22, [x22, _JS_EVENT_AXIS@GOTPAGEOFF]
Lloh15:
	adrp	x23, _JS_EVENT_INIT@GOTPAGE
Lloh16:
	ldr	x23, [x23, _JS_EVENT_INIT@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x19]
	sub	x1, x29, #80
	mov	w2, #24
	bl	_read
	cbz	x0, LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w8, [x29, #-80]
	ldr	w9, [x22]
	ldr	w10, [x23]
	orr	w9, w10, w9
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	w8, [x29, #-64]
	ldur	x9, [x29, #-72]
	str	w8, [x20, x9, lsl #2]
	add	x8, x9, #1
	ldrsw	x9, [x19, #4]
	cmp	x8, x9
	b.ls	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x19, #4]
	b	LBB0_3
LBB0_7:
	ldr	w8, [x19, #4]
	ldr	w9, [x21]
	cmp	w8, w9
	b.le	LBB0_9
; %bb.8:
	str	w9, [x19, #4]
	mov	x8, x9
LBB0_9:
	lsl	w0, w8, #2
	bl	_malloc
	str	x0, [x19, #8]
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x8, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	lsl	x9, x8, #2
	ldr	w10, [x20, x9]
	str	w10, [x0, x9]
	add	x8, x8, #1
	ldrsw	x9, [x19, #4]
	cmp	x8, x9
	b.lt	LBB0_11
LBB0_12:
	ldur	x8, [x29, #-56]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXAXIS,4,2                    ; @MAXAXIS
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_JS_EVENT_AXIS,4,2              ; @JS_EVENT_AXIS
	.comm	_JS_EVENT_INIT,4,2              ; @JS_EVENT_INIT
	.no_dead_strip	_LinuxJoyInit
.subsections_via_symbols
