	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_config_load_remap              ## -- Begin function config_load_remap
	.p2align	4, 0x90
_config_load_remap:                     ## @config_load_remap
	.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	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_runloop_get_system_info
	testq	%rax, %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movq	(%rax), %r13
	jmp	LBB0_3
LBB0_2:
	xorl	%r13d, %r13d
LBB0_3:
	movq	_RARCH_PATH_BASENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_path_get
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_path_basename
	movq	%rax, %r12
	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, %r14
	movq	%r13, %rdi
	callq	_string_is_empty
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_string_is_empty
	testq	%rax, %rax
	je	LBB0_7
LBB0_4:
	xorl	%r12d, %r12d
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_string_is_empty
	testq	%rax, %rax
	movl	$0, %r12d
	jne	LBB0_21
## %bb.8:
	movq	%r15, %rdi
	callq	_string_is_empty
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_fill_pathname_parent_dir_name
LBB0_10:
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_malloc
	movq	%rax, %r15
	movl	(%r14), %edi
	callq	_malloc
	movq	%rax, %r12
	movl	(%r14), %edi
	callq	_malloc
	movq	%rax, %rbx
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%r14), %edi
	movq	%r12, %r14
	callq	_malloc
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movb	$0, (%rbx)
	movb	$0, (%r12)
	movb	$0, (%r15)
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_strlcpy
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	callq	_RARCH_LOG
	leaq	L_.str.1(%rip), %r8
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r13, %rbx
	movq	%r13, %rdx
	movq	%r13, %rcx
	movq	%r8, %r13
	movq	%r12, %r9
	callq	_fill_pathname_join_special_ext
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, %r8
	movq	%r12, %r9
	callq	_fill_pathname_join_special_ext
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%r13, %r8
	movq	%r12, %r9
	callq	_fill_pathname_join_special_ext
	xorl	%edi, %edi
	callq	_input_remapping_set_defaults
	movq	%r14, %rdi
	callq	_config_file_new_from_path_to_string
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	%rax, %rbx
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	callq	_RARCH_LOG
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_input_remapping_load_file
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_RARCH_CTL_SET_REMAPS_GAME_ACTIVE@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_13:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_config_file_new_from_path_to_string
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movq	%rax, %r12
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rsi
	callq	_RARCH_LOG
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_input_remapping_load_file
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	_RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_config_file_new_from_path_to_string
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_20
## %bb.17:
	movq	%rax, %rbx
	leaq	L_.str.4(%rip), %rdi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_RARCH_LOG
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_input_remapping_load_file
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	movq	_RARCH_CTL_SET_REMAPS_CORE_ACTIVE@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_rarch_ctl
	movq	_MSG_GAME_REMAP_FILE_LOADED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movq	_MESSAGE_QUEUE_ICON_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_MESSAGE_QUEUE_CATEGORY_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	subq	$8, %rsp
	movl	$1, %r12d
	movl	%eax, %edi
	movl	$1, %esi
	movl	$100, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	pushq	%rbx
	callq	_runloop_msg_queue_push
	addq	$16, %rsp
LBB0_20:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_21
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.comm	_RARCH_PATH_BASENAME,4,2        ## @RARCH_PATH_BASENAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[Remaps]: remap directory: %s\n"

L_.str.1:                               ## @.str.1
	.asciz	".rmp"

L_.str.2:                               ## @.str.2
	.asciz	"[Remaps]: game-specific remap found at %s.\n"

	.comm	_RARCH_CTL_SET_REMAPS_GAME_ACTIVE,4,2 ## @RARCH_CTL_SET_REMAPS_GAME_ACTIVE
L_.str.3:                               ## @.str.3
	.asciz	"[Remaps]: content-dir-specific remap found at %s.\n"

	.comm	_RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE,4,2 ## @RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE
L_.str.4:                               ## @.str.4
	.asciz	"[Remaps]: core-specific remap found at %s.\n"

	.comm	_RARCH_CTL_SET_REMAPS_CORE_ACTIVE,4,2 ## @RARCH_CTL_SET_REMAPS_CORE_ACTIVE
	.comm	_MSG_GAME_REMAP_FILE_LOADED,4,2 ## @MSG_GAME_REMAP_FILE_LOADED
	.comm	_MESSAGE_QUEUE_ICON_DEFAULT,4,2 ## @MESSAGE_QUEUE_ICON_DEFAULT
	.comm	_MESSAGE_QUEUE_CATEGORY_INFO,4,2 ## @MESSAGE_QUEUE_CATEGORY_INFO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_config_load_remap              ; -- Begin function config_load_remap
	.p2align	2
_config_load_remap:                     ; @config_load_remap
	.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	x26, 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	x22, _PATH_MAX_LENGTH@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PATH_MAX_LENGTH@GOTPAGEOFF]
	ldrsw	x23, [x22]
	bl	_runloop_get_system_info
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x24, [x0]
	b	LBB0_3
LBB0_2:
	mov	x24, #0
LBB0_3:
Lloh5:
	adrp	x8, _RARCH_PATH_BASENAME@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RARCH_PATH_BASENAME@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_path_get
	mov	x19, x0
	bl	_path_basename
	mov	x25, x0
	ldr	w20, [x22]
	mov	x9, x20
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x27, x8, x9
	mov	sp, x27
	mov	x0, x24
	bl	_string_is_empty
	cbnz	x0, LBB0_6
; %bb.4:
	mov	x0, x25
	bl	_string_is_empty
	cbnz	x0, LBB0_6
; %bb.5:
	mov	x0, x26
	bl	_string_is_empty
	cbz	x0, LBB0_9
LBB0_6:
	mov	w23, #0
LBB0_7:
	ldur	x8, [x29, #-88]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.8:
	mov	x0, x23
	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_9:
	mov	x0, x19
	bl	_string_is_empty
	cbnz	x0, LBB0_11
; %bb.10:
	mov	x0, x27
	mov	x1, x19
	mov	x2, x20
	bl	_fill_pathname_parent_dir_name
LBB0_11:
	ldr	w0, [x22]
	bl	_malloc
	mov	x19, x0
	ldr	w0, [x22]
	bl	_malloc
	mov	x20, x0
	ldr	w0, [x22]
	bl	_malloc
	mov	x21, x0
	ldr	w0, [x22]
	bl	_malloc
	mov	x22, x0
	strb	wzr, [x21]
	strb	wzr, [x20]
	strb	wzr, [x19]
	mov	x0, x19
	mov	x1, x26
	mov	x2, x23
	bl	_strlcpy
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_RARCH_LOG
Lloh15:
	adrp	x26, l_.str.1@PAGE
Lloh16:
	add	x26, x26, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	mov	x2, x24
	mov	x3, x24
	mov	x4, x26
	mov	x5, x23
	bl	_fill_pathname_join_special_ext
	mov	x0, x22
	mov	x1, x19
	mov	x2, x24
	mov	x3, x27
	mov	x4, x26
	mov	x5, x23
	bl	_fill_pathname_join_special_ext
	mov	x0, x21
	mov	x1, x19
	mov	x2, x24
	mov	x3, x25
	mov	x4, x26
	mov	x5, x23
	bl	_fill_pathname_join_special_ext
	mov	w0, #0
	bl	_input_remapping_set_defaults
	mov	x0, x21
	bl	_config_file_new_from_path_to_string
	cbz	x0, LBB0_14
; %bb.12:
	mov	x23, x0
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_RARCH_LOG
	mov	x0, x23
	mov	x1, x21
	bl	_input_remapping_load_file
	cbz	x0, LBB0_14
; %bb.13:
Lloh19:
	adrp	x8, _RARCH_CTL_SET_REMAPS_GAME_ACTIVE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _RARCH_CTL_SET_REMAPS_GAME_ACTIVE@GOTPAGEOFF]
	b	LBB0_20
