	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cinergyt2_rc_query
_cinergyt2_rc_query:                    ## @cinergyt2_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r12
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movl	$0, -64(%rbp)
	movq	_CINERGYT2_EP1_GET_RC_EVENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movq	_REMOTE_NO_KEY_PRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	leaq	-84(%rbp), %rsi
	leaq	-80(%rbp), %rcx
	movl	$1, %edx
	movl	$20, %r8d
	xorl	%r9d, %r9d
	callq	_dvb_usb_generic_rw
	cmpl	$255, -64(%rbp)
	jne	LBB0_8
## %bb.1:
	movq	(%r12), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, (%r12)
	movq	_RC_REPEAT_DELAY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_12
## %bb.2:
	movq	_repeatable_keys@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rsi
	movq	(%r12), %rdi
	cmpq	(%rdi,%rbx,8), %rsi
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_rc
	jmp	LBB0_12
LBB0_8:
	movl	-76(%rbp), %eax
	notl	%eax
	movl	%eax, -72(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%r13, %rdi
	movq	%r14, %rdx
	movq	%r15, %rcx
	callq	_dvb_usb_nec_rc_key_to_event
	movl	-80(%rbp), %esi
	testl	%esi, %esi
	je	LBB0_12
## %bb.9:
	movq	(%r14), %rax
	cmpq	(%r13), %rax
	je	LBB0_11
## %bb.10:
	movq	$0, (%r12)
LBB0_11:
	movl	-76(%rbp), %edx
	movl	-72(%rbp), %ecx
	movl	-68(%rbp), %r8d
	movl	-64(%rbp), %r9d
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_rc
	jmp	LBB0_12
LBB0_6:
	movq	_REMOTE_KEY_REPEAT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%rsi, (%r14)
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_rc
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CINERGYT2_EP1_GET_RC_EVENTS,4,2 ## @CINERGYT2_EP1_GET_RC_EVENTS
	.comm	_REMOTE_NO_KEY_PRESSED,4,2      ## @REMOTE_NO_KEY_PRESSED
	.comm	_RC_REPEAT_DELAY,8,3            ## @RC_REPEAT_DELAY
	.comm	_repeatable_keys,8,3            ## @repeatable_keys
	.comm	_REMOTE_KEY_REPEAT,4,2          ## @REMOTE_KEY_REPEAT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"repeat key, event %x\n"

L_.str.1:                               ## @.str.1
	.asciz	"repeated key (non repeatable)\n"

L_.str.2:                               ## @.str.2
	.asciz	"key: %x %x %x %x %x\n"

	.no_dead_strip	_cinergyt2_rc_query
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cinergyt2_rc_query
_cinergyt2_rc_query:                    ; @cinergyt2_rc_query
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x21, x2
	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]
	stur	x8, [x29, #-56]
	ldr	x22, [x0, #8]
	stp	xzr, xzr, [sp, #48]
	str	wzr, [sp, #64]
Lloh3:
	adrp	x8, _CINERGYT2_EP1_GET_RC_EVENTS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CINERGYT2_EP1_GET_RC_EVENTS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #44]
Lloh6:
	adrp	x8, _REMOTE_NO_KEY_PRESSED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REMOTE_NO_KEY_PRESSED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x2]
	add	x1, sp, #44
	add	x3, sp, #48
	mov	w2, #1
	mov	w4, #20
	mov	w5, #0
	bl	_dvb_usb_generic_rw
	ldr	w8, [sp, #64]
	cmp	w8, #255
	b.ne	LBB0_7
; %bb.1:
	ldr	x8, [x22]
	add	x9, x8, #1
	str	x9, [x22]
Lloh9:
	adrp	x9, _RC_REPEAT_DELAY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RC_REPEAT_DELAY@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_13
; %bb.2:
Lloh12:
	adrp	x22, _repeatable_keys@GOTPAGE
Lloh13:
	ldr	x22, [x22, _repeatable_keys@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x23, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x0, [x22]
	ldr	x9, [x0, x23, lsl #3]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.lt	LBB0_4
LBB0_6:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_7:
	ldr	w8, [sp, #52]
	mvn	w8, w8
	str	w8, [sp, #56]
	add	x1, sp, #48
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	bl	_dvb_usb_nec_rc_key_to_event
	ldr	w8, [sp, #48]
	cbz	w8, LBB0_13
; %bb.8:
	ldr	x9, [x19]
	ldr	x10, [x20]
	cmp	x9, x10
	b.eq	LBB0_10
; %bb.9:
	str	xzr, [x22]
LBB0_10:
	ldp	w9, w10, [sp, #52]
	ldp	w11, w12, [sp, #60]
	stp	x11, x12, [sp, #24]
	stp	x9, x10, [sp, #8]
	str	x8, [sp]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh18:
	adrp	x9, _REMOTE_KEY_REPEAT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _REMOTE_KEY_REPEAT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	str	w9, [x21]
	str	x8, [x19]
	str	x8, [sp]
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
LBB0_12:
	bl	_deb_rc
LBB0_13:
	ldur	x8, [x29, #-56]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	w0, #0
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_15:
	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 AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_CINERGYT2_EP1_GET_RC_EVENTS,4,2 ; @CINERGYT2_EP1_GET_RC_EVENTS
	.comm	_REMOTE_NO_KEY_PRESSED,4,2      ; @REMOTE_NO_KEY_PRESSED
	.comm	_RC_REPEAT_DELAY,8,3            ; @RC_REPEAT_DELAY
	.comm	_repeatable_keys,8,3            ; @repeatable_keys
	.comm	_REMOTE_KEY_REPEAT,4,2          ; @REMOTE_KEY_REPEAT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"repeat key, event %x\n"

l_.str.1:                               ; @.str.1
	.asciz	"repeated key (non repeatable)\n"

l_.str.2:                               ; @.str.2
	.asciz	"key: %x %x %x %x %x\n"

	.no_dead_strip	_cinergyt2_rc_query
.subsections_via_symbols
