	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em2874_polling_getkey
_em2874_polling_getkey:                 ## @em2874_polling_getkey
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	8(%rdi), %rdi
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movl	$0, -32(%rbp)
	movq	_EM2874_R51_IR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rcx
	xorl	%esi, %esi
	movl	$20, %r8d
	callq	*(%rdi)
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movl	-48(%rbp), %eax
	movl	%eax, %ecx
	sarl	$7, %ecx
	movl	%ecx, (%r14)
	andl	$127, %eax
	movl	%eax, 4(%r14)
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$130, %eax
	je	LBB0_5
## %bb.3:
	cmpl	$129, %eax
	jne	LBB0_7
## %bb.4:
	movq	_RC_PROTO_RC5@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movl	-44(%rbp), %edi
	movl	-40(%rbp), %esi
	callq	_RC_SCANCODE_RC5
	jmp	LBB0_8
LBB0_6:
	movq	_RC_PROTO_RC6_0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movl	-44(%rbp), %edi
	movl	-40(%rbp), %esi
	callq	_RC_SCANCODE_RC6_0
	jmp	LBB0_8
LBB0_5:
	movl	-44(%rbp), %edi
	movl	-40(%rbp), %esi
	movl	-36(%rbp), %edx
	movl	-32(%rbp), %ecx
	leaq	12(%r14), %r8
	callq	_ir_nec_bytes_to_scancode
	jmp	LBB0_8
LBB0_7:
	movq	_RC_PROTO_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movl	-44(%rbp), %eax
	movl	-40(%rbp), %ecx
	shll	$24, %eax
	shll	$16, %ecx
	orl	%eax, %ecx
	movl	-36(%rbp), %eax
	shll	$8, %eax
	orl	%ecx, %eax
	orl	-32(%rbp), %eax
LBB0_8:
	movl	%eax, 8(%r14)
	xorl	%eax, %eax
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EM2874_R51_IR,4,2              ## @EM2874_R51_IR
	.comm	_RC_PROTO_RC5,4,2               ## @RC_PROTO_RC5
	.comm	_RC_PROTO_RC6_0,4,2             ## @RC_PROTO_RC6_0
	.comm	_RC_PROTO_UNKNOWN,4,2           ## @RC_PROTO_UNKNOWN
	.no_dead_strip	_em2874_polling_getkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em2874_polling_getkey
_em2874_polling_getkey:                 ; @em2874_polling_getkey
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x0, [x0, #8]
	stp	xzr, xzr, [sp]
	str	wzr, [sp, #16]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _EM2874_R51_IR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EM2874_R51_IR@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x9]
	mov	x3, sp
	mov	w1, #0
	mov	w4, #20
	blr	x8
	tbnz	w0, #31, LBB0_9
; %bb.1:
	ldr	w8, [sp]
	asr	w9, w8, #7
	and	w8, w8, #0x7f
	stp	w9, w8, [x19]
	ldr	w8, [x20]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #130
	b.eq	LBB0_6
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.4:
Lloh6:
	adrp	x8, _RC_PROTO_RC5@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RC_PROTO_RC5@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldp	w0, w1, [sp, #4]
	bl	_RC_SCANCODE_RC5
	mov	x8, x0
	b	LBB0_8
LBB0_5:
Lloh9:
	adrp	x8, _RC_PROTO_RC6_0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RC_PROTO_RC6_0@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldp	w0, w1, [sp, #4]
	bl	_RC_SCANCODE_RC6_0
	mov	x8, x0
	b	LBB0_8
LBB0_6:
	ldp	w0, w1, [sp, #4]
	add	x4, x19, #12
	ldp	w2, w3, [sp, #12]
	bl	_ir_nec_bytes_to_scancode
	mov	x8, x0
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x8, _RC_PROTO_UNKNOWN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RC_PROTO_UNKNOWN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldp	w8, w9, [sp, #4]
	lsl	w9, w9, #16
	orr	w8, w9, w8, lsl #24
	ldp	w9, w10, [sp, #12]
	orr	w8, w8, w9, lsl #8
	orr	w8, w8, w10
LBB0_8:
	mov	w0, #0
	str	w8, [x19, #8]
LBB0_9:
	ldr	x8, [sp, #24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_11:
	bl	___stack_chk_fail
	.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	_EM2874_R51_IR,4,2              ; @EM2874_R51_IR
	.comm	_RC_PROTO_RC5,4,2               ; @RC_PROTO_RC5
	.comm	_RC_PROTO_RC6_0,4,2             ; @RC_PROTO_RC6_0
	.comm	_RC_PROTO_UNKNOWN,4,2           ; @RC_PROTO_UNKNOWN
	.no_dead_strip	_em2874_polling_getkey
.subsections_via_symbols
