; LLVM IR from chriskiefer/libcccrt :: benchmarks/maximilian.ll (ZN10maxiSample5play4Eddd)

; 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.maxiSample = type { double, double, double, double, %class.maxiLagExp, i16, i32, i16, [6 x i8], %class.maxiTrigger, %"class.std::vector", %"class.std::__cxx11::basic_string", i32, i32, i32, i16, i32, i16, i8, double }
%class.maxiLagExp = type { double, double, double }
%class.maxiTrigger = type <{ double, i8, [7 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, 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] }

@chandiv = external dso_local global float, align 4
@_ZN12maxiSettings10sampleRateE = external dso_local global i64, align 8

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN10maxiSample5play4Eddd(ptr noundef nonnull align 8 dereferenceable(176) %0, double noundef %1, double noundef %2, double noundef %3) #2 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store double %1, ptr %6, align 8, !tbaa !9
  store double %2, ptr %7, align 8, !tbaa !9
  store double %3, ptr %8, align 8, !tbaa !9
  %17 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %18 = load double, ptr %6, align 8, !tbaa !9
  %19 = fcmp ogt double %18, 0.000000e+00
  br i1 %19, label %20, label %147

20:                                               ; preds = %4
  %21 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %22 = load double, ptr %21, align 8, !tbaa !11
  %23 = load double, ptr %7, align 8, !tbaa !9
  %24 = fcmp olt double %22, %23
  br i1 %24, label %25, label %28

25:                                               ; preds = %20
  %26 = load double, ptr %7, align 8, !tbaa !9
  %27 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  store double %26, ptr %27, align 8, !tbaa !11
  br label %28

28:                                               ; preds = %25, %20
  %29 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %30 = load double, ptr %29, align 8, !tbaa !11
  %31 = load double, ptr %8, align 8, !tbaa !9
  %32 = fcmp oge double %30, %31
  br i1 %32, label %33, label %36

33:                                               ; preds = %28
  %34 = load double, ptr %7, align 8, !tbaa !9
  %35 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  store double %34, ptr %35, align 8, !tbaa !11
  br label %36

36:                                               ; preds = %33, %28
  %37 = load double, ptr %8, align 8, !tbaa !9
  %38 = load double, ptr %7, align 8, !tbaa !9
  %39 = fsub double %37, %38
  %40 = load i64, ptr @_ZN12maxiSettings10sampleRateE, align 8, !tbaa !25
  %41 = uitofp i64 %40 to double
  %42 = load double, ptr %6, align 8, !tbaa !9
  %43 = load float, ptr @chandiv, align 4, !tbaa !26
  %44 = fpext float %43 to double
  %45 = fmul double %42, %44
  %46 = fdiv double %41, %45
  %47 = fdiv double %39, %46
  %48 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %49 = load double, ptr %48, align 8, !tbaa !11
  %50 = fadd double %49, %47
  store double %50, ptr %48, align 8, !tbaa !11
  %51 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %52 = load double, ptr %51, align 8, !tbaa !11
  %53 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %54 = load double, ptr %53, align 8, !tbaa !11
  %55 = call double @llvm.floor.f64(double %54)
  %56 = fsub double %52, %55
  store double %56, ptr %9, align 8, !tbaa !9
  %57 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %58 = load double, ptr %57, align 8, !tbaa !11
  %59 = fcmp ogt double %58, 0.000000e+00
  br i1 %59, label %60, label %70

60:                                               ; preds = %36
  %61 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %62 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %63 = load double, ptr %62, align 8, !tbaa !11
  %64 = call double @llvm.floor.f64(double %63)
  %65 = fptosi double %64 to i32
  %66 = sub nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %67) #3
  %69 = load double, ptr %68, align 8, !tbaa !9
  store double %69, ptr %10, align 8, !tbaa !9
  br label %74

70:                                               ; preds = %36
  %71 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %72 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef 0) #3
  %73 = load double, ptr %72, align 8, !tbaa !9
  store double %73, ptr %10, align 8, !tbaa !9
  br label %74

