; LLVM IR from zsiciarz/aquila :: tests/source/generator (PinkNoiseGenerator)

; 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.Aquila::PinkNoiseGenerator" = type { %"class.Aquila::Generator", [20 x double], i32, i32 }
%"class.Aquila::Generator" = type { %"class.Aquila::SignalSource", double, double, double }
%"class.Aquila::SignalSource" = type { ptr, %"class.std::vector", double }
%"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 }
%"struct.std::pair" = type { %"class.Aquila::SignalSource::iterator", %"class.Aquila::SignalSource::iterator" }
%"class.Aquila::SignalSource::iterator" = type { ptr, i64 }
%"class.UnitTest::TestDetails" = type <{ ptr, ptr, ptr, i32, i8, [3 x i8] }>
%"class.UnitTest::MemoryOutStream" = type { %"class.std::__cxx11::basic_ostringstream.base", %"class.std::__cxx11::basic_string", %"class.std::basic_ios" }
%"class.std::__cxx11::basic_ostringstream.base" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"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::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 }

@_ZN23SuitePinkNoiseGenerator3genE = external dso_local global %"class.Aquila::PinkNoiseGenerator", align 8
@_ZTISt9exception = external constant ptr
@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK23SuitePinkNoiseGenerator26TestDoesNotOverrunAplitude7RunImplEv(ptr noundef nonnull align 8 dereferenceable(49) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca %"struct.std::pair", align 8
  %5 = alloca %"class.Aquila::SignalSource::iterator", align 8
  %6 = alloca %"class.Aquila::SignalSource::iterator", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.UnitTest::TestDetails", align 8
  %10 = alloca %"class.UnitTest::TestDetails", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.UnitTest::MemoryOutStream", align 8
  %13 = alloca %"class.UnitTest::TestDetails", align 8
  %14 = alloca %"class.UnitTest::TestDetails", align 8
  %15 = alloca %"class.UnitTest::TestDetails", align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.UnitTest::MemoryOutStream", align 8
  %18 = alloca %"class.UnitTest::TestDetails", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8
  %20 = call i64 @time(ptr noundef null) #8
  %21 = trunc i64 %20 to i32
  call void @srand(i32 noundef %21) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  store double 1.000000e+03, ptr %3, align 8, !tbaa !9
  %22 = load double, ptr %3, align 8, !tbaa !9
  %23 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setAmplitudeEd(ptr noundef nonnull align 8 dereferenceable(64) @_ZN23SuitePinkNoiseGenerator3genE, double noundef %22)
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = getelementptr inbounds ptr, ptr %24, i64 8
  %26 = load ptr, ptr %25, align 8
  call void %26(ptr noundef nonnull align 8 dereferenceable(64) %23, i64 noundef 65536)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #8
  %27 = call { ptr, i64 } @_ZSt5beginIN6Aquila18PinkNoiseGeneratorEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(232) @_ZN23SuitePinkNoiseGenerator3genE)
  %28 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  %29 = extractvalue { ptr, i64 } %27, 0
  store ptr %29, ptr %28, align 8
  %30 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  %31 = extractvalue { ptr, i64 } %27, 1
  store i64 %31, ptr %30, align 8
  %32 = call { ptr, i64 } @_ZSt3endIN6Aquila18PinkNoiseGeneratorEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(232) @_ZN23SuitePinkNoiseGenerator3genE)
  %33 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 0
  %34 = extractvalue { ptr, i64 } %32, 0
  store ptr %34, ptr %33, align 8
  %35 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 1
  %36 = extractvalue { ptr, i64 } %32, 1
  store i64 %36, ptr %35, align 8
  %37 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  %38 = load ptr, ptr %37, align 8
  %39 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  %40 = load i64, ptr %39, align 8
  %41 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8
  %43 = getelementptr inbounds { ptr, i64 }, ptr %6, i32 0, i32 1
  %44 = load i64, ptr %43, align 8
  call void @_ZSt14minmax_elementIN6Aquila12SignalSource8iteratorEESt4pairIT_S4_ES4_S4_(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %4, ptr %38, i64 %40, ptr %42, i64 %44)
  br label %45

