	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_input_autoconfigure_joypad_reindex_devices ## -- Begin function input_autoconfigure_joypad_reindex_devices
	.p2align	4, 0x90
_input_autoconfigure_joypad_reindex_devices: ## @input_autoconfigure_joypad_reindex_devices
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_MAX_INPUT_DEVICES@GOTPCREL(%rip), %rsi
	cmpl	$0, (%rsi)
	je	LBB0_15
## %bb.1:
	movq	_input_device_name_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rax,%rcx,4)
	incq	%rcx
	movl	(%rsi), %edx
	cmpq	%rdx, %rcx
	jb	LBB0_2
## %bb.3:
	testl	%edx, %edx
	je	LBB0_15
## %bb.4:
	movl	$1, %r13d
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	movl	(%rsi), %eax
	incq	%r13
	cmpq	%rax, %r15
	jae	LBB0_15
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	%r15d, %edi
	movq	%rsi, %r12
	callq	_input_config_get_device_name
	movq	%r12, %rsi
	testq	%rax, %rax
	je	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r14
	movq	_input_device_name_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax,%r15,4)
	jne	LBB0_14
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	1(%r15), %rax
	movl	(%rsi), %ecx
	cmpq	%rcx, %rax
	jae	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$2, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r13, %rbx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=2
	movq	%r12, %rsi
	incq	%rbx
	cmpl	%ebx, (%r12)
	jbe	LBB0_14
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%ebx, %edi
	callq	_input_config_get_device_name
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_string_is_equal
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	_input_device_name_index@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax,%rbx,4)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=2
	movl	$1, (%rax,%r15,4)
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax,%rbx,4)
	incl	%ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_13
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_INPUT_DEVICES,4,2          ## @MAX_INPUT_DEVICES
	.comm	_input_device_name_index,8,3    ## @input_device_name_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_input_autoconfigure_joypad_reindex_devices ; -- Begin function input_autoconfigure_joypad_reindex_devices
	.p2align	2
_input_autoconfigure_joypad_reindex_devices: ; @input_autoconfigure_joypad_reindex_devices
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x22, _MAX_INPUT_DEVICES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_INPUT_DEVICES@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	w8, LBB0_15
; %bb.1:
	mov	x8, #0
Lloh2:
	adrp	x23, _input_device_name_index@GOTPAGE
Lloh3:
	ldr	x23, [x23, _input_device_name_index@GOTPAGEOFF]
	ldr	x9, [x23]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x9, x8, lsl #2]
	add	x8, x8, #1
	ldr	w10, [x22]
	cmp	x8, x10
	b.lo	LBB0_2
; %bb.3:
	cbz	w10, LBB0_15
; %bb.4:
	mov	x19, #0
	mov	w24, #1
	mov	w25, #1
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x19, x19, #1
	ldr	w8, [x22]
	add	x25, x25, #1
	cmp	x19, x8
	b.hs	LBB0_15
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	mov	x0, x19
	bl	_input_config_get_device_name
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x23]
	ldr	w8, [x8, x19, lsl #2]
	cbnz	w8, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x19, #1
	ldr	w9, [x22]
	cmp	x8, x9
	b.hs	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x20, x0
	mov	w26, #2
	mov	x21, x25
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	x21, x21, #1
	ldr	w8, [x22]
	cmp	w8, w21
	b.ls	LBB0_5
LBB0_11:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	bl	_input_config_get_device_name
	cbz	x0, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x1, x0
	mov	x0, x20
	bl	_string_is_equal
	cbz	x0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=2
	ldr	x8, [x23]
	ldr	w9, [x8, x21, lsl #2]
	cbnz	w9, LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=2
	str	w24, [x8, x19, lsl #2]
	str	w26, [x8, x21, lsl #2]
	add	w26, w26, #1
	b	LBB0_10
LBB0_15:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_INPUT_DEVICES,4,2          ; @MAX_INPUT_DEVICES
	.comm	_input_device_name_index,8,3    ; @input_device_name_index
.subsections_via_symbols
