	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_interpret_ir_data              ## -- Begin function interpret_ir_data
	.p2align	4, 0x90
_interpret_ir_data:                     ## @interpret_ir_data
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_find_sensorbar
	cmpq	$0, 88(%rbx)
	je	LBB0_9
## %bb.1:
	movl	80(%rbx), %eax
	movl	%eax, 84(%rbx)
	movq	_SB_Z_COEFFICIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	4(%rbx)
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_calc_yaw
	movl	%eax, (%r14)
	movq	8(%rbx), %rax
	movq	_ERROR_MAX_COUNT@GOTPCREL(%rip), %rcx
	movss	20(%rbx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	cmpq	(%rcx), %rax
	jge	LBB0_2
## %bb.3:
	subss	16(%rbx), %xmm0
	callq	_SQUARED
	movss	%xmm0, -28(%rbp)                ## 4-byte Spill
	movss	28(%rbx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	subss	24(%rbx), %xmm0
	callq	_SQUARED
	addss	-28(%rbp), %xmm0                ## 4-byte Folded Reload
	movq	_GLITCH_DIST@GOTPCREL(%rip), %rax
	ucomiss	(%rax), %xmm0
	jbe	LBB0_7
## %bb.4:
	movq	32(%rbx), %rax
	movq	_GLITCH_MAX_COUNT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_apply_ir_smoothing
	movq	$0, 32(%rbx)
	jmp	LBB0_8
LBB0_9:
	movq	8(%rbx), %rax
	movq	_ERROR_MAX_COUNT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_13
## %bb.10:
	movl	$1, 40(%rbx)
	incq	%rax
	movq	%rax, 8(%rbx)
	jmp	LBB0_11
LBB0_2:
	movss	%xmm0, 16(%rbx)
	movss	28(%rbx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 24(%rbx)
	movq	$0, 32(%rbx)
	jmp	LBB0_8
LBB0_13:
	movl	$0, 40(%rbx)
	jmp	LBB0_14
LBB0_7:
	movq	$0, 32(%rbx)
	movq	%rbx, %rdi
	callq	_apply_ir_smoothing
	jmp	LBB0_8
LBB0_6:
	incq	%rax
	movq	%rax, 32(%rbx)
LBB0_8:
	movl	$1, 40(%rbx)
	movq	$0, 8(%rbx)
LBB0_11:
	movss	16(%rbx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -24(%rbp)
	movss	24(%rbx), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -20(%rbp)
	movl	64(%rbx), %edx
	movq	72(%rbx), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %r8d
	leaq	-24(%rbp), %rdi
	leaq	-20(%rbp), %rsi
	callq	_ir_correct_for_bounds
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movl	64(%rbx), %edx
	movq	56(%rbx), %rax
	movl	(%rax), %ecx
	movl	4(%rax), %r8d
	leaq	-24(%rbp), %rdi
	leaq	-20(%rbp), %rsi
	callq	_ir_convert_to_vres
	movss	-24(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 44(%rbx)
	movss	-20(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 48(%rbx)
	movl	$1, %eax
	jmp	LBB0_15
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	movl	%eax, 52(%rbx)
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SB_Z_COEFFICIENT,4,2           ## @SB_Z_COEFFICIENT
	.comm	_ERROR_MAX_COUNT,8,3            ## @ERROR_MAX_COUNT
	.comm	_GLITCH_DIST,4,2                ## @GLITCH_DIST
	.comm	_GLITCH_MAX_COUNT,8,3           ## @GLITCH_MAX_COUNT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_interpret_ir_data              ; -- Begin function interpret_ir_data
	.p2align	2
_interpret_ir_data:                     ; @interpret_ir_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset b8, -40
	.cfi_offset b9, -48
	mov	x20, x1
	mov	x19, x0
	bl	_find_sensorbar
	ldr	x8, [x19, #88]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w8, [x19, #80]
	str	w8, [x19, #84]
Lloh0:
	adrp	x8, _SB_Z_COEFFICIENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SB_Z_COEFFICIENT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	sdiv	w8, w8, w9
	str	w8, [x19]
	mov	x0, x19
	bl	_calc_yaw
	str	w0, [x20]
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _ERROR_MAX_COUNT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ERROR_MAX_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	s0, [x19, #20]
	cmp	x8, x9
	b.ge	LBB0_7
; %bb.2:
	ldr	s1, [x19, #16]
	fsub	s0, s0, s1
	bl	_SQUARED
	fmov	s8, s0
	ldp	s1, s0, [x19, #24]
	fsub	s0, s0, s1
	bl	_SQUARED
	fadd	s0, s8, s0
Lloh6:
	adrp	x8, _GLITCH_DIST@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GLITCH_DIST@GOTPAGEOFF]
Lloh8:
	ldr	s1, [x8]
	fcmp	s0, s1
	b.le	LBB0_9
; %bb.3:
	ldr	x8, [x19, #32]
Lloh9:
	adrp	x9, _GLITCH_MAX_COUNT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GLITCH_MAX_COUNT@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_10
; %bb.4:
	mov	x0, x19
	bl	_apply_ir_smoothing
	str	xzr, [x19, #32]
	b	LBB0_11
LBB0_5:
	ldr	x8, [x19, #8]
Lloh12:
	adrp	x9, _ERROR_MAX_COUNT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ERROR_MAX_COUNT@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_8
; %bb.6:
	mov	w9, #1
	str	w9, [x19, #40]
	add	x8, x8, #1
	str	x8, [x19, #8]
	b	LBB0_12
LBB0_7:
	str	s0, [x19, #16]
	ldr	s0, [x19, #28]
	str	s0, [x19, #24]
	str	xzr, [x19, #32]
	b	LBB0_11
LBB0_8:
	mov	w8, #0
	str	wzr, [x19, #40]
	b	LBB0_15
LBB0_9:
	str	xzr, [x19, #32]
	mov	x0, x19
	bl	_apply_ir_smoothing
	b	LBB0_11
LBB0_10:
	add	x8, x8, #1
	str	x8, [x19, #32]
LBB0_11:
	mov	w8, #1
	str	w8, [x19, #40]
	str	xzr, [x19, #8]
LBB0_12:
	ldr	s1, [x19, #16]
	ldr	s0, [x19, #24]
	stp	s0, s1, [sp, #8]
	ldr	w2, [x19, #64]
	ldr	x8, [x19, #72]
	ldp	w3, w4, [x8]
	add	x0, sp, #12
	add	x1, sp, #8
	bl	_ir_correct_for_bounds
	cbz	x0, LBB0_14
; %bb.13:
	ldr	w2, [x19, #64]
	ldr	x8, [x19, #56]
	ldp	w3, w4, [x8]
	add	x0, sp, #12
	add	x1, sp, #8
	bl	_ir_convert_to_vres
	ldp	s1, s0, [sp, #8]
	stp	s0, s1, [x19, #44]
	mov	w8, #1
	b	LBB0_15
LBB0_14:
	mov	w8, #0
LBB0_15:
	str	w8, [x19, #52]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SB_Z_COEFFICIENT,4,2           ; @SB_Z_COEFFICIENT
	.comm	_ERROR_MAX_COUNT,8,3            ; @ERROR_MAX_COUNT
	.comm	_GLITCH_DIST,4,2                ; @GLITCH_DIST
	.comm	_GLITCH_MAX_COUNT,8,3           ; @GLITCH_MAX_COUNT
.subsections_via_symbols
