; LLVM IR from mackorone/mms :: old/v2/src/mouse/continuous/Continuous.ll (ZN10continuous10Continuous14turnCorrectionEv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }
%"class.continuous::Continuous" = type { %class.IMouseAlgorithm, i32, i32, i32, i32, float, float, [256 x i8], [5 x i8], [3 x i8], i8, i8, i32, i8, i8, i8, i8, i32, i32, i32, i8, i8, i8, i8, i8, float, i32, i32, i32, double, double, double, double, double, double, i32, i32, ptr }
%class.IMouseAlgorithm = type { ptr }

@.str.68 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [12 x i8], align 1
@_ZZN10continuous10Continuous14turnCorrectionEvE11targetAngle = external hidden global float, align 4
@_ZZN10continuous10Continuous14turnCorrectionEvE1i = external hidden global i32, align 4
@_ZZN10continuous10Continuous14turnCorrectionEvE4turn = external hidden global i8, align 1
@_ZZN10continuous10Continuous14turnCorrectionEvE8straight = external hidden global i8, align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408)) #2 align 2

declare void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296), ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408), double noundef, double noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10continuous10Continuous14turnCorrectionEv(ptr noundef nonnull align 8 dereferenceable(408) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.0", align 1
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.0", align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator.0", align 1
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator.0", align 1
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca %"class.std::allocator.0", align 1
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.std::allocator.0", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %26 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 866, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  %27 = load i8, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE8straight, align 1, !tbaa !11, !range !13, !noundef !14
  %28 = trunc i8 %27 to i1
  br i1 %28, label %217, label %29

29:                                               ; preds = %1
  %30 = load i8, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE4turn, align 1, !tbaa !11, !range !13, !noundef !14
  %31 = trunc i8 %30 to i1
  br i1 %31, label %32, label %108

32:                                               ; preds = %29
  %33 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 26
  %34 = load volatile i32, ptr %33, align 4, !tbaa !15
  %35 = icmp eq i32 %34, 3
  br i1 %35, label %36, label %43

36:                                               ; preds = %32
  %37 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 25
  %38 = load volatile float, ptr %37, align 8, !tbaa !21
  %39 = load float, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE11targetAngle, align 4, !tbaa !22
  %40 = fadd float %38, %39
  %41 = fmul float 1.000000e+02, %40
  %42 = fptosi float %41 to i32
  store i32 %42, ptr %3, align 4, !tbaa !9
  br label %50

43:                                               ; preds = %32
  %44 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 25
  %45 = load volatile float, ptr %44, align 8, !tbaa !21
  %46 = load float, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE11targetAngle, align 4, !tbaa !22
  %47 = fsub float %45, %46
  %48 = fmul float 1.000000e+02, %47
  %49 = fptosi float %48 to i32
  store i32 %49, ptr %3, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %43, %36
  %51 = load i32, ptr %3, align 4, !tbaa !9
  %52 = load i32, ptr %5, align 4, !tbaa !9
  %53 = sub nsw i32 %51, %52
  store i32 %53, ptr %4, align 4, !tbaa !9
  %54 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 27
  store i32 0, ptr %54, align 8, !tbaa !23
  %55 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 28
  store i32 0, ptr %55, align 4, !tbaa !24
  %56 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 37
  %57 = load ptr, ptr %56, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.68, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %58 unwind label %90

58:                                               ; preds = %50
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %57, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %59 unwind label %94

59:                                               ; preds = %58
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  %60 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 37
  %61 = load ptr, ptr %60, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.69, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %62 unwind label %99

62:                                               ; preds = %59
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %61, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %63 unwind label %103

63:                                               ; preds = %62
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  %64 = load i32, ptr %3, align 4, !tbaa !9
  %65 = mul nsw i32 16, %64
  %66 = load i32, ptr %4, align 4, !tbaa !9
  %67 = mul nsw i32 600, %66
  %68 = add nsw i32 %65, %67
  store i32 %68, ptr %6, align 4, !tbaa !9
  %69 = load i32, ptr %3, align 4, !tbaa !9
  store i32 %69, ptr %5, align 4, !tbaa !9
  %70 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 3
  %71 = load i32, ptr %70, align 8, !tbaa !26
  %72 = load i32, ptr %6, align 4, !tbaa !9
  %73 = sdiv i32 %72, 124
  %74 = add nsw i32 %71, %73
  %75 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 36
  store i32 %74, ptr %75, align 4, !tbaa !27
  %76 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 4
  %77 = load i32, ptr %76, align 4, !tbaa !28
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %79 = sdiv i32 %78, 124
  %80 = sub nsw i32 %77, %79
  %81 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 35
  store i32 %80, ptr %81, align 8, !tbaa !29
  %82 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 36
  %83 = load i32, ptr %82, align 4, !tbaa !27
  %84 = sitofp i32 %83 to double
  %85 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 35
  %86 = load i32, ptr %85, align 8, !tbaa !29
  %87 = sitofp i32 %86 to double
  call void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408) %26, double noundef %84, double noundef %87)
  %88 = load i32, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE1i, align 4, !tbaa !9
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE1i, align 4, !tbaa !9
  br label %216

90:                                               ; preds = %50
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %11, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %12, align 4
  br label %98

94:                                               ; preds = %58
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %11, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %98

98:                                               ; preds = %94, %90
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  br label %421

99:                                               ; preds = %59
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %11, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %12, align 4
  br label %107

103:                                              ; preds = %62
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %11, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  br label %107

107:                                              ; preds = %103, %99
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  br label %421

108:                                              ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 650, ptr %15, align 4, !tbaa !9
  %109 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  br i1 %109, label %110, label %212

110:                                              ; preds = %108
  %111 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  br i1 %111, label %112, label %131

