	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function command_event_init_controllers
_command_event_init_controllers:        ## @command_event_init_controllers
	.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_USERS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_16
## %bb.1:
	movq	_runloop_system@GOTPCREL(%rip), %r13
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	_MAX_USERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$4, %r12
	cmpq	%rax, %rbx
	jae	LBB0_16
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_input_config_get_device
	movl	%eax, %r15d
	movl	(%r13), %eax
	cmpq	%rax, %rbx
	jae	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r13), %rdi
	addq	%r12, %rdi
	movl	%r15d, %esi
	callq	_libretro_find_controller_description
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %r14
	testq	%r14, %r14
	jne	LBB0_8
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %eax
	andl	$-2, %eax
	leaq	L_.str.1(%rip), %r14
	cmpl	$128, %eax
	jne	LBB0_6
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$129, %r15d
	je	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$128, %r15d
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_MSG_VALUE_DISCONNECTING_DEVICE_FROM_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leal	1(%rbx), %edx
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_RARCH_LOG
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_RARCH_WARN
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %eax
	movl	$129, %r15d
	cmpq	%rax, %rbx
	jae	LBB0_15
	jmp	LBB0_14
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_MSG_CONNECTING_TO_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leal	1(%rbx), %r8d
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	movl	%r15d, %edx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_RARCH_LOG
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %eax
	cmpq	%rax, %rbx
	jae	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, -48(%rbp)
	movl	%ebx, -44(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_core_set_controller_port_device
	jmp	LBB0_15
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_runloop_system,16,3            ## @runloop_system
	.comm	_MAX_USERS,4,2                  ## @MAX_USERS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Input device ID %u is unknown to this libretro implementation. Using RETRO_DEVICE_JOYPAD.\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"%s %u.\n"

	.comm	_MSG_VALUE_DISCONNECTING_DEVICE_FROM_PORT,4,2 ## @MSG_VALUE_DISCONNECTING_DEVICE_FROM_PORT
L_.str.3:                               ## @.str.3
	.asciz	"%s %u: %s (ID: %u).\n"

	.comm	_MSG_CONNECTING_TO_PORT,4,2     ## @MSG_CONNECTING_TO_PORT
	.no_dead_strip	_command_event_init_controllers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function command_event_init_controllers
_command_event_init_controllers:        ; @command_event_init_controllers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x24, _MAX_USERS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MAX_USERS@GOTPAGEOFF]
	ldr	w8, [x24]
	cbz	w8, LBB0_16
; %bb.1:
	mov	x25, #0
	mov	x19, #0
Lloh2:
	adrp	x26, _runloop_system@GOTPAGE
Lloh3:
	ldr	x26, [x26, _runloop_system@GOTPAGEOFF]
Lloh4:
	adrp	x28, l_.str.1@PAGE
Lloh5:
	add	x28, x28, l_.str.1@PAGEOFF
Lloh6:
	adrp	x20, l_.str@PAGE
Lloh7:
	add	x20, x20, l_.str@PAGEOFF
Lloh8:
	adrp	x21, l_.str.2@PAGE
Lloh9:
	add	x21, x21, l_.str.2@PAGEOFF
Lloh10:
	adrp	x22, l_.str.3@PAGE
Lloh11:
	add	x22, x22, l_.str.3@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	stp	w23, w19, [sp, #24]
	add	x0, sp, #24
	bl	_core_set_controller_port_device
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #1
	ldr	w8, [x24]
	add	x25, x25, #4
	cmp	x19, x8
	b.hs	LBB0_16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_input_config_get_device
	mov	x23, x0
	ldr	w8, [x26]
	cmp	x19, x8
	b.hs	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x26, #8]
	add	x0, x8, x25
	mov	x1, x23
	bl	_libretro_find_controller_description
	cbz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x27, [x0]
	cbnz	x27, LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	and	w8, w23, #0xfffffffe
	mov	x27, x28
	cmp	w8, #128
	b.ne	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w23, #129
	b.eq	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w23, #128
	b.ne	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh12:
	adrp	x8, _MSG_VALUE_DISCONNECTING_DEVICE_FROM_PORT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSG_VALUE_DISCONNECTING_DEVICE_FROM_PORT@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
	add	w2, w19, #1
	mov	x0, x21
	b	LBB0_15
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_RARCH_WARN
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	cmp	x19, x8
	b.hs	LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w23, #129
	b	LBB0_2
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh15:
	adrp	x8, _MSG_CONNECTING_TO_PORT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSG_CONNECTING_TO_PORT@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
	add	x8, x19, #1
	stp	x27, x8, [sp]
	mov	x0, x22
	mov	x2, x23
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_RARCH_LOG
	ldr	w8, [x26]
	cmp	x19, x8
	b.lo	LBB0_2
	b	LBB0_3
LBB0_16:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_runloop_system,16,3            ; @runloop_system
	.comm	_MAX_USERS,4,2                  ; @MAX_USERS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Input device ID %u is unknown to this libretro implementation. Using RETRO_DEVICE_JOYPAD.\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"%s %u.\n"

	.comm	_MSG_VALUE_DISCONNECTING_DEVICE_FROM_PORT,4,2 ; @MSG_VALUE_DISCONNECTING_DEVICE_FROM_PORT
l_.str.3:                               ; @.str.3
	.asciz	"%s %u: %s (ID: %u).\n"

	.comm	_MSG_CONNECTING_TO_PORT,4,2     ; @MSG_CONNECTING_TO_PORT
	.no_dead_strip	_command_event_init_controllers
.subsections_via_symbols
