	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function input_autoconfigure_joypad_from_conf_dir
_input_autoconfigure_joypad_from_conf_dir: ## @input_autoconfigure_joypad_from_conf_dir
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movb	$0, (%rax)
	movb	$0, (%r15)
	movq	_APPLICATION_SPECIAL_DIRECTORY_AUTOCONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movl	%ebx, %esi
	callq	_fill_pathname_application_special
	movq	_DIR_LIST_AUTOCONFIG@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	callq	_dir_list_new_special
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r15
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	jne	LBB0_6
## %bb.2:
	movq	%r15, %rdi
	callq	_string_list_free
LBB0_3:
	movq	(%r13), %rdi
	callq	_string_is_empty
	testl	%eax, %eax
	je	LBB0_4
LBB0_24:
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_RARCH_LOG
	jmp	LBB0_22
LBB0_4:
	movq	(%r13), %rdi
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdx
	callq	_dir_list_new_special
	testq	%rax, %rax
	je	LBB0_24
## %bb.5:
	movq	%rax, %r15
	movq	(%rax), %rsi
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_RARCH_LOG
	cmpq	$0, (%r15)
	je	LBB0_21
## %bb.7:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movl	$-1, -60(%rbp)                  ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	callq	_config_file_free
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	incq	%r13
	cmpq	(%r15), %r13
	jae	LBB0_15
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%r13,4), %edi
	callq	_config_file_new_from_path_to_string
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_input_autoconfigure_joypad_try_from_conf
	cmpl	%r14d, %eax
	jl	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, %r12d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	callq	_config_file_free
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%r13,4), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_strlcpy
	movl	%r13d, %eax
	movl	%r13d, -60(%rbp)                ## 4-byte Spill
	movl	%r12d, %r14d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_14
LBB0_15:
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	js	LBB0_19
## %bb.16:
	testl	%r14d, %r14d
	jle	LBB0_19
## %bb.17:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_19
## %bb.18:
	leaq	L_.str.3(%rip), %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_RARCH_LOG
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_input_autoconfigure_joypad_add
	movl	$1, %ebx
	jmp	LBB0_20
LBB0_19:
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_21
LBB0_20:
	movq	%r14, %rdi
	callq	_config_file_free
LBB0_21:
	movq	%r15, %rdi
	callq	_string_list_free
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.23:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.comm	_APPLICATION_SPECIAL_DIRECTORY_AUTOCONFIG,4,2 ## @APPLICATION_SPECIAL_DIRECTORY_AUTOCONFIG
	.comm	_DIR_LIST_AUTOCONFIG,4,2        ## @DIR_LIST_AUTOCONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cfg"

L_.str.1:                               ## @.str.1
	.asciz	"[Autoconf]: No profiles found.\n"

L_.str.2:                               ## @.str.2
	.asciz	"[Autoconf]: %d profiles found.\n"

L_.str.3:                               ## @.str.3
	.asciz	"[Autoconf]: selected configuration: %s\n"

	.no_dead_strip	_input_autoconfigure_joypad_from_conf_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function input_autoconfigure_joypad_from_conf_dir
_input_autoconfigure_joypad_from_conf_dir: ; @input_autoconfigure_joypad_from_conf_dir
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _PATH_MAX_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x9, x21
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x12, x9, #0x1fffffff0
	sub	x23, x8, x12
	mov	sp, x23
	mov	x9, x21
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x22, x8, x12
	mov	sp, x22
	strb	wzr, [x22]
	strb	wzr, [x23]
Lloh10:
	adrp	x8, _APPLICATION_SPECIAL_DIRECTORY_AUTOCONFIG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _APPLICATION_SPECIAL_DIRECTORY_AUTOCONFIG@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x21
	bl	_fill_pathname_application_special
Lloh13:
	adrp	x19, _DIR_LIST_AUTOCONFIG@GOTPAGE
