	.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	$24, %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, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	8(%rdi), %r13
	movq	_REMOTE_NO_KEY_PRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdx)
	callq	_mutex_lock
	movq	(%r13), %rcx
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [3,0,64,1]
	movups	%xmm0, (%rcx)
	movl	8(%r13), %r14d
	leal	1(%r14), %eax
	movl	%eax, 8(%r13)
	movl	%r14d, 16(%rcx)
	movq	%r12, %rdi
	movq	%rcx, %rsi
	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:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	(%r13), %rax
	cmpl	$65, 8(%rax)
	jne	LBB0_3
## %bb.5:
	cmpl	%r14d, 16(%rax)
	jne	LBB0_6
## %bb.7:
	movl	20(%rax), %r14d
	cmpl	$247, %r14d
	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	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	testl	%r14d, %r14d
	jle	LBB0_10
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_deb_rc
	movq	_deb_rc@GOTPCREL(%rip), %rdx
	movq	(%r13), %rdi
	addq	$24, %rdi
	movl	%r14d, %esi
	callq	_debug_dump
	movq	(%r13), %rsi
	addq	$24, %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	movq	%r15, %r14
	movq	%r15, %rcx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	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	4(%r12), %eax
	movl	%eax, (%r14)
	jmp	LBB0_15
	.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:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
	ldr	x23, [x0, #8]
Lloh0:
	adrp	x8, _REMOTE_NO_KEY_PRESSED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REMOTE_NO_KEY_PRESSED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x2]
	bl	_mutex_lock
	ldr	x1, [x23]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [x1]
	ldr	w24, [x23, #8]
	add	w8, w24, #1
	str	w8, [x23, #8]
	str	w24, [x1, #16]
	mov	x0, x19
	mov	w2, #5
	mov	x3, x1
	mov	w4, #256
	mov	w5, #0
	bl	_dvb_usb_generic_rw
	cbz	w0, LBB0_2
; %bb.1:
	mov	x22, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_err
	b	LBB0_9
LBB0_2:
	ldr	x8, [x23]
	ldr	w9, [x8, #8]
	cmp	w9, #65
	b.ne	LBB0_6
; %bb.3:
	ldr	w9, [x8, #16]
	cmp	w9, w24
	b.ne	LBB0_7
; %bb.4:
	ldr	w22, [x8, #20]
	cmp	w22, #247
	b.lt	LBB0_10
; %bb.5:
Lloh7:
	adrp	x0, l_.str.3@PAGE
Lloh8:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_err
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
	cmp	w22, #1
	b.lt	LBB0_15
; %bb.11:
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x22
	bl	_deb_rc
Lloh18:
	adrp	x2, _deb_rc@GOTPAGE
Lloh19:
	ldr	x2, [x2, _deb_rc@GOTPAGEOFF]
	ldr	x8, [x23]
	add	x0, x8, #24
	mov	x1, x22
	bl	_debug_dump
	ldr	x8, [x23]
	add	x1, x8, #24
	mov	x0, x19
	mov	x2, x22
	mov	x3, x20
	mov	x4, x21
	bl	_rc_decode
	cbz	w0, LBB0_13
; %bb.12:
	mov	x22, x0
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_err
	b	LBB0_9
LBB0_13:
	ldr	w1, [x21]
	ldr	w8, [x20]
	str	x8, [sp]
Lloh22:
	adrp	x0, l_.str.6@PAGE
Lloh23:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_deb_rc
	ldr	w8, [x21]
Lloh24:
	adrp	x9, _REMOTE_KEY_REPEAT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _REMOTE_KEY_REPEAT@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.14:
	mov	w22, #0
	ldr	w8, [x19, #4]
	str	w8, [x20]
	b	LBB0_9
LBB0_15:
	mov	w22, #0
	b	LBB0_9
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.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
