	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gc_nes_process_packet
_gc_nes_process_packet:                 ## @gc_nes_process_packet
	.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	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_GC_SNESMOUSE_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	8(%r14), %rax
	cmpq	$0, 1024(%rax)
	jne	LBB0_5
## %bb.1:
	cmpq	$0, 1032(%rax)
	jne	LBB0_2
## %bb.3:
	movq	_GC_NES_LENGTH@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_GC_SNES_LENGTH@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %ebx
LBB0_5:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_gc_nes_read_packet
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	_GC_MAX_DEVICES@GOTPCREL(%rip), %rsi
	cmpl	$0, (%rsi)
	jle	LBB0_23
## %bb.6:
	movl	$8, %ebx
	xorl	%r12d, %r12d
	movq	_gc_status_bit@GOTPCREL(%rip), %rdi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movzbl	12(%r15), %eax
	testl	%eax, %r14d
	je	LBB0_14
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	movslq	(%rsi), %rax
	addq	$16, %rbx
	cmpq	%rax, %r12
	jge	LBB0_23
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rax
	movq	(%rax,%rbx), %r13
	movq	(%rdi), %rcx
	movl	(%rcx,%r12,4), %r14d
	movl	-8(%rax,%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$129, %eax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$130, %eax
	jne	LBB0_22
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	6(%r15), %eax
	xorl	%edx, %edx
	testl	%eax, %r14d
	sete	%dl
	movzbl	7(%r15), %eax
	andl	%r14d, %eax
	cmpl	$1, %eax
	sbbl	$0, %edx
	movq	%r13, %rdi
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	4(%r15), %eax
	xorl	%edx, %edx
	testl	%eax, %r14d
	sete	%dl
	movzbl	5(%r15), %eax
	andl	%r14d, %eax
	cmpl	$1, %eax
	sbbl	$0, %edx
	movq	%r13, %rdi
	callq	_input_report_abs
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	_gc_nes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movzbl	(%r15,%rax), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	4(%rax), %esi
	movq	_gc_nes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movzbl	(%r15,%rax), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%rax), %esi
	movq	_gc_nes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	movzbl	(%r15,%rax), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	12(%rax), %esi
	movq	_gc_nes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rax), %rax
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	6(%r15), %eax
	xorl	%edx, %edx
	testl	%eax, %r14d
	sete	%dl
	movzbl	7(%r15), %eax
	andl	%r14d, %eax
	cmpl	$1, %eax
	sbbl	$0, %edx
	movq	%r13, %rdi
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	4(%r15), %eax
	xorl	%edx, %edx
	testl	%eax, %r14d
	sete	%dl
	movzbl	5(%r15), %eax
	andl	%r14d, %eax
	cmpl	$1, %eax
	sbbl	$0, %edx
	movq	%r13, %rdi
	callq	_input_report_abs
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movzbl	(%r15,%rax), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	4(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movzbl	(%r15,%rax), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	movzbl	(%r15,%rax), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	12(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rax), %rax
	movzbl	(%r15,%rax), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	16(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	32(%rax), %rax
	movzbl	(%r15,%rax), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	20(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	40(%rax), %rax
	movzbl	(%r15,%rax), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	24(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	48(%rax), %rax
	movzbl	(%r15,%rax), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	28(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	56(%rax), %rax
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movzbl	(%r15,%rax), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
LBB0_21:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	callq	_input_sync
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	_GC_MAX_DEVICES@GOTPCREL(%rip), %rsi
	movq	_gc_status_bit@GOTPCREL(%rip), %rdi
	jmp	LBB0_22
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movzbl	13(%r15), %eax
	testl	%eax, %r14d
	jne	LBB0_22
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movzbl	14(%r15), %eax
	testl	%eax, %r14d
	jne	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movzbl	15(%r15), %eax
	testl	%eax, %r14d
	je	LBB0_22
## %bb.17:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	9(%r15), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	8(%r15), %edx
	andl	%r14d, %edx
	movq	%r13, %rdi
	callq	_input_report_key
	movzbl	25(%r15), %eax
	testl	%eax, %r14d
	setne	%al
	movzbl	17(%r15), %ecx
	testl	%ecx, %r14d
	setne	%cl
	addb	%al, %al
	movzbl	26(%r15), %edx
	testl	%edx, %r14d
	setne	%dl
	orb	%al, %dl
	addb	%cl, %cl
	movzbl	18(%r15), %eax
	testl	%eax, %r14d
	setne	%dil
	orb	%cl, %dil
	movzbl	27(%r15), %ecx
	testl	%ecx, %r14d
	setne	%cl
	movzbl	19(%r15), %esi
	testl	%esi, %r14d
	setne	%al
	shlb	$2, %dl
	addb	%cl, %cl
	orb	%dl, %cl
	movzbl	28(%r15), %edx
	testl	%edx, %r14d
	setne	%dl
	orb	%cl, %dl
	shlb	$2, %dil
	addb	%al, %al
	orb	%dil, %al
	movzbl	20(%r15), %ecx
	testl	%ecx, %r14d
	setne	%dil
	orb	%al, %dil
	movzbl	29(%r15), %eax
	testl	%eax, %r14d
	setne	%al
	movzbl	21(%r15), %esi
	testl	%esi, %r14d
	setne	%cl
	shlb	$2, %dl
	addb	%al, %al
	orb	%dl, %al
	movzbl	30(%r15), %edx
	testl	%edx, %r14d
	setne	%sil
	orb	%al, %sil
	shlb	$2, %dil
	addb	%cl, %cl
	orb	%dil, %cl
	movzbl	22(%r15), %eax
	testl	%eax, %r14d
	setne	%dl
	orb	%cl, %dl
	addb	%sil, %sil
	movzbl	31(%r15), %eax
	testl	%eax, %r14d
	setne	%dil
	addb	%dl, %dl
	movzbl	23(%r15), %ecx
	testl	%ecx, %r14d
	setne	%al
	orb	%dl, %al
	orb	%sil, %dil
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	movzbl	24(%r15), %ecx
	movzbl	%dil, %edx
	negb	%dil
	testl	%ecx, %r14d
	movzbl	%dil, %edi
	cmovel	%edx, %edi
	movq	_REL_X@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movsbl	%dil, %edx
	movb	%al, -49(%rbp)                  ## 1-byte Spill
	movq	%r13, %rdi
	callq	_input_report_rel
	movzbl	-49(%rbp), %eax                 ## 1-byte Folded Reload
LBB0_19:                                ##   in Loop: Header=BB0_7 Depth=1
	testb	%al, %al
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_7 Depth=1
	movzbl	16(%r15), %edx
	movzbl	%al, %ecx
	negb	%al
	testl	%edx, %r14d
	movzbl	%al, %eax
	cmovel	%ecx, %eax
	movq	_REL_Y@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movsbl	%al, %edx
	movq	%r13, %rdi
	callq	_input_report_rel
	jmp	LBB0_21
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GC_SNESMOUSE_LENGTH,4,2        ## @GC_SNESMOUSE_LENGTH
	.comm	_GC_SNES_LENGTH,4,2             ## @GC_SNES_LENGTH
	.comm	_GC_NES_LENGTH,4,2              ## @GC_NES_LENGTH
	.comm	_GC_MAX_DEVICES,4,2             ## @GC_MAX_DEVICES
	.comm	_gc_status_bit,8,3              ## @gc_status_bit
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_gc_snes_btn,8,3                ## @gc_snes_btn
	.comm	_gc_nes_bytes,8,3               ## @gc_nes_bytes
	.comm	_gc_snes_bytes,8,3              ## @gc_snes_bytes
	.comm	_BTN_LEFT,4,2                   ## @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ## @BTN_RIGHT
	.comm	_REL_X,4,2                      ## @REL_X
	.comm	_REL_Y,4,2                      ## @REL_Y
	.no_dead_strip	_gc_nes_process_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gc_nes_process_packet
_gc_nes_process_packet:                 ; @gc_nes_process_packet
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #48
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _GC_SNESMOUSE_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GC_SNESMOUSE_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x9, x1
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
	ldr	x8, [x0, #8]
	ldr	x9, [x8, #1024]
	cbnz	x9, LBB0_2
; %bb.1:
Lloh8:
	adrp	x9, _GC_SNES_LENGTH@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GC_SNES_LENGTH@GOTPAGEOFF]
	ldr	x8, [x8, #1032]
Lloh10:
	adrp	x10, _GC_NES_LENGTH@GOTPAGE
Lloh11:
	ldr	x10, [x10, _GC_NES_LENGTH@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w1, [x8]
LBB0_2:
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x20
	bl	_gc_nes_read_packet
Lloh12:
	adrp	x22, _GC_MAX_DEVICES@GOTPAGE
Lloh13:
	ldr	x22, [x22, _GC_MAX_DEVICES@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.3:
	mov	x23, #0
	mov	x24, #0
Lloh14:
	adrp	x10, _gc_status_bit@GOTPAGE
Lloh15:
	ldr	x10, [x10, _gc_status_bit@GOTPAGEOFF]
Lloh16:
	adrp	x27, _gc_snes_btn@GOTPAGE
Lloh17:
	ldr	x27, [x27, _gc_snes_btn@GOTPAGEOFF]
Lloh18:
	adrp	x28, _gc_snes_bytes@GOTPAGE
Lloh19:
	ldr	x28, [x28, _gc_snes_bytes@GOTPAGEOFF]
Lloh20:
	adrp	x26, _gc_nes_bytes@GOTPAGE
Lloh21:
	ldr	x26, [x26, _gc_nes_bytes@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, #12]
	tst	w25, w8
	b.eq	LBB0_13
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x22]
	add	x23, x23, #16
	cmp	x24, x8
	b.ge	LBB0_20
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x8, x8, x23
	ldr	x21, [x8, #8]
	ldr	x9, [x10]
	ldr	w25, [x9, x24, lsl #2]
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w8, #130
	b.ne	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh22:
	adrp	x8, _ABS_X@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldrb	w8, [x20, #6]
	tst	w25, w8
	cset	w8, eq
	ldrb	w9, [x20, #7]
	tst	w25, w9
	cset	w9, eq
	sub	w2, w8, w9
	mov	x0, x21
	bl	_input_report_abs
Lloh25:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	ldrb	w8, [x20, #4]
	tst	w25, w8
	cset	w8, eq
	ldrb	w9, [x20, #5]
	tst	w25, w9
	cset	w9, eq
	sub	w2, w8, w9
	mov	x0, x21
	bl	_input_report_abs
	ldr	x8, [x27]
	ldr	w1, [x8]
	ldr	x8, [x26]
	ldr	x8, [x8]
	ldrb	w8, [x20, x8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x27]
	ldr	w1, [x8, #4]
	ldr	x8, [x26]
	ldr	x8, [x8, #8]
	ldrb	w8, [x20, x8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x27]
	ldr	w1, [x8, #8]
	ldr	x8, [x26]
	ldr	x8, [x8, #16]
	ldrb	w8, [x20, x8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x27]
	ldr	w1, [x8, #12]
	ldr	x8, [x26]
	ldr	x8, [x8, #24]
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh28:
	adrp	x8, _ABS_X@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldrb	w8, [x20, #6]
	tst	w25, w8
	cset	w8, eq
	ldrb	w9, [x20, #7]
	tst	w25, w9
	cset	w9, eq
	sub	w2, w8, w9
	mov	x0, x21
	bl	_input_report_abs
Lloh31:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	ldrb	w8, [x20, #4]
	tst	w25, w8
	cset	w8, eq
	ldrb	w9, [x20, #5]
	tst	w25, w9
	cset	w9, eq
	sub	w2, w8, w9
	mov	x0, x21
	bl	_input_report_abs
	ldr	x8, [x27]
	ldr	w1, [x8]
	ldr	x8, [x28]
	ldr	x8, [x8]
	ldrb	w8, [x20, x8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x27]
	ldr	w1, [x8, #4]
	ldr	x8, [x28]
	ldr	x8, [x8, #8]
	ldrb	w8, [x20, x8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x27]
	ldr	w1, [x8, #8]
	ldr	x8, [x28]
	ldr	x8, [x8, #16]
	ldrb	w8, [x20, x8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x27]
	ldr	w1, [x8, #12]
	ldr	x8, [x28]
	ldr	x8, [x8, #24]
	ldrb	w8, [x20, x8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x27]
	ldr	w1, [x8, #16]
	ldr	x8, [x28]
	ldr	x8, [x8, #32]
	ldrb	w8, [x20, x8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x27]
	ldr	w1, [x8, #20]
	ldr	x8, [x28]
	ldr	x8, [x8, #40]
	ldrb	w8, [x20, x8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x27]
	ldr	w1, [x8, #24]
	ldr	x8, [x28]
	ldr	x8, [x8, #48]
	ldrb	w8, [x20, x8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x27]
	ldr	w1, [x8, #28]
	ldr	x8, [x28]
	ldr	x8, [x8, #56]
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, x8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_input_sync
Lloh34:
	adrp	x10, _gc_status_bit@GOTPAGE
Lloh35:
	ldr	x10, [x10, _gc_status_bit@GOTPAGEOFF]
	b	LBB0_5
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, #13]
	tst	w25, w8
	b.ne	LBB0_5
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, #14]
	tst	w25, w8
	b.ne	LBB0_5
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, #15]
	tst	w25, w8
	b.eq	LBB0_5
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh36:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh37:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	ldrb	w8, [x20, #9]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
Lloh39:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh40:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	ldrb	w8, [x20, #8]
	and	w2, w25, w8
	mov	x0, x21
	bl	_input_report_key
	ldrb	w8, [x20, #25]
	tst	w25, w8
	cset	w8, ne
	ldrb	w9, [x20, #17]
	tst	w25, w9
	cset	w11, ne
	ldrb	w9, [x20, #26]
	tst	w25, w9
	cset	w9, ne
	bfi	w9, w8, #1, #1
	ldrb	w8, [x20, #18]
	tst	w25, w8
	cset	w12, ne
	ldrb	w8, [x20, #27]
	tst	w25, w8
	cset	w8, ne
	ldrb	w10, [x20, #19]
	tst	w25, w10
	cset	w13, ne
	lsl	w8, w8, #1
	bfi	w8, w9, #2, #2
	ldrb	w9, [x20, #28]
	tst	w25, w9
	cset	w9, ne
	orr	w8, w8, w9
	ldrb	w9, [x20, #20]
	tst	w25, w9
	cset	w14, ne
	ldrb	w9, [x20, #29]
	tst	w25, w9
	cset	w9, ne
	ldrb	w10, [x20, #21]
	tst	w25, w10
	cset	w10, ne
	lsl	w9, w9, #1
	bfi	w9, w8, #2, #30
	ldrb	w8, [x20, #30]
	tst	w25, w8
	cset	w8, ne
	orr	w9, w9, w8
	ldrb	w8, [x20, #22]
	tst	w25, w8
	cset	w15, ne
	ldrb	w8, [x20, #31]
	tst	w25, w8
	cset	w8, ne
	bfi	w8, w9, #1, #31
	ldrb	w9, [x20, #23]
	tst	w25, w9
	cset	w16, ne
	and	w9, w8, #0xff
	cbz	w9, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w9, [x20, #24]
	tst	w25, w9
	cneg	w8, w8, ne
Lloh42:
	adrp	x9, _REL_X@GOTPAGE
Lloh43:
	ldr	x9, [x9, _REL_X@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x9]
	sxtb	w2, w8
	mov	x0, x21
	stp	w12, w11, [x29, #-96]           ; 8-byte Folded Spill
	stp	w14, w13, [x29, #-104]          ; 8-byte Folded Spill
	stp	w15, w10, [x29, #-112]          ; 8-byte Folded Spill
	stur	w16, [x29, #-116]               ; 4-byte Folded Spill
	bl	_input_report_rel
	ldp	w16, w15, [x29, #-116]          ; 8-byte Folded Reload
	ldp	w10, w14, [x29, #-108]          ; 8-byte Folded Reload
	ldp	w13, w12, [x29, #-100]          ; 8-byte Folded Reload
	ldur	w11, [x29, #-92]                ; 4-byte Folded Reload
LBB0_18:                                ;   in Loop: Header=BB0_6 Depth=1
	bfi	w12, w11, #1, #1
	lsl	w8, w13, #1
	bfi	w8, w12, #2, #2
	orr	w8, w8, w14
	lsl	w9, w10, #1
	bfi	w9, w8, #2, #30
	orr	w8, w9, w15
	bfi	w16, w8, #1, #31
	tst	w16, #0xff
	b.eq	LBB0_12
; %bb.19:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, #16]
	tst	w25, w8
	cneg	w8, w16, ne
Lloh45:
	adrp	x9, _REL_Y@GOTPAGE
Lloh46:
	ldr	x9, [x9, _REL_Y@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x9]
	sxtb	w2, w8
	mov	x0, x21
	bl	_input_report_rel
	b	LBB0_12
LBB0_20:
	ldur	x8, [x29, #-88]
Lloh48:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh49:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh50:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_GC_SNESMOUSE_LENGTH,4,2        ; @GC_SNESMOUSE_LENGTH
	.comm	_GC_SNES_LENGTH,4,2             ; @GC_SNES_LENGTH
	.comm	_GC_NES_LENGTH,4,2              ; @GC_NES_LENGTH
	.comm	_GC_MAX_DEVICES,4,2             ; @GC_MAX_DEVICES
	.comm	_gc_status_bit,8,3              ; @gc_status_bit
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_gc_snes_btn,8,3                ; @gc_snes_btn
	.comm	_gc_nes_bytes,8,3               ; @gc_nes_bytes
	.comm	_gc_snes_bytes,8,3              ; @gc_snes_bytes
	.comm	_BTN_LEFT,4,2                   ; @BTN_LEFT
	.comm	_BTN_RIGHT,4,2                  ; @BTN_RIGHT
	.comm	_REL_X,4,2                      ; @REL_X
	.comm	_REL_Y,4,2                      ; @REL_Y
	.no_dead_strip	_gc_nes_process_packet
.subsections_via_symbols
