; LLVM IR from zsiciarz/aquila :: tests/functions.ll (ZNK14SuiteFunctions28TestComplexDecibelConversion7RunImplEv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::complex" = type { { double, double } }
%"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 }

@_ZTISt9exception = external constant ptr
@.str = external hidden unnamed_addr constant [50 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress 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)) #1

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

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

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

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

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

declare void @__cxa_end_catch()

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK14SuiteFunctions28TestComplexDecibelConversion7RunImplEv(ptr noundef nonnull align 8 dereferenceable(49) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca double, align 8
  %4 = alloca %"class.std::complex", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %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
  store ptr %0, ptr %2, align 8, !tbaa !5
  %14 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %4, double noundef 0.000000e+00, double noundef 1.000000e+01)
  %15 = getelementptr inbounds { double, double }, ptr %4, i32 0, i32 0
  %16 = load double, ptr %15, align 8
  %17 = getelementptr inbounds { double, double }, ptr %4, i32 0, i32 1
  %18 = load double, ptr %17, align 8
  %19 = call noundef double @_ZN6Aquila2dBESt7complexIdE(double %16, double %18)
  store double %19, ptr %3, align 8, !tbaa !9
  br label %20

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

22:                                               ; preds = %20
  %23 = load ptr, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store double 2.000000e+01, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store double 0x3EB0C6F7A0B5ED8D, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %25 unwind label %33

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

27:                                               ; preds = %25
  invoke void @_ZN8UnitTest10CheckCloseIdddEEvRNS_11TestResultsERKT_RKT0_RKT1_RKNS_11TestDetailsE(ptr noundef nonnull align 8 dereferenceable(21) %23, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(29) %9)
          to label %28 unwind label %33

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

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

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

37:                                               ; preds = %33, %29
  %38 = load i32, ptr %6, align 4
  %39 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #7
  %40 = icmp eq i32 %38, %39
  br i1 %40, label %41, label %69

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %42 = load ptr, ptr %5, align 8
  %43 = call ptr @__cxa_begin_catch(ptr %42) #7
  store ptr %43, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 408, ptr %12) #7
  invoke void @_ZN8UnitTest15MemoryOutStreamC1Ev(ptr noundef nonnull align 8 dereferenceable(144) %12)
          to label %44 unwind label %90

44:                                               ; preds = %41
  %45 = 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 %46 unwind label %94

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

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

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

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

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

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

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

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

66:                                               ; preds = %79, %65, %28
  br label %67

67:                                               ; preds = %66
  br label %68

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

69:                                               ; preds = %37
  %70 = load ptr, ptr %5, align 8
  %71 = call ptr @__cxa_begin_catch(ptr %70) #7
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %73 unwind label %80

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

76:                                               ; preds = %73
  %77 = load ptr, ptr %75, align 8, !tbaa !5
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %10, ptr noundef nonnull align 8 dereferenceable(29) %77, i32 noundef 24)
          to label %78 unwind label %84

78:                                               ; preds = %76
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %74, ptr noundef nonnull align 8 dereferenceable(29) %10, ptr noundef @.str)
          to label %79 unwind label %84

79:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  call void @__cxa_end_catch()
  br label %66

80:                                               ; preds = %69
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %5, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %6, align 4
  br label %88

84:                                               ; preds = %78, %76, %73
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %5, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  br label %88

88:                                               ; preds = %84, %80
  invoke void @__cxa_end_catch()
          to label %89 unwind label %111

89:                                               ; preds = %88
  br label %105

90:                                               ; preds = %41
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %5, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %6, align 4
  br label %103

94:                                               ; preds = %55, %53, %46, %44
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %5, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %6, align 4
  br label %102

98:                                               ; preds = %64, %62, %60, %57
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %5, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  br label %102

102:                                              ; preds = %98, %94
  call void @_ZN8UnitTest15MemoryOutStreamD1Ev(ptr noundef nonnull align 8 dereferenceable(144) %12) #7
  br label %103

103:                                              ; preds = %102, %90
  call void @llvm.lifetime.end.p0(i64 408, ptr %12) #7
  invoke void @__cxa_end_catch()
          to label %104 unwind label %111

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

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

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

111:                                              ; preds = %103, %88
  %112 = landingpad { ptr, i32 }
          catch ptr null
  %113 = extractvalue { ptr, i32 } %112, 0
  call void @__clang_call_terminate(ptr %113) #8
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN6Aquila2dBESt7complexIdE(double, double) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind memory(none) }
attributes #4 = { 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 #5 = { 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 #6 = { 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 #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 = !{!"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.std::complex" = type { { double, double } }
%"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 }

@_ZTISt9exception = external constant ptr
@.str = external hidden unnamed_addr constant [50 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress 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 #1

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK14SuiteFunctions28TestComplexDecibelConversion7RunImplEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(49) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca double, align 8
  %3 = alloca %"class.std::complex", align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca %"class.UnitTest::TestDetails", align 8
  %7 = alloca %"class.UnitTest::TestDetails", align 8
  %8 = alloca %"class.UnitTest::MemoryOutStream", align 8
  %9 = alloca %"class.UnitTest::TestDetails", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  call void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16) %3, double noundef 0.000000e+00, double noundef 1.000000e+01)
  %10 = load double, ptr %3, align 8
  %11 = getelementptr inbounds i8, ptr %3, i64 8
  %12 = load double, ptr %11, align 8
  %13 = call noundef double @_ZN6Aquila2dBESt7complexIdE(double %10, double %12)
  store double %13, ptr %2, align 8, !tbaa !5
  %14 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %15 unwind label %22

15:                                               ; preds = %1
  %16 = load ptr, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  store double 2.000000e+01, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store double 0x3EB0C6F7A0B5ED8D, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  %17 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7DetailsEv()
          to label %18 unwind label %24

18:                                               ; preds = %15
  %19 = load ptr, ptr %17, align 8, !tbaa !9
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %6, ptr noundef nonnull align 8 dereferenceable(29) %19, i32 noundef 24)
          to label %20 unwind label %24

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

21:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %52

22:                                               ; preds = %1
  %23 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  br label %26

24:                                               ; preds = %20, %18, %15
  %25 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
          catch ptr null
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %26

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

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

31:                                               ; preds = %30
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull @.str.4)
          to label %33 unwind label %69

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

39:                                               ; preds = %33
  %40 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull @.str.5)
          to label %41 unwind label %69

41:                                               ; preds = %39
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN8UnitTest11CurrentTest7ResultsEv()
          to label %43 unwind label %69

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

46:                                               ; preds = %43
  %47 = load ptr, ptr %45, align 8, !tbaa !9
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %9, ptr noundef nonnull align 8 dereferenceable(29) %47, i32 noundef 24)
          to label %48 unwind label %71

48:                                               ; preds = %46
  %49 = invoke noundef ptr @_ZNK8UnitTest15MemoryOutStream7GetTextEv(ptr noundef nonnull align 8 dereferenceable(144) %8)
          to label %50 unwind label %71

50:                                               ; preds = %48
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %44, ptr noundef nonnull align 8 dereferenceable(29) %9, ptr noundef %49)
          to label %51 unwind label %71

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

52:                                               ; preds = %61, %51, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  ret void

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

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

58:                                               ; preds = %55
  %59 = load ptr, ptr %57, align 8, !tbaa !9
  invoke void @_ZN8UnitTest11TestDetailsC1ERKS0_i(ptr noundef nonnull align 8 dereferenceable(29) %7, ptr noundef nonnull align 8 dereferenceable(29) %59, i32 noundef 24)
          to label %60 unwind label %64

60:                                               ; preds = %58
  invoke void @_ZN8UnitTest11TestResults13OnTestFailureERKNS_11TestDetailsEPKc(ptr noundef nonnull align 8 dereferenceable(21) %56, ptr noundef nonnull align 8 dereferenceable(29) %7, ptr noundef nonnull @.str)
          to label %61 unwind label %64

61:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @__cxa_end_catch()
  br label %52

62:                                               ; preds = %53
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %66

64:                                               ; preds = %60, %58, %55
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %66

66:                                               ; preds = %64, %62
  %.pn12 = phi { ptr, i32 } [ %65, %64 ], [ %63, %62 ]
  invoke void @__cxa_end_catch()
          to label %75 unwind label %76

67:                                               ; preds = %30
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %74

69:                                               ; preds = %41, %39, %33, %31
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %73

71:                                               ; preds = %50, %48, %46, %43
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #7
  br label %73

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

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

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

76:                                               ; preds = %74, %66
  %77 = landingpad { ptr, i32 }
          catch ptr null
  %78 = extractvalue { ptr, i32 } %77, 0
  call void @__clang_call_terminate(ptr %78) #8
  unreachable
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN6Aquila2dBESt7complexIdE(double, double) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7complexIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(16), double noundef, double noundef) unnamed_addr #6 align 2

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


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