	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opera1_rc_query
_opera1_rc_query:                       ## @opera1_rc_query
	.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	$312, %rsp                      ## imm = 0x138
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r12
	movl	$32, -336(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -332(%rbp)
	leaq	-304(%rbp), %rax
	movq	%rax, -328(%rbp)
	movq	_ADDR_B880_READ_REMOTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -320(%rbp)
	leaq	-336(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	cmpl	$1, %eax
	jne	LBB0_16
## %bb.1:
	movq	%rbx, -344(%rbp)                ## 8-byte Spill
	movq	%r14, -352(%rbp)                ## 8-byte Spill
	xorl	%eax, %eax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%ecx, %ecx
	cmpq	$0, -304(%rbp,%rax,8)
	setne	%cl
	orl	%edx, %ecx
	xorl	%edx, %edx
	cmpq	$0, -296(%rbp,%rax,8)
	setne	%dl
	leal	(%rdx,%rcx,2), %edx
	cmpq	$30, %rax
	setne	%cl
	shll	%cl, %edx
	addq	$2, %rax
	cmpq	$32, %rax
	jne	LBB0_2
## %bb.3:
	movl	%edx, %eax
	shrl	$15, %eax
	andl	$1, %eax
	testl	$32768, %edx                    ## imm = 0x8000
	leal	(%rax,%rdx,2), %ebx
	cmovel	%edx, %ebx
	testl	%ebx, %ebx
	je	LBB0_17
## %bb.4:
	cmpl	$65535, %ebx                    ## imm = 0xFFFF
	jne	LBB0_8
## %bb.5:
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	_REMOTE_KEY_REPEAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	-344(%rbp), %rdx                ## 8-byte Reload
	movl	%ecx, (%rdx)
	movq	-352(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	movl	%ebx, %eax
	sarl	%eax
	cmpl	$2, %ebx
	movl	%eax, %ebx
	jb	LBB0_17
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	sarl	$16, %eax
	cmpl	$4588, %eax                     ## imm = 0x11EC
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$4333, %eax                     ## imm = 0x10ED
	jne	LBB0_7
## %bb.10:
	orl	$283967488, %ebx                ## imm = 0x10ED0000
LBB0_11:
	movq	_rc_map_opera1_table@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_17
## %bb.12:
	orl	$256, %ebx                      ## imm = 0x100
	movzwl	%bx, %r14d
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	addq	%rbx, %rdi
	callq	_rc5_scan
	cmpl	%r14d, %eax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	$0, (%r12)
	incq	%r15
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %rbx
	cmpq	%rax, %r15
	jl	LBB0_13
	jmp	LBB0_17
LBB0_16:
	movq	_REMOTE_NO_KEY_PRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	xorl	%eax, %eax
	addq	$312, %rsp                      ## imm = 0x138
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_REMOTE_KEY_PRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-344(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	(%r13), %rax
	movl	(%rax,%rbx), %ecx
	movq	-352(%rbp), %rdx                ## 8-byte Reload
	movl	%ecx, (%rdx)
	movslq	(%rax,%rbx), %rax
	movq	%rax, (%r12)
	jmp	LBB0_17
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_ADDR_B880_READ_REMOTE,4,2      ## @ADDR_B880_READ_REMOTE
	.comm	_REMOTE_KEY_REPEAT,4,2          ## @REMOTE_KEY_REPEAT
	.comm	_rc_map_opera1_table,8,3        ## @rc_map_opera1_table
	.comm	_REMOTE_KEY_PRESSED,4,2         ## @REMOTE_KEY_PRESSED
	.comm	_REMOTE_NO_KEY_PRESSED,4,2      ## @REMOTE_NO_KEY_PRESSED
	.no_dead_strip	_opera1_rc_query
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opera1_rc_query
_opera1_rc_query:                       ; @opera1_rc_query
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #368
	.cfi_def_cfa_offset 368
	stp	x26, x25, [sp, #288]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #304]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #320]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #336]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #352]            ; 16-byte Folded Spill
	add	x29, sp, #352
	.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
	mov	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	x21, [x0, #8]
	mov	w8, #32
Lloh3:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w8, w9, [sp]
	add	x22, sp, #24
	str	x22, [sp, #8]
Lloh6:
	adrp	x8, _ADDR_B880_READ_REMOTE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADDR_B880_READ_REMOTE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	mov	x1, sp
	mov	w2, #1
	bl	_i2c_transfer
	cmp	w0, #1
	b.ne	LBB0_15
; %bb.1:
	mov	x9, #0
	mov	w8, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x22, x9]
	cmp	x10, #0
	cset	w10, ne
	orr	w8, w8, w10
	cmp	x9, #248
	cset	w10, ne
	lsl	w8, w8, w10
	add	x9, x9, #8
	cmp	x9, #256
	b.ne	LBB0_2
; %bb.3:
	lsl	w9, w8, #1
	bfxil	w9, w8, #15, #1
	tst	w8, #0x8000
	csel	w22, w8, w9, eq
	cbz	w22, LBB0_16
; %bb.4:
	mov	w8, #65535
	cmp	w22, w8
	b.ne	LBB0_8
; %bb.5:
	ldr	x8, [x21]
	cbz	x8, LBB0_8
; %bb.6:
Lloh9:
	adrp	x9, _REMOTE_KEY_REPEAT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _REMOTE_KEY_REPEAT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	str	w9, [x20]
	str	w8, [x19]
	b	LBB0_16
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	asr	w8, w22, #1
	cmp	w22, #2
	mov	x22, x8
	b.lo	LBB0_16
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	asr	w8, w22, #16
	mov	w9, #4588
	cmp	w8, w9
	b.eq	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w9, #4333
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.10:
	mov	w8, #283967488
	orr	w22, w22, w8
LBB0_11:
Lloh12:
	adrp	x23, _rc_map_opera1_table@GOTPAGE
Lloh13:
	ldr	x23, [x23, _rc_map_opera1_table@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_16
; %bb.12:
	mov	x24, #0
	mov	x25, #0
	and	w8, w22, #0xffff
	orr	w22, w8, #0x100
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x0, x8, x24
	bl	_rc5_scan
	cmp	w0, w22
	b.eq	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	str	xzr, [x21]
	add	x25, x25, #1
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	add	x24, x24, #4
	cmp	x25, w0, sxtw
	b.lt	LBB0_13
	b	LBB0_16
LBB0_15:
Lloh14:
	adrp	x8, _REMOTE_NO_KEY_PRESSED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REMOTE_NO_KEY_PRESSED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_16:
	ldur	x8, [x29, #-72]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.17:
	mov	w0, #0
	ldp	x29, x30, [sp, #352]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #336]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #320]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #304]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #288]            ; 16-byte Folded Reload
	add	sp, sp, #368
	ret
LBB0_18:
Lloh20:
	adrp	x8, _REMOTE_KEY_PRESSED@GOTPAGE
Lloh21:
	ldr	x8, [x8, _REMOTE_KEY_PRESSED@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x20]
	ldr	x8, [x23]
	ldr	w9, [x8, x24]
	str	w9, [x19]
	ldrsw	x8, [x8, x24]
	str	x8, [x21]
	b	LBB0_16
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_ADDR_B880_READ_REMOTE,4,2      ; @ADDR_B880_READ_REMOTE
	.comm	_REMOTE_KEY_REPEAT,4,2          ; @REMOTE_KEY_REPEAT
	.comm	_rc_map_opera1_table,8,3        ; @rc_map_opera1_table
	.comm	_REMOTE_KEY_PRESSED,4,2         ; @REMOTE_KEY_PRESSED
	.comm	_REMOTE_NO_KEY_PRESSED,4,2      ; @REMOTE_NO_KEY_PRESSED
	.no_dead_strip	_opera1_rc_query
.subsections_via_symbols
