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

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

@_ZN17SuiteSignalSource9testArrayE = external dso_local global [10 x double], align 16
@_ZN17SuiteSignalSource4dataE = external dso_local global %"class.Aquila::SignalSource", align 8
@_ZTISt9exception = external constant ptr
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Aquila12SignalSourceC2IdEEPT_md(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i64 noundef, double noundef) unnamed_addr #0 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv() #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: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #4

declare ptr @__cxa_begin_catch(ptr)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK6Aquila12SignalSource5beginEv(ptr noundef nonnull align 8 dereferenceable(40)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6Aquila12SignalSource8iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK17SuiteSignalSource31TestIteratorsToDifferentSources7RunImplEv(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 %"class.Aquila::SignalSource", align 8
  %4 = alloca %"class.Aquila::SignalSource::iterator", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.Aquila::SignalSource::iterator", 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
  call void @llvm.lifetime.start.p0(i64 40, ptr %3) #7
  call void @_ZN6Aquila12SignalSourceC2IdEEPT_md(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef @_ZN17SuiteSignalSource9testArrayE, i64 noundef 10, double noundef 2.205000e+04)
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #7
  %14 = invoke { ptr, i64 } @_ZNK6Aquila12SignalSource5beginEv(ptr noundef nonnull align 8 dereferenceable(40) @_ZN17SuiteSignalSource4dataE)
          to label %15 unwind label %40

15:                                               ; preds = %1
  %16 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 0
  %17 = extractvalue { ptr, i64 } %14, 0
  store ptr %17, ptr %16, align 8
  %18 = getelementptr inbounds { ptr, i64 }, ptr %4, i32 0, i32 1
  %19 = extractvalue { ptr, i64 } %14, 1
  store i64 %19, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #7
  %20 = invoke { ptr, i64 } @_ZNK6Aquila12SignalSource5beginEv(ptr noundef nonnull align 8 dereferenceable(40) %3)
          to label %21 unwind label %44

21:                                               ; preds = %15
  %22 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 0
  %23 = extractvalue { ptr, i64 } %20, 0
  store ptr %23, ptr %22, align 8
  %24 = getelementptr inbounds { ptr, i64 }, ptr %7, i32 0, i32 1
  %25 = extractvalue { ptr, i64 } %20, 1
  store i64 %25, ptr %24, align 8
  br label %26

26:                                               ; preds = %21
  %27 = invoke noundef zeroext i1 @_ZNK6Aquila12SignalSource8iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %28 unwind label %48

28:                                               ; preds = %26
  %29 = invoke noundef zeroext i1 @_ZN8UnitTest5CheckIbEEbT_(i1 noundef zeroext %27)
          to label %30 unwind label %48

30:                                               ; preds = %28
  br i1 %29, label %101, label %31

31:                                               ; preds = %30
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %33 unwind label %48

33:                                               ; preds = %31
  %34 = load ptr, ptr %32, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #7
  %35 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %36 unwind label %52

36:                                               ; preds = %33
  %37 = load ptr, ptr %35, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %8, ptr noundef nonnull align 8 dereferenceable(29) %37, i32 noundef 93)
          to label %38 unwind label %52

38:                                               ; preds = %36
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %34, ptr noundef nonnull align 8 dereferenceable(29) %8, ptr noundef @.str.42)
          to label %39 unwind label %52

39:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  br label %101

40:                                               ; preds = %1
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %5, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %6, align 4
  br label %133

44:                                               ; preds = %99, %15
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %5, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %6, align 4
  br label %132

48:                                               ; preds = %31, %28, %26
  %49 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %5, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %6, align 4
  br label %56

52:                                               ; preds = %38, %36, %33
  %53 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %5, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #7
  br label %56

56:                                               ; preds = %52, %48
  %57 = load i32, ptr %6, align 4
  %58 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #7
  %59 = icmp eq i32 %57, %58
  br i1 %59, label %60, label %89

60:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %61 = load ptr, ptr %5, align 8
  %62 = call ptr @__cxa_begin_catch(ptr %61) #7
  store ptr %62, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 408, ptr %11) #7
  invoke void @_ZN8UnitTest15MemoryOutStreamC1Ev(ptr noundef nonnull align 8 dereferenceable(144) %11)
          to label %63 unwind label %112

63:                                               ; preds = %60
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef @.str.3)
          to label %65 unwind label %116

65:                                               ; preds = %63
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = getelementptr inbounds ptr, ptr %67, i64 2
  %69 = load ptr, ptr %68, align 8
  %70 = call noundef ptr %69(ptr noundef nonnull align 8 dereferenceable(8) %66) #7
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef %70)
          to label %72 unwind label %116

72:                                               ; preds = %65
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef @.str.44)
          to label %74 unwind label %116

74:                                               ; preds = %72
  %75 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %76 unwind label %116

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