45:                                               ; preds = %1
  %46 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 0
  %47 = invoke noundef double @_ZNK6Aquila12SignalSource8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %46)
          to label %48 unwind label %63

48:                                               ; preds = %45
  %49 = load double, ptr %3, align 8, !tbaa !9
  %50 = fneg double %49
  %51 = fcmp ogt double %47, %50
  %52 = invoke noundef zeroext i1 @_ZN8UnitTest5CheckIbEEbT_(i1 noundef zeroext %51)
          to label %53 unwind label %63

53:                                               ; preds = %48
  br i1 %52, label %131, label %54

54:                                               ; preds = %53
  %55 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %56 unwind label %63

56:                                               ; preds = %54
  %57 = load ptr, ptr %55, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #8
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %59 unwind label %67

59:                                               ; preds = %56
  %60 = load ptr, ptr %58, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %9, ptr noundef nonnull align 8 dereferenceable(29) %60, i32 noundef 20)
          to label %61 unwind label %67

61:                                               ; preds = %59
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %57, ptr noundef nonnull align 8 dereferenceable(29) %9, ptr noundef @.str)
          to label %62 unwind label %67

62:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  br label %131

63:                                               ; preds = %54, %48, %45
  %64 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %7, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %8, align 4
  br label %71

67:                                               ; preds = %61, %59, %56
  %68 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %7, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  br label %71

71:                                               ; preds = %67, %63
  %72 = load i32, ptr %8, align 4
  %73 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #8
  %74 = icmp eq i32 %72, %73
  br i1 %74, label %75, label %120

75:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %76 = load ptr, ptr %7, align 8
  %77 = call ptr @__cxa_begin_catch(ptr %76) #8
  store ptr %77, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 408, ptr %12) #8
  invoke void @_ZN8UnitTest15MemoryOutStreamC1Ev(ptr noundef nonnull align 8 dereferenceable(144) %12)
          to label %78 unwind label %142

78:                                               ; preds = %75
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef @.str.4)
          to label %80 unwind label %146

80:                                               ; preds = %78
  %81 = load ptr, ptr %11, align 8, !tbaa !5
  %82 = load ptr, ptr %81, align 8, !tbaa !11
  %83 = getelementptr inbounds ptr, ptr %82, i64 2
  %84 = load ptr, ptr %83, align 8
  %85 = call noundef ptr %84(ptr noundef nonnull align 8 dereferenceable(8) %81) #8
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %79, ptr noundef %85)
          to label %87 unwind label %146

87:                                               ; preds = %80
  %88 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %86, ptr noundef @.str.5)
          to label %89 unwind label %146

89:                                               ; preds = %87
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %91 unwind label %146

91:                                               ; preds = %89
  %92 = load ptr, ptr %90, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #8
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %94 unwind label %150

94:                                               ; preds = %91
  %95 = load ptr, ptr %93, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %13, ptr noundef nonnull align 8 dereferenceable(29) %95, i32 noundef 20)
          to label %96 unwind label %150

96:                                               ; preds = %94
  %97 = invoke noundef ptr @_ZNK8UnitTest15MemoryOutStream7GetTextEv(ptr noundef nonnull align 8 dereferenceable(144) %12)
          to label %98 unwind label %150

98:                                               ; preds = %96
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %92, ptr noundef nonnull align 8 dereferenceable(29) %13, ptr noundef %97)
          to label %99 unwind label %150

99:                                               ; preds = %98
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %12) #8
  call void @llvm.lifetime.end.p0(i64 408, ptr %12) #8
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %100

100:                                              ; preds = %131, %130, %99
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102
  %104 = getelementptr inbounds %"struct.std::pair", ptr %4, i32 0, i32 1
  %105 = invoke noundef double @_ZNK6Aquila12SignalSource8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %104)
          to label %106 unwind label %157

106:                                              ; preds = %103
  %107 = load double, ptr %3, align 8, !tbaa !9
  %108 = fcmp olt double %105, %107
  %109 = invoke noundef zeroext i1 @_ZN8UnitTest5CheckIbEEbT_(i1 noundef zeroext %108)
          to label %110 unwind label %157

