	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wiimod_ir_in_ir
_wiimod_ir_in_ir:                       ## @wiimod_ir_in_ir
	.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	_WIIPROTO_FLAGS_IR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rdi)
	je	LBB0_10
## %bb.1:
	cmpl	$3, %ecx
	ja	LBB0_10
## %bb.2:
	movq	%rdi, %r15
	movb	$1, %r12b
	movq	_ABS_HAT0Y@GOTPCREL(%rip), %rax
	movq	_ABS_HAT0X@GOTPCREL(%rip), %rdi
	movl	%ecx, %ecx
	leaq	LJTI0_0(%rip), %rbx
	movslq	(%rbx,%rcx,4), %rcx
	addq	%rbx, %rcx
	jmpq	*%rcx
LBB0_3:
	movq	_ABS_HAT1Y@GOTPCREL(%rip), %rax
	movq	_ABS_HAT1X@GOTPCREL(%rip), %rdi
	jmp	LBB0_6
LBB0_4:
	movq	_ABS_HAT2Y@GOTPCREL(%rip), %rax
	movq	_ABS_HAT2X@GOTPCREL(%rip), %rdi
	jmp	LBB0_6
LBB0_5:
	movq	_ABS_HAT3Y@GOTPCREL(%rip), %rax
	movq	_ABS_HAT3X@GOTPCREL(%rip), %rdi
	xorl	%r12d, %r12d
LBB0_6:
	movl	(%rax), %r14d
	movl	(%rdi), %eax
	testl	%edx, %edx
	je	LBB0_8
## %bb.7:
	movl	(%rsi), %ebx
	movl	%ebx, %edx
	andl	$3, %edx
	shll	$8, %edx
	orl	4(%rsi), %edx
	addq	$8, %rsi
	shll	$6, %ebx
	jmp	LBB0_9
LBB0_8:
	movl	8(%rsi), %ebx
	movl	%ebx, %edx
	andl	$48, %edx
	shll	$4, %edx
	orl	(%rsi), %edx
	addq	$4, %rsi
	shll	$2, %ebx
LBB0_9:
	andl	$768, %ebx                      ## imm = 0x300
	orl	(%rsi), %ebx
	movl	(%r15), %edi
	movl	%eax, %esi
	callq	_input_report_abs
	movl	(%r15), %edi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_input_report_abs
	testb	%r12b, %r12b
	je	LBB0_11
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r15), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_3
	.long	L0_0_set_4
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.comm	_WIIPROTO_FLAGS_IR,4,2          ## @WIIPROTO_FLAGS_IR
	.comm	_ABS_HAT0X,4,2                  ## @ABS_HAT0X
	.comm	_ABS_HAT0Y,4,2                  ## @ABS_HAT0Y
	.comm	_ABS_HAT1X,4,2                  ## @ABS_HAT1X
	.comm	_ABS_HAT1Y,4,2                  ## @ABS_HAT1Y
	.comm	_ABS_HAT2X,4,2                  ## @ABS_HAT2X
	.comm	_ABS_HAT2Y,4,2                  ## @ABS_HAT2Y
	.comm	_ABS_HAT3X,4,2                  ## @ABS_HAT3X
	.comm	_ABS_HAT3Y,4,2                  ## @ABS_HAT3Y
	.no_dead_strip	_wiimod_ir_in_ir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wiimod_ir_in_ir
_wiimod_ir_in_ir:                       ; @wiimod_ir_in_ir
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x0, #4]
Lloh0:
	adrp	x9, _WIIPROTO_FLAGS_IR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WIIPROTO_FLAGS_IR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #0
	ccmp	w3, #3, #2, ne
	b.hi	LBB0_9
; %bb.1:
	mov	x19, x0
	mov	w22, #1
Lloh3:
	adrp	x8, _ABS_HAT0Y@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ABS_HAT0Y@GOTPAGEOFF]
Lloh5:
	adrp	x9, _ABS_HAT0X@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ABS_HAT0X@GOTPAGEOFF]
	mov	w10, w3
Lloh7:
	adrp	x11, lJTI0_0@PAGE
Lloh8:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_2
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_2:
	mov	w22, #1
Lloh9:
	adrp	x8, _ABS_HAT1Y@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ABS_HAT1Y@GOTPAGEOFF]
Lloh11:
	adrp	x9, _ABS_HAT1X@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ABS_HAT1X@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	mov	w22, #1
Lloh13:
	adrp	x8, _ABS_HAT2Y@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ABS_HAT2Y@GOTPAGEOFF]
Lloh15:
	adrp	x9, _ABS_HAT2X@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ABS_HAT2X@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
	mov	w22, #0
Lloh17:
	adrp	x8, _ABS_HAT3Y@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ABS_HAT3Y@GOTPAGEOFF]
Lloh19:
	adrp	x9, _ABS_HAT3X@GOTPAGE
Lloh20:
	ldr	x9, [x9, _ABS_HAT3X@GOTPAGEOFF]
LBB0_5:
	ldr	w20, [x8]
	ldr	w8, [x9]
	cbz	w2, LBB0_7
; %bb.6:
	ldp	w10, w9, [x1]
	ubfiz	w11, w10, #8, #2
	orr	w2, w11, w9
	add	x9, x1, #8
	lsl	w10, w10, #6
	b	LBB0_8
LBB0_7:
	ldr	w9, [x1]
	ldr	w10, [x1, #8]
	lsl	w11, w10, #4
	and	w11, w11, #0x300
	orr	w2, w11, w9
	add	x9, x1, #4
	lsl	w10, w10, #2
LBB0_8:
	ldr	w9, [x9]
	and	w10, w10, #0x300
	orr	w21, w10, w9
	ldr	w0, [x19]
	mov	x1, x8
	bl	_input_report_abs
	ldr	w0, [x19]
	mov	x1, x20
	mov	x2, x21
	bl	_input_report_abs
	tbz	w22, #0, LBB0_10
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_input_sync
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
                                        ; -- End function
	.comm	_WIIPROTO_FLAGS_IR,4,2          ; @WIIPROTO_FLAGS_IR
	.comm	_ABS_HAT0X,4,2                  ; @ABS_HAT0X
	.comm	_ABS_HAT0Y,4,2                  ; @ABS_HAT0Y
	.comm	_ABS_HAT1X,4,2                  ; @ABS_HAT1X
	.comm	_ABS_HAT1Y,4,2                  ; @ABS_HAT1Y
	.comm	_ABS_HAT2X,4,2                  ; @ABS_HAT2X
	.comm	_ABS_HAT2Y,4,2                  ; @ABS_HAT2Y
	.comm	_ABS_HAT3X,4,2                  ; @ABS_HAT3X
	.comm	_ABS_HAT3Y,4,2                  ; @ABS_HAT3Y
	.no_dead_strip	_wiimod_ir_in_ir
.subsections_via_symbols
