	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_android_run_events             ## -- Begin function android_run_events
	.p2align	4, 0x90
_android_run_events:                    ## @android_run_events
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_g_android@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	$-1, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ALooper_pollOnce
	movq	_LOOPER_ID_MAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_android_input_poll_main_cmd
LBB0_2:
	cmpq	$0, (%rbx)
	je	LBB0_4
## %bb.3:
	movq	_RARCH_CTL_SET_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_rarch_ctl
	jmp	LBB0_8
LBB0_4:
	movl	$1, %r14d
	cmpq	$0, 8(%rbx)
	je	LBB0_8
## %bb.5:
	movq	_RARCH_CTL_IS_PAUSED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_rarch_ctl
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_CMD_EVENT_REINIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_command_event
LBB0_7:
	movq	_APP_CMD_REINIT_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_android_app_write_cmd
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_android,8,3                  ## @g_android
	.comm	_LOOPER_ID_MAIN,8,3             ## @LOOPER_ID_MAIN
	.comm	_RARCH_CTL_SET_SHUTDOWN,4,2     ## @RARCH_CTL_SET_SHUTDOWN
	.comm	_RARCH_CTL_IS_PAUSED,4,2        ## @RARCH_CTL_IS_PAUSED
	.comm	_CMD_EVENT_REINIT,4,2           ## @CMD_EVENT_REINIT
	.comm	_APP_CMD_REINIT_DONE,4,2        ## @APP_CMD_REINIT_DONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_android_run_events             ; -- Begin function android_run_events
	.p2align	2
_android_run_events:                    ; @android_run_events
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _g_android@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_android@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	mov	w0, #-1
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	bl	_ALooper_pollOnce
Lloh3:
	adrp	x8, _LOOPER_ID_MAIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LOOPER_ID_MAIN@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	bl	_android_input_poll_main_cmd
LBB0_2:
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _RARCH_CTL_SET_SHUTDOWN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RARCH_CTL_SET_SHUTDOWN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_rarch_ctl
	mov	w0, #0
	b	LBB0_9
LBB0_4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.5:
Lloh9:
	adrp	x8, _RARCH_CTL_IS_PAUSED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RARCH_CTL_IS_PAUSED@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_rarch_ctl
	cbz	x0, LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _CMD_EVENT_REINIT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CMD_EVENT_REINIT@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_command_event
LBB0_7:
Lloh15:
	adrp	x8, _APP_CMD_REINIT_DONE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _APP_CMD_REINIT_DONE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_android_app_write_cmd
LBB0_8:
	mov	w0, #1
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_g_android,8,3                  ; @g_android
	.comm	_LOOPER_ID_MAIN,8,3             ; @LOOPER_ID_MAIN
	.comm	_RARCH_CTL_SET_SHUTDOWN,4,2     ; @RARCH_CTL_SET_SHUTDOWN
	.comm	_RARCH_CTL_IS_PAUSED,4,2        ; @RARCH_CTL_IS_PAUSED
	.comm	_CMD_EVENT_REINIT,4,2           ; @CMD_EVENT_REINIT
	.comm	_APP_CMD_REINIT_DONE,4,2        ; @APP_CMD_REINIT_DONE
.subsections_via_symbols