LBB0_14:
	mov	x0, x22
	bl	_config_file_new_from_path_to_string
	cbz	x0, LBB0_17
; %bb.15:
	mov	x23, x0
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x22
	bl	_RARCH_LOG
	mov	x0, x23
	mov	x1, x22
	bl	_input_remapping_load_file
	cbz	x0, LBB0_17
; %bb.16:
Lloh23:
	adrp	x8, _RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE@GOTPAGEOFF]
	b	LBB0_20
LBB0_17:
	mov	x0, x20
	bl	_config_file_new_from_path_to_string
	mov	x23, x0
	cbz	x0, LBB0_21
; %bb.18:
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x20
	bl	_RARCH_LOG
	mov	x0, x23
	mov	x1, x20
	bl	_input_remapping_load_file
	cbz	x0, LBB0_22
; %bb.19:
Lloh27:
	adrp	x8, _RARCH_CTL_SET_REMAPS_CORE_ACTIVE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _RARCH_CTL_SET_REMAPS_CORE_ACTIVE@GOTPAGEOFF]
LBB0_20:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_rarch_ctl
Lloh29:
	adrp	x8, _MSG_GAME_REMAP_FILE_LOADED@GOTPAGE
Lloh30:
	ldr	x8, [x8, _MSG_GAME_REMAP_FILE_LOADED@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
Lloh32:
	adrp	x8, _MESSAGE_QUEUE_ICON_DEFAULT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MESSAGE_QUEUE_ICON_DEFAULT@GOTPAGEOFF]
Lloh34:
	ldr	w5, [x8]
Lloh35:
	adrp	x8, _MESSAGE_QUEUE_CATEGORY_INFO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _MESSAGE_QUEUE_CATEGORY_INFO@GOTPAGEOFF]
Lloh37:
	ldr	w6, [x8]
	mov	w23, #1
	mov	w1, #1
	mov	w2, #100
	mov	w3, #1
	mov	x4, #0
	bl	_runloop_msg_queue_push
LBB0_21:
	mov	x0, x22
	bl	_free
	mov	x0, x19
	bl	_free
	mov	x0, x20
	bl	_free
	mov	x0, x21
	bl	_free
	b	LBB0_7
LBB0_22:
	mov	w23, #0
	b	LBB0_21
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.comm	_RARCH_PATH_BASENAME,4,2        ; @RARCH_PATH_BASENAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[Remaps]: remap directory: %s\n"

l_.str.1:                               ; @.str.1
	.asciz	".rmp"

l_.str.2:                               ; @.str.2
	.asciz	"[Remaps]: game-specific remap found at %s.\n"

	.comm	_RARCH_CTL_SET_REMAPS_GAME_ACTIVE,4,2 ; @RARCH_CTL_SET_REMAPS_GAME_ACTIVE
l_.str.3:                               ; @.str.3
	.asciz	"[Remaps]: content-dir-specific remap found at %s.\n"

	.comm	_RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE,4,2 ; @RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE
l_.str.4:                               ; @.str.4
	.asciz	"[Remaps]: core-specific remap found at %s.\n"

	.comm	_RARCH_CTL_SET_REMAPS_CORE_ACTIVE,4,2 ; @RARCH_CTL_SET_REMAPS_CORE_ACTIVE
	.comm	_MSG_GAME_REMAP_FILE_LOADED,4,2 ; @MSG_GAME_REMAP_FILE_LOADED
	.comm	_MESSAGE_QUEUE_ICON_DEFAULT,4,2 ; @MESSAGE_QUEUE_ICON_DEFAULT
	.comm	_MESSAGE_QUEUE_CATEGORY_INFO,4,2 ; @MESSAGE_QUEUE_CATEGORY_INFO
.subsections_via_symbols
