	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rwebinput_keyboard_cb
_rwebinput_keyboard_cb:                 ## @rwebinput_keyboard_cb
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_EMSCRIPTEN_EVENT_KEYPRESS@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	je	LBB0_4
## %bb.1:
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_g_rwebinput_keyboard@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rsi
	cmpq	%rsi, %rcx
	jb	LBB0_3
## %bb.2:
	addl	%esi, %esi
	movl	$1, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_MAX
	movq	%rax, %r15
	movq	(%r12), %rax
	movq	16(%rax), %rdi
	leaq	(,%r15,8), %rsi
	callq	_realloc
	movq	(%r12), %rcx
	movq	%rax, 16(%rcx)
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_retro_assert
	movq	(%r12), %rax
	movq	%r15, 8(%rax)
	movq	(%rax), %rcx
LBB0_3:
	movq	16(%rax), %rax
	movl	%ebx, (%rax,%rcx,8)
	leaq	(%rax,%rcx,8), %rdi
	addq	$4, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	(%r12), %rax
	incq	(%rax)
LBB0_4:
	movq	_EM_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMSCRIPTEN_EVENT_KEYPRESS,4,2  ## @EMSCRIPTEN_EVENT_KEYPRESS
	.comm	_EM_TRUE,4,2                    ## @EM_TRUE
	.comm	_g_rwebinput_keyboard,8,3       ## @g_rwebinput_keyboard
	.no_dead_strip	_rwebinput_keyboard_cb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rwebinput_keyboard_cb
_rwebinput_keyboard_cb:                 ; @rwebinput_keyboard_cb
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _EMSCRIPTEN_EVENT_KEYPRESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EMSCRIPTEN_EVENT_KEYPRESS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.eq	LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh3:
	adrp	x22, _g_rwebinput_keyboard@GOTPAGE
Lloh4:
	ldr	x22, [x22, _g_rwebinput_keyboard@GOTPAGEOFF]
	ldr	x8, [x22]
	ldp	x9, x10, [x8]
	cmp	x9, x10
	b.lo	LBB0_3
; %bb.2:
	lsl	w1, w10, #1
	mov	w0, #1
	bl	_MAX
	mov	x21, x0
	ldr	x8, [x22]
	ldr	x0, [x8, #16]
	lsl	x1, x21, #3
	bl	_realloc
	ldr	x8, [x22]
	str	x0, [x8, #16]
	cmp	x0, #0
	cset	w0, ne
	bl	_retro_assert
	ldr	x8, [x22]
	str	x21, [x8, #8]
	ldr	x9, [x8]
LBB0_3:
	ldr	x8, [x8, #16]
	add	x0, x8, x9, lsl #3
	str	w20, [x0], #4
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x22]
	ldr	x9, [x8]
	add	x9, x9, #1
	str	x9, [x8]
LBB0_4:
Lloh5:
	adrp	x8, _EM_TRUE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EM_TRUE@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EMSCRIPTEN_EVENT_KEYPRESS,4,2  ; @EMSCRIPTEN_EVENT_KEYPRESS
	.comm	_EM_TRUE,4,2                    ; @EM_TRUE
	.comm	_g_rwebinput_keyboard,8,3       ; @g_rwebinput_keyboard
	.no_dead_strip	_rwebinput_keyboard_cb
.subsections_via_symbols
