	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a800_rc_query
_a800_rc_query:                         ## @a800_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, %r14
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %ebx
	xorl	%r12d, %r12d
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rdx
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	subq	$8, %rsp
	leaq	-96(%rbp), %r10
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$4, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$2000                           ## imm = 0x7D0
	pushq	$5
	pushq	%r10
	callq	_usb_control_msg
	addq	$32, %rsp
	cmpl	$5, %eax
	jne	LBB0_1
## %bb.2:
	leaq	-96(%rbp), %rsi
	movq	%r13, %rdi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_dvb_usb_nec_rc_key_to_event
	movq	-96(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.3:
	movq	-88(%rbp), %rdx
	movq	-80(%rbp), %rcx
	movq	-72(%rbp), %r8
	movq	-64(%rbp), %r9
	leaq	L_.str(%rip), %rdi
	callq	_deb_rc
	jmp	LBB0_4
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"key: %x %x %x %x %x\n"

	.no_dead_strip	_a800_rc_query
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a800_rc_query
_a800_rc_query:                         ; @a800_rc_query
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	w22, [x0]
	mov	x0, x22
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
Lloh3:
	adrp	x8, _USB_TYPE_VENDOR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _USB_DIR_IN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _USB_DIR_IN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	w8, #2000
	str	w8, [sp]
	add	x6, sp, #16
	mov	x0, x22
	mov	w2, #4
	mov	w4, #0
	mov	w5, #0
	mov	w7, #5
	bl	_usb_control_msg
	cmp	w0, #5
	b.ne	LBB0_4
; %bb.1:
	add	x1, sp, #16
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_dvb_usb_nec_rc_key_to_event
	ldr	x1, [sp, #16]
	cbz	x1, LBB0_3
; %bb.2:
	ldp	x2, x3, [sp, #24]
	ldp	x4, x5, [sp, #40]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_rc
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"key: %x %x %x %x %x\n"

	.no_dead_strip	_a800_rc_query
.subsections_via_symbols
