	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_calculate_basic_ir             ## -- Begin function calculate_basic_ir
	.p2align	4, 0x90
_calculate_basic_ir:                    ## @calculate_basic_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	%rdi, %r14
	movl	8(%rsi), %ecx
	andl	$48, %ecx
	shll	$4, %ecx
	orl	(%rsi), %ecx
	movq	8(%rdi), %rbx
	movl	$1023, %eax                     ## imm = 0x3FF
	movl	$1023, %edi                     ## imm = 0x3FF
	subl	%ecx, %edi
	movl	%edi, (%rbx)
	movl	8(%rsi), %ecx
	shll	$2, %ecx
	andl	$768, %ecx                      ## imm = 0x300
	orl	4(%rsi), %ecx
	movl	%ecx, 4(%rbx)
	movl	8(%rsi), %ecx
	andl	$3, %ecx
	shll	$8, %ecx
	orl	12(%rsi), %ecx
	movl	$1023, %edx                     ## imm = 0x3FF
	subl	%ecx, %edx
	movl	%edx, 24(%rbx)
	movl	8(%rsi), %ecx
	andl	$12, %ecx
	shll	$6, %ecx
	orl	16(%rsi), %ecx
	movl	%ecx, 28(%rbx)
	movl	28(%rsi), %ecx
	andl	$48, %ecx
	shll	$4, %ecx
	orl	20(%rsi), %ecx
	movl	$1023, %edx                     ## imm = 0x3FF
	subl	%ecx, %edx
	movl	%edx, 48(%rbx)
	movl	28(%rsi), %ecx
	shll	$2, %ecx
	andl	$768, %ecx                      ## imm = 0x300
	orl	24(%rsi), %ecx
	movl	%ecx, 52(%rbx)
	movl	28(%rsi), %ecx
	andl	$3, %ecx
	shll	$8, %ecx
	orl	32(%rsi), %ecx
	subl	%ecx, %eax
	movl	%eax, 72(%rbx)
	movl	28(%rsi), %eax
	andl	$12, %eax
	shll	$6, %eax
	orl	36(%rsi), %eax
	movl	%eax, 76(%rbx)
	callq	_BIG_ENDIAN_SHORT
	movl	%eax, (%rbx)
	movl	4(%rbx), %edi
	callq	_BIG_ENDIAN_SHORT
	movl	%eax, 4(%rbx)
	xorl	%r15d, %r15d
	movl	$0, %ecx
	cmpl	$1023, %eax                     ## imm = 0x3FF
	je	LBB0_2
## %bb.1:
	movq	$0, 16(%rbx)
	movl	$1, %ecx
LBB0_2:
	movl	%ecx, 8(%rbx)
	movl	24(%rbx), %edi
	callq	_BIG_ENDIAN_SHORT
	movl	%eax, 24(%rbx)
	movl	28(%rbx), %edi
	callq	_BIG_ENDIAN_SHORT
	movl	%eax, 28(%rbx)
	cmpl	$1023, %eax                     ## imm = 0x3FF
	je	LBB0_4
## %bb.3:
	movq	$0, 40(%rbx)
	movl	$1, %r15d
LBB0_4:
	movl	%r15d, 32(%rbx)
	movl	48(%rbx), %edi
	callq	_BIG_ENDIAN_SHORT
	movl	%eax, 48(%rbx)
	movl	52(%rbx), %edi
	callq	_BIG_ENDIAN_SHORT
	movl	%eax, 52(%rbx)
	xorl	%r12d, %r12d
	movl	$0, %ecx
	cmpl	$1023, %eax                     ## imm = 0x3FF
	je	LBB0_6
## %bb.5:
	movq	$0, 64(%rbx)
	movl	$1, %ecx
LBB0_6:
	leaq	8(%r14), %r15
	movl	%ecx, 56(%rbx)
	movl	72(%rbx), %edi
	callq	_BIG_ENDIAN_SHORT
	movl	%eax, 72(%rbx)
	movl	76(%rbx), %edi
	callq	_BIG_ENDIAN_SHORT
	movl	%eax, 76(%rbx)
	cmpl	$1023, %eax                     ## imm = 0x3FF
	je	LBB0_8
## %bb.7:
	movq	$0, 88(%rbx)
	movl	$1, %r12d
