	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fdtv_handle_rc                 ## -- Begin function fdtv_handle_rc
	.p2align	4, 0x90
_fdtv_handle_rc:                        ## @fdtv_handle_rc
	.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
	movl	%esi, %edx
	movq	8(%rdi), %r14
	movq	(%r14), %rax
	movl	%esi, %ecx
	andl	$-32, %ecx
	cmpl	$768, %ecx                      ## imm = 0x300
	jne	LBB0_2
## %bb.1:
	addl	$-768, %edx                     ## imm = 0xFD00
	jmp	LBB0_8
LBB0_2:
	leal	-832(%rdx), %ecx
	cmpl	$20, %ecx
	ja	LBB0_4
## %bb.3:
	addl	$-800, %edx                     ## imm = 0xFCE0
	jmp	LBB0_8
LBB0_4:
	leal	-17665(%rdx), %ecx
	cmpl	$30, %ecx
	ja	LBB0_6
## %bb.5:
	movq	_oldtable@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_9
LBB0_6:
	leal	-17728(%rdx), %eax
	cmpl	$2, %eax
	ja	LBB0_10
## %bb.7:
	movq	_oldtable@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addl	$-17697, %edx                   ## imm = 0xBADF
LBB0_8:
	movl	%edx, %ecx
LBB0_9:
	movl	%ecx, %ecx
	movl	(%rax,%rcx,4), %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_input_report_key
	movq	%r14, %rdi
	callq	_input_sync
	movq	%r14, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_input_report_key
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
LBB0_10:
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_oldtable,8,3                   ## @oldtable
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid key code 0x%04x from remote control\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_fdtv_handle_rc                 ; -- Begin function fdtv_handle_rc
	.p2align	2
_fdtv_handle_rc:                        ; @fdtv_handle_rc
	.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
	mov	x2, x1
	ldr	x19, [x0, #8]
	ldr	x8, [x19]
	and	w9, w1, #0xffffffe0
	cmp	w9, #768
	b.ne	LBB0_2
; %bb.1:
	sub	w9, w2, #768
	b	LBB0_8
LBB0_2:
	sub	w9, w2, #832
	cmp	w9, #20
	b.hi	LBB0_4
; %bb.3:
	sub	w9, w2, #800
	b	LBB0_8
LBB0_4:
	mov	w8, #-17665
	add	w9, w2, w8
	cmp	w9, #30
	b.hi	LBB0_6
; %bb.5:
Lloh0:
	adrp	x8, _oldtable@GOTPAGE
Lloh1:
	ldr	x8, [x8, _oldtable@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	b	LBB0_8
LBB0_6:
	mov	w8, #-17728
	add	w8, w2, w8
	cmp	w8, #2
	b.hi	LBB0_9
; %bb.7:
Lloh3:
	adrp	x8, _oldtable@GOTPAGE
Lloh4:
	ldr	x8, [x8, _oldtable@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	mov	w9, #-17697
	add	w9, w2, w9
LBB0_8:
	ldr	w20, [x8, w9, uxtw #2]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_input_report_key
	mov	x0, x19
	bl	_input_sync
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_input_report_key
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_input_sync
LBB0_9:
	ldr	w0, [x0]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_dbg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_oldtable,8,3                   ; @oldtable
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid key code 0x%04x from remote control\n"

.subsections_via_symbols
