	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ir_input_init                  ## -- Begin function ir_input_init
	.p2align	4, 0x90
_ir_input_init:                         ## @ir_input_init
	.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	%rcx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	%edx, (%rsi)
	movq	8(%rsi), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	testq	%r15, %r15
	je	LBB0_6
## %bb.1:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	movq	8(%r15), %rcx
	xorl	%edx, %edx
	movq	_IR_KEYTAB_SIZE@GOTPCREL(%rip), %rsi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	movslq	%eax, %rdi
	cmpq	%rdi, %rdx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%rcx,%rdx,8), %rdi
	cmpl	(%rsi), %edi
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%rcx,%rdx,8), %eax
	movq	8(%r12), %rbx
	movl	%eax, (%rbx,%rdi,4)
	movl	(%r15), %eax
	jmp	LBB0_5
LBB0_6:
	movq	8(%r12), %rax
	movq	%rax, 16(%r14)
	movl	$4, (%r14)
	movq	_IR_KEYTAB_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movl	%ecx, 4(%r14)
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.7:
	movl	(%rax), %edi
	movl	12(%r14), %esi
	callq	_set_bit
	cmpl	$2, (%r15)
	jl	LBB0_10
## %bb.8:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	movl	12(%r14), %esi
	callq	_set_bit
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	movl	12(%r14), %esi
	xorl	%edi, %edi
	callq	_clear_bit
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %esi
	callq	_set_bit
	movq	_repeat@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.12:
	movq	_EV_REP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r14), %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_bit                        ## TAILCALL
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IR_KEYTAB_SIZE,4,2             ## @IR_KEYTAB_SIZE
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_repeat,8,3                     ## @repeat
	.comm	_EV_REP,4,2                     ## @EV_REP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ir_input_init                  ; -- Begin function ir_input_init
	.p2align	2
_ir_input_init:                         ; @ir_input_init
	.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
	mov	x21, x3
	mov	x20, x1
	mov	x19, x0
	str	w2, [x1]
	ldr	x0, [x1, #8]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x22, _IR_KEYTAB_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _IR_KEYTAB_SIZE@GOTPAGEOFF]
	cbz	x21, LBB0_6
; %bb.1:
	ldr	w9, [x21]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x8, #0
	ldr	x10, [x21, #8]
	add	x10, x10, #4
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #1
	add	x10, x10, #8
	cmp	x8, w9, sxtw
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldursw	x11, [x10, #-4]
	ldr	w12, [x22]
	cmp	w11, w12
	b.ge	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x10]
	ldr	x12, [x20, #8]
	str	w9, [x12, x11, lsl #2]
	ldr	w9, [x21]
	b	LBB0_3
LBB0_6:
	ldr	x8, [x20, #8]
	str	x8, [x19, #16]
	mov	w9, #4
	str	w9, [x19]
	ldr	w9, [x22]
	str	w9, [x19, #4]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.7:
	ldr	w0, [x8]
	ldr	w1, [x19, #12]
	bl	_set_bit
	ldr	w8, [x22]
	cmp	w8, #2
	b.lt	LBB0_10
; %bb.8:
	mov	w21, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x21, lsl #2]
	ldr	w1, [x19, #12]
	bl	_set_bit
	add	x21, x21, #1
	ldrsw	x8, [x22]
	cmp	x21, x8
	b.lt	LBB0_9
LBB0_10:
	ldr	w1, [x19, #12]
	mov	w0, #0
	bl	_clear_bit
Lloh2:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_set_bit
Lloh5:
	adrp	x8, _repeat@GOTPAGE
Lloh6:
	ldr	x8, [x8, _repeat@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.11:
Lloh8:
	adrp	x8, _EV_REP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EV_REP@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	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
	b	_set_bit
LBB0_12:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IR_KEYTAB_SIZE,4,2             ; @IR_KEYTAB_SIZE
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_repeat,8,3                     ; @repeat
	.comm	_EV_REP,4,2                     ; @EV_REP
.subsections_via_symbols
