	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	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, %r14
	movl	4(%r15), %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
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$4, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$2000                           ## imm = 0x7D0
	pushq	$5
	pushq	%r14
	callq	_usb_control_msg
	addq	$32, %rsp
	cmpl	$5, %eax
	jne	LBB0_3
## %bb.4:
	movl	(%r14), %eax
	cmpl	$2, %eax
	je	LBB0_7
## %bb.5:
	cmpl	$1, %eax
	jne	LBB0_8
## %bb.6:
	movl	(%r15), %r15d
	movq	_RC_PROTO_NEC@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	4(%r14), %edi
	movl	12(%r14), %esi
	callq	_RC_SCANCODE_NEC
	xorl	%r12d, %r12d
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_rc_keydown
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_9
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_7:
	movl	(%r15), %edi
	callq	_rc_repeat
LBB0_8:
	movq	%r14, %rdi
	callq	_kfree
LBB0_9:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_RC_PROTO_NEC,4,2               ## @RC_PROTO_NEC
	.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, #64
	.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
	mov	x20, 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_5
; %bb.1:
	mov	x19, x0
	ldr	w21, [x20, #4]
	mov	x0, x21
	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]
	mov	x0, x21
	mov	w2, #4
	mov	w4, #0
	mov	w5, #0
	mov	x6, x19
	mov	w7, #5
	bl	_usb_control_msg
	cmp	w0, #5
	b.ne	LBB0_6
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #2
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.4:
	ldr	w20, [x20]
Lloh9:
	adrp	x8, _RC_PROTO_NEC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RC_PROTO_NEC@GOTPAGEOFF]
Lloh11:
	ldr	w21, [x8]
	ldr	w0, [x19, #4]
	ldr	w1, [x19, #12]
	bl	_RC_SCANCODE_NEC
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	mov	w3, #0
	bl	_rc_keydown
	b	LBB0_8
LBB0_5:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_6:
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_7:
	ldr	w0, [x20]
	bl	_rc_repeat
LBB0_8:
	mov	w20, #0
LBB0_9:
	mov	x0, x19
	bl	_kfree
LBB0_10:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_RC_PROTO_NEC,4,2               ; @RC_PROTO_NEC
	.no_dead_strip	_a800_rc_query
.subsections_via_symbols
