	.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, -56(%rbp)                 ## 8-byte Spill
	movq	(%r14), %rax
	movq	_GC_SNESMOUSE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, (%rax,%rcx,4)
	jne	LBB0_5
## %bb.1:
	movq	_GC_SNES@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$0, (%rax,%rcx,4)
	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	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_gc_nes_read_packet
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	_GC_MAX_DEVICES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_25
## %bb.6:
	xorl	%ebx, %ebx
	movq	_GC_NES@GOTPCREL(%rip), %r14
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	callq	_input_sync
	movq	_GC_MAX_DEVICES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_GC_NES@GOTPCREL(%rip), %r14
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
LBB0_24:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_25
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rdx), %rcx
	movq	(%rcx,%rbx,8), %r12
	testq	%r12, %r12
	je	LBB0_24
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_gc_status_bit@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %r13d
	movq	(%rdx), %rax
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %ecx
	movq	_GC_SNES@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rax,%rdx,4), %edx
	orl	%ecx, %edx
	testl	%r13d, %edx
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %r15
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movzbl	6(%rbx), %eax
	xorl	%edx, %edx
	testl	%eax, %r13d
	sete	%dl
	movzbl	7(%rbx), %eax
	andl	%r13d, %eax
	cmpl	$1, %eax
	sbbl	$0, %edx
	movq	%r12, %rdi
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	4(%rbx), %eax
	xorl	%edx, %edx
	testl	%eax, %r13d
	sete	%dl
	movzbl	5(%rbx), %eax
	movq	%r15, %rbx
	andl	%r13d, %eax
	cmpl	$1, %eax
	sbbl	$0, %edx
	movq	%r12, %rdi
	callq	_input_report_abs
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %ecx
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	testl	%r13d, %ecx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_gc_snes_btn@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	(%rax), %esi
	movq	_gc_nes_bytes@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	4(%rax), %esi
	movq	_gc_nes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	(%r15), %rax
	movl	8(%rax), %esi
	movq	_gc_nes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	(%r15), %rax
	movl	12(%rax), %esi
	movq	_gc_nes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rax), %rax
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_GC_SNES@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testl	%r13d, (%rax,%rcx,4)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_gc_snes_btn@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	_gc_snes_bytes@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rax), %rax
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	4(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rax
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	(%r15), %rax
	movl	8(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rax), %rax
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	(%r15), %rax
	movl	12(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rax), %rax
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	(%r15), %rax
	movl	16(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	32(%rax), %rax
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	(%r15), %rax
	movl	20(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	40(%rax), %rax
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	(%r15), %rax
	movl	24(%rax), %esi
	movq	_gc_snes_bytes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	%rcx, %r15
	movq	48(%rax), %rax
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	_gc_snes_btn@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	28(%rax), %esi
	movq	(%r15), %rax
	movq	56(%rax), %rax
	movzbl	(%r14,%rax), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_GC_SNESMOUSE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testl	%r13d, (%rax,%rcx,4)
	je	LBB0_23
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movzbl	12(%rax), %eax
	testl	%eax, %r13d
	jne	LBB0_23
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movzbl	13(%rax), %eax
	testl	%eax, %r13d
	jne	LBB0_23
## %bb.17:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movzbl	14(%rax), %eax
	testl	%eax, %r13d
	jne	LBB0_23
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movzbl	15(%rax), %eax
	testl	%eax, %r13d
	je	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_BTN_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movzbl	9(%r14), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movq	_BTN_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	8(%r14), %edx
	andl	%r13d, %edx
	movq	%r12, %rdi
	callq	_input_report_key
	movzbl	25(%r14), %eax
	testl	%eax, %r13d
	setne	%al
	movzbl	17(%r14), %ecx
	testl	%ecx, %r13d
	setne	%cl
	addb	%al, %al
	movzbl	26(%r14), %edx
	testl	%edx, %r13d
	setne	%dl
	orb	%al, %dl
	addb	%cl, %cl
	movzbl	18(%r14), %eax
	testl	%eax, %r13d
	setne	%dil
	orb	%cl, %dil
	movzbl	27(%r14), %ecx
	testl	%ecx, %r13d
	setne	%cl
	movzbl	19(%r14), %esi
	testl	%esi, %r13d
	setne	%al
	shlb	$2, %dl
	addb	%cl, %cl
	orb	%dl, %cl
	movzbl	28(%r14), %edx
	testl	%edx, %r13d
	setne	%dl
	orb	%cl, %dl
	shlb	$2, %dil
	addb	%al, %al
	orb	%dil, %al
	movzbl	20(%r14), %ecx
	testl	%ecx, %r13d
	setne	%dil
	orb	%al, %dil
	movzbl	29(%r14), %eax
	testl	%eax, %r13d
	setne	%al
	movzbl	21(%r14), %esi
	testl	%esi, %r13d
	setne	%cl
	shlb	$2, %dl
	addb	%al, %al
	orb	%dl, %al
	movzbl	30(%r14), %edx
	testl	%edx, %r13d
	setne	%sil
	orb	%al, %sil
	shlb	$2, %dil
	addb	%cl, %cl
	orb	%dil, %cl
	movzbl	22(%r14), %eax
	testl	%eax, %r13d
	setne	%dl
	orb	%cl, %dl
	addb	%sil, %sil
	movzbl	31(%r14), %eax
	testl	%eax, %r13d
	setne	%al
	addb	%dl, %dl
	movzbl	23(%r14), %ecx
	testl	%ecx, %r13d
	setne	%r14b
	orb	%dl, %r14b
	orb	%sil, %al
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movzbl	24(%rcx), %ecx
	movzbl	%al, %edx
	negb	%al
	testl	%ecx, %r13d
	movzbl	%al, %eax
	cmovel	%edx, %eax
	movq	_REL_X@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movsbl	%al, %edx
	movq	%r12, %rdi
	callq	_input_report_rel
LBB0_21:                                ##   in Loop: Header=BB0_7 Depth=1
	testb	%r14b, %r14b
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movzbl	16(%rax), %eax
	movzbl	%r14b, %ecx
	negb	%r14b
	testl	%eax, %r13d
	movzbl	%r14b, %eax
	cmovel	%ecx, %eax
	movq	_REL_Y@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movsbl	%al, %edx
	movq	%r12, %rdi
	callq	_input_report_rel
	jmp	LBB0_23
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.26:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GC_SNESMOUSE_LENGTH,4,2        ## @GC_SNESMOUSE_LENGTH
	.comm	_GC_SNESMOUSE,8,3               ## @GC_SNESMOUSE
	.comm	_GC_SNES,8,3                    ## @GC_SNES
	.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	_GC_NES,8,3                     ## @GC_NES
	.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
Lloh8:
	adrp	x9, _GC_SNESMOUSE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GC_SNESMOUSE@GOTPAGEOFF]
	ldr	x8, [x0]
Lloh10:
	ldr	x9, [x9]
	ldr	w9, [x8, x9, lsl #2]
Lloh11:
	adrp	x23, _GC_SNES@GOTPAGE
Lloh12:
	ldr	x23, [x23, _GC_SNES@GOTPAGEOFF]
	cbnz	w9, LBB0_2
; %bb.1:
	ldr	x9, [x23]
	ldr	w8, [x8, x9, lsl #2]
Lloh13:
	adrp	x9, _GC_SNES_LENGTH@GOTPAGE
Lloh14:
	ldr	x9, [x9, _GC_SNES_LENGTH@GOTPAGEOFF]
Lloh15:
	adrp	x10, _GC_NES_LENGTH@GOTPAGE
Lloh16:
	ldr	x10, [x10, _GC_NES_LENGTH@GOTPAGEOFF]
	cmp	w8, #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
Lloh17:
	adrp	x8, _GC_MAX_DEVICES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GC_MAX_DEVICES@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.3:
	mov	x25, #0
Lloh20:
	adrp	x27, _GC_NES@GOTPAGE
Lloh21:
	ldr	x27, [x27, _GC_NES@GOTPAGEOFF]
Lloh22:
	adrp	x28, _gc_snes_btn@GOTPAGE
Lloh23:
	ldr	x28, [x28, _gc_snes_btn@GOTPAGEOFF]
Lloh24:
	adrp	x26, _gc_snes_bytes@GOTPAGE
Lloh25:
	ldr	x26, [x26, _gc_snes_bytes@GOTPAGEOFF]
Lloh26:
	adrp	x22, _gc_nes_bytes@GOTPAGE
Lloh27:
	ldr	x22, [x22, _gc_nes_bytes@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_input_sync
Lloh28:
	adrp	x8, _GC_MAX_DEVICES@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GC_MAX_DEVICES@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x25, x25, #1
	cmp	x25, w8, sxtw
	b.ge	LBB0_22
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	x21, [x9, x25, lsl #3]
	cbz	x21, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh31:
	adrp	x8, _gc_status_bit@GOTPAGE
Lloh32:
	ldr	x8, [x8, _gc_status_bit@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	ldr	w24, [x8, x25, lsl #2]
	ldr	x8, [x19]
	ldr	x9, [x27]
	ldr	w9, [x8, x9, lsl #2]
	ldr	x10, [x23]
	ldr	w10, [x8, x10, lsl #2]
	orr	w10, w10, w9
	tst	w10, w24
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh34:
	adrp	x8, _ABS_X@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	ldrb	w8, [x20, #6]
	tst	w24, w8
	cset	w8, eq
	ldrb	w9, [x20, #7]
	tst	w24, w9
	cset	w9, eq
	sub	w2, w8, w9
	mov	x0, x21
	bl	_input_report_abs
Lloh37:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	ldrb	w8, [x20, #4]
	tst	w24, w8
	cset	w8, eq
	ldrb	w9, [x20, #5]
	tst	w24, w9
	cset	w9, eq
	sub	w2, w8, w9
	mov	x0, x21
	bl	_input_report_abs
	ldr	x8, [x19]
	ldr	x9, [x27]
	ldr	w9, [x8, x9, lsl #2]
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	tst	w9, w24
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x28]
	ldr	w1, [x8]
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x28]
	ldr	w1, [x8, #4]
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x28]
	ldr	w1, [x8, #8]
	ldr	x8, [x22]
	ldr	x8, [x8, #16]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x28]
	ldr	w1, [x8, #12]
	ldr	x8, [x22]
	ldr	x8, [x8, #24]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x19]
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x23]
	ldr	w9, [x8, x9, lsl #2]
	tst	w9, w24
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x28]
	ldr	w1, [x8]
	ldr	x8, [x26]
	ldr	x8, [x8]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x28]
	ldr	w1, [x8, #4]
	ldr	x8, [x26]
	ldr	x8, [x8, #8]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x28]
	ldr	w1, [x8, #8]
	ldr	x8, [x26]
	ldr	x8, [x8, #16]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x28]
	ldr	w1, [x8, #12]
	ldr	x8, [x26]
	ldr	x8, [x8, #24]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x28]
	ldr	w1, [x8, #16]
	ldr	x8, [x26]
	ldr	x8, [x8, #32]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x28]
	ldr	w1, [x8, #20]
	ldr	x8, [x26]
	ldr	x8, [x8, #40]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x28]
	ldr	w1, [x8, #24]
	ldr	x8, [x26]
	ldr	x8, [x8, #48]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x28]
	ldr	w1, [x8, #28]
	ldr	x8, [x26]
	ldr	x8, [x8, #56]
	ldrb	w8, [x20, x8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldr	x8, [x19]
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh40:
	adrp	x9, _GC_SNESMOUSE@GOTPAGE
Lloh41:
	ldr	x9, [x9, _GC_SNESMOUSE@GOTPAGEOFF]
Lloh42:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	tst	w8, w24
	b.eq	LBB0_4
; %bb.14:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, #12]
	tst	w24, w8
	b.ne	LBB0_4
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, #13]
	tst	w24, w8
	b.ne	LBB0_4
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, #14]
	tst	w24, w8
	b.ne	LBB0_4
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, #15]
	tst	w24, w8
	b.eq	LBB0_4
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
Lloh43:
	adrp	x8, _BTN_LEFT@GOTPAGE
Lloh44:
	ldr	x8, [x8, _BTN_LEFT@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	ldrb	w8, [x20, #9]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
Lloh46:
	adrp	x8, _BTN_RIGHT@GOTPAGE
Lloh47:
	ldr	x8, [x8, _BTN_RIGHT@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	ldrb	w8, [x20, #8]
	and	w2, w24, w8
	mov	x0, x21
	bl	_input_report_key
	ldrb	w8, [x20, #25]
	tst	w24, w8
	cset	w8, ne
	ldrb	w9, [x20, #17]
	tst	w24, w9
	cset	w11, ne
	ldrb	w9, [x20, #26]
	tst	w24, w9
	cset	w9, ne
	bfi	w9, w8, #1, #1
	ldrb	w8, [x20, #18]
	tst	w24, w8
	cset	w12, ne
	ldrb	w8, [x20, #27]
	tst	w24, w8
	cset	w8, ne
	ldrb	w10, [x20, #19]
	tst	w24, w10
	cset	w13, ne
	lsl	w8, w8, #1
	bfi	w8, w9, #2, #2
	ldrb	w9, [x20, #28]
	tst	w24, w9
	cset	w9, ne
	orr	w8, w8, w9
	ldrb	w9, [x20, #20]
	tst	w24, w9
	cset	w14, ne
	ldrb	w9, [x20, #29]
	tst	w24, w9
	cset	w9, ne
	ldrb	w10, [x20, #21]
	tst	w24, w10
	cset	w10, ne
	lsl	w9, w9, #1
	bfi	w9, w8, #2, #30
	ldrb	w8, [x20, #30]
	tst	w24, w8
	cset	w8, ne
	orr	w9, w9, w8
	ldrb	w8, [x20, #22]
	tst	w24, w8
	cset	w15, ne
	ldrb	w8, [x20, #31]
	tst	w24, w8
	cset	w8, ne
	bfi	w8, w9, #1, #31
	ldrb	w9, [x20, #23]
	tst	w24, w9
	cset	w16, ne
	and	w9, w8, #0xff
	cbz	w9, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w9, [x20, #24]
	tst	w24, w9
	cneg	w8, w8, ne
Lloh49:
	adrp	x9, _REL_X@GOTPAGE
Lloh50:
	ldr	x9, [x9, _REL_X@GOTPAGEOFF]
Lloh51:
	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_20:                                ;   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_4
; %bb.21:                               ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, #16]
	tst	w24, w8
	cneg	w8, w16, ne
Lloh52:
	adrp	x9, _REL_Y@GOTPAGE
Lloh53:
	ldr	x9, [x9, _REL_Y@GOTPAGEOFF]
Lloh54:
	ldr	w1, [x9]
	sxtb	w2, w8
	mov	x0, x21
	bl	_input_report_rel
	b	LBB0_4
LBB0_22:
	ldur	x8, [x29, #-88]
Lloh55:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh56:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh57:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	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_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_GC_SNESMOUSE_LENGTH,4,2        ; @GC_SNESMOUSE_LENGTH
	.comm	_GC_SNESMOUSE,8,3               ; @GC_SNESMOUSE
	.comm	_GC_SNES,8,3                    ; @GC_SNES
	.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	_GC_NES,8,3                     ; @GC_NES
	.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