LBB0_8:
	movl	%r12d, 80(%rbx)
	movq	_WIIMOTE_STATE_ACC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_WIIMOTE_IS_SET
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_interpret_ir_data              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WIIMOTE_STATE_ACC,4,2          ## @WIIMOTE_STATE_ACC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_calculate_basic_ir             ; -- Begin function calculate_basic_ir
	.p2align	2
_calculate_basic_ir:                    ; @calculate_basic_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
	mov	x19, x0
	mov	x20, x0
	ldr	x21, [x20, #8]!
	ldr	w8, [x1]
	ldr	w9, [x1, #8]
	lsl	w9, w9, #4
	and	w9, w9, #0x300
	orr	w8, w9, w8
	mov	w9, #1023
	sub	w0, w9, w8
	str	w0, [x21]
	ldp	w8, w10, [x1, #4]
	lsl	w10, w10, #2
	and	w10, w10, #0x300
	orr	w8, w10, w8
	str	w8, [x21, #4]
	ldp	w10, w8, [x1, #8]
	ubfiz	w10, w10, #8, #2
	orr	w8, w10, w8
	sub	w8, w9, w8
	str	w8, [x21, #24]
	ldr	w8, [x1, #16]
	ldr	w10, [x1, #8]
	lsl	w10, w10, #6
	and	w10, w10, #0x300
	orr	w8, w10, w8
	str	w8, [x21, #28]
	ldr	w8, [x1, #20]
	ldr	w10, [x1, #28]
	lsl	w10, w10, #4
	and	w10, w10, #0x300
	orr	w8, w10, w8
	sub	w8, w9, w8
	str	w8, [x21, #48]
	ldp	w8, w10, [x1, #24]
	lsl	w10, w10, #2
	and	w10, w10, #0x300
	orr	w8, w10, w8
	str	w8, [x21, #52]
	ldp	w10, w8, [x1, #28]
	ubfiz	w10, w10, #8, #2
	orr	w8, w10, w8
	sub	w8, w9, w8
	str	w8, [x21, #72]
	ldr	w8, [x1, #36]
	ldr	w9, [x1, #28]
	lsl	w9, w9, #6
	and	w9, w9, #0x300
	orr	w8, w9, w8
	str	w8, [x21, #76]
	bl	_BIG_ENDIAN_SHORT
	str	w0, [x21]
	ldr	w0, [x21, #4]
	bl	_BIG_ENDIAN_SHORT
	str	w0, [x21, #4]
	cmp	w0, #1023
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #0
	b	LBB0_3
LBB0_2:
	str	xzr, [x21, #16]
	mov	w8, #1
LBB0_3:
	str	w8, [x21, #8]
	ldr	w0, [x21, #24]
	bl	_BIG_ENDIAN_SHORT
	str	w0, [x21, #24]
	ldr	w0, [x21, #28]
	bl	_BIG_ENDIAN_SHORT
	str	w0, [x21, #28]
	cmp	w0, #1023
	b.ne	LBB0_5
; %bb.4:
	mov	w8, #0
	b	LBB0_6
LBB0_5:
	str	xzr, [x21, #40]
	mov	w8, #1
LBB0_6:
	str	w8, [x21, #32]
	ldr	w0, [x21, #48]
	bl	_BIG_ENDIAN_SHORT
	str	w0, [x21, #48]
	ldr	w0, [x21, #52]
	bl	_BIG_ENDIAN_SHORT
	str	w0, [x21, #52]
	cmp	w0, #1023
	b.ne	LBB0_8
; %bb.7:
	mov	w8, #0
	b	LBB0_9
LBB0_8:
	str	xzr, [x21, #64]
	mov	w8, #1
LBB0_9:
	str	w8, [x21, #56]
	ldr	w0, [x21, #72]
	bl	_BIG_ENDIAN_SHORT
	str	w0, [x21, #72]
	ldr	w0, [x21, #76]
	bl	_BIG_ENDIAN_SHORT
	str	w0, [x21, #76]
	cmp	w0, #1023
	b.ne	LBB0_11
; %bb.10:
	mov	w8, #0
	b	LBB0_12
LBB0_11:
	str	xzr, [x21, #88]
	mov	w8, #1
LBB0_12:
	str	w8, [x21, #80]
Lloh0:
	adrp	x8, _WIIMOTE_STATE_ACC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WIIMOTE_STATE_ACC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_WIIMOTE_IS_SET
	mov	x2, x0
	mov	x0, x20
	mov	x1, 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	_interpret_ir_data
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WIIMOTE_STATE_ACC,4,2          ; @WIIMOTE_STATE_ACC
.subsections_via_symbols
