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

; 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 }

@_ZN10continuous10startAngleE = external dso_local global double, align 8
@_ZN10continuous13forwardOffsetE = external dso_local global i32, align 4
@.str.68 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [12 x i8], align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE14nextRightValid = external hidden global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE13nextLeftValid = external hidden global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE15nextCellDecided = external hidden global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE9oldErrorP = external hidden global i32, align 4
@_ZZN10continuous10Continuous17forwardCorrectionEvE7endCell = external hidden global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE15currentWallLeft = external hidden global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE16currentWallRight = external hidden global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE12ticksDecided = external hidden global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE5count = external hidden global i32, align 4
@_ZZN10continuous10Continuous17forwardCorrectionEvE13targetDegrees = external hidden global double, align 8
@_ZZN10continuous10Continuous17forwardCorrectionEvE1i = external hidden global i32, align 4

; 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
define dso_local void @_ZN10continuous10Continuous17forwardCorrectionEv(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 double, align 8
  %5 = alloca double, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.0", align 1
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator.0", align 1
  %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
  store ptr %0, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 1679, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store double 5.000000e-01, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store double 5.000000e-01, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1104, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 1335, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %23 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE1i, align 4, !tbaa !9
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %59

25:                                               ; preds = %1
  %26 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 37
  %27 = load ptr, ptr %26, align 8, !tbaa !13
  %28 = call noundef double @_ZN3sim14MouseInterface22currentRotationDegreesEv(ptr noundef nonnull align 8 dereferenceable(296) %27)
  store double %28, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !11
  %29 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !11
  %30 = fcmp oge double %29, 0.000000e+00
  br i1 %30, label %31, label %34

31:                                               ; preds = %25
  %32 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !11
  %33 = fcmp olt double %32, 4.500000e+01
  br i1 %33, label %40, label %34

34:                                               ; preds = %31, %25
  %35 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !11
  %36 = fcmp ogt double %35, 3.150000e+02
  br i1 %36, label %37, label %41

37:                                               ; preds = %34
  %38 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !11
  %39 = fcmp ole double %38, 3.600000e+02
  br i1 %39, label %40, label %41

40:                                               ; preds = %37, %31
  store double 3.600000e+02, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13targetDegrees, align 8, !tbaa !11
  br label %58

41:                                               ; preds = %37, %34
  %42 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !11
  %43 = fcmp ogt double %42, 4.500000e+01
  br i1 %43, label %44, label %48

44:                                               ; preds = %41
  %45 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !11
  %46 = fcmp olt double %45, 1.350000e+02
  br i1 %46, label %47, label %48

47:                                               ; preds = %44
  store double 9.000000e+01, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13targetDegrees, align 8, !tbaa !11
  br label %57

48:                                               ; preds = %44, %41
  %49 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !11
  %50 = fcmp ogt double %49, 1.350000e+02
  br i1 %50, label %51, label %55

51:                                               ; preds = %48
  %52 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !11
  %53 = fcmp olt double %52, 2.250000e+02
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  store double 1.800000e+02, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13targetDegrees, align 8, !tbaa !11
  br label %56

55:                                               ; preds = %51, %48
  store double 2.700000e+02, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13targetDegrees, align 8, !tbaa !11
  br label %56

56:                                               ; preds = %55, %54
  br label %57

57:                                               ; preds = %56, %47
  br label %58

58:                                               ; preds = %57, %40
  br label %59

59:                                               ; preds = %58, %1
  %60 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE1i, align 4, !tbaa !9
  %61 = add nsw i32 %60, 1
  store i32 %61, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE1i, align 4, !tbaa !9
  %62 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 37
  %63 = load ptr, ptr %62, align 8, !tbaa !13
  %64 = call noundef double @_ZN3sim14MouseInterface22currentRotationDegreesEv(ptr noundef nonnull align 8 dereferenceable(296) %63)
  store double %64, ptr %11, align 8, !tbaa !11
  %65 = load double, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13targetDegrees, align 8, !tbaa !11
  %66 = fcmp oeq double %65, 3.600000e+02
  br i1 %66, label %67, label %74

67:                                               ; preds = %59
  %68 = load double, ptr %11, align 8, !tbaa !11
  %69 = fcmp ole double %68, 4.500000e+01
  br i1 %69, label %70, label %73

70:                                               ; preds = %67
  %71 = load double, ptr %11, align 8, !tbaa !11
  %72 = fadd double %71, 3.600000e+02
  store double %72, ptr %11, align 8, !tbaa !11
  br label %73

73:                                               ; preds = %70, %67
  br label %74

74:                                               ; preds = %73, %59
  %75 = load double, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13targetDegrees, align 8, !tbaa !11
  %76 = load double, ptr %11, align 8, !tbaa !11
  %77 = fsub double %76, %75
  store double %77, ptr %11, align 8, !tbaa !11
  %78 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 37
  %79 = load ptr, ptr %78, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %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 @.str.68, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %80 unwind label %105

80:                                               ; preds = %74
  %81 = invoke noundef i32 @_ZN3sim14MouseInterface16readWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %79, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %82 unwind label %109

82:                                               ; preds = %80
  %83 = sub nsw i32 0, %81
  %84 = load i32, ptr @_ZN10continuous13forwardOffsetE, align 4, !tbaa !9
  %85 = add nsw i32 %83, %84
  %86 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 28
  store i32 %85, ptr %86, align 4, !tbaa !19
  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 %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  %87 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 37
  %88 = load ptr, ptr %87, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.69, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %89 unwind label %114

89:                                               ; preds = %82
  %90 = invoke noundef i32 @_ZN3sim14MouseInterface16readWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %88, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %91 unwind label %118

91:                                               ; preds = %89
  %92 = load i32, ptr @_ZN10continuous13forwardOffsetE, align 4, !tbaa !9
  %93 = add nsw i32 %90, %92
  %94 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 27
  store i32 %93, ptr %94, align 8, !tbaa !20
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  %95 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 15
  %96 = load i8, ptr %95, align 2, !tbaa !21, !range !22, !noundef !23
  %97 = trunc i8 %96 to i1
  br i1 %97, label %98, label %159

98:                                               ; preds = %91
  %99 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 3
  %100 = load i32, ptr %99, align 8, !tbaa !24
  %101 = icmp eq i32 %100, 0
  br i1 %101, label %102, label %123

102:                                              ; preds = %98
  %103 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 3
  store i32 30, ptr %103, align 8, !tbaa !24
  %104 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 4
  store i32 30, ptr %104, align 4, !tbaa !25
  br label %123

105:                                              ; preds = %74
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %14, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %15, align 4
  br label %113

109:                                              ; preds = %80
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %14, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br label %113

113:                                              ; preds = %109, %105
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  br label %344

114:                                              ; preds = %82
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %14, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %15, align 4
  br label %122

118:                                              ; preds = %89
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %14, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  br label %122

122:                                              ; preds = %118, %114
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  br label %344

123:                                              ; preds = %102, %98
  %124 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE5count, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE5count, align 4, !tbaa !9
  %126 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE5count, align 4, !tbaa !9
  %127 = srem i32 %126, 1
  %128 = icmp eq i32 %127, 0
  br i1 %128, label %129, label %158

129:                                              ; preds = %123
  %130 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 3
  %131 = load i32, ptr %130, align 8, !tbaa !24
  %132 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 17
  %133 = load i32, ptr %132, align 4, !tbaa !26
  %134 = icmp slt i32 %131, %133
  br i1 %134, label %135, label %142

135:                                              ; preds = %129
  %136 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 3
  %137 = load i32, ptr %136, align 8, !tbaa !24
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %136, align 8, !tbaa !24
  %139 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 4
  %140 = load i32, ptr %139, align 4, !tbaa !25
  %141 = add nsw i32 %140, 1
  store i32 %141, ptr %139, align 4, !tbaa !25
  br label %157

142:                                              ; preds = %129
  %143 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 3
  %144 = load i32, ptr %143, align 8, !tbaa !24
  %145 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 17
  %146 = load i32, ptr %145, align 4, !tbaa !26
  %147 = icmp sgt i32 %144, %146
  br i1 %147, label %148, label %155

148:                                              ; preds = %142
  %149 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 3
  %150 = load i32, ptr %149, align 8, !tbaa !24
  %151 = add nsw i32 %150, -1
  store i32 %151, ptr %149, align 8, !tbaa !24
  %152 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 4
  %153 = load i32, ptr %152, align 4, !tbaa !25
  %154 = add nsw i32 %153, -1
  store i32 %154, ptr %152, align 4, !tbaa !25
  br label %156

155:                                              ; preds = %142
  store i32 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE5count, align 4, !tbaa !9
  br label %156

156:                                              ; preds = %155, %148
  br label %157

157:                                              ; preds = %156, %135
  br label %158

158:                                              ; preds = %157, %123
  br label %159

159:                                              ; preds = %158, %91
  %160 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 27
  %161 = load i32, ptr %160, align 8, !tbaa !20
  %162 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 28
  %163 = load i32, ptr %162, align 4, !tbaa !19
  %164 = add nsw i32 %161, %163
  %165 = sdiv i32 %164, 2
  %166 = icmp sge i32 %165, 1104
  br i1 %166, label %167, label %201

167:                                              ; preds = %159
  %168 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE15nextCellDecided, align 1, !tbaa !27, !range !22, !noundef !23
  %169 = trunc i8 %168 to i1
  br i1 %169, label %201, label %170

170:                                              ; preds = %167
  %171 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 31
  %172 = load double, ptr %171, align 8, !tbaa !28
  %173 = fcmp ogt double %172, 5.000000e-01
  %174 = zext i1 %173 to i8
  store i8 %174, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE14nextRightValid, align 1, !tbaa !27
  %175 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 32
  %176 = load double, ptr %175, align 8, !tbaa !29
  %177 = fcmp ogt double %176, 5.000000e-01
  %178 = zext i1 %177 to i8
  store i8 %178, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13nextLeftValid, align 1, !tbaa !27
  store i8 1, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE15nextCellDecided, align 1, !tbaa !27
  %179 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 23
  %180 = load volatile i8, ptr %179, align 1, !tbaa !30, !range !22, !noundef !23
  %181 = trunc i8 %180 to i1
  %182 = zext i1 %181 to i32
  %183 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13nextLeftValid, align 1, !tbaa !27, !range !22, !noundef !23
  %184 = trunc i8 %183 to i1
  %185 = zext i1 %184 to i32
  %186 = icmp ne i32 %182, %185
  br i1 %186, label %187, label %189

187:                                              ; preds = %170
  %188 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 23
  store volatile i8 0, ptr %188, align 1, !tbaa !30
  br label %189

189:                                              ; preds = %187, %170
  %190 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 22
  %191 = load volatile i8, ptr %190, align 2, !tbaa !31, !range !22, !noundef !23
  %192 = trunc i8 %191 to i1
  %193 = zext i1 %192 to i32
  %194 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE14nextRightValid, align 1, !tbaa !27, !range !22, !noundef !23
  %195 = trunc i8 %194 to i1
  %196 = zext i1 %195 to i32
  %197 = icmp ne i32 %193, %196
  br i1 %197, label %198, label %200

198:                                              ; preds = %189
  %199 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 22
  store volatile i8 0, ptr %199, align 2, !tbaa !31
  br label %200

200:                                              ; preds = %198, %189
  br label %201

201:                                              ; preds = %200, %167, %159
  %202 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 27
  %203 = load i32, ptr %202, align 8, !tbaa !20
  %204 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 28
  %205 = load i32, ptr %204, align 4, !tbaa !19
  %206 = add nsw i32 %203, %205
  %207 = sdiv i32 %206, 2
  %208 = icmp sge i32 %207, 1335
  br i1 %208, label %209, label %218

209:                                              ; preds = %201
  %210 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13nextLeftValid, align 1, !tbaa !27, !range !22, !noundef !23
  %211 = trunc i8 %210 to i1
  %212 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 23
  %213 = zext i1 %211 to i8
  store volatile i8 %213, ptr %212, align 1, !tbaa !30
  %214 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE14nextRightValid, align 1, !tbaa !27, !range !22, !noundef !23
  %215 = trunc i8 %214 to i1
  %216 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 22
  %217 = zext i1 %215 to i8
  store volatile i8 %217, ptr %216, align 2, !tbaa !31
  br label %218

218:                                              ; preds = %209, %201
  %219 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 23
  %220 = load volatile i8, ptr %219, align 1, !tbaa !30, !range !22, !noundef !23
  %221 = trunc i8 %220 to i1
  br i1 %221, label %222, label %236

222:                                              ; preds = %218
  %223 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 22
  %224 = load volatile i8, ptr %223, align 2, !tbaa !31, !range !22, !noundef !23
  %225 = trunc i8 %224 to i1
  br i1 %225, label %226, label %236

226:                                              ; preds = %222
  store double 0.000000e+00, ptr %11, align 8, !tbaa !11
  %227 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 29
  %228 = load double, ptr %227, align 8, !tbaa !32
  %229 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 30
  %230 = load double, ptr %229, align 8, !tbaa !33
  %231 = fsub double %228, %230
  store double %231, ptr %8, align 8, !tbaa !11
  %232 = load double, ptr %8, align 8, !tbaa !11
  %233 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE9oldErrorP, align 4, !tbaa !9
  %234 = sitofp i32 %233 to double
  %235 = fsub double %232, %234
  store double %235, ptr %9, align 8, !tbaa !11
  br label %267

236:                                              ; preds = %222, %218
  %237 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 23
  %238 = load volatile i8, ptr %237, align 1, !tbaa !30, !range !22, !noundef !23
  %239 = trunc i8 %238 to i1
  br i1 %239, label %240, label %247

240:                                              ; preds = %236
  %241 = load double, ptr %11, align 8, !tbaa !11
  %242 = fmul double 1.000000e+00, %241
  store double %242, ptr %8, align 8, !tbaa !11
  %243 = load double, ptr %8, align 8, !tbaa !11
  %244 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE9oldErrorP, align 4, !tbaa !9
  %245 = sitofp i32 %244 to double
  %246 = fsub double %243, %245
  store double %246, ptr %9, align 8, !tbaa !11
  br label %266

247:                                              ; preds = %236
  %248 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 22
  %249 = load volatile i8, ptr %248, align 2, !tbaa !31, !range !22, !noundef !23
  %250 = trunc i8 %249 to i1
  br i1 %250, label %251, label %258

251:                                              ; preds = %247
  %252 = load double, ptr %11, align 8, !tbaa !11
  %253 = fmul double 1.000000e+00, %252
  store double %253, ptr %8, align 8, !tbaa !11
  %254 = load double, ptr %8, align 8, !tbaa !11
  %255 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE9oldErrorP, align 4, !tbaa !9
  %256 = sitofp i32 %255 to double
  %257 = fsub double %254, %256
  store double %257, ptr %9, align 8, !tbaa !11
  br label %265

258:                                              ; preds = %247
  %259 = load double, ptr %11, align 8, !tbaa !11
  %260 = fmul double 1.000000e+00, %259
  store double %260, ptr %8, align 8, !tbaa !11
  %261 = load double, ptr %8, align 8, !tbaa !11
  %262 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE9oldErrorP, align 4, !tbaa !9
  %263 = sitofp i32 %262 to double
  %264 = fsub double %261, %263
  store double %264, ptr %9, align 8, !tbaa !11
  br label %265

265:                                              ; preds = %258, %251
  br label %266

266:                                              ; preds = %265, %240
  br label %267

267:                                              ; preds = %266, %226
  %268 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 27
  %269 = load i32, ptr %268, align 8, !tbaa !20
  %270 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 28
  %271 = load i32, ptr %270, align 4, !tbaa !19
  %272 = add nsw i32 %269, %271
  %273 = sdiv i32 %272, 2
  %274 = icmp sge i32 %273, 1679
  br i1 %274, label %275, label %276

275:                                              ; preds = %267
  store i8 1, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE7endCell, align 1, !tbaa !27
  br label %276

276:                                              ; preds = %275, %267
  %277 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE7endCell, align 1, !tbaa !27, !range !22, !noundef !23
  %278 = trunc i8 %277 to i1
  br i1 %278, label %279, label %300

279:                                              ; preds = %276
  %280 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13nextLeftValid, align 1, !tbaa !27, !range !22, !noundef !23
  %281 = trunc i8 %280 to i1
  %282 = zext i1 %281 to i8
  store i8 %282, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE15currentWallLeft, align 1, !tbaa !27
  %283 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE14nextRightValid, align 1, !tbaa !27, !range !22, !noundef !23
  %284 = trunc i8 %283 to i1
  %285 = zext i1 %284 to i8
  store i8 %285, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE16currentWallRight, align 1, !tbaa !27
  store i32 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE9oldErrorP, align 4, !tbaa !9
  store i8 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE12ticksDecided, align 1, !tbaa !27
  %286 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %22)
  %287 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 9
  %288 = getelementptr inbounds [3 x i8], ptr %287, i64 0, i64 0
  %289 = zext i1 %286 to i8
  store volatile i8 %289, ptr %288, align 1, !tbaa !27
  %290 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %22)
  %291 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 9
  %292 = getelementptr inbounds [3 x i8], ptr %291, i64 0, i64 1
  %293 = zext i1 %290 to i8
  store volatile i8 %293, ptr %292, align 1, !tbaa !27
  %294 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %22)
  %295 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 9
  %296 = getelementptr inbounds [3 x i8], ptr %295, i64 0, i64 2
  %297 = zext i1 %294 to i8
  store volatile i8 %297, ptr %296, align 1, !tbaa !27
  %298 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 13
  store i8 1, ptr %298, align 8, !tbaa !34
  store i8 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE15nextCellDecided, align 1, !tbaa !27
  %299 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 26
  store volatile i32 0, ptr %299, align 4, !tbaa !35
  store i8 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE7endCell, align 1, !tbaa !27
  store i32 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE1i, align 4, !tbaa !9
  br label %300

300:                                              ; preds = %279, %276
  %301 = load double, ptr %8, align 8, !tbaa !11
  %302 = load double, ptr %9, align 8, !tbaa !11
  %303 = fmul double 6.000000e+02, %302
  %304 = call double @llvm.fmuladd.f64(double 2.000000e+02, double %301, double %303)
  store double %304, ptr %10, align 8, !tbaa !11
  %305 = load double, ptr %8, align 8, !tbaa !11
  %306 = fptosi double %305 to i32
  store i32 %306, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE9oldErrorP, align 4, !tbaa !9
  %307 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 37
  %308 = load ptr, ptr %307, align 8, !tbaa !13
  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 %309 unwind label %326

309:                                              ; preds = %300
  %310 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 3
  %311 = load i32, ptr %310, align 8, !tbaa !24
  %312 = sitofp i32 %311 to double
  %313 = load double, ptr %10, align 8, !tbaa !11
  %314 = fadd double %312, %313
  %315 = fneg double %314
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %308, ptr noundef nonnull align 8 dereferenceable(32) %18, double noundef %315)
          to label %316 unwind label %330

316:                                              ; preds = %309
  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
  %317 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 37
  %318 = load ptr, ptr %317, align 8, !tbaa !13
  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 %319 unwind label %335

319:                                              ; preds = %316
  %320 = getelementptr inbounds %"class.continuous::Continuous", ptr %22, i32 0, i32 4
  %321 = load i32, ptr %320, align 4, !tbaa !25
  %322 = sitofp i32 %321 to double
  %323 = load double, ptr %10, align 8, !tbaa !11
  %324 = fsub double %322, %323
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %318, ptr noundef nonnull align 8 dereferenceable(32) %20, double noundef %324)
          to label %325 unwind label %339

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

326:                                              ; preds = %300
  %327 = landingpad { ptr, i32 }
          cleanup
  %328 = extractvalue { ptr, i32 } %327, 0
  store ptr %328, ptr %14, align 8
  %329 = extractvalue { ptr, i32 } %327, 1
  store i32 %329, ptr %15, align 4
  br label %334

330:                                              ; preds = %309
  %331 = landingpad { ptr, i32 }
          cleanup
  %332 = extractvalue { ptr, i32 } %331, 0
  store ptr %332, ptr %14, align 8
  %333 = extractvalue { ptr, i32 } %331, 1
  store i32 %333, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  br label %334

334:                                              ; preds = %330, %326
  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 %344

335:                                              ; preds = %316
  %336 = landingpad { ptr, i32 }
          cleanup
  %337 = extractvalue { ptr, i32 } %336, 0
  store ptr %337, ptr %14, align 8
  %338 = extractvalue { ptr, i32 } %336, 1
  store i32 %338, ptr %15, align 4
  br label %343

339:                                              ; preds = %319
  %340 = landingpad { ptr, i32 }
          cleanup
  %341 = extractvalue { ptr, i32 } %340, 0
  store ptr %341, ptr %14, align 8
  %342 = extractvalue { ptr, i32 } %340, 1
  store i32 %342, ptr %15, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  br label %343

343:                                              ; preds = %339, %335
  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 %344

344:                                              ; preds = %343, %334, %122, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %345

345:                                              ; preds = %344
  %346 = load ptr, ptr %14, align 8
  %347 = load i32, ptr %15, align 4
  %348 = insertvalue { ptr, i32 } poison, ptr %346, 0
  %349 = insertvalue { ptr, i32 } %348, i32 %347, 1
  resume { ptr, i32 } %349
}

; 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) #3

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

declare noundef double @_ZN3sim14MouseInterface22currentRotationDegreesEv(ptr noundef nonnull align 8 dereferenceable(296)) #4

declare noundef i32 @_ZN3sim14MouseInterface16readWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296), ptr noundef nonnull align 8 dereferenceable(32)) #4

; 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { "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 #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 = !{!"double", !7, i64 0}
!13 = !{!14, !6, i64 400}
!14 = !{!"_ZTSN10continuous10ContinuousE", !15, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !16, i64 24, !16, i64 28, !7, i64 32, !7, i64 288, !7, i64 293, !17, i64 296, !17, i64 297, !10, i64 300, !17, i64 304, !17, i64 305, !17, i64 306, !17, i64 307, !10, i64 308, !10, i64 312, !10, i64 316, !17, i64 320, !17, i64 321, !17, i64 322, !17, i64 323, !17, i64 324, !16, i64 328, !18, i64 332, !10, i64 336, !10, i64 340, !12, i64 344, !12, i64 352, !12, i64 360, !12, i64 368, !12, i64 376, !12, i64 384, !10, i64 392, !10, i64 396, !6, i64 400}
!15 = !{!"_ZTS15IMouseAlgorithm"}
!16 = !{!"float", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSN10continuous10ContinuousUt_E", !7, i64 0}
!19 = !{!14, !10, i64 340}
!20 = !{!14, !10, i64 336}
!21 = !{!14, !17, i64 306}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!14, !10, i64 16}
!25 = !{!14, !10, i64 20}
!26 = !{!14, !10, i64 308}
!27 = !{!17, !17, i64 0}
!28 = !{!14, !12, i64 360}
!29 = !{!14, !12, i64 368}
!30 = !{!14, !17, i64 323}
!31 = !{!14, !17, i64 322}
!32 = !{!14, !12, i64 344}
!33 = !{!14, !12, i64 352}
!34 = !{!14, !17, i64 304}
!35 = !{!14, !18, i64 332}


; 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 }

@_ZN10continuous10startAngleE = external dso_local local_unnamed_addr global double, align 8
@_ZN10continuous13forwardOffsetE = external dso_local local_unnamed_addr global i32, align 4
@.str.68 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [12 x i8], align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE14nextRightValid = external hidden local_unnamed_addr global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE13nextLeftValid = external hidden local_unnamed_addr global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE15nextCellDecided = external hidden local_unnamed_addr global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE9oldErrorP = external hidden local_unnamed_addr global i32, align 4
@_ZZN10continuous10Continuous17forwardCorrectionEvE7endCell = external hidden local_unnamed_addr global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE15currentWallLeft = external hidden local_unnamed_addr global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE16currentWallRight = external hidden local_unnamed_addr global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE12ticksDecided = external hidden local_unnamed_addr global i8, align 1
@_ZZN10continuous10Continuous17forwardCorrectionEvE5count = external hidden local_unnamed_addr global i32, align 4
@_ZZN10continuous10Continuous17forwardCorrectionEvE13targetDegrees = external hidden local_unnamed_addr global double, align 8
@_ZZN10continuous10Continuous17forwardCorrectionEvE1i = external hidden local_unnamed_addr global i32, align 4

; 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
define dso_local void @_ZN10continuous10Continuous17forwardCorrectionEv(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 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE1i, align 4, !tbaa !5
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %27

12:                                               ; preds = %1
  %13 = getelementptr inbounds i8, ptr %0, i64 400
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = tail call noundef double @_ZN3sim14MouseInterface22currentRotationDegreesEv(ptr noundef nonnull align 8 dereferenceable(296) %14)
  store double %15, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !17
  %16 = fcmp oge double %15, 0.000000e+00
  %17 = fcmp olt double %15, 4.500000e+01
  %or.cond = and i1 %16, %17
  br i1 %or.cond, label %.sink.split, label %18

18:                                               ; preds = %12
  %19 = fcmp ogt double %15, 3.150000e+02
  %20 = fcmp ole double %15, 3.600000e+02
  %or.cond3 = and i1 %19, %20
  br i1 %or.cond3, label %.sink.split, label %21

21:                                               ; preds = %18
  %22 = fcmp ogt double %15, 4.500000e+01
  %23 = fcmp olt double %15, 1.350000e+02
  %or.cond5 = and i1 %22, %23
  br i1 %or.cond5, label %.sink.split, label %24

24:                                               ; preds = %21
  %25 = fcmp ogt double %15, 1.350000e+02
  %26 = fcmp olt double %15, 2.250000e+02
  %or.cond7 = and i1 %25, %26
  %. = select i1 %or.cond7, double 1.800000e+02, double 2.700000e+02
  br label %.sink.split

.sink.split:                                      ; preds = %24, %21, %12, %18
  %.sink = phi double [ 3.600000e+02, %18 ], [ 3.600000e+02, %12 ], [ 9.000000e+01, %21 ], [ %., %24 ]
  store double %.sink, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13targetDegrees, align 8, !tbaa !17
  br label %27

27:                                               ; preds = %.sink.split, %1
  %28 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE1i, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE1i, align 4, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %0, i64 400
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  %32 = tail call noundef double @_ZN3sim14MouseInterface22currentRotationDegreesEv(ptr noundef nonnull align 8 dereferenceable(296) %31)
  %33 = load double, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13targetDegrees, align 8, !tbaa !17
  %34 = fcmp oeq double %33, 3.600000e+02
  %35 = fcmp ole double %32, 4.500000e+01
  %or.cond9 = and i1 %35, %34
  %36 = fadd double %32, 3.600000e+02
  %.031 = select i1 %or.cond9, double %36, double %32
  %37 = fsub double %.031, %33
  %38 = load ptr, ptr %30, align 8, !tbaa !9
  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 %39 unwind label %61

39:                                               ; preds = %27
  %40 = invoke noundef i32 @_ZN3sim14MouseInterface16readWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %38, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %41 unwind label %63

41:                                               ; preds = %39
  %42 = load i32, ptr @_ZN10continuous13forwardOffsetE, align 4, !tbaa !5
  %43 = sub i32 %42, %40
  %44 = getelementptr inbounds i8, ptr %0, i64 340
  store i32 %43, ptr %44, align 4, !tbaa !18
  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
  %45 = load ptr, ptr %30, align 8, !tbaa !9
  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 %46 unwind label %66

46:                                               ; preds = %41
  %47 = invoke noundef i32 @_ZN3sim14MouseInterface16readWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %45, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %48 unwind label %68

48:                                               ; preds = %46
  %49 = load i32, ptr @_ZN10continuous13forwardOffsetE, align 4, !tbaa !5
  %50 = add nsw i32 %49, %47
  %51 = getelementptr inbounds i8, ptr %0, i64 336
  store i32 %50, ptr %51, align 8, !tbaa !19
  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
  %52 = getelementptr inbounds i8, ptr %0, i64 306
  %53 = load i8, ptr %52, align 2, !tbaa !20, !range !21, !noundef !22
  %54 = trunc nuw i8 %53 to i1
  br i1 %54, label %55, label %91

55:                                               ; preds = %48
  %56 = getelementptr inbounds i8, ptr %0, i64 16
  %57 = load i32, ptr %56, align 8, !tbaa !23
  %58 = icmp eq i32 %57, 0
  br i1 %58, label %59, label %71

59:                                               ; preds = %55
  store i32 30, ptr %56, align 8, !tbaa !23
  %60 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 30, ptr %60, align 4, !tbaa !24
  br label %71

61:                                               ; preds = %27
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %39
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  br label %65

65:                                               ; preds = %63, %61
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  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 %191

66:                                               ; preds = %41
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %70

68:                                               ; preds = %46
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %70

70:                                               ; preds = %68, %66
  %.pn39 = phi { ptr, i32 } [ %69, %68 ], [ %67, %66 ]
  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 %191

71:                                               ; preds = %59, %55
  %72 = phi i32 [ 30, %59 ], [ %57, %55 ]
  %73 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE5count, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE5count, align 4, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %0, i64 308
  %76 = load i32, ptr %75, align 4, !tbaa !25
  %77 = icmp slt i32 %72, %76
  br i1 %77, label %78, label %83

78:                                               ; preds = %71
  %79 = add nsw i32 %72, 1
  store i32 %79, ptr %56, align 8, !tbaa !23
  %80 = getelementptr inbounds i8, ptr %0, i64 20
  %81 = load i32, ptr %80, align 4, !tbaa !24
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %80, align 4, !tbaa !24
  br label %91

83:                                               ; preds = %71
  %84 = icmp sgt i32 %72, %76
  br i1 %84, label %85, label %90

85:                                               ; preds = %83
  %86 = add nsw i32 %72, -1
  store i32 %86, ptr %56, align 8, !tbaa !23
  %87 = getelementptr inbounds i8, ptr %0, i64 20
  %88 = load i32, ptr %87, align 4, !tbaa !24
  %89 = add nsw i32 %88, -1
  store i32 %89, ptr %87, align 4, !tbaa !24
  br label %91

90:                                               ; preds = %83
  store i32 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE5count, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %85, %90, %78, %48
  %92 = load i32, ptr %51, align 8, !tbaa !19
  %93 = load i32, ptr %44, align 4, !tbaa !18
  %94 = add nsw i32 %93, %92
  %95 = icmp sgt i32 %94, 2207
  br i1 %95, label %96, label %.thread

96:                                               ; preds = %91
  %97 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE15nextCellDecided, align 1, !tbaa !26, !range !21, !noundef !22
  %98 = trunc nuw i8 %97 to i1
  br i1 %98, label %115, label %99

99:                                               ; preds = %96
  %100 = getelementptr inbounds i8, ptr %0, i64 360
  %101 = load double, ptr %100, align 8, !tbaa !27
  %102 = fcmp ogt double %101, 5.000000e-01
  %103 = zext i1 %102 to i8
  store i8 %103, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE14nextRightValid, align 1, !tbaa !26
  %104 = getelementptr inbounds i8, ptr %0, i64 368
  %105 = load double, ptr %104, align 8, !tbaa !28
  %106 = fcmp ogt double %105, 5.000000e-01
  %107 = zext i1 %106 to i8
  store i8 %107, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13nextLeftValid, align 1, !tbaa !26
  store i8 1, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE15nextCellDecided, align 1, !tbaa !26
  %108 = getelementptr inbounds i8, ptr %0, i64 323
  %109 = load volatile i8, ptr %108, align 1, !tbaa !29, !range !21, !noundef !22
  %.not = icmp eq i8 %109, %107
  br i1 %.not, label %111, label %110

110:                                              ; preds = %99
  store volatile i8 0, ptr %108, align 1, !tbaa !29
  br label %111

111:                                              ; preds = %110, %99
  %112 = getelementptr inbounds i8, ptr %0, i64 322
  %113 = load volatile i8, ptr %112, align 2, !tbaa !30, !range !21, !noundef !22
  %.not41 = icmp eq i8 %113, %103
  br i1 %.not41, label %115, label %114

114:                                              ; preds = %111
  store volatile i8 0, ptr %112, align 2, !tbaa !30
  br label %115

115:                                              ; preds = %111, %114, %96
  %116 = icmp ugt i32 %94, 2669
  br i1 %116, label %117, label %.thread

117:                                              ; preds = %115
  %118 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13nextLeftValid, align 1, !tbaa !26, !range !21, !noundef !22
  %119 = getelementptr inbounds i8, ptr %0, i64 323
  store volatile i8 %118, ptr %119, align 1, !tbaa !29
  %120 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE14nextRightValid, align 1, !tbaa !26, !range !21, !noundef !22
  %121 = getelementptr inbounds i8, ptr %0, i64 322
  store volatile i8 %120, ptr %121, align 2, !tbaa !30
  br label %.thread

.thread:                                          ; preds = %91, %117, %115
  %122 = getelementptr inbounds i8, ptr %0, i64 323
  %123 = load volatile i8, ptr %122, align 1, !tbaa !29, !range !21, !noundef !22
  %124 = trunc nuw i8 %123 to i1
  br i1 %124, label %125, label %135

125:                                              ; preds = %.thread
  %126 = getelementptr inbounds i8, ptr %0, i64 322
  %127 = load volatile i8, ptr %126, align 2, !tbaa !30, !range !21, !noundef !22
  %128 = trunc nuw i8 %127 to i1
  br i1 %128, label %129, label %135

129:                                              ; preds = %125
  %130 = getelementptr inbounds i8, ptr %0, i64 344
  %131 = load double, ptr %130, align 8, !tbaa !31
  %132 = getelementptr inbounds i8, ptr %0, i64 352
  %133 = load double, ptr %132, align 8, !tbaa !32
  %134 = fsub double %131, %133
  br label %141

135:                                              ; preds = %125, %.thread
  %136 = load volatile i8, ptr %122, align 1, !tbaa !29, !range !21, !noundef !22
  %137 = trunc nuw i8 %136 to i1
  br i1 %137, label %141, label %138

138:                                              ; preds = %135
  %139 = getelementptr inbounds i8, ptr %0, i64 322
  %140 = load volatile i8, ptr %139, align 2, !tbaa !30, !range !21, !noundef !22
  br label %141

141:                                              ; preds = %135, %138, %129
  %.sink48 = phi double [ %37, %138 ], [ %134, %129 ], [ %37, %135 ]
  %142 = load i32, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE9oldErrorP, align 4, !tbaa !5
  %143 = sitofp i32 %142 to double
  %144 = fsub double %.sink48, %143
  %145 = icmp sgt i32 %94, 3357
  br i1 %145, label %.thread47, label %146

.thread47:                                        ; preds = %141
  store i8 1, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE7endCell, align 1, !tbaa !26
  br label %148

146:                                              ; preds = %141
  %.pre = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE7endCell, align 1, !tbaa !26, !range !21
  %147 = trunc nuw i8 %.pre to i1
  br i1 %147, label %148, label %162

148:                                              ; preds = %.thread47, %146
  %149 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE13nextLeftValid, align 1, !tbaa !26, !range !21, !noundef !22
  store i8 %149, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE15currentWallLeft, align 1, !tbaa !26
  %150 = load i8, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE14nextRightValid, align 1, !tbaa !26, !range !21, !noundef !22
  store i8 %150, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE16currentWallRight, align 1, !tbaa !26
  store i32 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE9oldErrorP, align 4, !tbaa !5
  store i8 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE12ticksDecided, align 1, !tbaa !26
  %151 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %152 = getelementptr inbounds i8, ptr %0, i64 293
  %153 = zext i1 %151 to i8
  store volatile i8 %153, ptr %152, align 1, !tbaa !26
  %154 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %155 = getelementptr inbounds i8, ptr %0, i64 294
  %156 = zext i1 %154 to i8
  store volatile i8 %156, ptr %155, align 2, !tbaa !26
  %157 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %158 = getelementptr inbounds i8, ptr %0, i64 295
  %159 = zext i1 %157 to i8
  store volatile i8 %159, ptr %158, align 1, !tbaa !26
  %160 = getelementptr inbounds i8, ptr %0, i64 304
  store i8 1, ptr %160, align 8, !tbaa !33
  store i8 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE15nextCellDecided, align 1, !tbaa !26
  %161 = getelementptr inbounds i8, ptr %0, i64 332
  store volatile i32 0, ptr %161, align 4, !tbaa !34
  store i8 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE7endCell, align 1, !tbaa !26
  store i32 0, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE1i, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %148, %146
  %163 = fmul double %144, 6.000000e+02
  %164 = call double @llvm.fmuladd.f64(double %.sink48, double 2.000000e+02, double %163)
  %165 = fptosi double %.sink48 to i32
  store i32 %165, ptr @_ZZN10continuous10Continuous17forwardCorrectionEvE9oldErrorP, align 4, !tbaa !5
  %166 = load ptr, ptr %30, align 8, !tbaa !9
  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 %167 unwind label %181

167:                                              ; preds = %162
  %168 = getelementptr inbounds i8, ptr %0, i64 16
  %169 = load i32, ptr %168, align 8, !tbaa !23
  %170 = sitofp i32 %169 to double
  %171 = fadd double %164, %170
  %172 = fneg double %171
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %166, ptr noundef nonnull align 8 dereferenceable(32) %6, double noundef %172)
          to label %173 unwind label %183

173:                                              ; preds = %167
  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
  %174 = load ptr, ptr %30, align 8, !tbaa !9
  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 %175 unwind label %186

175:                                              ; preds = %173
  %176 = getelementptr inbounds i8, ptr %0, i64 20
  %177 = load i32, ptr %176, align 4, !tbaa !24
  %178 = sitofp i32 %177 to double
  %179 = fsub double %178, %164
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %174, ptr noundef nonnull align 8 dereferenceable(32) %8, double noundef %179)
          to label %180 unwind label %188

180:                                              ; preds = %175
  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

181:                                              ; preds = %162
  %182 = landingpad { ptr, i32 }
          cleanup
  br label %185

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

185:                                              ; preds = %183, %181
  %.pn42 = phi { ptr, i32 } [ %184, %183 ], [ %182, %181 ]
  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 %191

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

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

190:                                              ; preds = %188, %186
  %.pn44 = phi { ptr, i32 } [ %189, %188 ], [ %187, %186 ]
  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 %191

191:                                              ; preds = %190, %185, %70, %65
  %.pn44.pn = phi { ptr, i32 } [ %.pn44, %190 ], [ %.pn42, %185 ], [ %.pn39, %70 ], [ %.pn, %65 ]
  resume { ptr, i32 } %.pn44.pn
}

; 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) #3

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 #4

declare noundef double @_ZN3sim14MouseInterface22currentRotationDegreesEv(ptr noundef nonnull align 8 dereferenceable(296)) local_unnamed_addr #4

declare noundef i32 @_ZN3sim14MouseInterface16readWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

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


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