; LLVM IR from EricZinda/InductorHtn :: src/FXPlatform/FailFast.ll (Z26uncaught_exception_handlerv)

; 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::__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::allocator" = type { i8 }

@previousHandler = external dso_local global ptr, align 8
@terminateCalled = external dso_local global i8, align 1
@_ZTISt13runtime_error = external constant ptr
@.str.5 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@stderr = external global ptr, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z26uncaught_exception_handlerv() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = load i8, ptr @terminateCalled, align 1, !tbaa !5, !range !9, !noundef !10
  %9 = trunc i8 %8 to i1
  br i1 %9, label %99, label %10

10:                                               ; preds = %0
  invoke void @__cxa_rethrow() #7
          to label %116 unwind label %11

11:                                               ; preds = %10
  %12 = landingpad { ptr, i32 }
          catch ptr @_ZTISt13runtime_error
          catch ptr null
  %13 = extractvalue { ptr, i32 } %12, 0
  store ptr %13, ptr %1, align 8
  %14 = extractvalue { ptr, i32 } %12, 1
  store i32 %14, ptr %2, align 4
  br label %15

15:                                               ; preds = %11
  %16 = load i32, ptr %2, align 4
  %17 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt13runtime_error) #8
  %18 = icmp eq i32 %16, %17
  br i1 %18, label %19, label %45

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %20 = load ptr, ptr %1, align 8
  %21 = call ptr @__cxa_begin_catch(ptr %20) #8
  store ptr %21, ptr %5, align 8
  %22 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv()
          to label %23 unwind label %82

23:                                               ; preds = %19
  %24 = invoke noundef i64 @_ZN9NanoTrace16allowedTraceTypeEv(ptr noundef nonnull align 8 dereferenceable(12) %22)
          to label %25 unwind label %82

25:                                               ; preds = %23
  %26 = and i64 1, %24
  %27 = icmp ne i64 %26, 0
  br i1 %27, label %28, label %95

28:                                               ; preds = %25
  %29 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv()
          to label %30 unwind label %82

30:                                               ; preds = %28
  %31 = invoke noundef i32 @_ZN9NanoTrace11detailLevelEv(ptr noundef nonnull align 8 dereferenceable(12) %29)
          to label %32 unwind label %82

32:                                               ; preds = %30
  %33 = icmp sle i32 0, %31
  br i1 %33, label %34, label %95

34:                                               ; preds = %32
  %35 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv()
          to label %36 unwind label %82

36:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %37 unwind label %86

37:                                               ; preds = %36
  %38 = load ptr, ptr %5, align 8, !tbaa !11
  %39 = load ptr, ptr %38, align 8, !tbaa !13
  %40 = getelementptr inbounds ptr, ptr %39, i64 2
  %41 = load ptr, ptr %40, align 8
  %42 = call noundef ptr %41(ptr noundef nonnull align 8 dereferenceable(16) %38) #8
  %43 = invoke noundef double @_ZN9NanoTrace5TraceIPKcEEdRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi11TraceDetailT_(ptr noundef nonnull align 8 dereferenceable(12) %35, ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 1, i32 noundef 0, ptr noundef %42)
          to label %44 unwind label %90

44:                                               ; preds = %37
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #8
  br label %95

45:                                               ; preds = %15
  %46 = load ptr, ptr %1, align 8
  %47 = call ptr @__cxa_begin_catch(ptr %46) #8
  %48 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv()
          to label %49 unwind label %66

49:                                               ; preds = %45
  %50 = invoke noundef i64 @_ZN9NanoTrace16allowedTraceTypeEv(ptr noundef nonnull align 8 dereferenceable(12) %48)
          to label %51 unwind label %66

51:                                               ; preds = %49
  %52 = and i64 1, %50
  %53 = icmp ne i64 %52, 0
  br i1 %53, label %54, label %79

54:                                               ; preds = %51
  %55 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv()
          to label %56 unwind label %66

56:                                               ; preds = %54
  %57 = invoke noundef i32 @_ZN9NanoTrace11detailLevelEv(ptr noundef nonnull align 8 dereferenceable(12) %55)
          to label %58 unwind label %66

58:                                               ; preds = %56
  %59 = icmp sle i32 0, %57
  br i1 %59, label %60, label %79

60:                                               ; preds = %58
  %61 = invoke noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv()
          to label %62 unwind label %66

62:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %63 unwind label %70

63:                                               ; preds = %62
  %64 = invoke noundef double @_ZN9NanoTrace5TraceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi11TraceDetail(ptr noundef nonnull align 8 dereferenceable(12) %61, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 1, i32 noundef 0)
          to label %65 unwind label %74

65:                                               ; preds = %63
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #8
  br label %79

66:                                               ; preds = %60, %56, %54, %49, %45
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %1, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %2, align 4
  br label %80

70:                                               ; preds = %62
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %1, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %2, align 4
  br label %78

74:                                               ; preds = %63
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %1, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %2, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  br label %78

78:                                               ; preds = %74, %70
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #8
  br label %80

79:                                               ; preds = %65, %58, %51
  call void @__cxa_end_catch()
  br label %96

80:                                               ; preds = %78, %66
  invoke void @__cxa_end_catch()
          to label %81 unwind label %113

81:                                               ; preds = %80
  br label %108

82:                                               ; preds = %34, %30, %28, %23, %19
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %1, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %2, align 4
  br label %97

86:                                               ; preds = %36
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %1, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %2, align 4
  br label %94

90:                                               ; preds = %37
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %1, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %2, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #8
  br label %94

94:                                               ; preds = %90, %86
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #8
  br label %97

95:                                               ; preds = %44, %32, %25
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %96

96:                                               ; preds = %95, %79
  br label %99

97:                                               ; preds = %94, %82
  invoke void @__cxa_end_catch()
          to label %98 unwind label %113

98:                                               ; preds = %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %108

99:                                               ; preds = %96, %0
  %100 = load ptr, ptr @stderr, align 8, !tbaa !11
  %101 = call i32 @fflush(ptr noundef %100)
  %102 = load ptr, ptr @previousHandler, align 8, !tbaa !11
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %106

104:                                              ; preds = %99
  %105 = load ptr, ptr @previousHandler, align 8, !tbaa !11
  call void %105()
  br label %107

106:                                              ; preds = %99
  call void @abort() #9
  unreachable

107:                                              ; preds = %104
  ret void

108:                                              ; preds = %98, %81
  %109 = load ptr, ptr %1, align 8
  %110 = load i32, ptr %2, align 4
  %111 = insertvalue { ptr, i32 } poison, ptr %109, 0
  %112 = insertvalue { ptr, i32 } %111, i32 %110, 1
  resume { ptr, i32 } %112

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

116:                                              ; preds = %10
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv() #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN9NanoTrace16allowedTraceTypeEv(ptr noundef nonnull align 8 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN9NanoTrace11detailLevelEv(ptr noundef nonnull align 8 dereferenceable(12)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

declare void @__cxa_rethrow()

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

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN9NanoTrace5TraceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi11TraceDetail(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) #0 align 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 noundef double @_ZN9NanoTrace5TraceIPKcEEdRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi11TraceDetailT_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef) #0 align 2

declare i32 @fflush(ptr noundef) #5

