	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rwebinput_generate_lut
_rwebinput_generate_lut:                ## @rwebinput_generate_lut
	.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	_rarch_key_map_rwebinput@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %r15d
	movq	_rwebinput_key_to_code_map@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	incl	%eax
	xorl	%edi, %edi
	cmpl	%eax, %r15d
	sete	%dil
	callq	_retro_assert
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	(,%r13,8), %rax
	leaq	(%rax,%rax,2), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	8(%rcx,%rax), %ecx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%ecx, 8(%rdx,%rax)
	movq	%rbx, (%rdx,%rax)
	incq	%r13
	movq	_rwebinput_key_to_code_map@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$24, %r12
	cmpq	%rax, %r13
	jge	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	(%rbx), %rcx
	movq	(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(,%r13,2), %rax
	addq	%r13, %rax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rcx,%rax,8), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	xorl	%edi, %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_encoding_crc32
	movq	%rax, %rbx
	testq	%r13, %r13
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14), %rax
	xorl	%edi, %edi
	cmpq	%rbx, (%rax,%r15)
	setne	%dil
	callq	_retro_assert
	addq	$24, %r15
	cmpq	%r15, %r12
	jne	LBB0_4
	jmp	LBB0_5
LBB0_6:
	movq	(%r14), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	decl	%eax
	cltq
	movq	_RETROK_UNKNOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	(%rax,%rax,2), %rax
	movl	%ecx, 8(%rbx,%rax,8)
	movq	$0, (%rbx,%rax,8)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rarch_key_map_rwebinput,8,3    ## @rarch_key_map_rwebinput
	.comm	_rwebinput_key_to_code_map,8,3  ## @rwebinput_key_to_code_map
	.comm	_RETROK_UNKNOWN,4,2             ## @RETROK_UNKNOWN
	.no_dead_strip	_rwebinput_generate_lut
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rwebinput_generate_lut
_rwebinput_generate_lut:                ; @rwebinput_generate_lut
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x20, _rarch_key_map_rwebinput@GOTPAGE
Lloh1:
	ldr	x20, [x20, _rarch_key_map_rwebinput@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	mov	x19, x0
Lloh2:
	adrp	x21, _rwebinput_key_to_code_map@GOTPAGE
Lloh3:
	ldr	x21, [x21, _rwebinput_key_to_code_map@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	add	w8, w0, #1
	cmp	w19, w8
	cset	w0, eq
	bl	_retro_assert
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x22, #0
	mov	x23, #0
	mov	w24, #24
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x23, x23, lsl #1
	lsl	x8, x8, #3
	add	x9, x26, x8
	ldr	w9, [x9, #8]
	add	x8, x25, x8
	str	w9, [x8, #8]
	str	x19, [x8]
	add	x23, x23, #1
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	add	x22, x22, #24
	cmp	x23, w0, sxtw
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldr	x26, [x21]
	ldr	x25, [x20]
	madd	x8, x23, x24, x26
	ldr	x19, [x8, #16]
	mov	x0, x19
	bl	_strlen
	mov	x2, x0
	mov	w0, #0
	mov	x1, x19
	bl	_encoding_crc32
	mov	x19, x0
	cbz	x23, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x27, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20]
	ldr	x8, [x8, x27]
	cmp	x8, x19
	cset	w0, ne
	bl	_retro_assert
	add	x27, x27, #24
	cmp	x22, x27
	b.ne	LBB0_5
	b	LBB0_2
LBB0_6:
	ldr	x19, [x20]
	mov	x0, x19
	bl	_ARRAY_SIZE
Lloh4:
	adrp	x8, _RETROK_UNKNOWN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RETROK_UNKNOWN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	mov	w9, #24
	smaddl	x9, w0, w9, x19
	stur	w8, [x9, #-16]
	stur	xzr, [x9, #-24]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_rarch_key_map_rwebinput,8,3    ; @rarch_key_map_rwebinput
	.comm	_rwebinput_key_to_code_map,8,3  ; @rwebinput_key_to_code_map
	.comm	_RETROK_UNKNOWN,4,2             ; @RETROK_UNKNOWN
	.no_dead_strip	_rwebinput_generate_lut
.subsections_via_symbols