74:                                               ; preds = %70, %60
  %75 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %76 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %77 = load double, ptr %76, align 8, !tbaa !11
  %78 = fptosi double %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %78) #3
  %80 = load double, ptr %79, align 8, !tbaa !9
  store double %80, ptr %11, align 8, !tbaa !9
  %81 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %82 = load double, ptr %81, align 8, !tbaa !11
  %83 = load double, ptr %8, align 8, !tbaa !9
  %84 = fsub double %83, 2.000000e+00
  %85 = fcmp olt double %82, %84
  br i1 %85, label %86, label %94

86:                                               ; preds = %74
  %87 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %88 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %89 = load double, ptr %88, align 8, !tbaa !11
  %90 = fptosi double %89 to i64
  %91 = add nsw i64 %90, 1
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %91) #3
  %93 = load double, ptr %92, align 8, !tbaa !9
  store double %93, ptr %12, align 8, !tbaa !9
  br label %98

94:                                               ; preds = %74
  %95 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef 0) #3
  %97 = load double, ptr %96, align 8, !tbaa !9
  store double %97, ptr %12, align 8, !tbaa !9
  br label %98

98:                                               ; preds = %94, %86
  %99 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %100 = load double, ptr %99, align 8, !tbaa !11
  %101 = load double, ptr %8, align 8, !tbaa !9
  %102 = fsub double %101, 3.000000e+00
  %103 = fcmp olt double %100, %102
  br i1 %103, label %104, label %112

104:                                              ; preds = %98
  %105 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %106 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %107 = load double, ptr %106, align 8, !tbaa !11
  %108 = fptosi double %107 to i64
  %109 = add nsw i64 %108, 2
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %105, i64 noundef %109) #3
  %111 = load double, ptr %110, align 8, !tbaa !9
  store double %111, ptr %13, align 8, !tbaa !9
  br label %116

112:                                              ; preds = %98
  %113 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %113, i64 noundef 0) #3
  %115 = load double, ptr %114, align 8, !tbaa !9
  store double %115, ptr %13, align 8, !tbaa !9
  br label %116

116:                                              ; preds = %112, %104
  %117 = load double, ptr %12, align 8, !tbaa !9
  %118 = load double, ptr %10, align 8, !tbaa !9
  %119 = fsub double %117, %118
  %120 = fmul double 5.000000e-01, %119
  store double %120, ptr %14, align 8, !tbaa !9
  %121 = load double, ptr %10, align 8, !tbaa !9
  %122 = load double, ptr %11, align 8, !tbaa !9
  %123 = call double @llvm.fmuladd.f64(double -2.500000e+00, double %122, double %121)
  %124 = load double, ptr %12, align 8, !tbaa !9
  %125 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %124, double %123)
  %126 = load double, ptr %13, align 8, !tbaa !9
  %127 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %126, double %125)
  store double %127, ptr %15, align 8, !tbaa !9
  %128 = load double, ptr %13, align 8, !tbaa !9
  %129 = load double, ptr %10, align 8, !tbaa !9
  %130 = fsub double %128, %129
  %131 = load double, ptr %11, align 8, !tbaa !9
  %132 = load double, ptr %12, align 8, !tbaa !9
  %133 = fsub double %131, %132
  %134 = fmul double 1.500000e+00, %133
  %135 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %130, double %134)
  store double %135, ptr %16, align 8, !tbaa !9
  %136 = load double, ptr %16, align 8, !tbaa !9
  %137 = load double, ptr %9, align 8, !tbaa !9
  %138 = load double, ptr %15, align 8, !tbaa !9
  %139 = call double @llvm.fmuladd.f64(double %136, double %137, double %138)
  %140 = load double, ptr %9, align 8, !tbaa !9
  %141 = load double, ptr %14, align 8, !tbaa !9
  %142 = call double @llvm.fmuladd.f64(double %139, double %140, double %141)
  %143 = load double, ptr %9, align 8, !tbaa !9
  %144 = load double, ptr %11, align 8, !tbaa !9
  %145 = call double @llvm.fmuladd.f64(double %142, double %143, double %144)
  %146 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 3
  store double %145, ptr %146, align 8, !tbaa !28
  br label %274

147:                                              ; preds = %4
  %148 = load double, ptr %6, align 8, !tbaa !9
  %149 = fmul double %148, -1.000000e+00
  store double %149, ptr %6, align 8, !tbaa !9
  %150 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %151 = load double, ptr %150, align 8, !tbaa !11
  %152 = load double, ptr %7, align 8, !tbaa !9
  %153 = fcmp ole double %151, %152
  br i1 %153, label %154, label %157

154:                                              ; preds = %147
  %155 = load double, ptr %8, align 8, !tbaa !9
  %156 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  store double %155, ptr %156, align 8, !tbaa !11
  br label %157

157:                                              ; preds = %154, %147
  %158 = load double, ptr %8, align 8, !tbaa !9
  %159 = load double, ptr %7, align 8, !tbaa !9
  %160 = fsub double %158, %159
  %161 = load i64, ptr @_ZN12maxiSettings10sampleRateE, align 8, !tbaa !25
  %162 = uitofp i64 %161 to double
  %163 = load double, ptr %6, align 8, !tbaa !9
  %164 = load float, ptr @chandiv, align 4, !tbaa !26
  %165 = fpext float %164 to double
  %166 = fmul double %163, %165
  %167 = fdiv double %162, %166
  %168 = fdiv double %160, %167
  %169 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %170 = load double, ptr %169, align 8, !tbaa !11
  %171 = fsub double %170, %168
  store double %171, ptr %169, align 8, !tbaa !11
  %172 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %173 = load double, ptr %172, align 8, !tbaa !11
  %174 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %175 = load double, ptr %174, align 8, !tbaa !11
  %176 = call double @llvm.floor.f64(double %175)
  %177 = fsub double %173, %176
  store double %177, ptr %9, align 8, !tbaa !9
  %178 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %179 = load double, ptr %178, align 8, !tbaa !11
  %180 = load double, ptr %7, align 8, !tbaa !9
  %181 = fcmp ogt double %179, %180
  br i1 %181, label %182, label %196

182:                                              ; preds = %157
  %183 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %184 = load double, ptr %183, align 8, !tbaa !11
  %185 = load double, ptr %8, align 8, !tbaa !9
  %186 = fsub double %185, 1.000000e+00
  %187 = fcmp olt double %184, %186
  br i1 %187, label %188, label %196

188:                                              ; preds = %182
  %189 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %190 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %191 = load double, ptr %190, align 8, !tbaa !11
  %192 = fptosi double %191 to i64
  %193 = add nsw i64 %192, 1
  %194 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %189, i64 noundef %193) #3
  %195 = load double, ptr %194, align 8, !tbaa !9
  store double %195, ptr %10, align 8, !tbaa !9
  br label %200

196:                                              ; preds = %182, %157
  %197 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %198 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %197, i64 noundef 0) #3
  %199 = load double, ptr %198, align 8, !tbaa !9
  store double %199, ptr %10, align 8, !tbaa !9
  br label %200

200:                                              ; preds = %196, %188
  %201 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %202 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %203 = load double, ptr %202, align 8, !tbaa !11
  %204 = fptosi double %203 to i64
  %205 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %201, i64 noundef %204) #3
  %206 = load double, ptr %205, align 8, !tbaa !9
  store double %206, ptr %11, align 8, !tbaa !9
  %207 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %208 = load double, ptr %207, align 8, !tbaa !11
  %209 = load double, ptr %7, align 8, !tbaa !9
  %210 = fcmp ogt double %208, %209
  br i1 %210, label %211, label %219

211:                                              ; preds = %200
  %212 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %213 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %214 = load double, ptr %213, align 8, !tbaa !11
  %215 = fptosi double %214 to i64
  %216 = sub nsw i64 %215, 1
  %217 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %212, i64 noundef %216) #3
  %218 = load double, ptr %217, align 8, !tbaa !9
  store double %218, ptr %12, align 8, !tbaa !9
  br label %223

219:                                              ; preds = %200
  %220 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %220, i64 noundef 0) #3
  %222 = load double, ptr %221, align 8, !tbaa !9
  store double %222, ptr %12, align 8, !tbaa !9
  br label %223

223:                                              ; preds = %219, %211
  %224 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %225 = load double, ptr %224, align 8, !tbaa !11
  %226 = load double, ptr %7, align 8, !tbaa !9
  %227 = fadd double %226, 1.000000e+00
  %228 = fcmp ogt double %225, %227
  br i1 %228, label %229, label %237

