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

; 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

; 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10continuous10Continuous11readSensorsEv(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: mustprogress uwtable
define dso_local void @_ZN10continuous10Continuous10turnAroundEv(ptr noundef nonnull align 8 dereferenceable(408) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator.0", align 1
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::allocator.0", align 1
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator.0", align 1
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator.0", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %25 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store double 8.000000e-01, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store double 8.000000e-01, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #5
  store i8 0, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #5
  store i8 0, ptr %6, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 180, ptr %7, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  %26 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 3
  store i32 620, ptr %26, align 8, !tbaa !15
  %27 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 4
  store i32 620, ptr %27, align 4, !tbaa !20
  %28 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 26
  store volatile i32 0, ptr %28, align 4, !tbaa !21
  %29 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  br i1 %29, label %30, label %31

30:                                               ; preds = %1
  store i8 1, ptr %11, align 1, !tbaa !11
  br label %33

31:                                               ; preds = %1
  %32 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 21
  store volatile i8 1, ptr %32, align 1, !tbaa !22
  store i8 0, ptr %11, align 1, !tbaa !11
  br label %33

33:                                               ; preds = %31, %30
  %34 = load i8, ptr %11, align 1, !tbaa !11, !range !23, !noundef !24
  %35 = trunc i8 %34 to i1
  br i1 %35, label %36, label %147

36:                                               ; preds = %33
  br label %37

37:                                               ; preds = %127, %36
  %38 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 34
  %39 = load double, ptr %38, align 8, !tbaa !25
  %40 = fcmp ole double %39, 8.000000e-01
  br i1 %40, label %45, label %41

41:                                               ; preds = %37
  %42 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 33
  %43 = load double, ptr %42, align 8, !tbaa !26
  %44 = fcmp ole double %43, 8.000000e-01
  br label %45

45:                                               ; preds = %41, %37
  %46 = phi i1 [ true, %37 ], [ %44, %41 ]
  br i1 %46, label %47, label %146

47:                                               ; preds = %45
  call void @_ZN10continuous10Continuous11readSensorsEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  %48 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  br i1 %48, label %49, label %58

49:                                               ; preds = %47
  %50 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  br i1 %50, label %51, label %58

51:                                               ; preds = %49
  %52 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 29
  %53 = load double, ptr %52, align 8, !tbaa !27
  %54 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 30
  %55 = load double, ptr %54, align 8, !tbaa !28
  %56 = fsub double %53, %55
  %57 = fptosi double %56 to i32
  store i32 %57, ptr %8, align 4, !tbaa !13
  br label %102

58:                                               ; preds = %49, %47
  %59 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  br i1 %59, label %60, label %76

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %61 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 5
  %62 = load float, ptr %61, align 8, !tbaa !29
  %63 = fptosi float %62 to i32
  store i32 %63, ptr %12, align 4, !tbaa !13
  %64 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 25
  %65 = load volatile float, ptr %64, align 8, !tbaa !30
  %66 = fmul float 2.000000e+01, %65
  %67 = fpext float %66 to double
  %68 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 30
  %69 = load double, ptr %68, align 8, !tbaa !28
  %70 = load i32, ptr %12, align 4, !tbaa !13
  %71 = sitofp i32 %70 to double
  %72 = fsub double %69, %71
  %73 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %72, double %67)
  %74 = fptosi double %73 to i32
  store i32 %74, ptr %8, align 4, !tbaa !13
  store i32 0, ptr %8, align 4, !tbaa !13
  %75 = load i32, ptr %8, align 4, !tbaa !13
  store i32 %75, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %101

76:                                               ; preds = %58
  %77 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  br i1 %77, label %78, label %94

78:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %79 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 6
  %80 = load float, ptr %79, align 4, !tbaa !31
  %81 = fptosi float %80 to i32
  store i32 %81, ptr %13, align 4, !tbaa !13
  %82 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 25
  %83 = load volatile float, ptr %82, align 8, !tbaa !30
  %84 = fmul float 2.000000e+01, %83
  %85 = fpext float %84 to double
  %86 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 29
  %87 = load double, ptr %86, align 8, !tbaa !27
  %88 = load i32, ptr %13, align 4, !tbaa !13
  %89 = sitofp i32 %88 to double
  %90 = fsub double %87, %89
  %91 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %90, double %85)
  %92 = fptosi double %91 to i32
  store i32 %92, ptr %8, align 4, !tbaa !13
  store i32 0, ptr %8, align 4, !tbaa !13
  %93 = load i32, ptr %8, align 4, !tbaa !13
  store i32 %93, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %100

94:                                               ; preds = %76
  %95 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 25
  %96 = load volatile float, ptr %95, align 8, !tbaa !30
  %97 = fmul float 2.000000e+01, %96
  %98 = fptosi float %97 to i32
  store i32 %98, ptr %8, align 4, !tbaa !13
  store i32 0, ptr %8, align 4, !tbaa !13
  %99 = load i32, ptr %8, align 4, !tbaa !13
  store i32 %99, ptr %9, align 4, !tbaa !13
  br label %100

100:                                              ; preds = %94, %78
  br label %101

101:                                              ; preds = %100, %60
  br label %102

102:                                              ; preds = %101, %51
  %103 = load i32, ptr %8, align 4, !tbaa !13
  store i32 %103, ptr %9, align 4, !tbaa !13
  %104 = load i32, ptr %8, align 4, !tbaa !13
  %105 = mul nsw i32 200, %104
  %106 = load i32, ptr %9, align 4, !tbaa !13
  %107 = mul nsw i32 600, %106
  %108 = add nsw i32 %105, %107
  store i32 %108, ptr %10, align 4, !tbaa !13
  %109 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 37
  %110 = load ptr, ptr %109, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.68, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %111 unwind label %128

111:                                              ; preds = %102
  %112 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 3
  %113 = load i32, ptr %112, align 8, !tbaa !15
  %114 = load i32, ptr %10, align 4, !tbaa !13
  %115 = add nsw i32 %113, %114
  %116 = sub nsw i32 0, %115
  %117 = sitofp i32 %116 to double
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %110, ptr noundef nonnull align 8 dereferenceable(32) %14, double noundef %117)
          to label %118 unwind label %132

118:                                              ; preds = %111
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  %119 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 37
  %120 = load ptr, ptr %119, align 8, !tbaa !32
  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.69, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %121 unwind label %137

121:                                              ; preds = %118
  %122 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 4
  %123 = load i32, ptr %122, align 4, !tbaa !20
  %124 = load i32, ptr %10, align 4, !tbaa !13
  %125 = sub nsw i32 %123, %124
  %126 = sitofp i32 %125 to double
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %120, ptr noundef nonnull align 8 dereferenceable(32) %18, double noundef %126)
          to label %127 unwind label %141

127:                                              ; preds = %121
  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
  br label %37, !llvm.loop !33

128:                                              ; preds = %102
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %16, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %17, align 4
  br label %136

132:                                              ; preds = %111
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %16, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %136

136:                                              ; preds = %132, %128
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %272

137:                                              ; preds = %118
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %16, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %17, align 4
  br label %145

141:                                              ; preds = %121
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %16, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  br label %145

145:                                              ; preds = %141, %137
  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 %272

146:                                              ; preds = %45
  br label %234

147:                                              ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 100, ptr %20, align 4, !tbaa !13
  br label %148

148:                                              ; preds = %208, %147
  %149 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 27
  %150 = load i32, ptr %149, align 8, !tbaa !35
  %151 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 28
  %152 = load i32, ptr %151, align 4, !tbaa !36
  %153 = add nsw i32 %150, %152
  %154 = sdiv i32 %153, 2
  %155 = icmp slt i32 %154, 100
  br i1 %155, label %156, label %233

156:                                              ; preds = %148
  %157 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  br i1 %157, label %158, label %168

158:                                              ; preds = %156
  %159 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  br i1 %159, label %160, label %168

160:                                              ; preds = %158
  %161 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 29
  %162 = load double, ptr %161, align 8, !tbaa !27
  %163 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 30
  %164 = load double, ptr %163, align 8, !tbaa !28
  %165 = fsub double %162, %164
  %166 = fsub double %165, 1.000000e+02
  %167 = fptosi double %166 to i32
  store i32 %167, ptr %8, align 4, !tbaa !13
  br label %208

168:                                              ; preds = %158, %156
  %169 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  br i1 %169, label %170, label %184

