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

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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 }

@curve = external dso_local global [351 x float], align 16
@_ZN10continuous10startAngleE = external dso_local global double, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.68 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [12 x i8], align 1
@_ZZN10continuous10Continuous14curveTurnRightEvE1i = external hidden global i32, align 4
@_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle = external hidden global i32, align 4
@_ZZN10continuous10Continuous14curveTurnRightEvE4turn = external hidden global i8, align 1
@.str.73 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [5 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

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

; 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 @_ZN10continuous10Continuous14curveTurnRightEv(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 double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.0", align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator.0", align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator.0", align 1
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::allocator.0", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %21 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store double 1.000000e+00, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %22 = load double, ptr %5, align 8, !tbaa !9
  %23 = fdiv double 7.000000e+01, %22
  store double %23, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  store i8 1, ptr %8, align 1, !tbaa !11
  %24 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !13
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %69

26:                                               ; preds = %1
  %27 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 37
  %28 = load ptr, ptr %27, align 8, !tbaa !15
  %29 = call noundef double @_ZN3sim14MouseInterface22currentRotationDegreesEv(ptr noundef nonnull align 8 dereferenceable(296) %28)
  store double %29, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !9
  %30 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %21)
  br i1 %30, label %32, label %31

31:                                               ; preds = %26
  store i8 1, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE4turn, align 1, !tbaa !11
  br label %32

32:                                               ; preds = %31, %26
  %33 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !9
  %34 = fcmp oge double %33, 0.000000e+00
  br i1 %34, label %35, label %38

35:                                               ; preds = %32
  %36 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !9
  %37 = fcmp olt double %36, 4.500000e+01
  br i1 %37, label %44, label %38

38:                                               ; preds = %35, %32
  %39 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !9
  %40 = fcmp ogt double %39, 3.150000e+02
  br i1 %40, label %41, label %51

41:                                               ; preds = %38
  %42 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !9
  %43 = fcmp ole double %42, 3.600000e+02
  br i1 %43, label %44, label %51

44:                                               ; preds = %41, %35
  %45 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 26
  %46 = load volatile i32, ptr %45, align 4, !tbaa !20
  %47 = icmp eq i32 %46, 3
  br i1 %47, label %48, label %49

48:                                               ; preds = %44
  store i32 360, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  br label %50

49:                                               ; preds = %44
  store i32 0, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  br label %50

50:                                               ; preds = %49, %48
  br label %68

51:                                               ; preds = %41, %38
  %52 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !9
  %53 = fcmp ogt double %52, 4.500000e+01
  br i1 %53, label %54, label %58

54:                                               ; preds = %51
  %55 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !9
  %56 = fcmp olt double %55, 1.350000e+02
  br i1 %56, label %57, label %58

57:                                               ; preds = %54
  store i32 90, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  br label %67

58:                                               ; preds = %54, %51
  %59 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !9
  %60 = fcmp ogt double %59, 1.350000e+02
  br i1 %60, label %61, label %65

61:                                               ; preds = %58
  %62 = load double, ptr @_ZN10continuous10startAngleE, align 8, !tbaa !9
  %63 = fcmp olt double %62, 2.250000e+02
  br i1 %63, label %64, label %65

64:                                               ; preds = %61
  store i32 180, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  br label %66

65:                                               ; preds = %61, %58
  store i32 270, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  br label %66

66:                                               ; preds = %65, %64
  br label %67

67:                                               ; preds = %66, %57
  br label %68

68:                                               ; preds = %67, %50
  br label %69

69:                                               ; preds = %68, %1
  %70 = load i8, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE4turn, align 1, !tbaa !11, !range !21, !noundef !22
  %71 = trunc i8 %70 to i1
  %72 = zext i1 %71 to i32
  %73 = icmp eq i32 %72, 0
  br i1 %73, label %74, label %88

74:                                               ; preds = %69
  %75 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  %76 = sitofp i32 %75 to double
  store double %76, ptr %7, align 8, !tbaa !9
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.73)
  %78 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 34
  %79 = load double, ptr %78, align 8, !tbaa !23
  %80 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 33
  %81 = load double, ptr %80, align 8, !tbaa !24
  %82 = fadd double %79, %81
  %83 = fdiv double %82, 2.000000e+00
  %84 = fcmp oge double %83, 5.670000e-01
  br i1 %84, label %85, label %87