229:                                              ; preds = %223
  %230 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %231 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 0
  %232 = load double, ptr %231, align 8, !tbaa !11
  %233 = fptosi double %232 to i64
  %234 = sub nsw i64 %233, 2
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %230, i64 noundef %234) #3
  %236 = load double, ptr %235, align 8, !tbaa !9
  store double %236, ptr %13, align 8, !tbaa !9
  br label %241

237:                                              ; preds = %223
  %238 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 10
  %239 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %238, i64 noundef 0) #3
  %240 = load double, ptr %239, align 8, !tbaa !9
  store double %240, ptr %13, align 8, !tbaa !9
  br label %241

241:                                              ; preds = %237, %229
  %242 = load double, ptr %12, align 8, !tbaa !9
  %243 = load double, ptr %10, align 8, !tbaa !9
  %244 = fsub double %242, %243
  %245 = fmul double 5.000000e-01, %244
  store double %245, ptr %14, align 8, !tbaa !9
  %246 = load double, ptr %10, align 8, !tbaa !9
  %247 = load double, ptr %11, align 8, !tbaa !9
  %248 = call double @llvm.fmuladd.f64(double -2.500000e+00, double %247, double %246)
  %249 = load double, ptr %12, align 8, !tbaa !9
  %250 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %249, double %248)
  %251 = load double, ptr %13, align 8, !tbaa !9
  %252 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %251, double %250)
  store double %252, ptr %15, align 8, !tbaa !9
  %253 = load double, ptr %13, align 8, !tbaa !9
  %254 = load double, ptr %10, align 8, !tbaa !9
  %255 = fsub double %253, %254
  %256 = load double, ptr %11, align 8, !tbaa !9
  %257 = load double, ptr %12, align 8, !tbaa !9
  %258 = fsub double %256, %257
  %259 = fmul double 1.500000e+00, %258
  %260 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %255, double %259)
  store double %260, ptr %16, align 8, !tbaa !9
  %261 = load double, ptr %16, align 8, !tbaa !9
  %262 = load double, ptr %9, align 8, !tbaa !9
  %263 = load double, ptr %15, align 8, !tbaa !9
  %264 = call double @llvm.fmuladd.f64(double %261, double %262, double %263)
  %265 = load double, ptr %9, align 8, !tbaa !9
  %266 = fneg double %265
  %267 = load double, ptr %14, align 8, !tbaa !9
  %268 = call double @llvm.fmuladd.f64(double %264, double %266, double %267)
  %269 = load double, ptr %9, align 8, !tbaa !9
  %270 = fneg double %269
  %271 = load double, ptr %11, align 8, !tbaa !9
  %272 = call double @llvm.fmuladd.f64(double %268, double %270, double %271)
  %273 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 3
  store double %272, ptr %273, align 8, !tbaa !28
  br label %274

274:                                              ; preds = %241, %116
  %275 = getelementptr inbounds %class.maxiSample, ptr %17, i32 0, i32 3
  %276 = load double, ptr %275, align 8, !tbaa !28
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret double %276
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { 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, !10, i64 0}
!12 = !{!"_ZTS10maxiSample", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !14, i64 56, !15, i64 60, !14, i64 64, !16, i64 72, !18, i64 88, !22, i64 112, !15, i64 144, !15, i64 148, !15, i64 152, !14, i64 156, !15, i64 160, !14, i64 164, !17, i64 166, !10, i64 168}
!13 = !{!"_ZTS10maxiLagExpIdE", !10, i64 0, !10, i64 8, !10, i64 16}
!14 = !{!"short", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS11maxiTrigger", !10, i64 0, !17, i64 8}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !23, i64 0, !24, i64 8, !7, i64 16}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!24 = !{!"long", !7, i64 0}
!25 = !{!24, !24, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"float", !7, i64 0}
!28 = !{!12, !10, i64 24}


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

@chandiv = external dso_local local_unnamed_addr global float, align 4
@_ZN12maxiSettings10sampleRateE = external dso_local local_unnamed_addr global i64, align 8

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef double @_ZN10maxiSample5play4Eddd(ptr noundef nonnull align 8 dereferenceable(176) %0, double noundef %1, double noundef %2, double noundef %3) local_unnamed_addr #1 align 2 {
  %5 = fcmp ogt double %1, 0.000000e+00
  br i1 %5, label %6, label %58

6:                                                ; preds = %4
  %7 = load double, ptr %0, align 8, !tbaa !5
  %8 = fcmp olt double %7, %2
  %9 = select i1 %8, double %2, double %7
  %10 = fcmp ult double %9, %3
  %11 = select i1 %10, double %9, double %2
  %12 = fsub double %3, %2
  %13 = load i64, ptr @_ZN12maxiSettings10sampleRateE, align 8, !tbaa !23
  %14 = uitofp i64 %13 to double
  %15 = load float, ptr @chandiv, align 4, !tbaa !24
  %16 = fpext float %15 to double
  %17 = fmul double %16, %1
  %18 = fdiv double %14, %17
  %19 = fdiv double %12, %18
  %20 = fadd double %11, %19
  store double %20, ptr %0, align 8, !tbaa !5
  %21 = tail call double @llvm.floor.f64(double %20)
  %22 = fsub double %20, %21
  %23 = fcmp ogt double %20, 0.000000e+00
  %24 = getelementptr inbounds i8, ptr %0, i64 88
  %25 = fptosi double %21 to i32
  %26 = add nsw i32 %25, -1
  %27 = sext i32 %26 to i64
  %.sink73 = select i1 %23, i64 %27, i64 0
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %.sink73) #2
  %.057 = load double, ptr %28, align 8, !tbaa !26
  %29 = getelementptr inbounds i8, ptr %0, i64 88
  %30 = load double, ptr %0, align 8, !tbaa !5
  %31 = fptosi double %30 to i64
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %31) #2
  %33 = load double, ptr %32, align 8, !tbaa !26
  %34 = load double, ptr %0, align 8, !tbaa !5
  %35 = fadd double %3, -2.000000e+00
  %36 = fcmp olt double %34, %35
  %37 = fptosi double %34 to i64
  %38 = add nsw i64 %37, 1
  %.sink = select i1 %36, i64 %38, i64 0
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %.sink) #2
  %.055 = load double, ptr %39, align 8, !tbaa !26
  %40 = load double, ptr %0, align 8, !tbaa !5
  %41 = fadd double %3, -3.000000e+00
  %42 = fcmp olt double %40, %41
  %43 = fptosi double %40 to i64
  %44 = add nsw i64 %43, 2
  %.sink68 = select i1 %42, i64 %44, i64 0
  %45 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %29, i64 noundef %.sink68) #2
  %.0 = load double, ptr %45, align 8, !tbaa !26
  %46 = fsub double %.055, %.057
  %47 = fmul double %46, 5.000000e-01
  %48 = tail call double @llvm.fmuladd.f64(double %33, double -2.500000e+00, double %.057)
  %49 = tail call double @llvm.fmuladd.f64(double %.055, double 2.000000e+00, double %48)
  %50 = tail call double @llvm.fmuladd.f64(double %.0, double -5.000000e-01, double %49)
  %51 = fsub double %.0, %.057
  %52 = fsub double %33, %.055
  %53 = fmul double %52, 1.500000e+00
  %54 = tail call double @llvm.fmuladd.f64(double %51, double 5.000000e-01, double %53)
  %55 = tail call double @llvm.fmuladd.f64(double %54, double %22, double %50)
  %56 = tail call double @llvm.fmuladd.f64(double %55, double %22, double %47)
  %57 = tail call double @llvm.fmuladd.f64(double %56, double %22, double %33)
  br label %110

58:                                               ; preds = %4
  %59 = fneg double %1
  %60 = load double, ptr %0, align 8, !tbaa !5
  %61 = fcmp ugt double %60, %2
  %62 = select i1 %61, double %60, double %3
  %63 = fsub double %3, %2
  %64 = load i64, ptr @_ZN12maxiSettings10sampleRateE, align 8, !tbaa !23
  %65 = uitofp i64 %64 to double
  %66 = load float, ptr @chandiv, align 4, !tbaa !24
  %67 = fpext float %66 to double
  %68 = fmul double %59, %67
  %69 = fdiv double %65, %68
  %70 = fdiv double %63, %69
  %71 = fsub double %62, %70
  store double %71, ptr %0, align 8, !tbaa !5
  %72 = tail call double @llvm.floor.f64(double %71)
  %73 = fsub double %71, %72
  %74 = fcmp ogt double %71, %2
  %75 = fadd double %3, -1.000000e+00
  %76 = fcmp olt double %71, %75
  %or.cond = and i1 %74, %76
  %77 = getelementptr inbounds i8, ptr %0, i64 88
  %78 = fptosi double %71 to i64
  %79 = add nsw i64 %78, 1
  %.sink74 = select i1 %or.cond, i64 %79, i64 0
  %80 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %.sink74) #2
  %.158 = load double, ptr %80, align 8, !tbaa !26
  %81 = getelementptr inbounds i8, ptr %0, i64 88
  %82 = load double, ptr %0, align 8, !tbaa !5
  %83 = fptosi double %82 to i64
  %84 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %83) #2
  %85 = load double, ptr %84, align 8, !tbaa !26
  %86 = load double, ptr %0, align 8, !tbaa !5
  %87 = fcmp ogt double %86, %2
  %88 = fptosi double %86 to i64
  %89 = add nsw i64 %88, -1
  %.sink69 = select i1 %87, i64 %89, i64 0
  %90 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %.sink69) #2
  %.156 = load double, ptr %90, align 8, !tbaa !26
  %91 = load double, ptr %0, align 8, !tbaa !5
  %92 = fadd double %2, 1.000000e+00
  %93 = fcmp ogt double %91, %92
  %94 = fptosi double %91 to i64
  %95 = add nsw i64 %94, -2
  %.sink70 = select i1 %93, i64 %95, i64 0
  %96 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %81, i64 noundef %.sink70) #2
  %.1 = load double, ptr %96, align 8, !tbaa !26
  %97 = fsub double %.156, %.158
  %98 = fmul double %97, 5.000000e-01
  %99 = tail call double @llvm.fmuladd.f64(double %85, double -2.500000e+00, double %.158)
  %100 = tail call double @llvm.fmuladd.f64(double %.156, double 2.000000e+00, double %99)
  %101 = tail call double @llvm.fmuladd.f64(double %.1, double -5.000000e-01, double %100)
  %102 = fsub double %.1, %.158
  %103 = fsub double %85, %.156
  %104 = fmul double %103, 1.500000e+00
  %105 = tail call double @llvm.fmuladd.f64(double %102, double 5.000000e-01, double %104)
  %106 = tail call double @llvm.fmuladd.f64(double %105, double %73, double %101)
  %107 = fneg double %73
  %108 = tail call double @llvm.fmuladd.f64(double %106, double %107, double %98)
  %109 = tail call double @llvm.fmuladd.f64(double %108, double %107, double %85)
  br label %110

110:                                              ; preds = %58, %6
  %.sink71 = phi double [ %109, %58 ], [ %57, %6 ]
  %111 = getelementptr inbounds i8, ptr %0, i64 24
  store double %.sink71, ptr %111, align 8, !tbaa !27
  ret double %.sink71
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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, !7, i64 0}
!6 = !{!"_ZTS10maxiSample", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 56, !12, i64 60, !11, i64 64, !13, i64 72, !15, i64 88, !20, i64 112, !12, i64 144, !12, i64 148, !12, i64 152, !11, i64 156, !12, i64 160, !11, i64 164, !14, i64 166, !7, i64 168}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS10maxiLagExpIdE", !7, i64 0, !7, i64 8, !7, i64 16}
!11 = !{!"short", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_ZTS11maxiTrigger", !7, i64 0, !14, i64 8}
!14 = !{!"bool", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIdSaIdEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !19, i64 0, !19, i64 8, !19, i64 16}
!19 = !{!"any pointer", !8, i64 0}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !8, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !19, i64 0}
!22 = !{!"long", !8, i64 0}
!23 = !{!22, !22, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"float", !8, i64 0}
!26 = !{!7, !7, i64 0}
!27 = !{!6, !7, i64 24}


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass