; LLVM IR from quantumlib/Stim :: src/stim/main.perf.ll (Z3si2B5cxx11d)

; 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::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"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::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 }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3si2B5cxx11d(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, double noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca double, align 8
  %5 = alloca i8, align 1
  %6 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8
  store double %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  store i8 32, ptr %5, align 1, !tbaa !9
  %9 = load double, ptr %4, align 8, !tbaa !5
  %10 = fcmp olt double %9, 1.000000e+00
  br i1 %10, label %11, label %36

11:                                               ; preds = %2
  %12 = load double, ptr %4, align 8, !tbaa !5
  %13 = fcmp olt double %12, 1.000000e+00
  br i1 %13, label %14, label %17

14:                                               ; preds = %11
  %15 = load double, ptr %4, align 8, !tbaa !5
  %16 = fmul double %15, 1.000000e+03
  store double %16, ptr %4, align 8, !tbaa !5
  store i8 109, ptr %5, align 1, !tbaa !9
  br label %17

17:                                               ; preds = %14, %11
  %18 = load double, ptr %4, align 8, !tbaa !5
  %19 = fcmp olt double %18, 1.000000e+00
  br i1 %19, label %20, label %23

20:                                               ; preds = %17
  %21 = load double, ptr %4, align 8, !tbaa !5
  %22 = fmul double %21, 1.000000e+03
  store double %22, ptr %4, align 8, !tbaa !5
  store i8 117, ptr %5, align 1, !tbaa !9
  br label %23

23:                                               ; preds = %20, %17
  %24 = load double, ptr %4, align 8, !tbaa !5
  %25 = fcmp olt double %24, 1.000000e+00
  br i1 %25, label %26, label %29

26:                                               ; preds = %23
  %27 = load double, ptr %4, align 8, !tbaa !5
  %28 = fmul double %27, 1.000000e+03
  store double %28, ptr %4, align 8, !tbaa !5
  store i8 110, ptr %5, align 1, !tbaa !9
  br label %29

29:                                               ; preds = %26, %23
  %30 = load double, ptr %4, align 8, !tbaa !5
  %31 = fcmp olt double %30, 1.000000e+00
  br i1 %31, label %32, label %35

32:                                               ; preds = %29
  %33 = load double, ptr %4, align 8, !tbaa !5
  %34 = fmul double %33, 1.000000e+03
  store double %34, ptr %4, align 8, !tbaa !5
  store i8 112, ptr %5, align 1, !tbaa !9
  br label %35

35:                                               ; preds = %32, %29
  br label %61

36:                                               ; preds = %2
  %37 = load double, ptr %4, align 8, !tbaa !5
  %38 = fcmp ogt double %37, 1.000000e+03
  br i1 %38, label %39, label %42

39:                                               ; preds = %36
  %40 = load double, ptr %4, align 8, !tbaa !5
  %41 = fdiv double %40, 1.000000e+03
  store double %41, ptr %4, align 8, !tbaa !5
  store i8 107, ptr %5, align 1, !tbaa !9
  br label %42

42:                                               ; preds = %39, %36
  %43 = load double, ptr %4, align 8, !tbaa !5
  %44 = fcmp ogt double %43, 1.000000e+03
  br i1 %44, label %45, label %48

45:                                               ; preds = %42
  %46 = load double, ptr %4, align 8, !tbaa !5
  %47 = fdiv double %46, 1.000000e+03
  store double %47, ptr %4, align 8, !tbaa !5
  store i8 77, ptr %5, align 1, !tbaa !9
  br label %48

48:                                               ; preds = %45, %42
  %49 = load double, ptr %4, align 8, !tbaa !5
  %50 = fcmp ogt double %49, 1.000000e+03
  br i1 %50, label %51, label %54

51:                                               ; preds = %48
  %52 = load double, ptr %4, align 8, !tbaa !5
  %53 = fdiv double %52, 1.000000e+03
  store double %53, ptr %4, align 8, !tbaa !5
  store i8 71, ptr %5, align 1, !tbaa !9
  br label %54

54:                                               ; preds = %51, %48
  %55 = load double, ptr %4, align 8, !tbaa !5
  %56 = fcmp ogt double %55, 1.000000e+03
  br i1 %56, label %57, label %60

57:                                               ; preds = %54
  %58 = load double, ptr %4, align 8, !tbaa !5
  %59 = fdiv double %58, 1.000000e+03
  store double %59, ptr %4, align 8, !tbaa !5
  store i8 84, ptr %5, align 1, !tbaa !9
  br label %60

60:                                               ; preds = %57, %54
  br label %61

61:                                               ; preds = %60, %35
  call void @llvm.lifetime.start.p0(i64 392, ptr %6) #4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6)
  %62 = load double, ptr %4, align 8, !tbaa !5
  %63 = fcmp ole double 1.000000e+00, %62
  br i1 %63, label %64, label %85

64:                                               ; preds = %61
  %65 = load double, ptr %4, align 8, !tbaa !5
  %66 = fcmp olt double %65, 1.000000e+01
  br i1 %66, label %67, label %85

67:                                               ; preds = %64
  %68 = getelementptr inbounds i8, ptr %6, i64 16
  %69 = load double, ptr %4, align 8, !tbaa !5
  %70 = fptoui double %69 to i64
  %71 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %68, i64 noundef %70)
          to label %72 unwind label %81

72:                                               ; preds = %67
  %73 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %71, i8 noundef signext 46)
          to label %74 unwind label %81

74:                                               ; preds = %72
  %75 = load double, ptr %4, align 8, !tbaa !5
  %76 = fmul double %75, 1.000000e+01
  %77 = fptoui double %76 to i64
  %78 = urem i64 %77, 10
  %79 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %73, i64 noundef %78)
          to label %80 unwind label %81

80:                                               ; preds = %74
  br label %120

81:                                               ; preds = %126, %123, %120, %113, %105, %94, %91, %74, %72, %67
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %7, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %8, align 4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #4
  call void @llvm.lifetime.end.p0(i64 392, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  br label %128

85:                                               ; preds = %64, %61
  %86 = load double, ptr %4, align 8, !tbaa !5
  %87 = fcmp ole double 1.000000e+01, %86
  br i1 %87, label %88, label %99

88:                                               ; preds = %85
  %89 = load double, ptr %4, align 8, !tbaa !5
  %90 = fcmp olt double %89, 1.000000e+02
  br i1 %90, label %91, label %99

91:                                               ; preds = %88
  %92 = getelementptr inbounds i8, ptr %6, i64 16
  %93 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %92, i8 noundef signext 32)
          to label %94 unwind label %81

94:                                               ; preds = %91
  %95 = load double, ptr %4, align 8, !tbaa !5
  %96 = fptoui double %95 to i64
  %97 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %93, i64 noundef %96)
          to label %98 unwind label %81

98:                                               ; preds = %94
  br label %119

99:                                               ; preds = %88, %85
  %100 = load double, ptr %4, align 8, !tbaa !5
  %101 = fcmp ole double 1.000000e+02, %100
  br i1 %101, label %102, label %113

102:                                              ; preds = %99
  %103 = load double, ptr %4, align 8, !tbaa !5
  %104 = fcmp olt double %103, 1.000000e+03
  br i1 %104, label %105, label %113

105:                                              ; preds = %102
  %106 = getelementptr inbounds i8, ptr %6, i64 16
  %107 = load double, ptr %4, align 8, !tbaa !5
  %108 = fdiv double %107, 1.000000e+01
  %109 = fptoui double %108 to i64
  %110 = mul i64 %109, 10
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %106, i64 noundef %110)
          to label %112 unwind label %81

112:                                              ; preds = %105
  br label %118

113:                                              ; preds = %102, %99
  %114 = getelementptr inbounds i8, ptr %6, i64 16
  %115 = load double, ptr %4, align 8, !tbaa !5
  %116 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %114, double noundef %115)
          to label %117 unwind label %81

117:                                              ; preds = %113
  br label %118

118:                                              ; preds = %117, %112
  br label %119

119:                                              ; preds = %118, %98
  br label %120

120:                                              ; preds = %119, %80
  %121 = getelementptr inbounds i8, ptr %6, i64 16
  %122 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %121, i8 noundef signext 32)
          to label %123 unwind label %81

123:                                              ; preds = %120
  %124 = load i8, ptr %5, align 1, !tbaa !9
  %125 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %122, i8 noundef signext %124)
          to label %126 unwind label %81

126:                                              ; preds = %123
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(128) %6)
          to label %127 unwind label %81

127:                                              ; preds = %126
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #4
  call void @llvm.lifetime.end.p0(i64 392, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  ret void

128:                                              ; preds = %81
  %129 = load ptr, ptr %7, align 8
  %130 = load i32, ptr %8, align 4
  %131 = insertvalue { ptr, i32 } poison, ptr %129, 0
  %132 = insertvalue { ptr, i32 } %131, i32 %130, 1
  resume { ptr, i32 } %132
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) #0 align 2

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

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.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::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"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::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 }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3si2B5cxx11d(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, double noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %4 = fcmp olt double %1, 1.000000e+00
  br i1 %4, label %5, label %14

5:                                                ; preds = %2
  %6 = fmul double %1, 1.000000e+03
  %7 = fcmp olt double %6, 1.000000e+00
  %8 = fmul double %6, 1.000000e+03
  %.136 = select i1 %7, i8 117, i8 109
  %.1 = select i1 %7, double %8, double %6
  %9 = fcmp olt double %.1, 1.000000e+00
  %10 = fmul double %.1, 1.000000e+03
  %.237 = select i1 %9, i8 110, i8 %.136
  %.2 = select i1 %9, double %10, double %.1
  %11 = fcmp olt double %.2, 1.000000e+00
  br i1 %11, label %12, label %24

12:                                               ; preds = %5
  %13 = fmul double %.2, 1.000000e+03
  br label %24

14:                                               ; preds = %2
  %15 = fcmp ogt double %1, 1.000000e+03
  %16 = fdiv double %1, 1.000000e+03
  %.338 = select i1 %15, i8 107, i8 32
  %.3 = select i1 %15, double %16, double %1
  %17 = fcmp ogt double %.3, 1.000000e+03
  %18 = fdiv double %.3, 1.000000e+03
  %.439 = select i1 %17, i8 77, i8 %.338
  %.4 = select i1 %17, double %18, double %.3
  %19 = fcmp ogt double %.4, 1.000000e+03
  %20 = fdiv double %.4, 1.000000e+03
  %.540 = select i1 %19, i8 71, i8 %.439
  %.5 = select i1 %19, double %20, double %.4
  %21 = fcmp ogt double %.5, 1.000000e+03
  br i1 %21, label %22, label %24

22:                                               ; preds = %14
  %23 = fdiv double %.5, 1.000000e+03
  br label %24

24:                                               ; preds = %14, %22, %5, %12
  %.641 = phi i8 [ 112, %12 ], [ %.237, %5 ], [ 84, %22 ], [ %.540, %14 ]
  %.6 = phi double [ %13, %12 ], [ %.2, %5 ], [ %23, %22 ], [ %.5, %14 ]
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %3) #4
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %3)
  %25 = fcmp oge double %.6, 1.000000e+00
  %26 = fcmp olt double %.6, 1.000000e+01
  %or.cond = and i1 %25, %26
  br i1 %or.cond, label %27, label %39

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %3, i64 16
  %29 = fptoui double %.6 to i64
  %30 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %28, i64 noundef %29)
          to label %31 unwind label %37

31:                                               ; preds = %27
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %30, i8 noundef signext 46)
          to label %33 unwind label %37

33:                                               ; preds = %31
  %34 = fmul double %.6, 1.000000e+01
  %35 = fptoui double %34 to i64
  %36 = urem i64 %35, 10
  br label %.invoke

37:                                               ; preds = %.invoke, %65, %63, %60, %58, %42, %31, %27
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %3) #4
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %3) #4
  resume { ptr, i32 } %38

39:                                               ; preds = %24
  %40 = fcmp oge double %.6, 1.000000e+01
  %41 = fcmp olt double %.6, 1.000000e+02
  %or.cond3 = and i1 %40, %41
  br i1 %or.cond3, label %42, label %47

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %3, i64 16
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %43, i8 noundef signext 32)
          to label %45 unwind label %37

45:                                               ; preds = %42
  %46 = fptoui double %.6 to i64
  br label %.invoke

47:                                               ; preds = %39
  %48 = fcmp oge double %.6, 1.000000e+02
  %49 = fcmp olt double %.6, 1.000000e+03
  %or.cond5 = and i1 %48, %49
  %50 = getelementptr inbounds i8, ptr %3, i64 16
  br i1 %or.cond5, label %51, label %58

51:                                               ; preds = %47
  %52 = fdiv double %.6, 1.000000e+01
  %53 = fptoui double %52 to i64
  %54 = mul i64 %53, 10
  br label %.invoke

.invoke:                                          ; preds = %33, %45, %51
  %55 = phi ptr [ %50, %51 ], [ %44, %45 ], [ %32, %33 ]
  %56 = phi i64 [ %54, %51 ], [ %46, %45 ], [ %36, %33 ]
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %55, i64 noundef %56)
          to label %60 unwind label %37

58:                                               ; preds = %47
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %50, double noundef %.6)
          to label %60 unwind label %37

60:                                               ; preds = %.invoke, %58
  %61 = getelementptr inbounds i8, ptr %3, i64 16
  %62 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %61, i8 noundef signext 32)
          to label %63 unwind label %37

63:                                               ; preds = %60
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %62, i8 noundef signext %.641)
          to label %65 unwind label %37

65:                                               ; preds = %63
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(128) %3)
          to label %66 unwind label %37

66:                                               ; preds = %65
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %3) #4
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %3) #4
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #0 align 2

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

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

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


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