112:                                              ; preds = %110
  %113 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 29
  %114 = load double, ptr %113, align 8, !tbaa !30
  %115 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 6
  %116 = load float, ptr %115, align 4, !tbaa !31
  %117 = fpext float %116 to double
  %118 = fsub double %114, %117
  %119 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 34
  %120 = load double, ptr %119, align 8, !tbaa !32
  %121 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 33
  %122 = load double, ptr %121, align 8, !tbaa !33
  %123 = fsub double %120, %122
  %124 = fsub double %123, 0.000000e+00
  %125 = fmul double 3.000000e+00, %124
  %126 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %118, double %125)
  %127 = fptosi double %126 to i32
  store i32 %127, ptr %3, align 4, !tbaa !9
  %128 = load i32, ptr %3, align 4, !tbaa !9
  %129 = load i32, ptr %5, align 4, !tbaa !9
  %130 = sub nsw i32 %128, %129
  store i32 %130, ptr %4, align 4, !tbaa !9
  br label %165

131:                                              ; preds = %110
  %132 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  br i1 %132, label %133, label %152

133:                                              ; preds = %131
  %134 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 30
  %135 = load double, ptr %134, align 8, !tbaa !34
  %136 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 5
  %137 = load float, ptr %136, align 8, !tbaa !35
  %138 = fpext float %137 to double
  %139 = fsub double %135, %138
  %140 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 34
  %141 = load double, ptr %140, align 8, !tbaa !32
  %142 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 33
  %143 = load double, ptr %142, align 8, !tbaa !33
  %144 = fsub double %141, %143
  %145 = fsub double %144, 0.000000e+00
  %146 = fmul double 3.000000e+00, %145
  %147 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %139, double %146)
  %148 = fptosi double %147 to i32
  store i32 %148, ptr %3, align 4, !tbaa !9
  %149 = load i32, ptr %3, align 4, !tbaa !9
  %150 = load i32, ptr %5, align 4, !tbaa !9
  %151 = sub nsw i32 %149, %150
  store i32 %151, ptr %4, align 4, !tbaa !9
  br label %164

152:                                              ; preds = %131
  %153 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 34
  %154 = load double, ptr %153, align 8, !tbaa !32
  %155 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 33
  %156 = load double, ptr %155, align 8, !tbaa !33
  %157 = fsub double %154, %156
  %158 = fsub double %157, 0.000000e+00
  %159 = fmul double 3.000000e+00, %158
  %160 = fptosi double %159 to i32
  store i32 %160, ptr %3, align 4, !tbaa !9
  %161 = load i32, ptr %3, align 4, !tbaa !9
  %162 = load i32, ptr %5, align 4, !tbaa !9
  %163 = sub nsw i32 %161, %162
  store i32 %163, ptr %4, align 4, !tbaa !9
  br label %164

164:                                              ; preds = %152, %133
  br label %165

165:                                              ; preds = %164, %112
  %166 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 34
  %167 = load double, ptr %166, align 8, !tbaa !32
  %168 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 33
  %169 = load double, ptr %168, align 8, !tbaa !33
  %170 = fsub double %167, %169
  %171 = fsub double %170, 0.000000e+00
  %172 = fmul double 3.000000e+00, %171
  %173 = fptosi double %172 to i32
  store i32 %173, ptr %3, align 4, !tbaa !9
  %174 = load i32, ptr %3, align 4, !tbaa !9
  %175 = load i32, ptr %5, align 4, !tbaa !9
  %176 = sub nsw i32 %174, %175
  store i32 %176, ptr %4, align 4, !tbaa !9
  %177 = load i32, ptr %3, align 4, !tbaa !9
  %178 = mul nsw i32 200, %177
  %179 = load i32, ptr %4, align 4, !tbaa !9
  %180 = mul nsw i32 600, %179
  %181 = add nsw i32 %178, %180
  store i32 %181, ptr %6, align 4, !tbaa !9
  %182 = load i32, ptr %3, align 4, !tbaa !9
  store i32 %182, ptr %5, align 4, !tbaa !9
  %183 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 3
  %184 = load i32, ptr %183, align 8, !tbaa !26
  %185 = load i32, ptr %6, align 4, !tbaa !9
  %186 = sdiv i32 %185, 124
  %187 = add nsw i32 %184, %186
  %188 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 36
  store i32 %187, ptr %188, align 4, !tbaa !27
  %189 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 4
  %190 = load i32, ptr %189, align 4, !tbaa !28
  %191 = load i32, ptr %6, align 4, !tbaa !9
  %192 = sdiv i32 %191, 124
  %193 = sub nsw i32 %190, %192
  %194 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 35
  store i32 %193, ptr %194, align 8, !tbaa !29
  %195 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 36
  %196 = load i32, ptr %195, align 4, !tbaa !27
  %197 = sitofp i32 %196 to double
  %198 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 35
  %199 = load i32, ptr %198, align 8, !tbaa !29
  %200 = sitofp i32 %199 to double
  call void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408) %26, double noundef %197, double noundef %200)
  %201 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 33
  %202 = load double, ptr %201, align 8, !tbaa !33
  %203 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 34
  %204 = load double, ptr %203, align 8, !tbaa !32
  %205 = fadd double %202, %204
  %206 = fdiv double %205, 2.000000e+00
  %207 = fcmp oge double %206, 6.500000e+02
  br i1 %207, label %208, label %211

208:                                              ; preds = %165
  store i8 1, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE4turn, align 1, !tbaa !11
  store i32 30, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE1i, align 4, !tbaa !9
  %209 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 4
  store i32 620, ptr %209, align 4, !tbaa !28
  %210 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 25
  store volatile float 0.000000e+00, ptr %210, align 8, !tbaa !21
  br label %211