85:                                               ; preds = %74
  store i8 1, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE4turn, align 1, !tbaa !11
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.74)
  store i32 1, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !13
  br label %87

87:                                               ; preds = %85, %74
  br label %111

88:                                               ; preds = %69
  %89 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 26
  %90 = load volatile i32, ptr %89, align 4, !tbaa !20
  %91 = icmp eq i32 %90, 3
  br i1 %91, label %92, label %101

92:                                               ; preds = %88
  %93 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  %94 = sitofp i32 %93 to float
  %95 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !13
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [351 x float], ptr @curve, i64 0, i64 %96
  %98 = load float, ptr %97, align 4, !tbaa !25
  %99 = fsub float %94, %98
  %100 = fpext float %99 to double
  store double %100, ptr %7, align 8, !tbaa !9
  br label %110

101:                                              ; preds = %88
  %102 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  %103 = sitofp i32 %102 to float
  %104 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !13
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [351 x float], ptr @curve, i64 0, i64 %105
  %107 = load float, ptr %106, align 4, !tbaa !25
  %108 = fadd float %103, %107
  %109 = fpext float %108 to double
  store double %109, ptr %7, align 8, !tbaa !9
  br label %110

110:                                              ; preds = %101, %92
  br label %111

111:                                              ; preds = %110, %87
  %112 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 37
  %113 = load ptr, ptr %112, align 8, !tbaa !15
  %114 = call noundef double @_ZN3sim14MouseInterface22currentRotationDegreesEv(ptr noundef nonnull align 8 dereferenceable(296) %113)
  %115 = fptrunc double %114 to float
  %116 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 25
  store volatile float %115, ptr %116, align 8, !tbaa !26
  %117 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 26
  %118 = load volatile i32, ptr %117, align 4, !tbaa !20
  %119 = icmp eq i32 %118, 3
  br i1 %119, label %120, label %132

120:                                              ; preds = %111
  %121 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  %122 = icmp eq i32 %121, 360
  br i1 %122, label %123, label %131

123:                                              ; preds = %120
  %124 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 25
  %125 = load volatile float, ptr %124, align 8, !tbaa !26
  %126 = fcmp olt float %125, 4.500000e+01
  br i1 %126, label %127, label %131

127:                                              ; preds = %123
  %128 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 25
  %129 = load volatile float, ptr %128, align 8, !tbaa !26
  %130 = fadd float %129, 3.600000e+02
  store volatile float %130, ptr %128, align 8, !tbaa !26
  br label %131

131:                                              ; preds = %127, %123, %120
  br label %144

132:                                              ; preds = %111
  %133 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  %134 = icmp eq i32 %133, 0
  br i1 %134, label %135, label %143

135:                                              ; preds = %132
  %136 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 25
  %137 = load volatile float, ptr %136, align 8, !tbaa !26
  %138 = fcmp ogt float %137, 3.150000e+02
  br i1 %138, label %139, label %143

139:                                              ; preds = %135
  %140 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 25
  %141 = load volatile float, ptr %140, align 8, !tbaa !26
  %142 = fsub float %141, 3.600000e+02
  store volatile float %142, ptr %140, align 8, !tbaa !26
  br label %143

143:                                              ; preds = %139, %135, %132
  br label %144

144:                                              ; preds = %143, %131
  %145 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 25
  %146 = load volatile float, ptr %145, align 8, !tbaa !26
  %147 = fpext float %146 to double
  %148 = load double, ptr %7, align 8, !tbaa !9
  %149 = fsub double %147, %148
  store double %149, ptr %3, align 8, !tbaa !9
  %150 = load double, ptr %6, align 8, !tbaa !9
  %151 = load double, ptr %3, align 8, !tbaa !9
  %152 = fmul double %150, %151
  store double %152, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %153 = load double, ptr %5, align 8, !tbaa !9
  %154 = fdiv double 6.200000e+02, %153
  %155 = load double, ptr %4, align 8, !tbaa !9
  %156 = fadd double %154, %155
  %157 = fneg double %156
  %158 = fptosi double %157 to i32
  store i32 %158, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %159 = load double, ptr %5, align 8, !tbaa !9
  %160 = fdiv double 6.200000e+02, %159
  %161 = load double, ptr %4, align 8, !tbaa !9
  %162 = fsub double %160, %161
  %163 = fptosi double %162 to i32
  store i32 %163, ptr %10, align 4, !tbaa !13
  %164 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 37
  %165 = load ptr, ptr %164, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.68, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %166 unwind label %192

166:                                              ; preds = %144
  %167 = load i32, ptr %9, align 4, !tbaa !13
  %168 = sitofp i32 %167 to double
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %165, ptr noundef nonnull align 8 dereferenceable(32) %11, double noundef %168)
          to label %169 unwind label %196

169:                                              ; preds = %166
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  %170 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 37
  %171 = load ptr, ptr %170, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef @.str.69, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %172 unwind label %201

172:                                              ; preds = %169
  %173 = load i32, ptr %10, align 4, !tbaa !13
  %174 = sitofp i32 %173 to double
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %171, ptr noundef nonnull align 8 dereferenceable(32) %15, double noundef %174)
          to label %175 unwind label %205

175:                                              ; preds = %172
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  %176 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 26
  %177 = load volatile i32, ptr %176, align 4, !tbaa !20
  %178 = icmp eq i32 %177, 3
  br i1 %178, label %179, label %210

179:                                              ; preds = %175
  %180 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !13
  %181 = icmp slt i32 %180, 350
  br i1 %181, label %182, label %189

182:                                              ; preds = %179
  %183 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 25
  %184 = load volatile float, ptr %183, align 8, !tbaa !26
  %185 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  %186 = sub nsw i32 %185, 90
  %187 = sitofp i32 %186 to float
  %188 = fcmp ogt float %184, %187
  br label %189

189:                                              ; preds = %182, %179
  %190 = phi i1 [ false, %179 ], [ %188, %182 ]
  %191 = zext i1 %190 to i8
  store i8 %191, ptr %8, align 1, !tbaa !11
  br label %223

192:                                              ; preds = %144
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %13, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %14, align 4
  br label %200

196:                                              ; preds = %166
  %197 = landingpad { ptr, i32 }
          cleanup
  %198 = extractvalue { ptr, i32 } %197, 0
  store ptr %198, ptr %13, align 8
  %199 = extractvalue { ptr, i32 } %197, 1
  store i32 %199, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %200

200:                                              ; preds = %196, %192
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #5
  br label %274

201:                                              ; preds = %169
  %202 = landingpad { ptr, i32 }
          cleanup
  %203 = extractvalue { ptr, i32 } %202, 0
  store ptr %203, ptr %13, align 8
  %204 = extractvalue { ptr, i32 } %202, 1
  store i32 %204, ptr %14, align 4
  br label %209

205:                                              ; preds = %172
  %206 = landingpad { ptr, i32 }
          cleanup
  %207 = extractvalue { ptr, i32 } %206, 0
  store ptr %207, ptr %13, align 8
  %208 = extractvalue { ptr, i32 } %206, 1
  store i32 %208, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #5
  br label %209

209:                                              ; preds = %205, %201
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #5
  br label %274

210:                                              ; preds = %175
  %211 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !13
  %212 = icmp slt i32 %211, 350
  br i1 %212, label %213, label %220

213:                                              ; preds = %210
  %214 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 25
  %215 = load volatile float, ptr %214, align 8, !tbaa !26
  %216 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !13
  %217 = add nsw i32 %216, 90
  %218 = sitofp i32 %217 to float
  %219 = fcmp olt float %215, %218
  br label %220

220:                                              ; preds = %213, %210
  %221 = phi i1 [ false, %210 ], [ %219, %213 ]
  %222 = zext i1 %221 to i8
  store i8 %222, ptr %8, align 1, !tbaa !11
  br label %223

223:                                              ; preds = %220, %189
  %224 = load i8, ptr %8, align 1, !tbaa !11, !range !21, !noundef !22
  %225 = trunc i8 %224 to i1
  br i1 %225, label %226, label %229

226:                                              ; preds = %223
  %227 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !13
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !13
  br label %273

229:                                              ; preds = %223
  store i32 0, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !13
  %230 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 25
  store volatile float 0.000000e+00, ptr %230, align 8, !tbaa !26
  %231 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 37
  %232 = load ptr, ptr %231, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.68, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %233 unwind label %255

233:                                              ; preds = %229
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %232, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %234 unwind label %259

234:                                              ; preds = %233
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  %235 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 37
  %236 = load ptr, ptr %235, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef @.str.69, ptr noundef nonnull align 1 dereferenceable(1) %20)
          to label %237 unwind label %264

237:                                              ; preds = %234
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %236, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %238 unwind label %268

238:                                              ; preds = %237
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  %239 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 27
  store i32 0, ptr %239, align 8, !tbaa !27
  %240 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 28
  store i32 0, ptr %240, align 4, !tbaa !28
  %241 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 26
  store volatile i32 0, ptr %241, align 4, !tbaa !20
  %242 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %21)
  %243 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 9
  %244 = getelementptr inbounds [3 x i8], ptr %243, i64 0, i64 0
  %245 = zext i1 %242 to i8
  store volatile i8 %245, ptr %244, align 1, !tbaa !11
  %246 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %21)
  %247 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 9
  %248 = getelementptr inbounds [3 x i8], ptr %247, i64 0, i64 1
  %249 = zext i1 %246 to i8
  store volatile i8 %249, ptr %248, align 1, !tbaa !11
  %250 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %21)
  %251 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 9
  %252 = getelementptr inbounds [3 x i8], ptr %251, i64 0, i64 2
  %253 = zext i1 %250 to i8
  store volatile i8 %253, ptr %252, align 1, !tbaa !11
  %254 = getelementptr inbounds %"class.continuous::Continuous", ptr %21, i32 0, i32 13
  store i8 1, ptr %254, align 8, !tbaa !29
  store i8 0, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE4turn, align 1, !tbaa !11
  br label %273

255:                                              ; preds = %229
  %256 = landingpad { ptr, i32 }
          cleanup
  %257 = extractvalue { ptr, i32 } %256, 0
  store ptr %257, ptr %13, align 8
  %258 = extractvalue { ptr, i32 } %256, 1
  store i32 %258, ptr %14, align 4
  br label %263

259:                                              ; preds = %233
  %260 = landingpad { ptr, i32 }
          cleanup
  %261 = extractvalue { ptr, i32 } %260, 0
  store ptr %261, ptr %13, align 8
  %262 = extractvalue { ptr, i32 } %260, 1
  store i32 %262, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  br label %263

263:                                              ; preds = %259, %255
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  br label %274

264:                                              ; preds = %234
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %13, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %14, align 4
  br label %272

268:                                              ; preds = %237
  %269 = landingpad { ptr, i32 }
          cleanup
  %270 = extractvalue { ptr, i32 } %269, 0
  store ptr %270, ptr %13, align 8
  %271 = extractvalue { ptr, i32 } %269, 1
  store i32 %271, ptr %14, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %272

272:                                              ; preds = %268, %264
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %20) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  br label %274

273:                                              ; preds = %238, %226
  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 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %3) #5
  ret void

274:                                              ; preds = %272, %263, %209, %200
  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 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, 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 8, ptr %3) #5
  br label %275

275:                                              ; preds = %274
  %276 = load ptr, ptr %13, align 8
  %277 = load i32, ptr %14, align 4
  %278 = insertvalue { ptr, i32 } poison, ptr %276, 0
  %279 = insertvalue { ptr, i32 } %278, i32 %277, 1
  resume { ptr, i32 } %279
}

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

; 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 = { inlinehint 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 #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 = !{!"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, !6, i64 400}
!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, !19, i64 332}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!16, !10, i64 384}
!24 = !{!16, !10, i64 376}
!25 = !{!18, !18, i64 0}
!26 = !{!16, !18, i64 328}
!27 = !{!16, !14, i64 336}
!28 = !{!16, !14, i64 340}
!29 = !{!16, !12, i64 304}


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"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 }