110:                                              ; preds = %106
  br i1 %109, label %208, label %111

111:                                              ; preds = %110
  %112 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %113 unwind label %157

113:                                              ; preds = %111
  %114 = load ptr, ptr %112, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #8
  %115 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %116 unwind label %161

116:                                              ; preds = %113
  %117 = load ptr, ptr %115, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %14, ptr noundef nonnull align 8 dereferenceable(29) %117, i32 noundef 21)
          to label %118 unwind label %161

118:                                              ; preds = %116
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %114, ptr noundef nonnull align 8 dereferenceable(29) %14, ptr noundef @.str.6)
          to label %119 unwind label %161

119:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #8
  br label %208

120:                                              ; preds = %71
  %121 = load ptr, ptr %7, align 8
  %122 = call ptr @__cxa_begin_catch(ptr %121) #8
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %124 unwind label %132

124:                                              ; preds = %120
  %125 = load ptr, ptr %123, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #8
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %127 unwind label %136

127:                                              ; preds = %124
  %128 = load ptr, ptr %126, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %10, ptr noundef nonnull align 8 dereferenceable(29) %128, i32 noundef 20)
          to label %129 unwind label %136

129:                                              ; preds = %127
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %125, ptr noundef nonnull align 8 dereferenceable(29) %10, ptr noundef @.str.3)
          to label %130 unwind label %136

130:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  call void @__cxa_end_catch()
  br label %100

131:                                              ; preds = %62, %53
  br label %100

132:                                              ; preds = %120
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %7, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %8, align 4
  br label %140

136:                                              ; preds = %129, %127, %124
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %7, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #8
  br label %140

140:                                              ; preds = %136, %132
  invoke void @__cxa_end_catch()
          to label %141 unwind label %240

141:                                              ; preds = %140
  br label %234

142:                                              ; preds = %75
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %7, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %8, align 4
  br label %155

146:                                              ; preds = %89, %87, %80, %78
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %7, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %8, align 4
  br label %154

150:                                              ; preds = %98, %96, %94, %91
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %7, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #8
  br label %154

154:                                              ; preds = %150, %146
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %12) #8
  br label %155

155:                                              ; preds = %154, %142
  call void @llvm.lifetime.end.p0(i64 408, ptr %12) #8
  invoke void @__cxa_end_catch()
          to label %156 unwind label %240

156:                                              ; preds = %155
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %234

157:                                              ; preds = %111, %106, %103
  %158 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %7, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %8, align 4
  br label %165

161:                                              ; preds = %118, %116, %113
  %162 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %7, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #8
  br label %165

165:                                              ; preds = %161, %157
  %166 = load i32, ptr %8, align 4
  %167 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #8
  %168 = icmp eq i32 %166, %167
  br i1 %168, label %169, label %197

169:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %170 = load ptr, ptr %7, align 8
  %171 = call ptr @__cxa_begin_catch(ptr %170) #8
  store ptr %171, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 408, ptr %17) #8
  invoke void @_ZN8UnitTest15MemoryOutStreamC1Ev(ptr noundef nonnull align 8 dereferenceable(144) %17)
          to label %172 unwind label %219

172:                                              ; preds = %169
  %173 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef @.str.4)
          to label %174 unwind label %223

174:                                              ; preds = %172
  %175 = load ptr, ptr %16, align 8, !tbaa !5
  %176 = load ptr, ptr %175, align 8, !tbaa !11
  %177 = getelementptr inbounds ptr, ptr %176, i64 2
  %178 = load ptr, ptr %177, align 8
  %179 = call noundef ptr %178(ptr noundef nonnull align 8 dereferenceable(8) %175) #8
  %180 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %173, ptr noundef %179)
          to label %181 unwind label %223

181:                                              ; preds = %174
  %182 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %180, ptr noundef @.str.8)
          to label %183 unwind label %223

183:                                              ; preds = %181
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %185 unwind label %223

185:                                              ; preds = %183
  %186 = load ptr, ptr %184, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #8
  %187 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %188 unwind label %227

188:                                              ; preds = %185
  %189 = load ptr, ptr %187, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %18, ptr noundef nonnull align 8 dereferenceable(29) %189, i32 noundef 21)
          to label %190 unwind label %227

190:                                              ; preds = %188
  %191 = invoke noundef ptr @_ZNK8UnitTest15MemoryOutStream7GetTextEv(ptr noundef nonnull align 8 dereferenceable(144) %17)
          to label %192 unwind label %227

192:                                              ; preds = %190
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %186, ptr noundef nonnull align 8 dereferenceable(29) %18, ptr noundef %191)
          to label %193 unwind label %227

193:                                              ; preds = %192
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #8
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %17) #8
  call void @llvm.lifetime.end.p0(i64 408, ptr %17) #8
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %194

194:                                              ; preds = %208, %207, %193
  br label %195

195:                                              ; preds = %194
  br label %196

196:                                              ; preds = %195
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  ret void

197:                                              ; preds = %165
  %198 = load ptr, ptr %7, align 8
  %199 = call ptr @__cxa_begin_catch(ptr %198) #8
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %201 unwind label %209

201:                                              ; preds = %197
  %202 = load ptr, ptr %200, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #8
  %203 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %204 unwind label %213

204:                                              ; preds = %201
  %205 = load ptr, ptr %203, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %15, ptr noundef nonnull align 8 dereferenceable(29) %205, i32 noundef 21)
          to label %206 unwind label %213

206:                                              ; preds = %204
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %202, ptr noundef nonnull align 8 dereferenceable(29) %15, ptr noundef @.str.7)
          to label %207 unwind label %213

207:                                              ; preds = %206
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #8
  call void @__cxa_end_catch()
  br label %194

208:                                              ; preds = %119, %110
  br label %194

209:                                              ; preds = %197
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %7, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %8, align 4
  br label %217

213:                                              ; preds = %206, %204, %201
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %7, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #8
  br label %217

217:                                              ; preds = %213, %209
  invoke void @__cxa_end_catch()
          to label %218 unwind label %240

218:                                              ; preds = %217
  br label %234

219:                                              ; preds = %169
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %7, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %8, align 4
  br label %232

223:                                              ; preds = %183, %181, %174, %172
  %224 = landingpad { ptr, i32 }
          cleanup
  %225 = extractvalue { ptr, i32 } %224, 0
  store ptr %225, ptr %7, align 8
  %226 = extractvalue { ptr, i32 } %224, 1
  store i32 %226, ptr %8, align 4
  br label %231

227:                                              ; preds = %192, %190, %188, %185
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %7, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #8
  br label %231

231:                                              ; preds = %227, %223
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %17) #8
  br label %232

232:                                              ; preds = %231, %219
  call void @llvm.lifetime.end.p0(i64 408, ptr %17) #8
  invoke void @__cxa_end_catch()
          to label %233 unwind label %240

233:                                              ; preds = %232
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %234

234:                                              ; preds = %233, %218, %156, %141
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %235

235:                                              ; preds = %234
  %236 = load ptr, ptr %7, align 8
  %237 = load i32, ptr %8, align 4
  %238 = insertvalue { ptr, i32 } poison, ptr %236, 0
  %239 = insertvalue { ptr, i32 } %238, i32 %237, 1
  resume { ptr, i32 } %239

240:                                              ; preds = %232, %217, %155, %140
  %241 = landingpad { ptr, i32 }
          catch ptr null
  %242 = extractvalue { ptr, i32 } %241, 0
  call void @__clang_call_terminate(ptr %242) #9
  unreachable
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) #1

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setAmplitudeEd(ptr noundef nonnull align 8 dereferenceable(64), double noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt14minmax_elementIN6Aquila12SignalSource8iteratorEESt4pairIT_S4_ES4_S4_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr, i64, ptr, i64) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, i64 } @_ZSt5beginIN6Aquila18PinkNoiseGeneratorEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(232)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, i64 } @_ZSt3endIN6Aquila18PinkNoiseGeneratorEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(232)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN8UnitTest5CheckIbEEbT_(i1 noundef zeroext) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK6Aquila12SignalSource8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv() #5