170:                                              ; preds = %168
  %171 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 25
  %172 = load volatile float, ptr %171, align 8, !tbaa !30
  %173 = fmul float 2.000000e+01, %172
  %174 = fpext float %173 to double
  %175 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 30
  %176 = load double, ptr %175, align 8, !tbaa !28
  %177 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 5
  %178 = load float, ptr %177, align 8, !tbaa !29
  %179 = fpext float %178 to double
  %180 = fsub double %176, %179
  %181 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %180, double %174)
  %182 = fptosi double %181 to i32
  store i32 %182, ptr %8, align 4, !tbaa !13
  %183 = load i32, ptr %8, align 4, !tbaa !13
  store i32 %183, ptr %9, align 4, !tbaa !13
  br label %207

184:                                              ; preds = %168
  %185 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  br i1 %185, label %186, label %200

186:                                              ; preds = %184
  %187 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 25
  %188 = load volatile float, ptr %187, align 8, !tbaa !30
  %189 = fmul float 2.000000e+01, %188
  %190 = fpext float %189 to double
  %191 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 29
  %192 = load double, ptr %191, align 8, !tbaa !27
  %193 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 6
  %194 = load float, ptr %193, align 4, !tbaa !31
  %195 = fpext float %194 to double
  %196 = fsub double %192, %195
  %197 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %196, double %190)
  %198 = fptosi double %197 to i32
  store i32 %198, ptr %8, align 4, !tbaa !13
  %199 = load i32, ptr %8, align 4, !tbaa !13
  store i32 %199, ptr %9, align 4, !tbaa !13
  br label %206

200:                                              ; preds = %184
  %201 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 25
  %202 = load volatile float, ptr %201, align 8, !tbaa !30
  %203 = fmul float 2.000000e+01, %202
  %204 = fptosi float %203 to i32
  store i32 %204, ptr %8, align 4, !tbaa !13
  %205 = load i32, ptr %8, align 4, !tbaa !13
  store i32 %205, ptr %9, align 4, !tbaa !13
  br label %206

206:                                              ; preds = %200, %186
  br label %207

207:                                              ; preds = %206, %170
  br label %208

208:                                              ; preds = %207, %160
  %209 = load i32, ptr %8, align 4, !tbaa !13
  store i32 %209, ptr %9, align 4, !tbaa !13
  %210 = load i32, ptr %8, align 4, !tbaa !13
  %211 = mul nsw i32 200, %210
  %212 = load i32, ptr %9, align 4, !tbaa !13
  %213 = mul nsw i32 600, %212
  %214 = add nsw i32 %211, %213
  store i32 %214, ptr %10, align 4, !tbaa !13
  %215 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 3
  %216 = load i32, ptr %215, align 8, !tbaa !15
  %217 = load i32, ptr %10, align 4, !tbaa !13
  %218 = sdiv i32 %217, 124
  %219 = add nsw i32 %216, %218
  %220 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 36
  store i32 %219, ptr %220, align 4, !tbaa !37
  %221 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 4
  %222 = load i32, ptr %221, align 4, !tbaa !20
  %223 = load i32, ptr %10, align 4, !tbaa !13
  %224 = sdiv i32 %223, 124
  %225 = sub nsw i32 %222, %224
  %226 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 35
  store i32 %225, ptr %226, align 8, !tbaa !38
  %227 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 36
  %228 = load i32, ptr %227, align 4, !tbaa !37
  %229 = sitofp i32 %228 to double
  %230 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 35
  %231 = load i32, ptr %230, align 8, !tbaa !38
  %232 = sitofp i32 %231 to double
  call void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408) %25, double noundef %229, double noundef %232)
  br label %148, !llvm.loop !39

233:                                              ; preds = %148
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %234

234:                                              ; preds = %233, %146
  br label %235

235:                                              ; preds = %234
  br label %236

236:                                              ; preds = %235
  call void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408) %25, double noundef 0.000000e+00, double noundef 0.000000e+00)
  store i8 0, ptr %5, align 1, !tbaa !11
  store i8 0, ptr %6, align 1, !tbaa !11
  call void @_ZN10continuous10Continuous14pivotTurnRightEv(ptr noundef nonnull align 8 dereferenceable(408) %25)
  %237 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 25
  store volatile float 0.000000e+00, ptr %237, align 8, !tbaa !30
  %238 = load i8, ptr %11, align 1, !tbaa !11, !range !23, !noundef !24
  %239 = trunc i8 %238 to i1
  br i1 %239, label %240, label %242

240:                                              ; preds = %236
  %241 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 20
  store volatile i8 1, ptr %241, align 8, !tbaa !40
  br label %244

242:                                              ; preds = %236
  %243 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 21
  store volatile i8 1, ptr %243, align 1, !tbaa !22
  br label %244

244:                                              ; preds = %242, %240
  %245 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 37
  %246 = load ptr, ptr %245, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.68, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %247 unwind label %253

247:                                              ; preds = %244
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %246, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %248 unwind label %257

248:                                              ; preds = %247
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #5
  %249 = getelementptr inbounds %"class.continuous::Continuous", ptr %25, i32 0, i32 37
  %250 = load ptr, ptr %249, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str.69, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %251 unwind label %262

251:                                              ; preds = %248
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %250, ptr noundef nonnull align 8 dereferenceable(32) %23)
          to label %252 unwind label %266

252:                                              ; preds = %251
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #5
  br label %271

253:                                              ; preds = %244
  %254 = landingpad { ptr, i32 }
          cleanup
  %255 = extractvalue { ptr, i32 } %254, 0
  store ptr %255, ptr %16, align 8
  %256 = extractvalue { ptr, i32 } %254, 1
  store i32 %256, ptr %17, align 4
  br label %261

257:                                              ; preds = %247
  %258 = landingpad { ptr, i32 }
          cleanup
  %259 = extractvalue { ptr, i32 } %258, 0
  store ptr %259, ptr %16, align 8
  %260 = extractvalue { ptr, i32 } %258, 1
  store i32 %260, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #5
  br label %261

261:                                              ; preds = %257, %253
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #5
  br label %272

262:                                              ; preds = %248
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %16, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %17, align 4
  br label %270

266:                                              ; preds = %251
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %16, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #5
  br label %270

270:                                              ; preds = %266, %262
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #5
  br label %272

271:                                              ; preds = %252
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  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 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret void

272:                                              ; preds = %270, %261, %145, %136
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  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 1, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %273

273:                                              ; preds = %272
  %274 = load ptr, ptr %16, align 8
  %275 = load i32, ptr %17, align 4
  %276 = insertvalue { ptr, i32 } poison, ptr %274, 0
  %277 = insertvalue { ptr, i32 } %276, i32 %275, 1
  resume { ptr, i32 } %277
}

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

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

; 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
declare dso_local void @_ZN10continuous10Continuous14pivotTurnRightEv(ptr noundef nonnull align 8 dereferenceable(408)) #2 align 2

; 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !14, i64 16}
!16 = !{!"_ZTSN10continuous10ContinuousE", !17, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !18, i64 24, !18, i64 28, !7, i64 32, !7, i64 288, !7, i64 293, !12, i64 296, !12, i64 297, !14, i64 300, !12, i64 304, !12, i64 305, !12, i64 306, !12, i64 307, !14, i64 308, !14, i64 312, !14, i64 316, !12, i64 320, !12, i64 321, !12, i64 322, !12, i64 323, !12, i64 324, !18, i64 328, !19, i64 332, !14, i64 336, !14, i64 340, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !14, i64 392, !14, i64 396, !6, i64 400}
!17 = !{!"_ZTS15IMouseAlgorithm"}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSN10continuous10ContinuousUt_E", !7, i64 0}
!20 = !{!16, !14, i64 20}
!21 = !{!16, !19, i64 332}
!22 = !{!16, !12, i64 321}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = !{!16, !10, i64 384}
!26 = !{!16, !10, i64 376}
!27 = !{!16, !10, i64 344}
!28 = !{!16, !10, i64 352}
!29 = !{!16, !18, i64 24}
!30 = !{!16, !18, i64 328}
!31 = !{!16, !18, i64 28}
!32 = !{!16, !6, i64 400}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!16, !14, i64 336}
!36 = !{!16, !14, i64 340}
!37 = !{!16, !14, i64 396}
!38 = !{!16, !14, i64 392}
!39 = distinct !{!39, !34}
!40 = !{!16, !12, i64 320}


; 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

; 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10continuous10Continuous11readSensorsEv(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 uwtable
define dso_local void @_ZN10continuous10Continuous10turnAroundEv(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 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 620, ptr %10, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 620, ptr %11, align 4, !tbaa !16
  %12 = getelementptr inbounds i8, ptr %0, i64 332
  store volatile i32 0, ptr %12, align 4, !tbaa !17
  %13 = tail call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %13, label %.critedge39.preheader, label %24

.critedge39.preheader:                            ; preds = %1
  %14 = getelementptr inbounds i8, ptr %0, i64 384
  %15 = getelementptr inbounds i8, ptr %0, i64 376
  %16 = load double, ptr %14, align 8, !tbaa !18
  %17 = fcmp ugt double %16, 8.000000e-01
  %18 = load double, ptr %15, align 8
  %19 = fcmp ugt double %18, 8.000000e-01
  %or.cond43 = select i1 %17, i1 %19, i1 false
  br i1 %or.cond43, label %.loopexit, label %.critedge.lr.ph

.critedge.lr.ph:                                  ; preds = %.critedge39.preheader
  %20 = getelementptr inbounds i8, ptr %0, i64 328
  %21 = getelementptr inbounds i8, ptr %0, i64 344
  %22 = getelementptr inbounds i8, ptr %0, i64 352
  %23 = getelementptr inbounds i8, ptr %0, i64 400
  br label %.critedge

24:                                               ; preds = %1
  %25 = getelementptr inbounds i8, ptr %0, i64 321
  store volatile i8 1, ptr %25, align 1, !tbaa !19
  %26 = getelementptr inbounds i8, ptr %0, i64 336
  %27 = getelementptr inbounds i8, ptr %0, i64 340
  %28 = load i32, ptr %26, align 8, !tbaa !20
  %29 = load i32, ptr %27, align 4, !tbaa !21
  %30 = add nsw i32 %29, %28
  %31 = icmp slt i32 %30, 200
  br i1 %31, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %24
  %32 = getelementptr inbounds i8, ptr %0, i64 328
  %33 = getelementptr inbounds i8, ptr %0, i64 344
  %34 = getelementptr inbounds i8, ptr %0, i64 28
  %35 = getelementptr inbounds i8, ptr %0, i64 352
  %36 = getelementptr inbounds i8, ptr %0, i64 24
  %37 = getelementptr inbounds i8, ptr %0, i64 396
  %38 = getelementptr inbounds i8, ptr %0, i64 392
  br label %82

.critedge:                                        ; preds = %.critedge.lr.ph, %.critedge39
  call void @_ZN10continuous10Continuous11readSensorsEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %39 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %39, label %40, label %47

40:                                               ; preds = %.critedge
  %41 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %41, label %42, label %47

42:                                               ; preds = %40
  %43 = load double, ptr %21, align 8, !tbaa !22
  %44 = load double, ptr %22, align 8, !tbaa !23
  %45 = fsub double %43, %44
  %46 = fptosi double %45 to i32
  br label %54

47:                                               ; preds = %40, %.critedge
  %48 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %48, label %49, label %51

49:                                               ; preds = %47
  %50 = load volatile float, ptr %20, align 8, !tbaa !24
  br label %54

51:                                               ; preds = %47
  %52 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %53 = load volatile float, ptr %20, align 8, !tbaa !24
  br label %54

54:                                               ; preds = %51, %49, %42
  %.027 = phi i32 [ %46, %42 ], [ 0, %49 ], [ 0, %51 ]
  %55 = mul nsw i32 %.027, 800
  %56 = load ptr, ptr %23, align 8, !tbaa !25
  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 %57 unwind label %72

57:                                               ; preds = %54
  %58 = load i32, ptr %10, align 8, !tbaa !5
  %59 = add nsw i32 %55, %58
  %60 = sub nsw i32 0, %59
  %61 = sitofp i32 %60 to double
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %56, ptr noundef nonnull align 8 dereferenceable(32) %2, double noundef %61)
          to label %62 unwind label %74

62:                                               ; preds = %57
  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
  %63 = load ptr, ptr %23, align 8, !tbaa !25
  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 %64 unwind label %77

64:                                               ; preds = %62
  %65 = load i32, ptr %11, align 4, !tbaa !16
  %66 = sub nsw i32 %65, %55
  %67 = sitofp i32 %66 to double
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %63, ptr noundef nonnull align 8 dereferenceable(32) %4, double noundef %67)
          to label %.critedge39 unwind label %79

.critedge39:                                      ; preds = %64
  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
  %68 = load double, ptr %14, align 8, !tbaa !18
  %69 = fcmp ugt double %68, 8.000000e-01
  %70 = load double, ptr %15, align 8
  %71 = fcmp ugt double %70, 8.000000e-01
  %or.cond = select i1 %69, i1 %71, i1 false
  br i1 %or.cond, label %.loopexit, label %.critedge, !llvm.loop !26

72:                                               ; preds = %54
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %76

74:                                               ; preds = %57
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  br label %76

76:                                               ; preds = %74, %72
  %.pn33 = phi { ptr, i32 } [ %75, %74 ], [ %73, %72 ]
  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 %154

77:                                               ; preds = %62
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %81

79:                                               ; preds = %64
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %81

81:                                               ; preds = %79, %77
  %.pn35 = phi { ptr, i32 } [ %80, %79 ], [ %78, %77 ]
  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 %154

82:                                               ; preds = %.lr.ph, %118
  %83 = tail call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %83, label %84, label %92

84:                                               ; preds = %82
  %85 = tail call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %85, label %86, label %92

86:                                               ; preds = %84
  %87 = load double, ptr %33, align 8, !tbaa !22
  %88 = load double, ptr %35, align 8, !tbaa !23
  %89 = fsub double %87, %88
  %90 = fadd double %89, -1.000000e+02
  %91 = fptosi double %90 to i32
  br label %118

92:                                               ; preds = %84, %82
  %93 = tail call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %93, label %94, label %104

94:                                               ; preds = %92
  %95 = load volatile float, ptr %32, align 8, !tbaa !24
  %96 = fmul float %95, 2.000000e+01
  %97 = fpext float %96 to double
  %98 = load double, ptr %35, align 8, !tbaa !23
  %99 = load float, ptr %36, align 8, !tbaa !28
  %100 = fpext float %99 to double
  %101 = fsub double %98, %100
  %102 = tail call double @llvm.fmuladd.f64(double %101, double -5.000000e-01, double %97)
  %103 = fptosi double %102 to i32
  br label %118

104:                                              ; preds = %92
  %105 = tail call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %106 = load volatile float, ptr %32, align 8, !tbaa !24
  %107 = fmul float %106, 2.000000e+01
  br i1 %105, label %108, label %116

108:                                              ; preds = %104
  %109 = fpext float %107 to double
  %110 = load double, ptr %33, align 8, !tbaa !22
  %111 = load float, ptr %34, align 4, !tbaa !29
  %112 = fpext float %111 to double
  %113 = fsub double %110, %112
  %114 = tail call double @llvm.fmuladd.f64(double %113, double 5.000000e-01, double %109)
  %115 = fptosi double %114 to i32
  br label %118

116:                                              ; preds = %104
  %117 = fptosi float %107 to i32
  br label %118

118:                                              ; preds = %94, %116, %108, %86
  %.128 = phi i32 [ %91, %86 ], [ %103, %94 ], [ %115, %108 ], [ %117, %116 ]
  %119 = mul nsw i32 %.128, 800
  %120 = load i32, ptr %10, align 8, !tbaa !5
  %121 = sdiv i32 %119, 124
  %122 = add nsw i32 %121, %120
  store i32 %122, ptr %37, align 4, !tbaa !30
  %123 = load i32, ptr %11, align 4, !tbaa !16
  %124 = sub nsw i32 %123, %121
  store i32 %124, ptr %38, align 8, !tbaa !31
  %125 = sitofp i32 %122 to double
  %126 = sitofp i32 %124 to double
  tail call void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408) %0, double noundef %125, double noundef %126)
  %127 = load i32, ptr %26, align 8, !tbaa !20
  %128 = load i32, ptr %27, align 4, !tbaa !21
  %129 = add nsw i32 %128, %127
  %130 = icmp slt i32 %129, 200
  br i1 %130, label %82, label %.loopexit, !llvm.loop !32

.loopexit:                                        ; preds = %118, %.critedge39, %24, %.critedge39.preheader
  call void @_ZN10continuous10Continuous8setSpeedEdd(ptr noundef nonnull align 8 dereferenceable(408) %0, double noundef 0.000000e+00, double noundef 0.000000e+00)
  call void @_ZN10continuous10Continuous14pivotTurnRightEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %131 = getelementptr inbounds i8, ptr %0, i64 328
  store volatile float 0.000000e+00, ptr %131, align 8, !tbaa !24
  br i1 %13, label %132, label %134

132:                                              ; preds = %.loopexit
  %133 = getelementptr inbounds i8, ptr %0, i64 320
  store volatile i8 1, ptr %133, align 8, !tbaa !33
  br label %136

134:                                              ; preds = %.loopexit
  %135 = getelementptr inbounds i8, ptr %0, i64 321
  store volatile i8 1, ptr %135, align 1, !tbaa !19
  br label %136

136:                                              ; preds = %134, %132
  %137 = getelementptr inbounds i8, ptr %0, i64 400
  %138 = load ptr, ptr %137, align 8, !tbaa !25
  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 %139 unwind label %144

139:                                              ; preds = %136
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %138, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %140 unwind label %146

140:                                              ; preds = %139
  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
  %141 = load ptr, ptr %137, align 8, !tbaa !25
  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 %142 unwind label %149

142:                                              ; preds = %140
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %141, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %143 unwind label %151

143:                                              ; preds = %142
  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
  ret void

144:                                              ; preds = %136
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %148

146:                                              ; preds = %139
  %147 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %148

148:                                              ; preds = %146, %144
  %.pn = phi { ptr, i32 } [ %147, %146 ], [ %145, %144 ]
  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 %154

149:                                              ; preds = %140
  %150 = landingpad { ptr, i32 }
          cleanup
  br label %153

151:                                              ; preds = %142
  %152 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %153

153:                                              ; preds = %151, %149
  %.pn31 = phi { ptr, i32 } [ %152, %151 ], [ %150, %149 ]
  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 %154

154:                                              ; preds = %153, %148, %81, %76
  %.pn35.pn = phi { ptr, i32 } [ %.pn35, %81 ], [ %.pn33, %76 ], [ %.pn31, %153 ], [ %.pn, %148 ]
  resume { ptr, i32 } %.pn35.pn
}

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

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

; 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
declare dso_local void @_ZN10continuous10Continuous14pivotTurnRightEv(ptr noundef nonnull align 8 dereferenceable(408)) local_unnamed_addr #2 align 2

; 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, !8, i64 16}
!6 = !{!"_ZTSN10continuous10ContinuousE", !7, i64 0, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !11, i64 24, !11, i64 28, !9, i64 32, !9, i64 288, !9, i64 293, !12, i64 296, !12, i64 297, !8, i64 300, !12, i64 304, !12, i64 305, !12, i64 306, !12, i64 307, !8, i64 308, !8, i64 312, !8, i64 316, !12, i64 320, !12, i64 321, !12, i64 322, !12, i64 323, !12, i64 324, !11, i64 328, !13, i64 332, !8, i64 336, !8, i64 340, !14, i64 344, !14, i64 352, !14, i64 360, !14, i64 368, !14, i64 376, !14, i64 384, !8, i64 392, !8, i64 396, !15, i64 400}
!7 = !{!"_ZTS15IMouseAlgorithm"}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"float", !9, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = !{!"_ZTSN10continuous10ContinuousUt_E", !9, i64 0}
!14 = !{!"double", !9, i64 0}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!6, !8, i64 20}
!17 = !{!6, !13, i64 332}
!18 = !{!6, !14, i64 384}
!19 = !{!6, !12, i64 321}
!20 = !{!6, !8, i64 336}
!21 = !{!6, !8, i64 340}
!22 = !{!6, !14, i64 344}
!23 = !{!6, !14, i64 352}
!24 = !{!6, !11, i64 328}
!25 = !{!6, !15, i64 400}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!6, !11, i64 24}
!29 = !{!6, !11, i64 28}
!30 = !{!6, !8, i64 396}
!31 = !{!6, !8, i64 392}
!32 = distinct !{!32, !27}
!33 = !{!6, !12, i64 320}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass