	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_input_key_bind_set_mode   ## -- Begin function menu_input_key_bind_set_mode
	.p2align	4, 0x90
_menu_input_key_bind_set_mode:          ## @menu_input_key_bind_set_mode
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	%edi, %r13d
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_menu_driver_get_ptr
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	%r13d, %edi
	movq	%rbx, %rsi
	callq	_menu_input_key_bind_set_mode_common
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %eax
	movq	8(%r14), %rcx
	movl	(%rcx,%rax,4), %esi
	movq	_menu_bind_port@GOTPCREL(%rip), %r12
	movl	%esi, (%r12)
	movq	_menu_input_binds@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_menu_input_key_bind_poll_bind_get_rested_axes
	movl	(%r12), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_menu_input_key_bind_poll_bind_state
	movl	4(%r14), %esi
	leaq	4(%rbx), %rdi
	callq	_rarch_timer_begin_new_time
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_rarch_timer_begin_new_time
	movq	%r15, -48(%rbp)
	movq	_menu_input_key_bind_custom_bind_keyboard_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_RARCH_INPUT_KEYBOARD_CTL_START_WAIT_KEYS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rsi
	callq	_input_keyboard_ctl
	movl	$1, %r12d
LBB0_4:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_menu_bind_port,4,2             ## @menu_bind_port
	.comm	_menu_input_binds,8,2           ## @menu_input_binds
	.comm	_menu_input_key_bind_custom_bind_keyboard_cb,4,2 ## @menu_input_key_bind_custom_bind_keyboard_cb
	.comm	_RARCH_INPUT_KEYBOARD_CTL_START_WAIT_KEYS,4,2 ## @RARCH_INPUT_KEYBOARD_CTL_START_WAIT_KEYS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_input_key_bind_set_mode   ; -- Begin function menu_input_key_bind_set_mode
	.p2align	2
_menu_input_key_bind_set_mode:          ; @menu_input_key_bind_set_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x22, x0
	bl	_config_get_ptr
	mov	x20, x0
	bl	_menu_driver_get_ptr
	mov	x19, x0
	mov	w0, #0
	cbz	x21, LBB0_5
; %bb.1:
	cbz	x19, LBB0_5
; %bb.2:
	mov	x0, x22
	mov	x1, x21
	bl	_menu_input_key_bind_set_mode_common
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x21]
	ldr	x9, [x20, #8]
	ldr	w1, [x9, x8, lsl #2]
Lloh0:
	adrp	x22, _menu_bind_port@GOTPAGE
Lloh1:
	ldr	x22, [x22, _menu_bind_port@GOTPAGEOFF]
	str	w1, [x22]
Lloh2:
	adrp	x21, _menu_input_binds@GOTPAGE
Lloh3:
	ldr	x21, [x21, _menu_input_binds@GOTPAGEOFF]
	mov	x0, x21
	bl	_menu_input_key_bind_poll_bind_get_rested_axes
	ldr	w1, [x22]
	mov	x0, x21
	mov	w2, #0
	bl	_menu_input_key_bind_poll_bind_state
	ldr	w1, [x20, #4]
	add	x0, x21, #4
	bl	_rarch_timer_begin_new_time
	ldr	w1, [x20]
	mov	x0, x21
	bl	_rarch_timer_begin_new_time
Lloh4:
	adrp	x8, _menu_input_key_bind_custom_bind_keyboard_cb@GOTPAGE
Lloh5:
	ldr	x8, [x8, _menu_input_key_bind_custom_bind_keyboard_cb@GOTPAGEOFF]
	str	x19, [sp, #8]
Lloh6:
	ldr	w8, [x8]
	str	w8, [sp]
Lloh7:
	adrp	x8, _RARCH_INPUT_KEYBOARD_CTL_START_WAIT_KEYS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RARCH_INPUT_KEYBOARD_CTL_START_WAIT_KEYS@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	x1, sp
	bl	_input_keyboard_ctl
	mov	w0, #1
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_menu_bind_port,4,2             ; @menu_bind_port
	.comm	_menu_input_binds,8,2           ; @menu_input_binds
	.comm	_menu_input_key_bind_custom_bind_keyboard_cb,4,2 ; @menu_input_key_bind_custom_bind_keyboard_cb
	.comm	_RARCH_INPUT_KEYBOARD_CTL_START_WAIT_KEYS,4,2 ; @RARCH_INPUT_KEYBOARD_CTL_START_WAIT_KEYS
.subsections_via_symbols
