	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gf2k_read
_gf2k_read:                             ## @gf2k_read
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	8(%rdi), %r15
	movq	_gf2k_axes@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	cmpl	$0, (%rcx,%rax,4)
	jle	LBB0_7
## %bb.1:
	movq	_gf2k_abs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	xorl	%edi, %edi
	movl	$8, %esi
	xorl	%edx, %edx
	callq	_GB
	movl	%eax, %ebx
	movl	$46, %edi
	movl	$1, %esi
	movl	$8, %edx
	callq	_GB
	orl	%eax, %ebx
	movl	$50, %edi
	movl	$1, %esi
	movl	$9, %edx
	callq	_GB
	orl	%eax, %ebx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_input_report_abs
	movq	(%r13), %rax
	movq	(%r14), %rcx
	cmpl	$2, (%rax,%rcx,4)
	jl	LBB0_7
## %bb.2:
	movq	_gf2k_abs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %r12
	movl	$8, %edi
	movl	$8, %esi
	xorl	%edx, %edx
	callq	_GB
	movl	%eax, %ebx
	movl	$47, %edi
	movl	$1, %esi
	movl	$8, %edx
	callq	_GB
	orl	%eax, %ebx
	movl	$51, %edi
	movl	$1, %esi
	movl	$9, %edx
	callq	_GB
	orl	%eax, %ebx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_input_report_abs
	movq	(%r13), %rax
	movq	(%r14), %rcx
	cmpl	$3, (%rax,%rcx,4)
	jl	LBB0_7
## %bb.3:
	movq	_gf2k_abs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%rax), %r12
	movl	$16, %edi
	movl	$8, %esi
	xorl	%edx, %edx
	callq	_GB
	movl	%eax, %ebx
	movl	$48, %edi
	movl	$1, %esi
	movl	$8, %edx
	callq	_GB
	orl	%eax, %ebx
	movl	$52, %edi
	movl	$1, %esi
	movl	$9, %edx
	callq	_GB
	orl	%eax, %ebx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_input_report_abs
	movq	(%r13), %rax
	movq	(%r14), %rcx
	cmpl	$4, (%rax,%rcx,4)
	jl	LBB0_7
## %bb.4:
	movq	_gf2k_abs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rax), %r12
	movl	$24, %edi
	movl	$8, %esi
	xorl	%edx, %edx
	callq	_GB
	movl	%eax, %ebx
	movl	$49, %edi
	movl	$1, %esi
	movl	$8, %edx
	callq	_GB
	orl	%eax, %ebx
	movl	$53, %edi
	movl	$1, %esi
	movl	$9, %edx
	callq	_GB
	orl	%eax, %ebx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_input_report_abs
	movq	(%r13), %rax
	movq	(%r14), %rcx
	cmpl	$5, (%rax,%rcx,4)
	jl	LBB0_7
## %bb.5:
	movq	_gf2k_abs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movl	$60, %edi
	movl	$8, %esi
	xorl	%edx, %edx
	callq	_GB
	movl	%eax, %ebx
	movl	$54, %edi
	movl	$1, %esi
	movl	$9, %edx
	callq	_GB
	orl	%eax, %ebx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_input_report_abs
	movq	(%r13), %rax
	movq	(%r14), %rcx
	cmpl	$6, (%rax,%rcx,4)
	jl	LBB0_7
## %bb.6:
	movq	_gf2k_abs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %r12
	movl	$69, %edi
	movl	$8, %esi
	xorl	%edx, %edx
	callq	_GB
	movl	%eax, %ebx
	movl	$55, %edi
	movl	$1, %esi
	movl	$9, %edx
	callq	_GB
	orl	%eax, %ebx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_input_report_abs
LBB0_7:
	movl	$40, %edi
	movl	$4, %esi
	xorl	%edx, %edx
	callq	_GB
	movq	_gf2k_hats@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movq	(%r14), %rdx
	cmpl	$0, (%rcx,%rdx,4)
	movq	%r15, %r12
	movq	%r14, %r15
	jle	LBB0_10
## %bb.8:
	movslq	%eax, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	_ABS_HAT0X@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movq	_gf2k_hat_to_axis@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r12, %rdi
	callq	_input_report_abs
	incq	%rbx
	movq	(%r13), %rax
	movq	(%r15), %rcx
	movslq	(%rax,%rcx,4), %rax
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_10:
	movl	$44, %edi
	movl	$2, %esi
	xorl	%edx, %edx
	callq	_GB
	movl	%eax, %r14d
	movl	$32, %edi
	movl	$8, %esi
	movl	$2, %edx
	callq	_GB
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movl	$78, %edi
	movl	$2, %esi
	movl	$10, %edx
	callq	_GB
	movl	%eax, %r13d
	orl	%ebx, %r13d
	movq	_gf2k_joys@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movq	(%r15), %rax
	cmpl	$0, (%rcx,%rax,4)
	jle	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	_gf2k_btn_joy@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	xorl	%edx, %edx
	btl	%ebx, %r13d
	setb	%dl
	movq	%r12, %rdi
	callq	_input_report_key
	incq	%rbx
	movq	(%r14), %rcx
	movq	(%r15), %rax
	movslq	(%rcx,%rax,4), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_12