; Function Attrs: noreturn nounwind
declare void @abort() #6

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 = { "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 = { noreturn 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 #7 = { noreturn }
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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"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::__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::allocator" = type { i8 }

@previousHandler = external dso_local local_unnamed_addr global ptr, align 8
@terminateCalled = external dso_local local_unnamed_addr global i8, align 1
@_ZTISt13runtime_error = external constant ptr
@.str.5 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [36 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z26uncaught_exception_handlerv() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::allocator", align 1
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = load i8, ptr @terminateCalled, align 1, !tbaa !5, !range !9, !noundef !10
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %52, label %7

7:                                                ; preds = %0
  invoke void @__cxa_rethrow() #7
          to label %62 unwind label %8

8:                                                ; preds = %7
  %9 = landingpad { ptr, i32 }
          catch ptr @_ZTISt13runtime_error
          catch ptr null
  %10 = extractvalue { ptr, i32 } %9, 0
  %11 = extractvalue { ptr, i32 } %9, 1
  %12 = tail call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt13runtime_error) #8
  %13 = icmp eq i32 %11, %12
  %14 = tail call ptr @__cxa_begin_catch(ptr %10) #8
  %15 = tail call noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv()
  %16 = tail call noundef i64 @_ZN9NanoTrace16allowedTraceTypeEv(ptr noundef nonnull align 8 dereferenceable(12) %15)
  %17 = and i64 %16, 1
  %.not10 = icmp eq i64 %17, 0
  br i1 %13, label %18, label %32

18:                                               ; preds = %8
  br i1 %.not10, label %.sink.split, label %19

19:                                               ; preds = %18
  %20 = tail call noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv()
  %21 = tail call noundef i32 @_ZN9NanoTrace11detailLevelEv(ptr noundef nonnull align 8 dereferenceable(12) %20)
  %22 = icmp sgt i32 %21, -1
  br i1 %22, label %23, label %.sink.split

23:                                               ; preds = %19
  %24 = tail call noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv()
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %25 unwind label %47

25:                                               ; preds = %23
  %26 = load ptr, ptr %14, align 8, !tbaa !11
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %28 = load ptr, ptr %27, align 8
  %29 = call noundef ptr %28(ptr noundef nonnull align 8 dereferenceable(16) %14) #8
  %30 = invoke noundef double @_ZN9NanoTrace5TraceIPKcEEdRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi11TraceDetailT_(ptr noundef nonnull align 8 dereferenceable(12) %24, ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 1, i32 noundef 0, ptr noundef %29)
          to label %31 unwind label %49

31:                                               ; preds = %25
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  br label %.sink.split

32:                                               ; preds = %8
  br i1 %.not10, label %.sink.split, label %33

33:                                               ; preds = %32
  %34 = tail call noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv()
  %35 = tail call noundef i32 @_ZN9NanoTrace11detailLevelEv(ptr noundef nonnull align 8 dereferenceable(12) %34)
  %36 = icmp sgt i32 %35, -1
  br i1 %36, label %37, label %.sink.split

37:                                               ; preds = %33
  %38 = tail call noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv()
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.5, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %39 unwind label %42

39:                                               ; preds = %37
  %40 = invoke noundef double @_ZN9NanoTrace5TraceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi11TraceDetail(ptr noundef nonnull align 8 dereferenceable(12) %38, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef 1, i32 noundef 0)
          to label %41 unwind label %44

41:                                               ; preds = %39
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  br label %.sink.split

42:                                               ; preds = %37
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %46

44:                                               ; preds = %39
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #8
  br label %46

46:                                               ; preds = %44, %42
  %.pn = phi { ptr, i32 } [ %45, %44 ], [ %43, %42 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #8
  invoke void @__cxa_end_catch()
          to label %58 unwind label %59

47:                                               ; preds = %23
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %51

49:                                               ; preds = %25
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  br label %51

51:                                               ; preds = %49, %47
  %.pn11 = phi { ptr, i32 } [ %50, %49 ], [ %48, %47 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  invoke void @__cxa_end_catch()
          to label %58 unwind label %59

.sink.split:                                      ; preds = %18, %19, %31, %32, %33, %41
  call void @__cxa_end_catch()
  br label %52

52:                                               ; preds = %.sink.split, %0
  %53 = load ptr, ptr @stderr, align 8, !tbaa !13
  %54 = call i32 @fflush(ptr noundef %53)
  %55 = load ptr, ptr @previousHandler, align 8, !tbaa !13
  %.not14 = icmp eq ptr %55, null
  br i1 %.not14, label %57, label %56

56:                                               ; preds = %52
  call void %55()
  ret void

57:                                               ; preds = %52
  call void @abort() #9
  unreachable

58:                                               ; preds = %51, %46
  %.pn11.pn = phi { ptr, i32 } [ %.pn, %46 ], [ %.pn11, %51 ]
  resume { ptr, i32 } %.pn11.pn

59:                                               ; preds = %51, %46
  %60 = landingpad { ptr, i32 }
          catch ptr null
  %61 = extractvalue { ptr, i32 } %60, 0
  call void @__clang_call_terminate(ptr %61) #9
  unreachable

62:                                               ; preds = %7
  unreachable
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZN9NanoTrace6GlobalEv() local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN9NanoTrace11detailLevelEv(ptr noundef nonnull align 8 dereferenceable(12)) local_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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

declare void @__cxa_rethrow() local_unnamed_addr

; 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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN9NanoTrace5TraceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi11TraceDetail(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef) local_unnamed_addr #0 align 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 noundef double @_ZN9NanoTrace5TraceIPKcEEdRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi11TraceDetailT_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #6

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 = { nofree 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 #6 = { noreturn 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 #7 = { noreturn }
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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"any pointer", !7, i64 0}


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