Lloh14:
	ldr	x19, [x19, _DIR_LIST_AUTOCONFIG@GOTPAGEOFF]
	ldr	w1, [x19]
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	bl	_dir_list_new_special
	cbz	x0, LBB0_3
; %bb.1:
	mov	x23, x0
	ldr	x8, [x0]
	cbnz	x8, LBB0_7
; %bb.2:
	mov	x0, x23
	bl	_string_list_free
LBB0_3:
	ldr	x0, [x20]
	bl	_string_is_empty
	cbz	w0, LBB0_5
LBB0_4:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RARCH_LOG
	mov	w19, #0
	b	LBB0_24
LBB0_5:
	ldr	x0, [x20]
	ldr	w1, [x19]
Lloh19:
	adrp	x2, l_.str@PAGE
Lloh20:
	add	x2, x2, l_.str@PAGEOFF
	bl	_dir_list_new_special
	cbz	x0, LBB0_4
; %bb.6:
	mov	x23, x0
	ldr	x8, [x0]
LBB0_7:
	str	x8, [sp, #-16]!
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_RARCH_LOG
	add	sp, sp, #16
	ldr	x8, [x23]
	cbz	x8, LBB0_20
; %bb.8:
	stur	x24, [x29, #-96]                ; 8-byte Folded Spill
	mov	x27, #0
	mov	x24, #0
	mov	w28, #0
	mov	w19, #-1
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x25
	bl	_config_file_free
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x27, x27, #1
	ldr	x8, [x23]
	cmp	x27, x8
	b.hs	LBB0_16
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	ldr	w0, [x8, x27, lsl #2]
	bl	_config_file_new_from_path_to_string
	cbz	x0, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x25, x0
	mov	x1, x20
	bl	_input_autoconfigure_joypad_try_from_conf
	cmp	w0, w28
	b.lt	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x26, x0
	cbz	x24, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x24
	bl	_config_file_free
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x23, #8]
	ldr	w1, [x8, x27, lsl #2]
	mov	x0, x22
	mov	x2, x21
	bl	_strlcpy
	mov	x19, x27
	mov	x28, x26
	mov	x24, x25
	b	LBB0_10
LBB0_16:
	tbnz	w19, #31, LBB0_21
; %bb.17:
	cmp	w28, #1
	b.lt	LBB0_21
; %bb.18:
	cbz	x24, LBB0_21
; %bb.19:
	str	x22, [sp, #-16]!
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_RARCH_LOG
	add	sp, sp, #16
	mov	x0, x24
	mov	x1, x20
	ldur	x2, [x29, #-96]                 ; 8-byte Folded Reload
	bl	_input_autoconfigure_joypad_add
	mov	w20, #1
	b	LBB0_22
LBB0_20:
	mov	w19, #0
	b	LBB0_23
LBB0_21:
	mov	w20, #0
	mov	w19, #0
	cbz	x24, LBB0_23
LBB0_22:
	mov	x0, x24
	bl	_config_file_free
	mov	x19, x20
LBB0_23:
	mov	x0, x23
	bl	_string_list_free
LBB0_24:
	ldur	x8, [x29, #-88]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	mov	x0, x19
	sub	sp, x29, #80
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.comm	_APPLICATION_SPECIAL_DIRECTORY_AUTOCONFIG,4,2 ; @APPLICATION_SPECIAL_DIRECTORY_AUTOCONFIG
	.comm	_DIR_LIST_AUTOCONFIG,4,2        ; @DIR_LIST_AUTOCONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cfg"

l_.str.1:                               ; @.str.1
	.asciz	"[Autoconf]: No profiles found.\n"

l_.str.2:                               ; @.str.2
	.asciz	"[Autoconf]: %d profiles found.\n"

l_.str.3:                               ; @.str.3
	.asciz	"[Autoconf]: selected configuration: %s\n"

	.no_dead_strip	_input_autoconfigure_joypad_from_conf_dir
.subsections_via_symbols