LBB0_13:
	movq	_gf2k_pads@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	cmpl	$0, (%rcx,%rax,4)
	jle	LBB0_16
## %bb.14:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	_gf2k_btn_pad@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %esi
	xorl	%edx, %edx
	btl	%ebx, %r13d
	setb	%dl
	movq	%r12, %rdi
	callq	_input_report_key
	incq	%rbx
	movq	(%r14), %rax
	movq	(%r15), %rcx
	movslq	(%rax,%rcx,4), %rax
	cmpq	%rax, %rbx
	jl	LBB0_15
LBB0_16:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_gf2k_axes,8,3                  ## @gf2k_axes
	.comm	_gf2k_abs,8,3                   ## @gf2k_abs
	.comm	_gf2k_hats,8,3                  ## @gf2k_hats
	.comm	_ABS_HAT0X,8,3                  ## @ABS_HAT0X
	.comm	_gf2k_hat_to_axis,8,3           ## @gf2k_hat_to_axis
	.comm	_gf2k_joys,8,3                  ## @gf2k_joys
	.comm	_gf2k_btn_joy,8,3               ## @gf2k_btn_joy
	.comm	_gf2k_pads,8,3                  ## @gf2k_pads
	.comm	_gf2k_btn_pad,8,3               ## @gf2k_btn_pad
	.no_dead_strip	_gf2k_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gf2k_read
_gf2k_read:                             ; @gf2k_read
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x23, _gf2k_axes@GOTPAGE
Lloh1:
	ldr	x23, [x23, _gf2k_axes@GOTPAGEOFF]
	ldr	x8, [x23]
	ldp	x9, x20, [x0]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
Lloh2:
	adrp	x24, _gf2k_abs@GOTPAGE