declare void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21), ptr noundef nonnull align 8 dereferenceable(29), ptr noundef) #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv() #5

declare void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29), ptr noundef nonnull align 8 dereferenceable(29), i32 noundef) unnamed_addr #5

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #6

declare ptr @__cxa_begin_catch(ptr)

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8UnitTest15MemoryOutStreamC1Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #0 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) #4

declare noundef ptr @_ZNK8UnitTest15MemoryOutStream7GetTextEv(ptr noundef nonnull align 8 dereferenceable(144)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { nounwind "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { "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 #6 = { nounwind memory(none) }
attributes #7 = { noinline noreturn nounwind uwtable "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 #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!"vtable pointer", !8, i64 0}


; 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.Aquila::PinkNoiseGenerator" = type { %"class.Aquila::Generator", [20 x double], i32, i32 }
%"class.Aquila::Generator" = type { %"class.Aquila::SignalSource", double, double, double }
%"class.Aquila::SignalSource" = type { ptr, %"class.std::vector", double }
%"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 }
%"struct.std::pair" = type { %"class.Aquila::SignalSource::iterator", %"class.Aquila::SignalSource::iterator" }
%"class.Aquila::SignalSource::iterator" = type { ptr, i64 }
%"class.UnitTest::TestDetails" = type <{ ptr, ptr, ptr, i32, i8, [3 x i8] }>
%"class.UnitTest::MemoryOutStream" = type { %"class.std::__cxx11::basic_ostringstream.base", %"class.std::__cxx11::basic_string", %"class.std::basic_ios" }
%"class.std::__cxx11::basic_ostringstream.base" = type { %"class.std::basic_ostream.base", %"class.std::__cxx11::basic_stringbuf" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"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::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 }

@_ZN23SuitePinkNoiseGenerator3genE = external dso_local global %"class.Aquila::PinkNoiseGenerator", align 8
@_ZTISt9exception = external constant ptr
@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [39 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK23SuitePinkNoiseGenerator26TestDoesNotOverrunAplitude7RunImplEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(49) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca %"class.UnitTest::TestDetails", align 8
  %4 = alloca %"class.UnitTest::TestDetails", align 8
  %5 = alloca %"class.UnitTest::MemoryOutStream", align 8
  %6 = alloca %"class.UnitTest::TestDetails", align 8
  %7 = alloca %"class.UnitTest::TestDetails", align 8
  %8 = alloca %"class.UnitTest::TestDetails", align 8
  %9 = alloca %"class.UnitTest::MemoryOutStream", align 8
  %10 = alloca %"class.UnitTest::TestDetails", align 8
  %11 = tail call i64 @time(ptr noundef null) #8
  %12 = trunc i64 %11 to i32
  tail call void @srand(i32 noundef %12) #8
  %13 = tail call noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setAmplitudeEd(ptr noundef nonnull align 8 dereferenceable(64) @_ZN23SuitePinkNoiseGenerator3genE, double noundef 1.000000e+03)
  %14 = load ptr, ptr %13, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %14, i64 64
  %16 = load ptr, ptr %15, align 8
  tail call void %16(ptr noundef nonnull align 8 dereferenceable(64) %13, i64 noundef 65536)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #8
  %17 = tail call { ptr, i64 } @_ZSt5beginIN6Aquila18PinkNoiseGeneratorEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(232) @_ZN23SuitePinkNoiseGenerator3genE)
  %18 = extractvalue { ptr, i64 } %17, 0
  %19 = extractvalue { ptr, i64 } %17, 1
  %20 = tail call { ptr, i64 } @_ZSt3endIN6Aquila18PinkNoiseGeneratorEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(232) @_ZN23SuitePinkNoiseGenerator3genE)
  %21 = extractvalue { ptr, i64 } %20, 0
  %22 = extractvalue { ptr, i64 } %20, 1
  call void @_ZSt14minmax_elementIN6Aquila12SignalSource8iteratorEESt4pairIT_S4_ES4_S4_(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair") align 8 %2, ptr %18, i64 %19, ptr %21, i64 %22)
  %23 = invoke noundef double @_ZNK6Aquila12SignalSource8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
          to label %24 unwind label %36

24:                                               ; preds = %1
  %25 = fcmp ogt double %23, -1.000000e+03
  %26 = call noundef zeroext i1 @_ZN8UnitTest5CheckIbEEbT_(i1 noundef zeroext %25)
  br i1 %26, label %66, label %27

27:                                               ; preds = %24
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %29 unwind label %36

29:                                               ; preds = %27
  %30 = load ptr, ptr %28, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  %31 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %32 unwind label %38

32:                                               ; preds = %29
  %33 = load ptr, ptr %31, align 8, !tbaa !8
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %3, ptr noundef nonnull align 8 dereferenceable(29) %33, i32 noundef 20)
          to label %34 unwind label %38

34:                                               ; preds = %32
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %30, ptr noundef nonnull align 8 dereferenceable(29) %3, ptr noundef nonnull @.str)
          to label %35 unwind label %38

35:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  br label %66

36:                                               ; preds = %27, %1
  %37 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %40

38:                                               ; preds = %34, %32, %29
  %39 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  br label %40

40:                                               ; preds = %38, %36
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ]
  %.0 = extractvalue { ptr, i32 } %.pn, 0
  %.015 = extractvalue { ptr, i32 } %.pn, 1
  %41 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #8
  %42 = icmp eq i32 %.015, %41
  %43 = call ptr @__cxa_begin_catch(ptr %.0) #8
  br i1 %42, label %44, label %81

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 408, ptr nonnull %5) #8
  invoke void @_ZN8UnitTest15MemoryOutStreamC1Ev(ptr noundef nonnull align 8 dereferenceable(144) %5)
          to label %45 unwind label %95