79:                                               ; preds = %76
  %80 = load ptr, ptr %78, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %12, ptr noundef nonnull align 8 dereferenceable(29) %80, i32 noundef 93)
          to label %81 unwind label %120

81:                                               ; preds = %79
  %82 = invoke noundef ptr @_ZNK8UnitTest15MemoryOutStream7GetTextEv(ptr noundef nonnull align 8 dereferenceable(144) %11)
          to label %83 unwind label %120

83:                                               ; preds = %81
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %77, ptr noundef nonnull align 8 dereferenceable(29) %12, ptr noundef %82)
          to label %84 unwind label %120

84:                                               ; preds = %83
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %11) #7
  call void @llvm.lifetime.end.p0(i64 408, ptr %11) #7
  invoke void @__cxa_end_catch()
          to label %85 unwind label %126

85:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %86

86:                                               ; preds = %101, %100, %85
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #7
  call void @_ZN6Aquila12SignalSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #7
  ret void

89:                                               ; preds = %56
  %90 = load ptr, ptr %5, align 8
  %91 = call ptr @__cxa_begin_catch(ptr %90) #7
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %93 unwind label %102

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

96:                                               ; preds = %93
  %97 = load ptr, ptr %95, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %9, ptr noundef nonnull align 8 dereferenceable(29) %97, i32 noundef 93)
          to label %98 unwind label %106

98:                                               ; preds = %96
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %94, ptr noundef nonnull align 8 dereferenceable(29) %9, ptr noundef @.str.43)
          to label %99 unwind label %106

99:                                               ; preds = %98
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  invoke void @__cxa_end_catch()
          to label %100 unwind label %44

100:                                              ; preds = %99
  br label %86

101:                                              ; preds = %39, %30
  br label %86

102:                                              ; preds = %89
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %5, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %6, align 4
  br label %110

106:                                              ; preds = %98, %96, %93
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %5, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  br label %110

110:                                              ; preds = %106, %102
  invoke void @__cxa_end_catch()
          to label %111 unwind label %139

111:                                              ; preds = %110
  br label %132

112:                                              ; preds = %60
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %5, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %6, align 4
  br label %125

116:                                              ; preds = %74, %72, %65, %63
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %5, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %6, align 4
  br label %124

120:                                              ; preds = %83, %81, %79, %76
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %5, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #7
  br label %124

124:                                              ; preds = %120, %116
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %11) #7
  br label %125

125:                                              ; preds = %124, %112
  call void @llvm.lifetime.end.p0(i64 408, ptr %11) #7
  invoke void @__cxa_end_catch()
          to label %130 unwind label %139

126:                                              ; preds = %84
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %5, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %6, align 4
  br label %131

130:                                              ; preds = %125
  br label %131

131:                                              ; preds = %130, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %132

132:                                              ; preds = %131, %111, %44
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #7
  br label %133

133:                                              ; preds = %132, %40
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #7
  call void @_ZN6Aquila12SignalSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #7
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %5, align 8
  %136 = load i32, ptr %6, align 4
  %137 = insertvalue { ptr, i32 } poison, ptr %135, 0
  %138 = insertvalue { ptr, i32 } %137, i32 %136, 1
  resume { ptr, i32 } %138

139:                                              ; preds = %125, %110
  %140 = landingpad { ptr, i32 }
          catch ptr null
  %141 = extractvalue { ptr, i32 } %140, 0
  call void @__clang_call_terminate(ptr %141) #8
  unreachable
}

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #7 = { nounwind }
attributes #8 = { 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}


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

