	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl_input_poll
_sdl_input_poll:                        ## @sdl_input_poll
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_SDL_PumpEvents
	movq	16(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	*(%rcx)
LBB0_2:
	movq	%rbx, %rdi
	callq	_sdl_poll_mouse
	movq	_SDL_GETEVENT@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	_SDL_KEYEVENTMASK@GOTPCREL(%rip), %r15
	movslq	(%r15), %rcx
	leaq	-72(%rbp), %rdi
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_SDL_PeepEvents
	testq	%rax, %rax
	jle	LBB0_18
## %bb.3:
	movq	_SDL_KEYDOWN@GOTPCREL(%rip), %rbx
	movq	_SDL_KEYUP@GOTPCREL(%rip), %r13
	leaq	-72(%rbp), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	orl	%edx, %ecx
	movq	-72(%rbp), %rdx
	xorl	%edi, %edi
	cmpq	(%rbx), %rdx
	sete	%dil
	movq	_RETRO_DEVICE_KEYBOARD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movl	%eax, %esi
	movl	%eax, %edx
	callq	_input_keyboard_event
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r14), %edx
	movslq	(%r15), %rcx
	movq	%r12, %rdi
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_SDL_PeepEvents
	testq	%rax, %rax
	jle	LBB0_18
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax
	cmpq	(%rbx), %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	(%r13), %rax
	jne	LBB0_17
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %edi
	callq	_input_keymaps_translate_keysym_to_rk
	movl	-48(%rbp), %edx
	movq	_KMOD_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	%edx, %esi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_RETROKMOD_SHIFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_KMOD_CTRL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%edx, %ecx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_RETROKMOD_CTRL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_KMOD_ALT@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%edx, %edi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_RETROKMOD_ALT@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	orl	%esi, %ecx
	movq	_KMOD_NUM@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%edx, %esi
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_RETROKMOD_NUMLOCK@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	orl	%esi, %edi
	orl	%edi, %ecx
	movq	_KMOD_CAPS@GOTPCREL(%rip), %rsi
	andl	(%rsi), %edx
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	_RETROKMOD_CAPSLOCK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	jmp	LBB0_16
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDL_GETEVENT,4,2               ## @SDL_GETEVENT
	.comm	_SDL_KEYEVENTMASK,4,2           ## @SDL_KEYEVENTMASK
	.comm	_SDL_KEYDOWN,8,3                ## @SDL_KEYDOWN
	.comm	_SDL_KEYUP,8,3                  ## @SDL_KEYUP
	.comm	_KMOD_SHIFT,4,2                 ## @KMOD_SHIFT
	.comm	_RETROKMOD_SHIFT,4,2            ## @RETROKMOD_SHIFT
	.comm	_KMOD_CTRL,4,2                  ## @KMOD_CTRL
	.comm	_RETROKMOD_CTRL,4,2             ## @RETROKMOD_CTRL
	.comm	_KMOD_ALT,4,2                   ## @KMOD_ALT
	.comm	_RETROKMOD_ALT,4,2              ## @RETROKMOD_ALT
	.comm	_KMOD_NUM,4,2                   ## @KMOD_NUM
	.comm	_RETROKMOD_NUMLOCK,4,2          ## @RETROKMOD_NUMLOCK
	.comm	_KMOD_CAPS,4,2                  ## @KMOD_CAPS
	.comm	_RETROKMOD_CAPSLOCK,4,2         ## @RETROKMOD_CAPSLOCK
	.comm	_RETRO_DEVICE_KEYBOARD,4,2      ## @RETRO_DEVICE_KEYBOARD
	.comm	_SDL_MOUSEWHEEL,8,3             ## @SDL_MOUSEWHEEL
	.no_dead_strip	_sdl_input_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdl_input_poll
_sdl_input_poll:                        ; @sdl_input_poll
	.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, x0
	bl	_SDL_PumpEvents
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x8]
	blr	x8
LBB0_2:
	mov	x0, x19
	bl	_sdl_poll_mouse
Lloh0:
	adrp	x19, _SDL_GETEVENT@GOTPAGE
Lloh1:
	ldr	x19, [x19, _SDL_GETEVENT@GOTPAGEOFF]
	ldr	w2, [x19]
Lloh2:
	adrp	x20, _SDL_KEYEVENTMASK@GOTPAGE
Lloh3:
	ldr	x20, [x20, _SDL_KEYEVENTMASK@GOTPAGEOFF]
	ldrsw	x3, [x20]
	mov	x0, sp
	mov	w1, #1
	bl	_SDL_PeepEvents
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.3:
Lloh4:
	adrp	x21, _SDL_KEYDOWN@GOTPAGE
Lloh5:
	ldr	x21, [x21, _SDL_KEYDOWN@GOTPAGEOFF]
Lloh6:
	adrp	x22, _SDL_KEYUP@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SDL_KEYUP@GOTPAGEOFF]
Lloh8:
	adrp	x28, _RETROKMOD_ALT@GOTPAGE
Lloh9:
	ldr	x28, [x28, _RETROKMOD_ALT@GOTPAGEOFF]
Lloh10:
	adrp	x23, _KMOD_NUM@GOTPAGE
Lloh11:
	ldr	x23, [x23, _KMOD_NUM@GOTPAGEOFF]
Lloh12:
	adrp	x24, _RETROKMOD_NUMLOCK@GOTPAGE
Lloh13:
	ldr	x24, [x24, _RETROKMOD_NUMLOCK@GOTPAGEOFF]
Lloh14:
	adrp	x25, _KMOD_CAPS@GOTPAGE
Lloh15:
	ldr	x25, [x25, _KMOD_CAPS@GOTPAGEOFF]
Lloh16:
	adrp	x26, _RETROKMOD_CAPSLOCK@GOTPAGE
Lloh17:
	ldr	x26, [x26, _RETROKMOD_CAPSLOCK@GOTPAGEOFF]
Lloh18:
	adrp	x27, _RETRO_DEVICE_KEYBOARD@GOTPAGE
Lloh19:
	ldr	x27, [x27, _RETRO_DEVICE_KEYBOARD@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w2, [x19]
	ldrsw	x3, [x20]
	mov	x0, sp
	mov	w1, #1
	bl	_SDL_PeepEvents
	cmp	x0, #0
	b.le	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp]
	ldr	x9, [x21]
	ldr	x10, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [sp, #28]
	bl	_input_keymaps_translate_keysym_to_rk
	mov	x1, x0
	ldr	w8, [sp, #24]
Lloh20:
	adrp	x9, _KMOD_SHIFT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _KMOD_SHIFT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	adrp	x10, _RETROKMOD_SHIFT@GOTPAGE
Lloh24:
	ldr	x10, [x10, _RETROKMOD_SHIFT@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	tst	w9, w8
	csel	w9, wzr, w10, eq
Lloh26:
	adrp	x10, _KMOD_CTRL@GOTPAGE
Lloh27:
	ldr	x10, [x10, _KMOD_CTRL@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
Lloh29:
	adrp	x11, _RETROKMOD_CTRL@GOTPAGE
Lloh30:
	ldr	x11, [x11, _RETROKMOD_CTRL@GOTPAGEOFF]
Lloh31:
	ldr	w11, [x11]
	tst	w10, w8
	csel	w10, wzr, w11, eq
	orr	w9, w10, w9
Lloh32:
	adrp	x10, _KMOD_ALT@GOTPAGE
Lloh33:
	ldr	x10, [x10, _KMOD_ALT@GOTPAGEOFF]
Lloh34:
	ldr	w10, [x10]
	ldr	w11, [x28]
	tst	w10, w8
	csel	w10, wzr, w11, eq
	orr	w9, w9, w10
	ldr	w10, [x23]
	ldr	w11, [x24]
	tst	w10, w8
	csel	w10, wzr, w11, eq
	orr	w9, w9, w10
	ldr	w10, [x25]
	ldr	w11, [x26]
	tst	w10, w8
	csel	w8, wzr, w11, eq
	orr	w3, w9, w8
	ldr	x8, [sp]
	ldr	x9, [x21]
	cmp	x8, x9
	cset	w0, eq
	ldr	w4, [x27]
	mov	x2, x1
	bl	_input_keyboard_event
	b	LBB0_4
LBB0_7:
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SDL_GETEVENT,4,2               ; @SDL_GETEVENT
	.comm	_SDL_KEYEVENTMASK,4,2           ; @SDL_KEYEVENTMASK
	.comm	_SDL_KEYDOWN,8,3                ; @SDL_KEYDOWN
	.comm	_SDL_KEYUP,8,3                  ; @SDL_KEYUP
	.comm	_KMOD_SHIFT,4,2                 ; @KMOD_SHIFT
	.comm	_RETROKMOD_SHIFT,4,2            ; @RETROKMOD_SHIFT
	.comm	_KMOD_CTRL,4,2                  ; @KMOD_CTRL
	.comm	_RETROKMOD_CTRL,4,2             ; @RETROKMOD_CTRL
	.comm	_KMOD_ALT,4,2                   ; @KMOD_ALT
	.comm	_RETROKMOD_ALT,4,2              ; @RETROKMOD_ALT
	.comm	_KMOD_NUM,4,2                   ; @KMOD_NUM
	.comm	_RETROKMOD_NUMLOCK,4,2          ; @RETROKMOD_NUMLOCK
	.comm	_KMOD_CAPS,4,2                  ; @KMOD_CAPS
	.comm	_RETROKMOD_CAPSLOCK,4,2         ; @RETROKMOD_CAPSLOCK
	.comm	_RETRO_DEVICE_KEYBOARD,4,2      ; @RETRO_DEVICE_KEYBOARD
	.comm	_SDL_MOUSEWHEEL,8,3             ; @SDL_MOUSEWHEEL
	.no_dead_strip	_sdl_input_poll
.subsections_via_symbols