@curve = external dso_local local_unnamed_addr global [351 x float], align 16
@_ZN10continuous10startAngleE = external dso_local local_unnamed_addr global double, align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.68 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [12 x i8], align 1
@_ZZN10continuous10Continuous14curveTurnRightEvE1i = external hidden local_unnamed_addr global i32, align 4
@_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle = external hidden local_unnamed_addr global i32, align 4
@_ZZN10continuous10Continuous14curveTurnRightEvE4turn = external hidden local_unnamed_addr global i8, align 1
@.str.73 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [5 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: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3

declare void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__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 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 @_ZN10continuous10Continuous14curveTurnRightEv(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 @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !5
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %35

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 = tail call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  br i1 %16, label %18, label %17

17:                                               ; preds = %12
  store i8 1, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE4turn, align 1, !tbaa !18
  br label %18

18:                                               ; preds = %17, %12
  %19 = load double, ptr @_ZN10continuous10startAngleE, align 8
  %20 = fcmp oge double %19, 0.000000e+00
  %21 = fcmp olt double %19, 4.500000e+01
  %or.cond = and i1 %20, %21
  br i1 %or.cond, label %25, label %22

22:                                               ; preds = %18
  %23 = fcmp ogt double %19, 3.150000e+02
  %24 = fcmp ole double %19, 3.600000e+02
  %or.cond3 = and i1 %23, %24
  br i1 %or.cond3, label %25, label %29

25:                                               ; preds = %22, %18
  %26 = getelementptr inbounds i8, ptr %0, i64 332
  %27 = load volatile i32, ptr %26, align 4, !tbaa !19
  %28 = icmp eq i32 %27, 3
  %. = select i1 %28, i32 360, i32 0
  br label %.sink.split

29:                                               ; preds = %22
  %30 = fcmp ogt double %19, 4.500000e+01
  %31 = fcmp olt double %19, 1.350000e+02
  %or.cond5 = and i1 %30, %31
  br i1 %or.cond5, label %.sink.split, label %32

32:                                               ; preds = %29
  %33 = fcmp ogt double %19, 1.350000e+02
  %34 = fcmp olt double %19, 2.250000e+02
  %or.cond7 = and i1 %33, %34
  %.39 = select i1 %or.cond7, i32 180, i32 270
  br label %.sink.split

.sink.split:                                      ; preds = %32, %29, %25
  %.sink = phi i32 [ %., %25 ], [ 90, %29 ], [ %.39, %32 ]
  store i32 %.sink, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %.sink.split, %1
  %36 = load i8, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE4turn, align 1, !tbaa !18, !range !20, !noundef !21
  %37 = icmp eq i8 %36, 0
  br i1 %37, label %38, label %51

38:                                               ; preds = %35
  %39 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !5
  %40 = sitofp i32 %39 to double
  %41 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.73)
  %42 = getelementptr inbounds i8, ptr %0, i64 384
  %43 = load double, ptr %42, align 8, !tbaa !22
  %44 = getelementptr inbounds i8, ptr %0, i64 376
  %45 = load double, ptr %44, align 8, !tbaa !23
  %46 = fadd double %43, %45
  %47 = fmul double %46, 5.000000e-01
  %48 = fcmp ult double %47, 5.670000e-01
  br i1 %48, label %67, label %49

49:                                               ; preds = %38
  store i8 1, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE4turn, align 1, !tbaa !18
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.74)
  store i32 1, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !5
  br label %67

51:                                               ; preds = %35
  %52 = getelementptr inbounds i8, ptr %0, i64 332
  %53 = load volatile i32, ptr %52, align 4, !tbaa !19
  %54 = icmp eq i32 %53, 3
  %55 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !5
  %56 = sitofp i32 %55 to float
  %57 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [351 x float], ptr @curve, i64 0, i64 %58
  %60 = load float, ptr %59, align 4, !tbaa !24
  br i1 %54, label %61, label %64

61:                                               ; preds = %51
  %62 = fsub float %56, %60
  %63 = fpext float %62 to double
  br label %67

64:                                               ; preds = %51
  %65 = fadd float %60, %56
  %66 = fpext float %65 to double
  br label %67