@_ZN17SuiteSignalSource9testArrayE = external dso_local global [10 x double], align 16
@_ZN17SuiteSignalSource4dataE = external dso_local global %"class.Aquila::SignalSource", align 8
@_ZTISt9exception = external constant ptr
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.42 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.43 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.44 = external hidden unnamed_addr constant [23 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6Aquila12SignalSourceC2IdEEPT_md(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i64 noundef, double noundef) unnamed_addr #0 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv() 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: 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 @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21), ptr noundef nonnull align 8 dereferenceable(29), ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK6Aquila12SignalSource5beginEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6Aquila12SignalSource8iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK17SuiteSignalSource31TestIteratorsToDifferentSources7RunImplEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(49) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.Aquila::SignalSource", align 8
  %3 = alloca %"class.Aquila::SignalSource::iterator", align 8
  %4 = alloca %"class.Aquila::SignalSource::iterator", 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
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #7
  call void @_ZN6Aquila12SignalSourceC2IdEEPT_md(ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull @_ZN17SuiteSignalSource9testArrayE, i64 noundef 10, double noundef 2.205000e+04)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %9 = invoke { ptr, i64 } @_ZNK6Aquila12SignalSource5beginEv(ptr noundef nonnull align 8 dereferenceable(40) @_ZN17SuiteSignalSource4dataE)
          to label %10 unwind label %31

10:                                               ; preds = %1
  %11 = extractvalue { ptr, i64 } %9, 0
  store ptr %11, ptr %3, align 8
  %12 = getelementptr inbounds i8, ptr %3, i64 8
  %13 = extractvalue { ptr, i64 } %9, 1
  store i64 %13, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  %14 = invoke { ptr, i64 } @_ZNK6Aquila12SignalSource5beginEv(ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %15 unwind label %33

15:                                               ; preds = %10
  %16 = extractvalue { ptr, i64 } %14, 0
  store ptr %16, ptr %4, align 8
  %17 = getelementptr inbounds i8, ptr %4, i64 8
  %18 = extractvalue { ptr, i64 } %14, 1
  store i64 %18, ptr %17, align 8
  %19 = invoke noundef zeroext i1 @_ZNK6Aquila12SignalSource8iteratorneERKS1_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %20 unwind label %35

20:                                               ; preds = %15
  %21 = call noundef zeroext i1 @_ZN8UnitTest5CheckIbEEbT_(i1 noundef zeroext %19)
  br i1 %21, label %65, label %22

22:                                               ; preds = %20
  %23 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %24 unwind label %35

24:                                               ; preds = %22
  %25 = load ptr, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %27 unwind label %37

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

29:                                               ; preds = %27
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %25, ptr noundef nonnull align 8 dereferenceable(29) %5, ptr noundef nonnull @.str.42)
          to label %30 unwind label %37

30:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %65

31:                                               ; preds = %1
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %91

33:                                               ; preds = %74, %10
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %90

35:                                               ; preds = %22, %15
  %36 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %39

37:                                               ; preds = %29, %27, %24
  %38 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %39

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

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

44:                                               ; preds = %43
  %45 = 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.3)
          to label %46 unwind label %82

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

52:                                               ; preds = %46
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef nonnull @.str.44)
          to label %54 unwind label %82

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

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

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

61:                                               ; preds = %59
  %62 = invoke noundef ptr @_ZNK8UnitTest15MemoryOutStream7GetTextEv(ptr noundef nonnull align 8 dereferenceable(144) %7)
          to label %63 unwind label %84

63:                                               ; preds = %61
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %57, ptr noundef nonnull align 8 dereferenceable(29) %8, ptr noundef %62)
          to label %64 unwind label %84

64:                                               ; preds = %63
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %7) #7
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %7) #7
  invoke void @__cxa_end_catch()
          to label %65 unwind label %88

65:                                               ; preds = %64, %20, %30, %74
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  call void @_ZN6Aquila12SignalSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #7
  ret void

66:                                               ; preds = %39
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %68 unwind label %75

68:                                               ; preds = %66
  %69 = load ptr, ptr %67, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  %70 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %71 unwind label %77

71:                                               ; preds = %68
  %72 = load ptr, ptr %70, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %6, ptr noundef nonnull align 8 dereferenceable(29) %72, i32 noundef 93)
          to label %73 unwind label %77

73:                                               ; preds = %71
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %69, ptr noundef nonnull align 8 dereferenceable(29) %6, ptr noundef nonnull @.str.43)
          to label %74 unwind label %77

74:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  invoke void @__cxa_end_catch()
          to label %65 unwind label %33

75:                                               ; preds = %66
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %79

77:                                               ; preds = %73, %71, %68
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  br label %79

79:                                               ; preds = %77, %75
  %.pn14 = phi { ptr, i32 } [ %78, %77 ], [ %76, %75 ]
  invoke void @__cxa_end_catch()
          to label %90 unwind label %92

80:                                               ; preds = %43
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %87

82:                                               ; preds = %54, %52, %46, %44
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %86

84:                                               ; preds = %63, %61, %59, %56
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %86

86:                                               ; preds = %84, %82
  %.pn16 = phi { ptr, i32 } [ %85, %84 ], [ %83, %82 ]
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %7) #7
  br label %87

87:                                               ; preds = %86, %80
  %.pn16.pn = phi { ptr, i32 } [ %.pn16, %86 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %7) #7
  invoke void @__cxa_end_catch()
          to label %90 unwind label %92

88:                                               ; preds = %64
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %90

90:                                               ; preds = %88, %87, %79, %33
  %.pn19.pn = phi { ptr, i32 } [ %34, %33 ], [ %.pn14, %79 ], [ %89, %88 ], [ %.pn16.pn, %87 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  br label %91

91:                                               ; preds = %90, %31
  %.pn19.pn.pn = phi { ptr, i32 } [ %.pn19.pn, %90 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  call void @_ZN6Aquila12SignalSourceD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #7
  resume { ptr, i32 } %.pn19.pn.pn

92:                                               ; preds = %87, %79
  %93 = landingpad { ptr, i32 }
          catch ptr null
  %94 = extractvalue { ptr, i32 } %93, 0
  call void @__clang_call_terminate(ptr %94) #8
  unreachable
}

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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #7 = { nounwind }
attributes #8 = { 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}


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