	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PERLinuxJoyInit                ## -- Begin function PERLinuxJoyInit
	.p2align	4, 0x90
_PERLinuxJoyInit:                       ## @PERLinuxJoyInit
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	leaq	L_.str(%rip), %rdi
	leaq	-32(%rbp), %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_glob
	movl	-32(%rbp), %edi
	movq	_joycount@GOTPCREL(%rip), %rax
	movl	%edi, (%rax)
	shll	$2, %edi
	callq	_malloc
	movq	_joysticks@GOTPCREL(%rip), %r14
	movq	%rax, (%r14)
	cmpl	$0, -32(%rbp)
	jle	LBB0_4
## %bb.1:
	movq	-24(%rbp), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_LinuxJoyInit
	cmpl	$2, -32(%rbp)
	jl	LBB0_4
## %bb.2:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	addq	%rbx, %rdi
	movq	-24(%rbp), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_LinuxJoyInit
	incq	%rbx
	movslq	-32(%rbp), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	leaq	-32(%rbp), %rdi
	callq	_globfree
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/input/js*"

	.comm	_joycount,4,2                   ## @joycount
	.comm	_joysticks,8,3                  ## @joysticks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PERLinuxJoyInit                ; -- Begin function PERLinuxJoyInit
	.p2align	2
_PERLinuxJoyInit:                       ; @PERLinuxJoyInit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, sp
	mov	w1, #0
	mov	x2, #0
	bl	_glob
	ldr	w8, [sp]
Lloh2:
	adrp	x9, _joycount@GOTPAGE
Lloh3:
	ldr	x9, [x9, _joycount@GOTPAGEOFF]
Lloh4:
	str	w8, [x9]
	lsl	w0, w8, #2
	bl	_malloc
Lloh5:
	adrp	x19, _joysticks@GOTPAGE
Lloh6:
	ldr	x19, [x19, _joysticks@GOTPAGEOFF]
	str	x0, [x19]
	ldr	w8, [sp]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	w1, [x8]
	bl	_LinuxJoyInit
	ldr	w8, [sp]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.2:
	mov	w20, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x0, x20, x8
	ldr	x8, [sp, #8]
	ldr	w1, [x8, x20, lsl #2]
	bl	_LinuxJoyInit
	add	x20, x20, #1
	ldrsw	x8, [sp]
	cmp	x20, x8
	b.lt	LBB0_3
LBB0_4:
	mov	x0, sp
	bl	_globfree
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/input/js*"

	.comm	_joycount,4,2                   ; @joycount
	.comm	_joysticks,8,3                  ; @joysticks
.subsections_via_symbols
