; 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 }
%"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.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

; 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) #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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) #5

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK23SuitePinkNoiseGenerator12TestZeroMean7RunImplEv(ptr noundef nonnull align 8 dereferenceable(49) %0) unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca %"class.UnitTest::TestDetails", align 8
  %9 = alloca %"class.UnitTest::TestDetails", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.UnitTest::MemoryOutStream", align 8
  %12 = alloca %"class.UnitTest::TestDetails", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  %14 = call i64 @time(ptr noundef null) #8
  %15 = trunc i64 %14 to i32
  call void @srand(i32 noundef %15) #8
  %16 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setAmplitudeEd(ptr noundef nonnull align 8 dereferenceable(64) @_ZN23SuitePinkNoiseGenerator3genE, double noundef 1.000000e+00)
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = getelementptr inbounds ptr, ptr %17, i64 8
  %19 = load ptr, ptr %18, align 8
  call void %19(ptr noundef nonnull align 8 dereferenceable(64) %16, i64 noundef 65536)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %20 = call noundef double @_ZN6Aquila4meanERKNS_12SignalSourceE(ptr noundef nonnull align 8 dereferenceable(40) @_ZN23SuitePinkNoiseGenerator3genE)
  store double %20, ptr %3, align 8, !tbaa !11
  br label %21

21:                                               ; preds = %1
  %22 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %23 unwind label %30

23:                                               ; preds = %21
  %24 = load ptr, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  store double 0.000000e+00, ptr %6, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  store double 1.000000e-01, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #8
  %25 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %26 unwind label %34

26:                                               ; preds = %23
  %27 = load ptr, ptr %25, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %8, ptr noundef nonnull align 8 dereferenceable(29) %27, i32 noundef 29)
          to label %28 unwind label %34

28:                                               ; preds = %26
  invoke void @_ZN8UnitTest10CheckCloseIdddEEvRNS_11TestResultsERKT_RKT0_RKT1_RKNS_11TestDetailsE(ptr noundef nonnull align 8 dereferenceable(21) %24, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(29) %8)
          to label %29 unwind label %34

29:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %67

30:                                               ; preds = %21
  %31 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %4, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %5, align 4
  br label %38

34:                                               ; preds = %28, %26, %23
  %35 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %4, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %38

38:                                               ; preds = %34, %30
  %39 = load i32, ptr %5, align 4
  %40 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #8
  %41 = icmp eq i32 %39, %40
  br i1 %41, label %42, label %70

42:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %43 = load ptr, ptr %4, align 8
  %44 = call ptr @__cxa_begin_catch(ptr %43) #8
  store ptr %44, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 408, ptr %11) #8
  invoke void @_ZN8UnitTest15MemoryOutStreamC1Ev(ptr noundef nonnull align 8 dereferenceable(144) %11)
          to label %45 unwind label %91

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

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

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

56:                                               ; preds = %54
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %58 unwind label %95

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

61:                                               ; preds = %58
  %62 = load ptr, ptr %60, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %12, ptr noundef nonnull align 8 dereferenceable(29) %62, i32 noundef 29)
          to label %63 unwind label %99

63:                                               ; preds = %61
  %64 = invoke noundef ptr @_ZNK8UnitTest15MemoryOutStream7GetTextEv(ptr noundef nonnull align 8 dereferenceable(144) %11)
          to label %65 unwind label %99

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

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

67:                                               ; preds = %80, %66, %29
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  ret void

70:                                               ; preds = %38
  %71 = load ptr, ptr %4, align 8
  %72 = call ptr @__cxa_begin_catch(ptr %71) #8
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %74 unwind label %81

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

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

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

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

81:                                               ; preds = %70
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %4, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %5, align 4
  br label %89

85:                                               ; preds = %79, %77, %74
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %4, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #8
  br label %89

89:                                               ; preds = %85, %81
  invoke void @__cxa_end_catch()
          to label %90 unwind label %112

90:                                               ; preds = %89
  br label %106

91:                                               ; preds = %42
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %4, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %5, align 4
  br label %104

95:                                               ; preds = %56, %54, %47, %45
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %4, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %5, align 4
  br label %103

99:                                               ; preds = %65, %63, %61, %58
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %4, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #8
  br label %103

103:                                              ; preds = %99, %95
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %11) #8
  br label %104

104:                                              ; preds = %103, %91
  call void @llvm.lifetime.end.p0(i64 408, ptr %11) #8
  invoke void @__cxa_end_catch()
          to label %105 unwind label %112

105:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %106

106:                                              ; preds = %105, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %107

107:                                              ; preds = %106
  %108 = load ptr, ptr %4, align 8
  %109 = load i32, ptr %5, align 4
  %110 = insertvalue { ptr, i32 } poison, ptr %108, 0
  %111 = insertvalue { ptr, i32 } %110, i32 %109, 1
  resume { ptr, i32 } %111

112:                                              ; preds = %104, %89
  %113 = landingpad { ptr, i32 }
          catch ptr null
  %114 = extractvalue { ptr, i32 } %113, 0
  call void @__clang_call_terminate(ptr %114) #9
  unreachable
}

declare noundef double @_ZN6Aquila4meanERKNS_12SignalSourceE(ptr noundef nonnull align 8 dereferenceable(40)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8UnitTest10CheckCloseIdddEEvRNS_11TestResultsERKT_RKT0_RKT1_RKNS_11TestDetailsE(ptr noundef nonnull align 8 dereferenceable(21), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(29)) #6

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { nounwind memory(none) }
attributes #5 = { 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 #6 = { 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 #7 = { 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 #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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, 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 }
%"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.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [28 x i8], align 1

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

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

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

; 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 #2 align 2

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK23SuitePinkNoiseGenerator12TestZeroMean7RunImplEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(49) %0) unnamed_addr #6 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca %"class.UnitTest::TestDetails", align 8
  %6 = alloca %"class.UnitTest::TestDetails", align 8
  %7 = alloca %"class.UnitTest::MemoryOutStream", align 8
  %8 = alloca %"class.UnitTest::TestDetails", align 8
  %9 = tail call i64 @time(ptr noundef null) #8
  %10 = trunc i64 %9 to i32
  tail call void @srand(i32 noundef %10) #8
  %11 = tail call noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setAmplitudeEd(ptr noundef nonnull align 8 dereferenceable(64) @_ZN23SuitePinkNoiseGenerator3genE, double noundef 1.000000e+00)
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 64
  %14 = load ptr, ptr %13, align 8
  tail call void %14(ptr noundef nonnull align 8 dereferenceable(64) %11, i64 noundef 65536)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #8
  %15 = tail call noundef double @_ZN6Aquila4meanERKNS_12SignalSourceE(ptr noundef nonnull align 8 dereferenceable(40) @_ZN23SuitePinkNoiseGenerator3genE)
  store double %15, ptr %2, align 8, !tbaa !8
  %16 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %17 unwind label %24

17:                                               ; preds = %1
  %18 = load ptr, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  store double 0.000000e+00, ptr %3, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  store double 1.000000e-01, ptr %4, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #8
  %19 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %20 unwind label %26

20:                                               ; preds = %17
  %21 = load ptr, ptr %19, align 8, !tbaa !11
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %5, ptr noundef nonnull align 8 dereferenceable(29) %21, i32 noundef 29)
          to label %22 unwind label %26

22:                                               ; preds = %20
  invoke void @_ZN8UnitTest10CheckCloseIdddEEvRNS_11TestResultsERKT_RKT0_RKT1_RKNS_11TestDetailsE(ptr noundef nonnull align 8 dereferenceable(21) %18, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(29) %5)
          to label %23 unwind label %26

23:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %54

24:                                               ; preds = %1
  %25 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %28

26:                                               ; preds = %22, %20, %17
  %27 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %28

28:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  %.0 = extractvalue { ptr, i32 } %.pn, 0
  %.06 = extractvalue { ptr, i32 } %.pn, 1
  %29 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #8
  %30 = icmp eq i32 %.06, %29
  %31 = call ptr @__cxa_begin_catch(ptr %.0) #8
  br i1 %30, label %32, label %55

32:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 408, ptr nonnull %7) #8
  invoke void @_ZN8UnitTest15MemoryOutStreamC1Ev(ptr noundef nonnull align 8 dereferenceable(144) %7)
          to label %33 unwind label %69

33:                                               ; preds = %32
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull @.str.4)
          to label %35 unwind label %71

35:                                               ; preds = %33
  %36 = load ptr, ptr %31, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %38 = load ptr, ptr %37, align 8
  %39 = call noundef ptr %38(ptr noundef nonnull align 8 dereferenceable(8) %31) #8
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef %39)
          to label %41 unwind label %71

41:                                               ; preds = %35
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull @.str.12)
          to label %43 unwind label %71

43:                                               ; preds = %41
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %45 unwind label %71

45:                                               ; preds = %43
  %46 = load ptr, ptr %44, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #8
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %48 unwind label %73

48:                                               ; preds = %45
  %49 = load ptr, ptr %47, align 8, !tbaa !11
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %8, ptr noundef nonnull align 8 dereferenceable(29) %49, i32 noundef 29)
          to label %50 unwind label %73

50:                                               ; preds = %48
  %51 = invoke noundef ptr @_ZNK8UnitTest15MemoryOutStream7GetTextEv(ptr noundef nonnull align 8 dereferenceable(144) %7)
          to label %52 unwind label %73

52:                                               ; preds = %50
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %46, ptr noundef nonnull align 8 dereferenceable(29) %8, ptr noundef %51)
          to label %53 unwind label %73

53:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %7) #8
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %7) #8
  call void @__cxa_end_catch()
  br label %54

54:                                               ; preds = %63, %53, %23
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  ret void

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

57:                                               ; preds = %55
  %58 = load ptr, ptr %56, align 8, !tbaa !11
  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 %66

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

62:                                               ; preds = %60
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %58, ptr noundef nonnull align 8 dereferenceable(29) %6, ptr noundef nonnull @.str.11)
          to label %63 unwind label %66

63:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #8
  call void @__cxa_end_catch()
  br label %54

64:                                               ; preds = %55
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %68

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

68:                                               ; preds = %66, %64
  %.pn12 = phi { ptr, i32 } [ %67, %66 ], [ %65, %64 ]
  invoke void @__cxa_end_catch()
          to label %77 unwind label %78

69:                                               ; preds = %32
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %76

71:                                               ; preds = %43, %41, %35, %33
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %75

73:                                               ; preds = %52, %50, %48, %45
  %74 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #8
  br label %75

75:                                               ; preds = %73, %71
  %.pn14 = phi { ptr, i32 } [ %74, %73 ], [ %72, %71 ]
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %7) #8
  br label %76

76:                                               ; preds = %75, %69
  %.pn14.pn = phi { ptr, i32 } [ %.pn14, %75 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %7) #8
  invoke void @__cxa_end_catch()
          to label %77 unwind label %78

77:                                               ; preds = %76, %68
  %.pn14.pn.pn = phi { ptr, i32 } [ %.pn12, %68 ], [ %.pn14.pn, %76 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #8
  resume { ptr, i32 } %.pn14.pn.pn

78:                                               ; preds = %76, %68
  %79 = landingpad { ptr, i32 }
          catch ptr null
  %80 = extractvalue { ptr, i32 } %79, 0
  call void @__clang_call_terminate(ptr %80) #9
  unreachable
}

declare noundef double @_ZN6Aquila4meanERKNS_12SignalSourceE(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8UnitTest10CheckCloseIdddEEvRNS_11TestResultsERKT_RKT0_RKT1_RKNS_11TestDetailsE(ptr noundef nonnull align 8 dereferenceable(21), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(29)) local_unnamed_addr #6

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { nofree nosync nounwind memory(none) }
attributes #5 = { 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 #6 = { 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 #7 = { 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 #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 = !{!"double", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !10, i64 0}


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