67:                                               ; preds = %61, %64, %38, %49
  %.025 = phi double [ %40, %49 ], [ %40, %38 ], [ %63, %61 ], [ %66, %64 ]
  %68 = getelementptr inbounds i8, ptr %0, i64 400
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  %70 = tail call noundef double @_ZN3sim14MouseInterface22currentRotationDegreesEv(ptr noundef nonnull align 8 dereferenceable(296) %69)
  %71 = fptrunc double %70 to float
  %72 = getelementptr inbounds i8, ptr %0, i64 328
  store volatile float %71, ptr %72, align 8, !tbaa !25
  %73 = getelementptr inbounds i8, ptr %0, i64 332
  %74 = load volatile i32, ptr %73, align 4, !tbaa !19
  %75 = icmp eq i32 %74, 3
  %76 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !5
  br i1 %75, label %77, label %82

77:                                               ; preds = %67
  %78 = icmp eq i32 %76, 360
  br i1 %78, label %79, label %89

79:                                               ; preds = %77
  %80 = load volatile float, ptr %72, align 8, !tbaa !25
  %81 = fcmp olt float %80, 4.500000e+01
  br i1 %81, label %.sink.split35, label %89

82:                                               ; preds = %67
  %83 = icmp eq i32 %76, 0
  br i1 %83, label %84, label %89

84:                                               ; preds = %82
  %85 = load volatile float, ptr %72, align 8, !tbaa !25
  %86 = fcmp ogt float %85, 3.150000e+02
  br i1 %86, label %.sink.split35, label %89

.sink.split35:                                    ; preds = %84, %79
  %.sink38 = phi float [ 3.600000e+02, %79 ], [ -3.600000e+02, %84 ]
  %87 = load volatile float, ptr %72, align 8, !tbaa !25
  %88 = fadd float %87, %.sink38
  store volatile float %88, ptr %72, align 8, !tbaa !25
  br label %89

89:                                               ; preds = %.sink.split35, %82, %84, %77, %79
  %90 = load volatile float, ptr %72, align 8, !tbaa !25
  %91 = fpext float %90 to double
  %92 = fsub double %91, %.025
  %93 = fmul double %92, 7.000000e+01
  %94 = fsub double 6.200000e+02, %93
  %95 = fptosi double %94 to i32
  %96 = load ptr, ptr %68, 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 %97 unwind label %118

97:                                               ; preds = %89
  %98 = fadd double %93, 6.200000e+02
  %99 = fneg double %98
  %100 = fptosi double %99 to i32
  %101 = sitofp i32 %100 to double
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %96, ptr noundef nonnull align 8 dereferenceable(32) %2, double noundef %101)
          to label %102 unwind label %120

102:                                              ; preds = %97
  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
  %103 = load ptr, ptr %68, 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 %104 unwind label %123

104:                                              ; preds = %102
  %105 = sitofp i32 %95 to double
  invoke void @_ZN3sim14MouseInterface13setWheelSpeedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEd(ptr noundef nonnull align 8 dereferenceable(296) %103, ptr noundef nonnull align 8 dereferenceable(32) %4, double noundef %105)
          to label %106 unwind label %125

106:                                              ; preds = %104
  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
  %107 = load volatile i32, ptr %73, align 4, !tbaa !19
  %108 = icmp eq i32 %107, 3
  %109 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !5
  %110 = icmp slt i32 %109, 350
  br i1 %108, label %111, label %128

111:                                              ; preds = %106
  br i1 %110, label %112, label %.critedge

112:                                              ; preds = %111
  %113 = load volatile float, ptr %72, align 8, !tbaa !25
  %114 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !5
  %115 = add nsw i32 %114, -90
  %116 = sitofp i32 %115 to float
  %117 = fcmp ogt float %113, %116
  br i1 %117, label %135, label %.critedge

118:                                              ; preds = %89
  %119 = landingpad { ptr, i32 }
          cleanup
  br label %122

120:                                              ; preds = %97
  %121 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #5
  br label %122

122:                                              ; preds = %120, %118
  %.pn = phi { ptr, i32 } [ %121, %120 ], [ %119, %118 ]
  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 %166

123:                                              ; preds = %102
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %127

125:                                              ; preds = %104
  %126 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #5
  br label %127

127:                                              ; preds = %125, %123
  %.pn28 = phi { ptr, i32 } [ %126, %125 ], [ %124, %123 ]
  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 %166

128:                                              ; preds = %106
  br i1 %110, label %129, label %.critedge

129:                                              ; preds = %128
  %130 = load volatile float, ptr %72, align 8, !tbaa !25
  %131 = load i32, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE11offsetAngle, align 4, !tbaa !5
  %132 = add nsw i32 %131, 90
  %133 = sitofp i32 %132 to float
  %134 = fcmp olt float %130, %133
  br i1 %134, label %135, label %.critedge

135:                                              ; preds = %112, %129
  %136 = add nsw i32 %109, 1
  store i32 %136, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !5
  br label %165

.critedge:                                        ; preds = %112, %111, %128, %129
  store i32 0, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE1i, align 4, !tbaa !5
  store volatile float 0.000000e+00, ptr %72, align 8, !tbaa !25
  %137 = load ptr, ptr %68, 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 %138 unwind label %155

138:                                              ; preds = %.critedge
  invoke void @_ZN3sim14MouseInterface17resetWheelEncoderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(296) %137, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %139 unwind label %157

139:                                              ; preds = %138
  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
  %140 = load ptr, ptr %68, 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 %141 unwind label %160

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

142:                                              ; preds = %141
  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
  %143 = getelementptr inbounds i8, ptr %0, i64 336
  store i32 0, ptr %143, align 8, !tbaa !26
  %144 = getelementptr inbounds i8, ptr %0, i64 340
  store i32 0, ptr %144, align 4, !tbaa !27
  store volatile i32 0, ptr %73, align 4, !tbaa !19
  %145 = call noundef zeroext i1 @_ZN10continuous10Continuous8wallLeftEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %146 = getelementptr inbounds i8, ptr %0, i64 293
  %147 = zext i1 %145 to i8
  store volatile i8 %147, ptr %146, align 1, !tbaa !18
  %148 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallFrontEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %149 = getelementptr inbounds i8, ptr %0, i64 294
  %150 = zext i1 %148 to i8
  store volatile i8 %150, ptr %149, align 2, !tbaa !18
  %151 = call noundef zeroext i1 @_ZN10continuous10Continuous9wallRightEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  %152 = getelementptr inbounds i8, ptr %0, i64 295
  %153 = zext i1 %151 to i8
  store volatile i8 %153, ptr %152, align 1, !tbaa !18
  %154 = getelementptr inbounds i8, ptr %0, i64 304
  store i8 1, ptr %154, align 8, !tbaa !28
  store i8 0, ptr @_ZZN10continuous10Continuous14curveTurnRightEvE4turn, align 1, !tbaa !18
  br label %165

155:                                              ; preds = %.critedge
  %156 = landingpad { ptr, i32 }
          cleanup
  br label %159

157:                                              ; preds = %138
  %158 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %159

159:                                              ; preds = %157, %155
  %.pn30 = phi { ptr, i32 } [ %158, %157 ], [ %156, %155 ]
  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 %166

160:                                              ; preds = %139
  %161 = landingpad { ptr, i32 }
          cleanup
  br label %164

162:                                              ; preds = %141
  %163 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %164

164:                                              ; preds = %162, %160
  %.pn32 = phi { ptr, i32 } [ %163, %162 ], [ %161, %160 ]
  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 %166

165:                                              ; preds = %142, %135
  ret void

166:                                              ; preds = %164, %159, %127, %122
  %.pn32.pn = phi { ptr, i32 } [ %.pn32, %164 ], [ %.pn30, %159 ], [ %.pn28, %127 ], [ %.pn, %122 ]
  resume { ptr, i32 } %.pn32.pn
}

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

; 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 = { inlinehint 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 #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 = !{!13, !13, i64 0}
!19 = !{!10, !14, i64 332}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!10, !15, i64 384}
!23 = !{!10, !15, i64 376}
!24 = !{!12, !12, i64 0}
!25 = !{!10, !12, i64 328}
!26 = !{!10, !6, i64 336}
!27 = !{!10, !6, i64 340}
!28 = !{!10, !13, i64 304}


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