	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiimod_guitar_in_ext
_wiimod_guitar_in_ext:                  ## @wiimod_guitar_in_ext
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rsi), %edi
	movl	16(%rsi), %r8d
	movl	20(%rsi), %ecx
	movq	_WIIPROTO_FLAG_MP_ACTIVE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	xorl	%edx, %edx
	andl	4(%rbx), %eax
	sete	%dl
	movl	%edi, %r14d
	cmovel	%ecx, %r14d
	orl	$62, %edx
	movl	4(%rsi), %r13d
	andl	%edx, %r13d
	andl	%edi, %edx
	notl	%r14d
	andl	$1, %r14d
	xorl	%eax, %eax
	testb	$8, %cl
	sete	%al
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	testb	$16, %cl
	sete	%al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	testb	$32, %cl
	sete	%al
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	testb	$64, %cl
	sete	%al
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	testb	$-128, %cl
	sete	%al
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	testb	$4, %r8b
	sete	%al
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	testb	$16, %r8b
	sete	%al
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	testb	$64, %r8b
	movl	8(%rsi), %r12d
	movl	12(%rsi), %r15d
	sete	%al
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	andl	$31, %r15d
	andl	$31, %r12d
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	$-32, %edx
	movl	(%rbx), %edi
	callq	_input_report_abs
	movl	(%rbx), %edi
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	$-32, %r13d
	movl	%r13d, %edx
	callq	_input_report_abs
	movl	(%rbx), %edi
	movq	_ABS_HAT0X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	callq	_input_report_abs
	movl	(%rbx), %edi
	movq	_ABS_HAT1X@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	$-16, %r15d
	movl	%r15d, %edx
	callq	_input_report_abs
	movl	(%rbx), %edi
	movq	_wiimod_guitar_map@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_WIIMOD_GUITAR_KEY_G@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_key
	movl	(%rbx), %edi
	movq	(%r15), %rax
	movq	_WIIMOD_GUITAR_KEY_R@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_key
	movl	(%rbx), %edi
	movq	(%r15), %rax
	movq	_WIIMOD_GUITAR_KEY_Y@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_key
	movl	(%rbx), %edi
	movq	(%r15), %rax
	movq	_WIIMOD_GUITAR_KEY_B@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_key
	movl	(%rbx), %edi
	movq	(%r15), %rax
	movq	_WIIMOD_GUITAR_KEY_O@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_key
	movl	(%rbx), %edi
	movq	(%r15), %rax
	movq	_WIIMOD_GUITAR_KEY_UP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	%r14d, %edx
	callq	_input_report_key
	movl	(%rbx), %edi
	movq	(%r15), %rax
	movq	_WIIMOD_GUITAR_KEY_DOWN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_key
	movl	(%rbx), %edi
	movq	(%r15), %rax
	movq	_WIIMOD_GUITAR_KEY_PLUS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_key
	movl	(%rbx), %edi
	movq	(%r15), %rax
	movq	_WIIMOD_GUITAR_KEY_MINUS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	callq	_input_report_key
	movl	(%rbx), %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WIIPROTO_FLAG_MP_ACTIVE,4,2    ## @WIIPROTO_FLAG_MP_ACTIVE
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_ABS_HAT0X,4,2                  ## @ABS_HAT0X
	.comm	_ABS_HAT1X,4,2                  ## @ABS_HAT1X
	.comm	_wiimod_guitar_map,8,3          ## @wiimod_guitar_map
	.comm	_WIIMOD_GUITAR_KEY_G,8,3        ## @WIIMOD_GUITAR_KEY_G
	.comm	_WIIMOD_GUITAR_KEY_R,8,3        ## @WIIMOD_GUITAR_KEY_R
	.comm	_WIIMOD_GUITAR_KEY_Y,8,3        ## @WIIMOD_GUITAR_KEY_Y
	.comm	_WIIMOD_GUITAR_KEY_B,8,3        ## @WIIMOD_GUITAR_KEY_B
	.comm	_WIIMOD_GUITAR_KEY_O,8,3        ## @WIIMOD_GUITAR_KEY_O
	.comm	_WIIMOD_GUITAR_KEY_UP,8,3       ## @WIIMOD_GUITAR_KEY_UP
	.comm	_WIIMOD_GUITAR_KEY_DOWN,8,3     ## @WIIMOD_GUITAR_KEY_DOWN
	.comm	_WIIMOD_GUITAR_KEY_PLUS,8,3     ## @WIIMOD_GUITAR_KEY_PLUS
	.comm	_WIIMOD_GUITAR_KEY_MINUS,8,3    ## @WIIMOD_GUITAR_KEY_MINUS
	.no_dead_strip	_wiimod_guitar_in_ext
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiimod_guitar_in_ext
_wiimod_guitar_in_ext:                  ; @wiimod_guitar_in_ext
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x0
	ldp	w8, w9, [x1]
	ldp	w10, w11, [x1, #8]
	ldp	w12, w13, [x1, #16]
Lloh0:
	adrp	x14, _WIIPROTO_FLAG_MP_ACTIVE@GOTPAGE
Lloh1:
	ldr	x14, [x14, _WIIPROTO_FLAG_MP_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	w14, [x14]
	ldp	w0, w15, [x0]
	tst	w14, w15
	mov	w14, #62
	cinc	w14, w14, eq
	and	w21, w14, w9
	and	w9, w14, w8
	csel	w8, w13, w8, eq
	mvn	w8, w8
	and	w23, w8, #0x1
	mov	w8, #1
	bic	w26, w8, w13, lsr #3
	bic	w27, w8, w13, lsr #4
	bic	w25, w8, w13, lsr #5
	bic	w28, w8, w13, lsr #6
	bic	w24, w8, w13, lsr #7
	bic	w14, w8, w12, lsr #2
	bic	w13, w8, w12, lsr #4
	stp	w14, w13, [sp, #8]              ; 8-byte Folded Spill
	bic	w8, w8, w12, lsr #6
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	and	w22, w11, #0x1f
	and	w20, w10, #0x1f
Lloh3:
	adrp	x8, _ABS_X@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	sub	w2, w9, #32
	bl	_input_report_abs
	ldr	w0, [x19]
Lloh6:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	sub	w2, w21, #32
	bl	_input_report_abs
	ldr	w0, [x19]
Lloh9:
	adrp	x8, _ABS_HAT0X@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ABS_HAT0X@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_input_report_abs
	ldr	w0, [x19]
Lloh12:
	adrp	x8, _ABS_HAT1X@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ABS_HAT1X@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	sub	w2, w22, #16
	bl	_input_report_abs
	ldr	w0, [x19]
Lloh15:
	adrp	x20, _wiimod_guitar_map@GOTPAGE
Lloh16:
	ldr	x20, [x20, _wiimod_guitar_map@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh17:
	adrp	x9, _WIIMOD_GUITAR_KEY_G@GOTPAGE
Lloh18:
	ldr	x9, [x9, _WIIMOD_GUITAR_KEY_G@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x2, x27
	bl	_input_report_key
	ldr	w0, [x19]
	ldr	x8, [x20]
Lloh20:
	adrp	x9, _WIIMOD_GUITAR_KEY_R@GOTPAGE
Lloh21:
	ldr	x9, [x9, _WIIMOD_GUITAR_KEY_R@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x2, x28
	bl	_input_report_key
	ldr	w0, [x19]
	ldr	x8, [x20]
Lloh23:
	adrp	x9, _WIIMOD_GUITAR_KEY_Y@GOTPAGE
Lloh24:
	ldr	x9, [x9, _WIIMOD_GUITAR_KEY_Y@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x2, x26
	bl	_input_report_key
	ldr	w0, [x19]
	ldr	x8, [x20]
Lloh26:
	adrp	x9, _WIIMOD_GUITAR_KEY_B@GOTPAGE
Lloh27:
	ldr	x9, [x9, _WIIMOD_GUITAR_KEY_B@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x2, x25
	bl	_input_report_key
	ldr	w0, [x19]
	ldr	x8, [x20]
Lloh29:
	adrp	x9, _WIIMOD_GUITAR_KEY_O@GOTPAGE
Lloh30:
	ldr	x9, [x9, _WIIMOD_GUITAR_KEY_O@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x2, x24
	bl	_input_report_key
	ldr	w0, [x19]
	ldr	x8, [x20]
Lloh32:
	adrp	x9, _WIIMOD_GUITAR_KEY_UP@GOTPAGE
Lloh33:
	ldr	x9, [x9, _WIIMOD_GUITAR_KEY_UP@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	mov	x2, x23
	bl	_input_report_key
	ldr	w0, [x19]
	ldr	x8, [x20]
Lloh35:
	adrp	x9, _WIIMOD_GUITAR_KEY_DOWN@GOTPAGE
Lloh36:
	ldr	x9, [x9, _WIIMOD_GUITAR_KEY_DOWN@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	ldr	w2, [sp, #4]                    ; 4-byte Folded Reload
	bl	_input_report_key
	ldr	w0, [x19]
	ldr	x8, [x20]
Lloh38:
	adrp	x9, _WIIMOD_GUITAR_KEY_PLUS@GOTPAGE
Lloh39:
	ldr	x9, [x9, _WIIMOD_GUITAR_KEY_PLUS@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	ldr	w2, [sp, #8]                    ; 4-byte Folded Reload
	bl	_input_report_key
	ldr	w0, [x19]
	ldr	x8, [x20]
Lloh41:
	adrp	x9, _WIIMOD_GUITAR_KEY_MINUS@GOTPAGE
Lloh42:
	ldr	x9, [x9, _WIIMOD_GUITAR_KEY_MINUS@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	bl	_input_report_key
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_input_sync
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WIIPROTO_FLAG_MP_ACTIVE,4,2    ; @WIIPROTO_FLAG_MP_ACTIVE
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_ABS_HAT0X,4,2                  ; @ABS_HAT0X
	.comm	_ABS_HAT1X,4,2                  ; @ABS_HAT1X
	.comm	_wiimod_guitar_map,8,3          ; @wiimod_guitar_map
	.comm	_WIIMOD_GUITAR_KEY_G,8,3        ; @WIIMOD_GUITAR_KEY_G
	.comm	_WIIMOD_GUITAR_KEY_R,8,3        ; @WIIMOD_GUITAR_KEY_R
	.comm	_WIIMOD_GUITAR_KEY_Y,8,3        ; @WIIMOD_GUITAR_KEY_Y
	.comm	_WIIMOD_GUITAR_KEY_B,8,3        ; @WIIMOD_GUITAR_KEY_B
	.comm	_WIIMOD_GUITAR_KEY_O,8,3        ; @WIIMOD_GUITAR_KEY_O
	.comm	_WIIMOD_GUITAR_KEY_UP,8,3       ; @WIIMOD_GUITAR_KEY_UP
	.comm	_WIIMOD_GUITAR_KEY_DOWN,8,3     ; @WIIMOD_GUITAR_KEY_DOWN
	.comm	_WIIMOD_GUITAR_KEY_PLUS,8,3     ; @WIIMOD_GUITAR_KEY_PLUS
	.comm	_WIIMOD_GUITAR_KEY_MINUS,8,3    ; @WIIMOD_GUITAR_KEY_MINUS
	.no_dead_strip	_wiimod_guitar_in_ext
.subsections_via_symbols
