	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nova_t_rc_query
_nova_t_rc_query:                       ## @nova_t_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, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$5, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rsi
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_DIBUSB_REQ_POLL_REMOTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsi)
	movl	$53, 4(%rsi)
	movq	%rbx, %rdi
	movl	$2, %edx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rcx
	movl	$5, %r8d
	xorl	%r9d, %r9d
	callq	_dvb_usb_generic_rw
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	js	LBB0_13
## %bb.3:
	movq	_REMOTE_NO_KEY_PRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$128, (%rax)
	jne	LBB0_13
## %bb.4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	movl	8(%rax), %edx
	movl	%esi, %r12d
	shll	$8, %r12d
	orl	%edx, %r12d
	movl	%r12d, %ebx
	shrl	$3, %ebx
	movl	%r12d, %edi
	shrl	$14, %edi
	andl	$1, %edi
	andl	$63, %ebx
	shrl	$9, %r12d
	andl	$31, %r12d
	movl	12(%rax), %ecx
	movl	%edi, -60(%rbp)                 ## 4-byte Spill
	movl	%edi, (%rsp)
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %r8d
	movl	%ebx, %r9d
	xorl	%eax, %eax
	callq	_deb_rc
	movq	_rc_map_haupp_table@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_13
## %bb.5:
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r13
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %r15
	cmpq	%rax, %r13
	jge	LBB0_13
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	addq	%r15, %rdi
	callq	_rc5_data
	cmpl	%ebx, %eax
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r14), %rdi
	addq	%r15, %rdi
	callq	_rc5_custom
	cmpl	%r12d, %eax
	jne	LBB0_12
## %bb.8:
	movq	(%r14), %rdi
	addq	%r15, %rdi
	callq	_rc5_data
	movl	%eax, %ebx
	movq	(%r14), %rdi
	addq	%r15, %rdi
	callq	_rc5_custom
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_deb_rc
	movq	(%r14), %rax
	movl	(%rax,%r15), %eax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_REMOTE_KEY_PRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, (%rdx)
	jne	LBB0_11
## %bb.9:
	movl	4(%rdx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, 4(%rdx)
	cmpl	$1, %eax
	jg	LBB0_13
## %bb.10:
	movq	_REMOTE_NO_KEY_PRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_11:
	movl	$0, 4(%rdx)
	movl	%eax, (%rdx)
LBB0_13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	movl	-64(%rbp), %eax                 ## 4-byte Reload
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DIBUSB_REQ_POLL_REMOTE,4,2     ## @DIBUSB_REQ_POLL_REMOTE
	.comm	_REMOTE_NO_KEY_PRESSED,4,2      ## @REMOTE_NO_KEY_PRESSED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"raw key code 0x%02x, 0x%02x, 0x%02x to c: %02x d: %02x toggle: %d\n"

	.comm	_rc_map_haupp_table,8,3         ## @rc_map_haupp_table
L_.str.1:                               ## @.str.1
	.asciz	"c: %x, d: %x\n"

	.comm	_REMOTE_KEY_PRESSED,4,2         ## @REMOTE_KEY_PRESSED
	.no_dead_strip	_nova_t_rc_query
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nova_t_rc_query
_nova_t_rc_query:                       ; @nova_t_rc_query
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x24, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #5
	bl	_kmalloc
	cbz	x0, LBB0_11
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _DIBUSB_REQ_POLL_REMOTE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DIBUSB_REQ_POLL_REMOTE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #53
	stp	w8, w9, [x0]
	mov	x0, x21
	mov	x1, x20
	mov	w2, #2
	mov	x3, x20
	mov	w4, #5
	mov	w5, #0
	bl	_dvb_usb_generic_rw
	mov	x21, x0
	tbnz	w0, #31, LBB0_13
; %bb.2:
Lloh6:
	adrp	x8, _REMOTE_NO_KEY_PRESSED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REMOTE_NO_KEY_PRESSED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	w8, [x20]
	cmp	w8, #128
	b.ne	LBB0_13
; %bb.3:
	ldp	w1, w2, [x20, #4]
	orr	w8, w2, w1, lsl #8
	ubfx	w9, w8, #14, #1
	ubfx	w23, w8, #3, #6
	ubfx	w28, w8, #9, #5
	ldr	w8, [x20, #12]
	str	x9, [sp, #40]                   ; 8-byte Folded Spill
	stp	x23, x9, [sp, #16]
	stp	x8, x28, [sp]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_deb_rc
Lloh11:
	adrp	x27, _rc_map_haupp_table@GOTPAGE
Lloh12:
	ldr	x27, [x27, _rc_map_haupp_table@GOTPAGEOFF]
	ldr	x0, [x27]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.4:
	mov	x25, #0
	mov	x26, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x26, x26, #1
	ldr	x0, [x27]
	bl	_ARRAY_SIZE
	add	x25, x25, #4
	cmp	x26, w0, sxtw
	b.ge	LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x27]
	add	x0, x8, x25
	bl	_rc5_data
	cmp	w0, w23
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x27]
	add	x0, x8, x25
	bl	_rc5_custom
	cmp	w0, w28
	b.ne	LBB0_5
; %bb.8:
	ldr	x8, [x27]
	add	x0, x8, x25
	bl	_rc5_data
	mov	x23, x0
	ldr	x8, [x27]
	add	x0, x8, x25
	bl	_rc5_custom
	mov	x2, x0
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
	bl	_deb_rc
	ldr	x8, [x27]
	ldr	w8, [x8, x25]
	str	w8, [x22]
Lloh15:
	adrp	x8, _REMOTE_KEY_PRESSED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _REMOTE_KEY_PRESSED@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	w8, [x24]
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.9:
	ldr	w8, [x24, #4]
	add	w9, w8, #1
	str	w9, [x24, #4]
	cmp	w8, #1
	b.gt	LBB0_13
; %bb.10:
Lloh18:
	adrp	x8, _REMOTE_NO_KEY_PRESSED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _REMOTE_NO_KEY_PRESSED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_13
LBB0_11:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_12:
	mov	x8, x9
	stp	w8, wzr, [x24]
LBB0_13:
	mov	x0, x20
	bl	_kfree
LBB0_14:
	mov	x0, x21
	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
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DIBUSB_REQ_POLL_REMOTE,4,2     ; @DIBUSB_REQ_POLL_REMOTE
	.comm	_REMOTE_NO_KEY_PRESSED,4,2      ; @REMOTE_NO_KEY_PRESSED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"raw key code 0x%02x, 0x%02x, 0x%02x to c: %02x d: %02x toggle: %d\n"

	.comm	_rc_map_haupp_table,8,3         ; @rc_map_haupp_table
l_.str.1:                               ; @.str.1
	.asciz	"c: %x, d: %x\n"

	.comm	_REMOTE_KEY_PRESSED,4,2         ; @REMOTE_KEY_PRESSED
	.no_dead_strip	_nova_t_rc_query
.subsections_via_symbols