45:                                               ; preds = %44
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull @.str.4)
          to label %47 unwind label %97

47:                                               ; preds = %45
  %48 = load ptr, ptr %43, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %50 = load ptr, ptr %49, align 8
  %51 = call noundef ptr %50(ptr noundef nonnull align 8 dereferenceable(8) %43) #8
  %52 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef %51)
          to label %53 unwind label %97

53:                                               ; preds = %47
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef nonnull @.str.5)
          to label %55 unwind label %97

55:                                               ; preds = %53
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %57 unwind label %97

57:                                               ; preds = %55
  %58 = load ptr, ptr %56, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #8
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %60 unwind label %99

60:                                               ; preds = %57
  %61 = load ptr, ptr %59, align 8, !tbaa !8
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %6, ptr noundef nonnull align 8 dereferenceable(29) %61, i32 noundef 20)
          to label %62 unwind label %99

62:                                               ; preds = %60
  %63 = invoke noundef ptr @_ZNK8UnitTest15MemoryOutStream7GetTextEv(ptr noundef nonnull align 8 dereferenceable(144) %5)
          to label %64 unwind label %99

64:                                               ; preds = %62
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %58, ptr noundef nonnull align 8 dereferenceable(29) %6, ptr noundef %63)
          to label %65 unwind label %99

65:                                               ; preds = %64
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %5) #8
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %5) #8
  call void @__cxa_end_catch()
  br label %66

66:                                               ; preds = %24, %35, %65, %89
  %67 = getelementptr inbounds i8, ptr %2, i64 16
  %68 = invoke noundef double @_ZNK6Aquila12SignalSource8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16) %67)
          to label %69 unwind label %103

69:                                               ; preds = %66
  %70 = fcmp olt double %68, 1.000000e+03
  %71 = call noundef zeroext i1 @_ZN8UnitTest5CheckIbEEbT_(i1 noundef zeroext %70)
  br i1 %71, label %133, label %72

72:                                               ; preds = %69
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %74 unwind label %103

74:                                               ; preds = %72
  %75 = load ptr, ptr %73, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #8
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %77 unwind label %105

77:                                               ; preds = %74
  %78 = load ptr, ptr %76, align 8, !tbaa !8
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %7, ptr noundef nonnull align 8 dereferenceable(29) %78, i32 noundef 21)
          to label %79 unwind label %105

79:                                               ; preds = %77
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %75, ptr noundef nonnull align 8 dereferenceable(29) %7, ptr noundef nonnull @.str.6)
          to label %80 unwind label %105

80:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  br label %133

81:                                               ; preds = %40
  %82 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %83 unwind label %90

83:                                               ; preds = %81
  %84 = load ptr, ptr %82, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #8
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %86 unwind label %92

86:                                               ; preds = %83
  %87 = load ptr, ptr %85, align 8, !tbaa !8
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %4, ptr noundef nonnull align 8 dereferenceable(29) %87, i32 noundef 20)
          to label %88 unwind label %92

88:                                               ; preds = %86
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %84, ptr noundef nonnull align 8 dereferenceable(29) %4, ptr noundef nonnull @.str.3)
          to label %89 unwind label %92

89:                                               ; preds = %88
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  call void @__cxa_end_catch()
  br label %66

90:                                               ; preds = %81
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %94

92:                                               ; preds = %88, %86, %83
  %93 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #8
  br label %94

94:                                               ; preds = %92, %90
  %.pn25 = phi { ptr, i32 } [ %93, %92 ], [ %91, %90 ]
  invoke void @__cxa_end_catch()
          to label %156 unwind label %157

95:                                               ; preds = %44
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %102

97:                                               ; preds = %55, %53, %47, %45
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %101

99:                                               ; preds = %64, %62, %60, %57
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  br label %101

101:                                              ; preds = %99, %97
  %.pn27 = phi { ptr, i32 } [ %100, %99 ], [ %98, %97 ]
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %5) #8
  br label %102

102:                                              ; preds = %101, %95
  %.pn27.pn = phi { ptr, i32 } [ %.pn27, %101 ], [ %96, %95 ]
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %5) #8
  invoke void @__cxa_end_catch()
          to label %156 unwind label %157

103:                                              ; preds = %72, %66
  %104 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %107

105:                                              ; preds = %79, %77, %74
  %106 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #8
  br label %107

107:                                              ; preds = %105, %103
  %.pn30 = phi { ptr, i32 } [ %106, %105 ], [ %104, %103 ]
  %.4 = extractvalue { ptr, i32 } %.pn30, 0
  %.419 = extractvalue { ptr, i32 } %.pn30, 1
  %108 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #8
  %109 = icmp eq i32 %.419, %108
  %110 = call ptr @__cxa_begin_catch(ptr %.4) #8
  br i1 %109, label %111, label %134

111:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 408, ptr nonnull %9) #8
  invoke void @_ZN8UnitTest15MemoryOutStreamC1Ev(ptr noundef nonnull align 8 dereferenceable(144) %9)
          to label %112 unwind label %148

112:                                              ; preds = %111
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull @.str.4)
          to label %114 unwind label %150

114:                                              ; preds = %112
  %115 = load ptr, ptr %110, align 8, !tbaa !5
  %116 = getelementptr inbounds i8, ptr %115, i64 16
  %117 = load ptr, ptr %116, align 8
  %118 = call noundef ptr %117(ptr noundef nonnull align 8 dereferenceable(8) %110) #8
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef %118)
          to label %120 unwind label %150

120:                                              ; preds = %114
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef nonnull @.str.8)
          to label %122 unwind label %150

122:                                              ; preds = %120
  %123 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %124 unwind label %150

124:                                              ; preds = %122
  %125 = load ptr, ptr %123, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #8
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %127 unwind label %152

127:                                              ; preds = %124
  %128 = load ptr, ptr %126, align 8, !tbaa !8
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %10, ptr noundef nonnull align 8 dereferenceable(29) %128, i32 noundef 21)
          to label %129 unwind label %152

129:                                              ; preds = %127
  %130 = invoke noundef ptr @_ZNK8UnitTest15MemoryOutStream7GetTextEv(ptr noundef nonnull align 8 dereferenceable(144) %9)
          to label %131 unwind label %152

131:                                              ; preds = %129
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %125, ptr noundef nonnull align 8 dereferenceable(29) %10, ptr noundef %130)
          to label %132 unwind label %152

132:                                              ; preds = %131
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #8
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %9) #8
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %9) #8
  call void @__cxa_end_catch()
  br label %133

133:                                              ; preds = %69, %80, %142, %132
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #8
  ret void

134:                                              ; preds = %107
  %135 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %136 unwind label %143

136:                                              ; preds = %134
  %137 = load ptr, ptr %135, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #8
  %138 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %139 unwind label %145

139:                                              ; preds = %136
  %140 = load ptr, ptr %138, align 8, !tbaa !8
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %8, ptr noundef nonnull align 8 dereferenceable(29) %140, i32 noundef 21)
          to label %141 unwind label %145

141:                                              ; preds = %139
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %137, ptr noundef nonnull align 8 dereferenceable(29) %8, ptr noundef nonnull @.str.7)
          to label %142 unwind label %145

142:                                              ; preds = %141
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  call void @__cxa_end_catch()
  br label %133

143:                                              ; preds = %134
  %144 = landingpad { ptr, i32 }
          cleanup
  br label %147

145:                                              ; preds = %141, %139, %136
  %146 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  br label %147

147:                                              ; preds = %145, %143
  %.pn32 = phi { ptr, i32 } [ %146, %145 ], [ %144, %143 ]
  invoke void @__cxa_end_catch()
          to label %156 unwind label %157

148:                                              ; preds = %111
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %155

150:                                              ; preds = %122, %120, %114, %112
  %151 = landingpad { ptr, i32 }
          cleanup
  br label %154

152:                                              ; preds = %131, %129, %127, %124
  %153 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #8
  br label %154

154:                                              ; preds = %152, %150
  %.pn34 = phi { ptr, i32 } [ %153, %152 ], [ %151, %150 ]
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %9) #8
  br label %155

155:                                              ; preds = %154, %148
  %.pn34.pn = phi { ptr, i32 } [ %.pn34, %154 ], [ %149, %148 ]
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %9) #8
  invoke void @__cxa_end_catch()
          to label %156 unwind label %157

156:                                              ; preds = %155, %102, %147, %94
  %.pn34.pn.pn = phi { ptr, i32 } [ %.pn32, %147 ], [ %.pn25, %94 ], [ %.pn27.pn, %102 ], [ %.pn34.pn, %155 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn34.pn.pn

157:                                              ; preds = %155, %147, %102, %94
  %158 = landingpad { ptr, i32 }
          catch ptr null
  %159 = extractvalue { ptr, i32 } %158, 0
  call void @__clang_call_terminate(ptr %159) #9
  unreachable
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setAmplitudeEd(ptr noundef nonnull align 8 dereferenceable(64), double noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt14minmax_elementIN6Aquila12SignalSource8iteratorEESt4pairIT_S4_ES4_S4_(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr, i64, ptr, i64) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, i64 } @_ZSt5beginIN6Aquila18PinkNoiseGeneratorEEDTcldtfp_5beginEERT_(ptr noundef nonnull align 8 dereferenceable(232)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, i64 } @_ZSt3endIN6Aquila18PinkNoiseGeneratorEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(232)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN8UnitTest5CheckIbEEbT_(i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNK6Aquila12SignalSource8iteratordeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv() local_unnamed_addr #5

declare void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21), ptr noundef nonnull align 8 dereferenceable(29), ptr noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv() local_unnamed_addr #5

declare void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29), ptr noundef nonnull align 8 dereferenceable(29), i32 noundef) unnamed_addr #5

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #6

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8UnitTest15MemoryOutStreamC1Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #0 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 #4

declare noundef ptr @_ZNK8UnitTest15MemoryOutStream7GetTextEv(ptr noundef nonnull align 8 dereferenceable(144)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144)) unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { nounwind "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 #5 = { "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 #6 = { nofree nosync nounwind memory(none) }
attributes #7 = { noinline noreturn nounwind uwtable "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 #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass