	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function menu_input_key_bind_poll_bind_state
_menu_input_key_bind_poll_bind_state:   ## @menu_input_key_bind_poll_bind_state
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_input_get_ptr
	movq	%rax, %r13
	xorl	%eax, %eax
	callq	_input_get_data
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_input_driver_get_joypad_driver
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_input_driver_get_sec_joypad_driver
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.1:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	8(%rbx), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_MENU_MAX_MBUTTONS@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	je	LBB0_4
## %bb.2:
	movl	%r15d, %r14d
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movl	%r13d, %esi
	callq	_input_mouse_button_raw
	movq	8(%rbx), %rcx
	movq	(%rcx,%r14,8), %rcx
	movl	%eax, (%rcx,%r13,4)
	incq	%r13
	movl	(%r12), %eax
	cmpq	%rax, %r13
	jb	LBB0_3
LBB0_4:
	movl	$0, -104(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -96(%rbp)
	movl	$1, %ecx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.5:
	movq	_RETRO_DEVICE_KEYBOARD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_RETROK_RETURN@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	-88(%rbp), %rax
	movq	%rax, 16(%rsp)
	movups	-104(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
LBB0_6:
	movl	%ecx, (%rbx)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	callq	_menu_input_key_bind_poll_bind_state_internal
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.8:
	movq	%rbx, %rsi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_menu_input_key_bind_poll_bind_state_internal ## TAILCALL
LBB0_7:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MENU_MAX_MBUTTONS,4,2          ## @MENU_MAX_MBUTTONS
	.comm	_RETRO_DEVICE_KEYBOARD,4,2      ## @RETRO_DEVICE_KEYBOARD
	.comm	_RETROK_RETURN,4,2              ## @RETROK_RETURN
	.no_dead_strip	_menu_input_key_bind_poll_bind_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function menu_input_key_bind_poll_bind_state
_menu_input_key_bind_poll_bind_state:   ; @menu_input_key_bind_poll_bind_state
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_input_get_ptr
	mov	x25, x0
	bl	_input_get_data
	mov	x24, x0
	bl	_input_driver_get_joypad_driver
	mov	x23, x0
	bl	_input_driver_get_sec_joypad_driver
	cbz	x21, LBB0_9
; %bb.1:
	mov	x22, x0
	ldr	x0, [x21, #8]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x27, _MENU_MAX_MBUTTONS@GOTPAGE
Lloh1:
	ldr	x27, [x27, _MENU_MAX_MBUTTONS@GOTPAGEOFF]
	ldr	w8, [x27]
	cbz	w8, LBB0_4
; %bb.2:
	mov	x26, #0
	mov	w28, w20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x26
	bl	_input_mouse_button_raw
	ldr	x8, [x21, #8]
	ldr	x8, [x8, x28, lsl #3]
	str	w0, [x8, x26, lsl #2]
	add	x26, x26, #1
	ldr	w8, [x27]
	cmp	x26, x8
	b.lo	LBB0_3
LBB0_4:
	cbz	w19, LBB0_6
; %bb.5:
	mov	w8, #1
	b	LBB0_7
LBB0_6:
	ldr	x8, [x25]
Lloh2:
	adrp	x9, _RETRO_DEVICE_KEYBOARD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RETRO_DEVICE_KEYBOARD@GOTPAGEOFF]
Lloh4:
	ldr	w4, [x9]
Lloh5:
	adrp	x9, _RETROK_RETURN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _RETROK_RETURN@GOTPAGEOFF]
Lloh7:
	ldr	w6, [x9]
	str	wzr, [sp, #8]
	stp	xzr, xzr, [sp, #16]
	add	x1, sp, #8
	mov	x0, x24
	mov	x2, #0
	mov	w3, #0
	mov	w5, #0
	blr	x8
	cmp	x0, #0
	cset	w8, ne
LBB0_7:
	str	w8, [x21]
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_menu_input_key_bind_poll_bind_state_internal
	cbz	x22, LBB0_9
; %bb.8:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_menu_input_key_bind_poll_bind_state_internal
LBB0_9:
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MENU_MAX_MBUTTONS,4,2          ; @MENU_MAX_MBUTTONS
	.comm	_RETRO_DEVICE_KEYBOARD,4,2      ; @RETRO_DEVICE_KEYBOARD
	.comm	_RETROK_RETURN,4,2              ; @RETROK_RETURN
	.no_dead_strip	_menu_input_key_bind_poll_bind_state
.subsections_via_symbols