Lloh3:
	ldr	x24, [x24, _gf2k_abs@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x21, [x8]
	mov	w0, #0
	mov	w1, #8
	mov	w2, #0
	bl	_GB
	mov	x22, x0
	mov	w0, #46
	mov	w1, #1
	mov	w2, #8
	bl	_GB
	orr	w22, w0, w22
	mov	w0, #50
	mov	w1, #1
	mov	w2, #9
	bl	_GB
	orr	w2, w22, w0
	mov	x0, x20
	mov	x1, x21
	bl	_input_report_abs
	ldr	x8, [x23]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #1
	b.le	LBB0_7
; %bb.2:
	ldr	x8, [x24]
	ldr	x21, [x8, #8]
	mov	w0, #8
	mov	w1, #8
	mov	w2, #0
	bl	_GB
	mov	x22, x0
	mov	w0, #47
	mov	w1, #1
	mov	w2, #8
	bl	_GB
	orr	w22, w0, w22
	mov	w0, #51
	mov	w1, #1
	mov	w2, #9
	bl	_GB
	orr	w2, w22, w0
	mov	x0, x20
	mov	x1, x21
	bl	_input_report_abs
	ldr	x8, [x23]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #3
	b.lt	LBB0_7
; %bb.3:
	ldr	x8, [x24]
	ldr	x21, [x8, #16]
	mov	w0, #16
	mov	w1, #8
	mov	w2, #0
	bl	_GB
	mov	x22, x0
	mov	w0, #48
	mov	w1, #1
	mov	w2, #8
	bl	_GB
	orr	w22, w0, w22
	mov	w0, #52
	mov	w1, #1
	mov	w2, #9
	bl	_GB
	orr	w2, w22, w0
	mov	x0, x20
	mov	x1, x21
	bl	_input_report_abs
	ldr	x8, [x23]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #4
	b.lt	LBB0_7
; %bb.4:
	ldr	x8, [x24]
	ldr	x21, [x8, #24]
	mov	w0, #24
	mov	w1, #8
	mov	w2, #0
	bl	_GB
	mov	x22, x0
	mov	w0, #49
	mov	w1, #1
	mov	w2, #8
	bl	_GB
	orr	w22, w0, w22
	mov	w0, #53
	mov	w1, #1
	mov	w2, #9
	bl	_GB
	orr	w2, w22, w0
	mov	x0, x20
	mov	x1, x21
	bl	_input_report_abs
	ldr	x8, [x23]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #5
	b.lt	LBB0_7
; %bb.5:
	ldr	x8, [x24]
	ldr	x21, [x8]
	mov	w0, #60
	mov	w1, #8
	mov	w2, #0
	bl	_GB
	mov	x22, x0
	mov	w0, #54
	mov	w1, #1
	mov	w2, #9
	bl	_GB
	orr	w2, w0, w22
	mov	x0, x20
	mov	x1, x21
	bl	_input_report_abs
	ldr	x8, [x23]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #6
	b.lt	LBB0_7
; %bb.6:
	ldr	x8, [x24]
	ldr	x21, [x8, #8]
	mov	w0, #69
	mov	w1, #8
	mov	w2, #0
	bl	_GB
	mov	x22, x0
	mov	w0, #55
	mov	w1, #1
	mov	w2, #9
	bl	_GB
	orr	w2, w0, w22
	mov	x0, x20
	mov	x1, x21
	bl	_input_report_abs
LBB0_7:
	mov	w0, #40
	mov	w1, #4
	mov	w2, #0
	bl	_GB
                                        ; kill: def $w0 killed $w0 def $x0
Lloh4:
	adrp	x21, _gf2k_hats@GOTPAGE
Lloh5:
	ldr	x21, [x21, _gf2k_hats@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x22, #0
	sxtw	x23, w0
Lloh6:
	adrp	x24, _ABS_HAT0X@GOTPAGE
Lloh7:
	ldr	x24, [x24, _ABS_HAT0X@GOTPAGEOFF]
Lloh8:
	adrp	x25, _gf2k_hat_to_axis@GOTPAGE
Lloh9:
	ldr	x25, [x25, _gf2k_hat_to_axis@GOTPAGEOFF]
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	add	x1, x22, x8
	ldr	x8, [x25]
	ldr	x8, [x8, x23, lsl #3]
	ldr	w2, [x8, x22, lsl #2]
	mov	x0, x20
	bl	_input_report_abs
	add	x22, x22, #1
	ldr	x8, [x21]
	ldr	x9, [x19]
	ldrsw	x8, [x8, x9, lsl #2]
	cmp	x22, x8
	b.lt	LBB0_9
LBB0_10:
	mov	w0, #44
	mov	w1, #2
	mov	w2, #0
	bl	_GB
	mov	x21, x0
	mov	w0, #32
	mov	w1, #8
	mov	w2, #2
	bl	_GB
	orr	w21, w0, w21
	mov	w0, #78
	mov	w1, #2
	mov	w2, #10
	bl	_GB
Lloh10:
	adrp	x22, _gf2k_joys@GOTPAGE
Lloh11:
	ldr	x22, [x22, _gf2k_joys@GOTPAGEOFF]
	orr	w21, w21, w0
	ldr	x9, [x22]
	ldr	x8, [x19]
	ldr	w9, [x9, x8, lsl #2]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x23, #0
Lloh12:
	adrp	x24, _gf2k_btn_joy@GOTPAGE
Lloh13:
	ldr	x24, [x24, _gf2k_btn_joy@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	w1, [x8, x23, lsl #2]
	lsr	w8, w21, w23
	and	w2, w8, #0x1
	mov	x0, x20
	bl	_input_report_key
	add	x23, x23, #1
	ldr	x9, [x22]
	ldr	x8, [x19]
	ldrsw	x9, [x9, x8, lsl #2]
	cmp	x23, x9
	b.lt	LBB0_12
LBB0_13:
Lloh14:
	adrp	x22, _gf2k_pads@GOTPAGE
Lloh15:
	ldr	x22, [x22, _gf2k_pads@GOTPAGEOFF]
	ldr	x9, [x22]
	ldr	w8, [x9, x8, lsl #2]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.14:
	mov	x23, #0
Lloh16:
	adrp	x24, _gf2k_btn_pad@GOTPAGE
Lloh17:
	ldr	x24, [x24, _gf2k_btn_pad@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	w1, [x8, x23, lsl #2]
	lsr	w8, w21, w23
	and	w2, w8, #0x1
	mov	x0, x20
	bl	_input_report_key
	add	x23, x23, #1
	ldr	x8, [x22]
	ldr	x9, [x19]
	ldrsw	x8, [x8, x9, lsl #2]
	cmp	x23, x8
	b.lt	LBB0_15
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_input_sync
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_gf2k_axes,8,3                  ; @gf2k_axes
	.comm	_gf2k_abs,8,3                   ; @gf2k_abs
	.comm	_gf2k_hats,8,3                  ; @gf2k_hats
	.comm	_ABS_HAT0X,8,3                  ; @ABS_HAT0X
	.comm	_gf2k_hat_to_axis,8,3           ; @gf2k_hat_to_axis
	.comm	_gf2k_joys,8,3                  ; @gf2k_joys
	.comm	_gf2k_btn_joy,8,3               ; @gf2k_btn_joy
	.comm	_gf2k_pads,8,3                  ; @gf2k_pads
	.comm	_gf2k_btn_pad,8,3               ; @gf2k_btn_pad
	.no_dead_strip	_gf2k_read
.subsections_via_symbols