211:                                              ; preds = %208, %165
  br label %215

212:                                              ; preds = %108
  store i8 1, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE4turn, align 1, !tbaa !11
  %213 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 4
  store i32 620, ptr %213, align 4, !tbaa !28
  %214 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 25
  store volatile float 0.000000e+00, ptr %214, align 8, !tbaa !21
  br label %215

215:                                              ; preds = %212, %211
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %216

216:                                              ; preds = %215, %63
  br label %307

217:                                              ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 300, ptr %16, align 4, !tbaa !9
  %218 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  br i1 %218, label %219, label %275

219:                                              ; preds = %217
  %220 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  br i1 %220, label %221, label %240

221:                                              ; preds = %219
  %222 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 29
  %223 = load double, ptr %222, align 8, !tbaa !30
  %224 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 6
  %225 = load float, ptr %224, align 4, !tbaa !31
  %226 = fpext float %225 to double
  %227 = fsub double %223, %226
  %228 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 34
  %229 = load double, ptr %228, align 8, !tbaa !32
  %230 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 33
  %231 = load double, ptr %230, align 8, !tbaa !33
  %232 = fsub double %229, %231
  %233 = fsub double %232, 0.000000e+00
  %234 = fmul double 3.000000e+00, %233
  %235 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %227, double %234)
  %236 = fptosi double %235 to i32
  store i32 %236, ptr %3, align 4, !tbaa !9
  %237 = load i32, ptr %3, align 4, !tbaa !9
  %238 = load i32, ptr %5, align 4, !tbaa !9
  %239 = sub nsw i32 %237, %238
  store i32 %239, ptr %4, align 4, !tbaa !9
  br label %274

240:                                              ; preds = %219
  %241 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  br i1 %241, label %242, label %261

242:                                              ; preds = %240
  %243 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 30
  %244 = load double, ptr %243, align 8, !tbaa !34
  %245 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 5
  %246 = load float, ptr %245, align 8, !tbaa !35
  %247 = fpext float %246 to double
  %248 = fsub double %244, %247
  %249 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 34
  %250 = load double, ptr %249, align 8, !tbaa !32
  %251 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 33
  %252 = load double, ptr %251, align 8, !tbaa !33
  %253 = fsub double %250, %252
  %254 = fsub double %253, 0.000000e+00
  %255 = fmul double 3.000000e+00, %254
  %256 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %248, double %255)
  %257 = fptosi double %256 to i32
  store i32 %257, ptr %3, align 4, !tbaa !9
  %258 = load i32, ptr %3, align 4, !tbaa !9
  %259 = load i32, ptr %5, align 4, !tbaa !9
  %260 = sub nsw i32 %258, %259
  store i32 %260, ptr %4, align 4, !tbaa !9
  br label %273

261:                                              ; preds = %240
  %262 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 34
  %263 = load double, ptr %262, align 8, !tbaa !32
  %264 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 33
  %265 = load double, ptr %264, align 8, !tbaa !33
  %266 = fsub double %263, %265
  %267 = fsub double %266, 0.000000e+00
  %268 = fmul double 3.000000e+00, %267
  %269 = fptosi double %268 to i32
  store i32 %269, ptr %3, align 4, !tbaa !9
  %270 = load i32, ptr %3, align 4, !tbaa !9
  %271 = load i32, ptr %5, align 4, !tbaa !9
  %272 = sub nsw i32 %270, %271
  store i32 %272, ptr %4, align 4, !tbaa !9
  br label %273

273:                                              ; preds = %261, %242
  br label %274

274:                                              ; preds = %273, %221
  br label %282

275:                                              ; preds = %217
  %276 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 25
  %277 = load volatile float, ptr %276, align 8, !tbaa !21
  %278 = load float, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE11targetAngle, align 4, !tbaa !22
  %279 = fsub float %277, %278
  %280 = fmul float 2.000000e+01, %279
  %281 = fptosi float %280 to i32
  store i32 %281, ptr %3, align 4, !tbaa !9
  br label %282

282:                                              ; preds = %275, %274
  %283 = load i32, ptr %3, align 4, !tbaa !9
  %284 = mul nsw i32 200, %283
  %285 = load i32, ptr %4, align 4, !tbaa !9
  %286 = mul nsw i32 600, %285
  %287 = add nsw i32 %284, %286
  store i32 %287, ptr %6, align 4, !tbaa !9
  %288 = load i32, ptr %3, align 4, !tbaa !9
  store i32 %288, ptr %5, align 4, !tbaa !9
  %289 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 3
  %290 = load i32, ptr %289, align 8, !tbaa !26
  %291 = load i32, ptr %6, align 4, !tbaa !9
  %292 = sdiv i32 %291, 124
  %293 = add nsw i32 %290, %292
  %294 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 36
  store i32 %293, ptr %294, align 4, !tbaa !27
  %295 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 4
  %296 = load i32, ptr %295, align 4, !tbaa !28
  %297 = load i32, ptr %6, align 4, !tbaa !9
  %298 = sdiv i32 %297, 124
  %299 = sub nsw i32 %296, %298
  %300 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 35
  store i32 %299, ptr %300, align 8, !tbaa !29
  %301 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 36
  %302 = load i32, ptr %301, align 4, !tbaa !27
  %303 = sitofp i32 %302 to double
  %304 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 35
  %305 = load i32, ptr %304, align 8, !tbaa !29
  %306 = sitofp i32 %305 to double
  call void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408) %26, double noundef %303, double noundef %306)
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %307

307:                                              ; preds = %282, %216
  %308 = load i8, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE8straight, align 1, !tbaa !11, !range !13, !noundef !14
  %309 = trunc i8 %308 to i1
  br i1 %309, label %310, label %420

310:                                              ; preds = %307
  %311 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  br i1 %311, label %312, label %366

312:                                              ; preds = %310
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 500, ptr %17, align 4, !tbaa !9
  %313 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 33
  %314 = load double, ptr %313, align 8, !tbaa !33
  %315 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 34
  %316 = load double, ptr %315, align 8, !tbaa !32
  %317 = fadd double %314, %316
  %318 = fdiv double %317, 2.000000e+00
  %319 = fcmp oge double %318, 5.000000e+02
  br i1 %319, label %320, label %364

320:                                              ; preds = %312
  store i32 0, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE1i, align 4, !tbaa !9
  %321 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 25
  store volatile float 0.000000e+00, ptr %321, align 8, !tbaa !21
  store i32 0, ptr %5, align 4, !tbaa !9
  %322 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 27
  store i32 0, ptr %322, align 8, !tbaa !23
  %323 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 28
  store i32 0, ptr %323, align 4, !tbaa !24
  %324 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 37
  %325 = load ptr, ptr %324, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef @.str.68, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %326 unwind label %346

326:                                              ; preds = %320
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %325, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %327 unwind label %350

327:                                              ; preds = %326
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  %328 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 37
  %329 = load ptr, ptr %328, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 32, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef @.str.69, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %330 unwind label %355

330:                                              ; preds = %327
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %329, ptr noundef nonnull align 8 dereferenceable(32) %20)
          to label %331 unwind label %359

331:                                              ; preds = %330
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  %332 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 26
  store volatile i32 0, ptr %332, align 4, !tbaa !15
  %333 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  %334 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 9
  %335 = getelementptr inbounds [3 x i8], ptr %334, i64 0, i64 0
  %336 = zext i1 %333 to i8
  store volatile i8 %336, ptr %335, align 1, !tbaa !11
  %337 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  %338 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 9
  %339 = getelementptr inbounds [3 x i8], ptr %338, i64 0, i64 1
  %340 = zext i1 %337 to i8
  store volatile i8 %340, ptr %339, align 1, !tbaa !11
  %341 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  %342 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 9
  %343 = getelementptr inbounds [3 x i8], ptr %342, i64 0, i64 2
  %344 = zext i1 %341 to i8
  store volatile i8 %344, ptr %343, align 1, !tbaa !11
  %345 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 13
  store i8 1, ptr %345, align 8, !tbaa !36
  store i8 0, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE8straight, align 1, !tbaa !11
  store i8 0, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE4turn, align 1, !tbaa !11
  br label %364

346:                                              ; preds = %320
  %347 = landingpad { ptr, i32 }
          cleanup
  %348 = extractvalue { ptr, i32 } %347, 0
  store ptr %348, ptr %11, align 8
  %349 = extractvalue { ptr, i32 } %347, 1
  store i32 %349, ptr %12, align 4
  br label %354

350:                                              ; preds = %326
  %351 = landingpad { ptr, i32 }
          cleanup
  %352 = extractvalue { ptr, i32 } %351, 0
  store ptr %352, ptr %11, align 8
  %353 = extractvalue { ptr, i32 } %351, 1
  store i32 %353, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  br label %354

354:                                              ; preds = %350, %346
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  br label %365

355:                                              ; preds = %327
  %356 = landingpad { ptr, i32 }
          cleanup
  %357 = extractvalue { ptr, i32 } %356, 0
  store ptr %357, ptr %11, align 8
  %358 = extractvalue { ptr, i32 } %356, 1
  store i32 %358, ptr %12, align 4
  br label %363

359:                                              ; preds = %330
  %360 = landingpad { ptr, i32 }
          cleanup
  %361 = extractvalue { ptr, i32 } %360, 0
  store ptr %361, ptr %11, align 8
  %362 = extractvalue { ptr, i32 } %360, 1
  store i32 %362, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  br label %363

363:                                              ; preds = %359, %355
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %20) #5
  br label %365

364:                                              ; preds = %331, %312
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %419

365:                                              ; preds = %363, %354
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %421

366:                                              ; preds = %310
  %367 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 27
  %368 = load i32, ptr %367, align 8, !tbaa !23
  %369 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 28
  %370 = load i32, ptr %369, align 4, !tbaa !24
  %371 = add nsw i32 %368, %370
  %372 = sdiv i32 %371, 2
  %373 = icmp sge i32 %372, 866
  br i1 %373, label %374, label %418

374:                                              ; preds = %366
  store i32 0, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE1i, align 4, !tbaa !9
  %375 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 25
  store volatile float 0.000000e+00, ptr %375, align 8, !tbaa !21
  store i32 0, ptr %5, align 4, !tbaa !9
  %376 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 27
  store i32 0, ptr %376, align 8, !tbaa !23
  %377 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 28
  store i32 0, ptr %377, align 4, !tbaa !24
  %378 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 37
  %379 = load ptr, ptr %378, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef @.str.68, ptr noundef nonnull align 1 dereferenceable(1) %23)
          to label %380 unwind label %400

380:                                              ; preds = %374
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %379, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %381 unwind label %404

381:                                              ; preds = %380
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #5
  %382 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 37
  %383 = load ptr, ptr %382, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %24, ptr noundef @.str.69, ptr noundef nonnull align 1 dereferenceable(1) %25)
          to label %384 unwind label %409

384:                                              ; preds = %381
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %383, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %385 unwind label %413

385:                                              ; preds = %384
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #5
  %386 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 26
  store volatile i32 0, ptr %386, align 4, !tbaa !15
  %387 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  %388 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 9
  %389 = getelementptr inbounds [3 x i8], ptr %388, i64 0, i64 0
  %390 = zext i1 %387 to i8
  store volatile i8 %390, ptr %389, align 1, !tbaa !11
  %391 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  %392 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 9
  %393 = getelementptr inbounds [3 x i8], ptr %392, i64 0, i64 1
  %394 = zext i1 %391 to i8
  store volatile i8 %394, ptr %393, align 1, !tbaa !11
  %395 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %26)
  %396 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 9
  %397 = getelementptr inbounds [3 x i8], ptr %396, i64 0, i64 2
  %398 = zext i1 %395 to i8
  store volatile i8 %398, ptr %397, align 1, !tbaa !11
  %399 = getelementptr inbounds %"class.continuous::Continuous", ptr %26, i32 0, i32 13
  store i8 1, ptr %399, align 8, !tbaa !36
  store i8 0, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE8straight, align 1, !tbaa !11
  store i8 0, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE4turn, align 1, !tbaa !11
  br label %418

400:                                              ; preds = %374
  %401 = landingpad { ptr, i32 }
          cleanup
  %402 = extractvalue { ptr, i32 } %401, 0
  store ptr %402, ptr %11, align 8
  %403 = extractvalue { ptr, i32 } %401, 1
  store i32 %403, ptr %12, align 4
  br label %408

404:                                              ; preds = %380
  %405 = landingpad { ptr, i32 }
          cleanup
  %406 = extractvalue { ptr, i32 } %405, 0
  store ptr %406, ptr %11, align 8
  %407 = extractvalue { ptr, i32 } %405, 1
  store i32 %407, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  br label %408

408:                                              ; preds = %404, %400
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %23) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #5
  br label %421

409:                                              ; preds = %381
  %410 = landingpad { ptr, i32 }
          cleanup
  %411 = extractvalue { ptr, i32 } %410, 0
  store ptr %411, ptr %11, align 8
  %412 = extractvalue { ptr, i32 } %410, 1
  store i32 %412, ptr %12, align 4
  br label %417

413:                                              ; preds = %384
  %414 = landingpad { ptr, i32 }
          cleanup
  %415 = extractvalue { ptr, i32 } %414, 0
  store ptr %415, ptr %11, align 8
  %416 = extractvalue { ptr, i32 } %414, 1
  store i32 %416, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #5
  br label %417

417:                                              ; preds = %413, %409
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %25) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #5
  br label %421

418:                                              ; preds = %385, %366
  br label %419

419:                                              ; preds = %418, %364
  br label %420

420:                                              ; preds = %419, %307
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void

421:                                              ; preds = %417, %408, %365, %107, %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %422

422:                                              ; preds = %421
  %423 = load ptr, ptr %11, align 8
  %424 = load i32, ptr %12, align 4
  %425 = insertvalue { ptr, i32 } poison, ptr %423, 0
  %426 = insertvalue { ptr, i32 } %425, i32 %424, 1
  resume { ptr, i32 } %426
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !19, i64 332}
!16 = !{!"_ZTSN10continuous10ContinuousE", !17, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !18, i64 24, !18, i64 28, !7, i64 32, !7, i64 288, !7, i64 293, !12, i64 296, !12, i64 297, !10, i64 300, !12, i64 304, !12, i64 305, !12, i64 306, !12, i64 307, !10, i64 308, !10, i64 312, !10, i64 316, !12, i64 320, !12, i64 321, !12, i64 322, !12, i64 323, !12, i64 324, !18, i64 328, !19, i64 332, !10, i64 336, !10, i64 340, !20, i64 344, !20, i64 352, !20, i64 360, !20, i64 368, !20, i64 376, !20, i64 384, !10, i64 392, !10, i64 396, !6, i64 400}
!17 = !{!"_ZTS15IMouseAlgorithm"}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSN10continuous10ContinuousUt_E", !7, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = !{!16, !18, i64 328}
!22 = !{!18, !18, i64 0}
!23 = !{!16, !10, i64 336}
!24 = !{!16, !10, i64 340}
!25 = !{!16, !6, i64 400}
!26 = !{!16, !10, i64 16}
!27 = !{!16, !10, i64 396}
!28 = !{!16, !10, i64 20}
!29 = !{!16, !10, i64 392}
!30 = !{!16, !20, i64 344}
!31 = !{!16, !18, i64 28}
!32 = !{!16, !20, i64 384}
!33 = !{!16, !20, i64 376}
!34 = !{!16, !20, i64 352}
!35 = !{!16, !18, i64 24}
!36 = !{!16, !12, i64 304}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }

@.str.68 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [12 x i8], align 1
@_ZZN10continuous10Continuous14turnCorrectionEvE11targetAngle = external hidden local_unnamed_addr global float, align 4
@_ZZN10continuous10Continuous14turnCorrectionEvE1i = external hidden local_unnamed_addr global i32, align 4
@_ZZN10continuous10Continuous14turnCorrectionEvE4turn = external hidden local_unnamed_addr global i8, align 1
@_ZZN10continuous10Continuous14turnCorrectionEvE8straight = external hidden local_unnamed_addr global i8, align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #2 align 2

declare void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408), double noundef, double noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10continuous10Continuous14turnCorrectionEv(ptr noundef nonnull align 8 dereferenceable(408) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator.0", align 1
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.0", align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.0", align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.0", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.0", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.0", align 1
  %14 = load i8, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE8straight, align 1, !tbaa !5, !range !9, !noundef !10
  %15 = trunc nuw i8 %14 to i1
  br i1 %15, label %96, label %16

16:                                               ; preds = %1
  %17 = load i8, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE4turn, align 1, !tbaa !5, !range !9, !noundef !10
  %18 = trunc nuw i8 %17 to i1
  br i1 %18, label %19, label %60

19:                                               ; preds = %16
  %20 = getelementptr inbounds i8, ptr %0, i64 332
  %21 = load volatile i32, ptr %20, align 4, !tbaa !11
  %22 = icmp eq i32 %21, 3
  %23 = getelementptr inbounds i8, ptr %0, i64 328
  %24 = load volatile float, ptr %23, align 8, !tbaa !19
  %25 = load float, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE11targetAngle, align 4, !tbaa !20
  %26 = fneg float %25
  %.0.in.in.p = select i1 %22, float %25, float %26
  %.0.in.in = fadd float %24, %.0.in.in.p
  %.0.in = fmul float %.0.in.in, 1.000000e+02
  %.0 = fptosi float %.0.in to i32
  %27 = getelementptr inbounds i8, ptr %0, i64 336
  store i32 0, ptr %27, align 8, !tbaa !21
  %28 = getelementptr inbounds i8, ptr %0, i64 340
  store i32 0, ptr %28, align 4, !tbaa !22
  %29 = getelementptr inbounds i8, ptr %0, i64 400
  %30 = load ptr, ptr %29, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.68, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %31 unwind label %50

31:                                               ; preds = %19
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %30, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %32 unwind label %52

32:                                               ; preds = %31
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  %33 = load ptr, ptr %29, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.69, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %34 unwind label %55

34:                                               ; preds = %32
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %33, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %35 unwind label %57

35:                                               ; preds = %34
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  %36 = mul nsw i32 %.0, 616
  %37 = getelementptr inbounds i8, ptr %0, i64 16
  %38 = load i32, ptr %37, align 8, !tbaa !24
  %39 = sdiv i32 %36, 124
  %40 = add nsw i32 %38, %39
  %41 = getelementptr inbounds i8, ptr %0, i64 396
  store i32 %40, ptr %41, align 4, !tbaa !25
  %42 = getelementptr inbounds i8, ptr %0, i64 20
  %43 = load i32, ptr %42, align 4, !tbaa !26
  %44 = sub nsw i32 %43, %39
  %45 = getelementptr inbounds i8, ptr %0, i64 392
  store i32 %44, ptr %45, align 8, !tbaa !27
  %46 = sitofp i32 %40 to double
  %47 = sitofp i32 %44 to double
  call void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408) %0, double noundef %46, double noundef %47)
  %48 = load i32, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE1i, align 4, !tbaa !28
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE1i, align 4, !tbaa !28
  br label %162

50:                                               ; preds = %19
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %54

52:                                               ; preds = %31
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  br label %54

54:                                               ; preds = %52, %50
  %.pn = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #5
  br label %234

55:                                               ; preds = %32
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %59

57:                                               ; preds = %34
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %59

59:                                               ; preds = %57, %55
  %.pn45 = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #5
  br label %234

60:                                               ; preds = %16
  %61 = tail call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %61, label %62, label %93

62:                                               ; preds = %60
  %63 = tail call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %63, label %66, label %64

64:                                               ; preds = %62
  %65 = tail call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br label %66

66:                                               ; preds = %64, %62
  %67 = getelementptr inbounds i8, ptr %0, i64 384
  %68 = load double, ptr %67, align 8, !tbaa !29
  %69 = getelementptr inbounds i8, ptr %0, i64 376
  %70 = load double, ptr %69, align 8, !tbaa !30
  %71 = fsub double %68, %70
  %72 = fmul double %71, 3.000000e+00
  %73 = fptosi double %72 to i32
  %74 = mul nsw i32 %73, 800
  %75 = getelementptr inbounds i8, ptr %0, i64 16
  %76 = load i32, ptr %75, align 8, !tbaa !24
  %77 = sdiv i32 %74, 124
  %78 = add nsw i32 %77, %76
  %79 = getelementptr inbounds i8, ptr %0, i64 396
  store i32 %78, ptr %79, align 4, !tbaa !25
  %80 = getelementptr inbounds i8, ptr %0, i64 20
  %81 = load i32, ptr %80, align 4, !tbaa !26
  %82 = sub nsw i32 %81, %77
  %83 = getelementptr inbounds i8, ptr %0, i64 392
  store i32 %82, ptr %83, align 8, !tbaa !27
  %84 = sitofp i32 %78 to double
  %85 = sitofp i32 %82 to double
  tail call void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408) %0, double noundef %84, double noundef %85)
  %86 = load double, ptr %69, align 8, !tbaa !30
  %87 = load double, ptr %67, align 8, !tbaa !29
  %88 = fadd double %86, %87
  %89 = fmul double %88, 5.000000e-01
  %90 = fcmp ult double %89, 6.500000e+02
  br i1 %90, label %162, label %91

91:                                               ; preds = %66
  store i8 1, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE4turn, align 1, !tbaa !5
  store i32 30, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE1i, align 4, !tbaa !28
  store i32 620, ptr %80, align 4, !tbaa !26
  %92 = getelementptr inbounds i8, ptr %0, i64 328
  store volatile float 0.000000e+00, ptr %92, align 8, !tbaa !19
  br label %162

93:                                               ; preds = %60
  store i8 1, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE4turn, align 1, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 620, ptr %94, align 4, !tbaa !26
  %95 = getelementptr inbounds i8, ptr %0, i64 328
  store volatile float 0.000000e+00, ptr %95, align 8, !tbaa !19
  br label %162

96:                                               ; preds = %1
  %97 = tail call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %97, label %98, label %140

98:                                               ; preds = %96
  %99 = tail call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %99, label %100, label %115

100:                                              ; preds = %98
  %101 = getelementptr inbounds i8, ptr %0, i64 344
  %102 = load double, ptr %101, align 8, !tbaa !31
  %103 = getelementptr inbounds i8, ptr %0, i64 28
  %104 = load float, ptr %103, align 4, !tbaa !32
  %105 = fpext float %104 to double
  %106 = fsub double %102, %105
  %107 = getelementptr inbounds i8, ptr %0, i64 384
  %108 = load double, ptr %107, align 8, !tbaa !29
  %109 = getelementptr inbounds i8, ptr %0, i64 376
  %110 = load double, ptr %109, align 8, !tbaa !30
  %111 = fsub double %108, %110
  %112 = fmul double %111, 3.000000e+00
  %113 = tail call double @llvm.fmuladd.f64(double %106, double 5.000000e-01, double %112)
  %114 = fptosi double %113 to i32
  br label %147

115:                                              ; preds = %98
  %116 = tail call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %116, label %117, label %132

117:                                              ; preds = %115
  %118 = getelementptr inbounds i8, ptr %0, i64 352
  %119 = load double, ptr %118, align 8, !tbaa !33
  %120 = getelementptr inbounds i8, ptr %0, i64 24
  %121 = load float, ptr %120, align 8, !tbaa !34
  %122 = fpext float %121 to double
  %123 = fsub double %119, %122
  %124 = getelementptr inbounds i8, ptr %0, i64 384
  %125 = load double, ptr %124, align 8, !tbaa !29
  %126 = getelementptr inbounds i8, ptr %0, i64 376
  %127 = load double, ptr %126, align 8, !tbaa !30
  %128 = fsub double %125, %127
  %129 = fmul double %128, 3.000000e+00
  %130 = tail call double @llvm.fmuladd.f64(double %123, double -5.000000e-01, double %129)
  %131 = fptosi double %130 to i32
  br label %147

132:                                              ; preds = %115
  %133 = getelementptr inbounds i8, ptr %0, i64 384
  %134 = load double, ptr %133, align 8, !tbaa !29
  %135 = getelementptr inbounds i8, ptr %0, i64 376
  %136 = load double, ptr %135, align 8, !tbaa !30
  %137 = fsub double %134, %136
  %138 = fmul double %137, 3.000000e+00
  %139 = fptosi double %138 to i32
  br label %147

140:                                              ; preds = %96
  %141 = getelementptr inbounds i8, ptr %0, i64 328
  %142 = load volatile float, ptr %141, align 8, !tbaa !19
  %143 = load float, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE11targetAngle, align 4, !tbaa !20
  %144 = fsub float %142, %143
  %145 = fmul float %144, 2.000000e+01
  %146 = fptosi float %145 to i32
  br label %147

147:                                              ; preds = %100, %132, %117, %140
  %.033 = phi i32 [ %114, %100 ], [ %131, %117 ], [ %139, %132 ], [ 0, %140 ]
  %.1 = phi i32 [ %114, %100 ], [ %131, %117 ], [ %139, %132 ], [ %146, %140 ]
  %148 = mul nsw i32 %.1, 200
  %149 = mul nsw i32 %.033, 600
  %150 = add nsw i32 %148, %149
  %151 = getelementptr inbounds i8, ptr %0, i64 16
  %152 = load i32, ptr %151, align 8, !tbaa !24
  %153 = sdiv i32 %150, 124
  %154 = add nsw i32 %153, %152
  %155 = getelementptr inbounds i8, ptr %0, i64 396
  store i32 %154, ptr %155, align 4, !tbaa !25
  %156 = getelementptr inbounds i8, ptr %0, i64 20
  %157 = load i32, ptr %156, align 4, !tbaa !26
  %158 = sub nsw i32 %157, %153
  %159 = getelementptr inbounds i8, ptr %0, i64 392
  store i32 %158, ptr %159, align 8, !tbaa !27
  %160 = sitofp i32 %154 to double
  %161 = sitofp i32 %158 to double
  tail call void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408) %0, double noundef %160, double noundef %161)
  br label %162

162:                                              ; preds = %93, %91, %66, %35, %147
  %163 = load i8, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE8straight, align 1, !tbaa !5, !range !9, !noundef !10
  %164 = trunc nuw i8 %163 to i1
  br i1 %164, label %165, label %233

165:                                              ; preds = %162
  %166 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %166, label %167, label %196

167:                                              ; preds = %165
  %168 = getelementptr inbounds i8, ptr %0, i64 376
  %169 = load double, ptr %168, align 8, !tbaa !30
  %170 = getelementptr inbounds i8, ptr %0, i64 384
  %171 = load double, ptr %170, align 8, !tbaa !29
  %172 = fadd double %169, %171
  %173 = fmul double %172, 5.000000e-01
  %174 = fcmp ult double %173, 5.000000e+02
  br i1 %174, label %233, label %175

175:                                              ; preds = %167
  store i32 0, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE1i, align 4, !tbaa !28
  %176 = getelementptr inbounds i8, ptr %0, i64 328
  store volatile float 0.000000e+00, ptr %176, align 8, !tbaa !19
  %177 = getelementptr inbounds i8, ptr %0, i64 336
  store i32 0, ptr %177, align 8, !tbaa !21
  %178 = getelementptr inbounds i8, ptr %0, i64 340
  store i32 0, ptr %178, align 4, !tbaa !22
  %179 = getelementptr inbounds i8, ptr %0, i64 400
  %180 = load ptr, ptr %179, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @.str.68, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %181 unwind label %186

181:                                              ; preds = %175
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %180, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %182 unwind label %188

182:                                              ; preds = %181
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  %183 = load ptr, ptr %179, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.69, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %184 unwind label %191

184:                                              ; preds = %182
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %183, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %185 unwind label %193

185:                                              ; preds = %184
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  br label %.sink.split

186:                                              ; preds = %175
  %187 = landingpad { ptr, i32 }
          cleanup
  br label %190

188:                                              ; preds = %181
  %189 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %190

190:                                              ; preds = %188, %186
  %.pn51 = phi { ptr, i32 } [ %189, %188 ], [ %187, %186 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %234

191:                                              ; preds = %182
  %192 = landingpad { ptr, i32 }
          cleanup
  br label %195

193:                                              ; preds = %184
  %194 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %195

195:                                              ; preds = %193, %191
  %.pn53 = phi { ptr, i32 } [ %194, %193 ], [ %192, %191 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  br label %234

196:                                              ; preds = %165
  %197 = getelementptr inbounds i8, ptr %0, i64 336
  %198 = load i32, ptr %197, align 8, !tbaa !21
  %199 = getelementptr inbounds i8, ptr %0, i64 340
  %200 = load i32, ptr %199, align 4, !tbaa !22
  %201 = add nsw i32 %200, %198
  %202 = icmp sgt i32 %201, 1731
  br i1 %202, label %203, label %233

203:                                              ; preds = %196
  store i32 0, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE1i, align 4, !tbaa !28
  %204 = getelementptr inbounds i8, ptr %0, i64 328
  store volatile float 0.000000e+00, ptr %204, align 8, !tbaa !19
  store i32 0, ptr %197, align 8, !tbaa !21
  store i32 0, ptr %199, align 4, !tbaa !22
  %205 = getelementptr inbounds i8, ptr %0, i64 400
  %206 = load ptr, ptr %205, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.68, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %207 unwind label %212

207:                                              ; preds = %203
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %206, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %208 unwind label %214

208:                                              ; preds = %207
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  %209 = load ptr, ptr %205, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.69, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %210 unwind label %217

210:                                              ; preds = %208
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %209, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %211 unwind label %219

211:                                              ; preds = %210
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  br label %.sink.split

212:                                              ; preds = %203
  %213 = landingpad { ptr, i32 }
          cleanup
  br label %216

214:                                              ; preds = %207
  %215 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %216

216:                                              ; preds = %214, %212
  %.pn47 = phi { ptr, i32 } [ %215, %214 ], [ %213, %212 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  br label %234

217:                                              ; preds = %208
  %218 = landingpad { ptr, i32 }
          cleanup
  br label %221

219:                                              ; preds = %210
  %220 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br label %221

221:                                              ; preds = %219, %217
  %.pn49 = phi { ptr, i32 } [ %220, %219 ], [ %218, %217 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  br label %234

.sink.split:                                      ; preds = %211, %185
  %222 = getelementptr inbounds i8, ptr %0, i64 332
  store volatile i32 0, ptr %222, align 4, !tbaa !11
  %223 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %224 = getelementptr inbounds i8, ptr %0, i64 293
  %225 = zext i1 %223 to i8
  store volatile i8 %225, ptr %224, align 1, !tbaa !5
  %226 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %227 = getelementptr inbounds i8, ptr %0, i64 294
  %228 = zext i1 %226 to i8
  store volatile i8 %228, ptr %227, align 2, !tbaa !5
  %229 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %230 = getelementptr inbounds i8, ptr %0, i64 295
  %231 = zext i1 %229 to i8
  store volatile i8 %231, ptr %230, align 1, !tbaa !5
  %232 = getelementptr inbounds i8, ptr %0, i64 304
  store i8 1, ptr %232, align 8, !tbaa !35
  store i8 0, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE8straight, align 1, !tbaa !5
  store i8 0, ptr @_ZZN10continuous10Continuous14turnCorrectionEvE4turn, align 1, !tbaa !5
  br label %233

233:                                              ; preds = %.sink.split, %167, %196, %162
  ret void

234:                                              ; preds = %190, %195, %221, %216, %59, %54
  %.pn53.pn.pn = phi { ptr, i32 } [ %.pn49, %221 ], [ %.pn47, %216 ], [ %.pn45, %59 ], [ %.pn, %54 ], [ %.pn53, %195 ], [ %.pn51, %190 ]
  resume { ptr, i32 } %.pn53.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !16, i64 332}
!12 = !{!"_ZTSN10continuous10ContinuousE", !13, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !15, i64 24, !15, i64 28, !7, i64 32, !7, i64 288, !7, i64 293, !6, i64 296, !6, i64 297, !14, i64 300, !6, i64 304, !6, i64 305, !6, i64 306, !6, i64 307, !14, i64 308, !14, i64 312, !14, i64 316, !6, i64 320, !6, i64 321, !6, i64 322, !6, i64 323, !6, i64 324, !15, i64 328, !16, i64 332, !14, i64 336, !14, i64 340, !17, i64 344, !17, i64 352, !17, i64 360, !17, i64 368, !17, i64 376, !17, i64 384, !14, i64 392, !14, i64 396, !18, i64 400}
!13 = !{!"_ZTS15IMouseAlgorithm"}
!14 = !{!"int", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTSN10continuous10ContinuousUt_E", !7, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!12, !15, i64 328}
!20 = !{!15, !15, i64 0}
!21 = !{!12, !14, i64 336}
!22 = !{!12, !14, i64 340}
!23 = !{!12, !18, i64 400}
!24 = !{!12, !14, i64 16}
!25 = !{!12, !14, i64 396}
!26 = !{!12, !14, i64 20}
!27 = !{!12, !14, i64 392}
!28 = !{!14, !14, i64 0}
!29 = !{!12, !17, i64 384}
!30 = !{!12, !17, i64 376}
!31 = !{!12, !17, i64 344}
!32 = !{!12, !15, i64 28}
!33 = !{!12, !17, i64 352}
!34 = !{!12, !15, i64 24}
!35 = !{!12, !6, i64 304}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass