	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function af9005_rc_query
LCPI0_0:
	.long	3                               ## 0x3
	.long	0                               ## 0x0
	.long	64                              ## 0x40
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_af9005_rc_query:                       ## @af9005_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	$1064, %rsp                     ## imm = 0x428
	.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, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	_REMOTE_NO_KEY_PRESSED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rdx)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [3,0,64,1]
	movaps	%xmm0, -80(%rbp)
	movl	(%rax), %ecx
	leal	1(%rcx), %edx
	movl	%edx, (%rax)
	movl	%ecx, -64(%rbp)
	leaq	-80(%rbp), %rsi
	leaq	-1104(%rbp), %rcx
	movl	$5, %edx
	movl	$256, %r8d                      ## imm = 0x100
	xorl	%r9d, %r9d
	callq	_dvb_usb_generic_rw
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_err
	jmp	LBB0_15
LBB0_2:
	cmpl	$65, -1096(%rbp)
	jne	LBB0_3
## %bb.5:
	movl	-1088(%rbp), %eax
	cmpl	-64(%rbp), %eax
	jne	LBB0_6
## %bb.7:
	movl	-1084(%rbp), %r13d
	cmpl	$247, %r13d
	jl	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
LBB0_4:
	callq	_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movl	%ebx, %eax
	addq	$1064, %rsp                     ## imm = 0x428
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	testl	%r13d, %r13d
	jle	LBB0_10
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_deb_rc
	movq	_deb_rc@GOTPCREL(%rip), %rdx
	leaq	-1080(%rbp), %rdi
	movl	%r13d, %esi
	callq	_debug_dump
	movq	%r12, %rdi
	leaq	-1080(%rbp), %rsi
	movl	%r13d, %edx
	movq	%r14, %rcx
	movq	%r15, %r8
	callq	_rc_decode
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r13d
	leaq	L_.str.5(%rip), %rdi
	callq	_err
	movl	%r13d, %ebx
	jmp	LBB0_15
LBB0_10:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_13:
	movl	(%r15), %esi
	movl	(%r14), %edx
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_deb_rc
	movl	(%r15), %eax
	movq	_REMOTE_KEY_REPEAT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_15
## %bb.14:
	movl	(%r12), %eax
	movl	%eax, (%r14)
	jmp	LBB0_15
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_REMOTE_NO_KEY_PRESSED,4,2      ## @REMOTE_NO_KEY_PRESSED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rc query failed"

L_.str.1:                               ## @.str.1
	.asciz	"rc query bad header."

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"rc query bad sequence."

L_.str.3:                               ## @.str.3
	.asciz	"rc query invalid length"

L_.str.4:                               ## @.str.4
	.asciz	"rc data (%d) "

L_.str.5:                               ## @.str.5
	.asciz	"rc_decode failed"

L_.str.6:                               ## @.str.6
	.asciz	"rc_decode state %x event %x\n"

	.comm	_REMOTE_KEY_REPEAT,4,2          ## @REMOTE_KEY_REPEAT
	.no_dead_strip	_af9005_rc_query
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function af9005_rc_query
lCPI0_0:
	.long	3                               ; 0x3
	.long	0                               ; 0x0
	.long	64                              ; 0x40
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_af9005_rc_query:                       ; @af9005_rc_query
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #1072
	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	x8, [x0, #8]
Lloh3:
	adrp	x9, _REMOTE_NO_KEY_PRESSED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REMOTE_NO_KEY_PRESSED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w9, [x2]
Lloh6:
	adrp	x9, lCPI0_0@PAGE
Lloh7:
	ldr	q0, [x9, lCPI0_0@PAGEOFF]
	stur	q0, [x29, #-80]
	ldr	w9, [x8]
	add	w10, w9, #1
	str	w10, [x8]
	stur	w9, [x29, #-64]
	sub	x1, x29, #80
	add	x3, sp, #16
	mov	w2, #5
	mov	w4, #256
	mov	w5, #0
	bl	_dvb_usb_generic_rw
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
	b	LBB0_9
LBB0_2:
	ldr	w8, [sp, #24]
	cmp	w8, #65
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [sp, #32]
	ldur	w9, [x29, #-64]
	cmp	w8, w9
	b.ne	LBB0_7
; %bb.4:
	ldr	w22, [sp, #36]
	cmp	w22, #247
	b.lt	LBB0_11
; %bb.5:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_err
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	ldur	x8, [x29, #-56]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.10:
	mov	x0, x22
	add	sp, sp, #1072
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	cmp	w22, #1
	b.lt	LBB0_16
; %bb.12:
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x22
	bl	_deb_rc
Lloh24:
	adrp	x2, _deb_rc@GOTPAGE
Lloh25:
	ldr	x2, [x2, _deb_rc@GOTPAGEOFF]
	add	x8, sp, #16
	add	x23, x8, #24
	mov	x0, x23
	mov	x1, x22
	bl	_debug_dump
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	mov	x3, x19
	mov	x4, x21
	bl	_rc_decode
	cbz	w0, LBB0_14
; %bb.13:
	mov	x22, x0
Lloh26:
	adrp	x0, l_.str.5@PAGE
Lloh27:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_err
	b	LBB0_9
LBB0_14:
	ldr	w1, [x21]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh28:
	adrp	x0, l_.str.6@PAGE
Lloh29:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_deb_rc
	ldr	w8, [x21]
Lloh30:
	adrp	x9, _REMOTE_KEY_REPEAT@GOTPAGE
Lloh31:
	ldr	x9, [x9, _REMOTE_KEY_REPEAT@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.15:
	mov	w22, #0
	ldr	w8, [x20]
	str	w8, [x19]
	b	LBB0_9
LBB0_16:
	mov	w22, #0
	b	LBB0_9
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdr	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_REMOTE_NO_KEY_PRESSED,4,2      ; @REMOTE_NO_KEY_PRESSED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rc query failed"

l_.str.1:                               ; @.str.1
	.asciz	"rc query bad header."

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"rc query bad sequence."

l_.str.3:                               ; @.str.3
	.asciz	"rc query invalid length"

l_.str.4:                               ; @.str.4
	.asciz	"rc data (%d) "

l_.str.5:                               ; @.str.5
	.asciz	"rc_decode failed"

l_.str.6:                               ; @.str.6
	.asciz	"rc_decode state %x event %x\n"

	.comm	_REMOTE_KEY_REPEAT,4,2          ; @REMOTE_KEY_REPEAT
	.no_dead_strip	_af9005_rc_query
.subsections_via_symbols
