; LLVM IR from next-step-for-interview-prep/Coding-Ninjas-DSA-course_code_and_notes_cpp :: Milestone-1=Intro_to_C++/questions and solutions/Lec-3=Conditionals_and_loops (main)

; 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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"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 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca float, align 4
  %4 = alloca i32, align 4
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca i8, align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %12 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = sitofp i32 %13 to double
  %15 = fmul double %14, 2.000000e-01
  %16 = fptrunc double %15 to float
  store float %16, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  %17 = load float, ptr %3, align 4, !tbaa !9
  %18 = fptosi float %17 to i32
  store i32 %18, ptr %4, align 4, !tbaa !5
  %19 = load float, ptr %3, align 4, !tbaa !9
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = sitofp i32 %20 to float
  %22 = fsub float %19, %21
  %23 = fpext float %22 to double
  %24 = fcmp ogt double %23, 5.000000e-01
  br i1 %24, label %25, label %29

25:                                               ; preds = %0
  %26 = load i32, ptr %4, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  %28 = sitofp i32 %27 to float
  store float %28, ptr %3, align 4, !tbaa !9
  br label %32

29:                                               ; preds = %0
  %30 = load i32, ptr %4, align 4, !tbaa !5
  %31 = sitofp i32 %30 to float
  store float %31, ptr %3, align 4, !tbaa !9
  br label %32

32:                                               ; preds = %29, %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sitofp i32 %33 to double
  %35 = fmul double %34, 5.000000e-01
  %36 = fptrunc double %35 to float
  store float %36, ptr %5, align 4, !tbaa !9
  %37 = load float, ptr %5, align 4, !tbaa !9
  %38 = fptosi float %37 to i32
  store i32 %38, ptr %4, align 4, !tbaa !5
  %39 = load float, ptr %5, align 4, !tbaa !9
  %40 = load i32, ptr %4, align 4, !tbaa !5
  %41 = sitofp i32 %40 to float
  %42 = fsub float %39, %41
  %43 = fpext float %42 to double
  %44 = fcmp ogt double %43, 5.000000e-01
  br i1 %44, label %45, label %49

45:                                               ; preds = %32
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  %48 = sitofp i32 %47 to float
  store float %48, ptr %5, align 4, !tbaa !9
  br label %52

49:                                               ; preds = %32
  %50 = load i32, ptr %4, align 4, !tbaa !5
  %51 = sitofp i32 %50 to float
  store float %51, ptr %5, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %49, %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %53 = load i32, ptr %2, align 4, !tbaa !5
  %54 = sitofp i32 %53 to double
  %55 = fmul double %54, 1.100000e-01
  %56 = fptrunc double %55 to float
  store float %56, ptr %6, align 4, !tbaa !9
  %57 = load float, ptr %6, align 4, !tbaa !9
  %58 = fptosi float %57 to i32
  store i32 %58, ptr %4, align 4, !tbaa !5
  %59 = load float, ptr %6, align 4, !tbaa !9
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = sitofp i32 %60 to float
  %62 = fsub float %59, %61
  %63 = fpext float %62 to double
  %64 = fcmp ogt double %63, 5.000000e-01
  br i1 %64, label %65, label %69

65:                                               ; preds = %52
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  %68 = sitofp i32 %67 to float
  store float %68, ptr %6, align 4, !tbaa !9
  br label %72

69:                                               ; preds = %52
  %70 = load i32, ptr %4, align 4, !tbaa !5
  %71 = sitofp i32 %70 to float
  store float %71, ptr %6, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %69, %65
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %7)
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  %74 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %75 unwind label %101

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %76 = load i32, ptr %2, align 4, !tbaa !5
  %77 = sitofp i32 %76 to float
  %78 = load float, ptr %3, align 4, !tbaa !9
  %79 = fadd float %77, %78
  %80 = load float, ptr %5, align 4, !tbaa !9
  %81 = fadd float %79, %80
  %82 = load float, ptr %6, align 4, !tbaa !9
  %83 = fsub float %81, %82
  %84 = fptosi float %83 to i32
  store i32 %84, ptr %11, align 4, !tbaa !5
  %85 = load i8, ptr %7, align 1, !tbaa !11
  %86 = sext i8 %85 to i32
  %87 = icmp eq i32 %86, 65
  br i1 %87, label %88, label %105

88:                                               ; preds = %75
  %89 = load i32, ptr %11, align 4, !tbaa !5
  %90 = add nsw i32 %89, 1700
  store i32 %90, ptr %11, align 4, !tbaa !5
  %91 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br i1 %91, label %92, label %96

92:                                               ; preds = %88
  %93 = load i32, ptr %11, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  %95 = sub nsw i32 %94, 1
  store i32 %95, ptr %11, align 4, !tbaa !5
  br label %99

96:                                               ; preds = %88
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = sub nsw i32 %97, 400
  store i32 %98, ptr %11, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %96, %92
  %100 = phi ptr [ %11, %92 ], [ %11, %96 ]
  br label %126

101:                                              ; preds = %72
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %9, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %10, align 4
  br label %135

105:                                              ; preds = %75
  %106 = load i8, ptr %7, align 1, !tbaa !11
  %107 = sext i8 %106 to i32
  %108 = icmp eq i32 %107, 66
  br i1 %108, label %109, label %122

109:                                              ; preds = %105
  %110 = load i32, ptr %11, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1500
  store i32 %111, ptr %11, align 4, !tbaa !5
  %112 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br i1 %112, label %113, label %117

113:                                              ; preds = %109
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = add nsw i32 %114, 1
  %116 = sub nsw i32 %115, 1
  store i32 %116, ptr %11, align 4, !tbaa !5
  br label %120

117:                                              ; preds = %109
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = sub nsw i32 %118, 200
  store i32 %119, ptr %11, align 4, !tbaa !5
  br label %120

120:                                              ; preds = %117, %113
  %121 = phi ptr [ %11, %113 ], [ %11, %117 ]
  br label %125

122:                                              ; preds = %105
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1300
  store i32 %124, ptr %11, align 4, !tbaa !5
  br label %125

125:                                              ; preds = %122, %120
  br label %126

126:                                              ; preds = %125, %99
  %127 = load i32, ptr %11, align 4, !tbaa !5
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %127)
          to label %129 unwind label %131

129:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %130 = load i32, ptr %1, align 4
  ret i32 %130

131:                                              ; preds = %126
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %9, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %135

135:                                              ; preds = %131, %101
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  br label %136

136:                                              ; preds = %135
  %137 = load ptr, ptr %9, align 8
  %138 = load i32, ptr %10, align 4
  %139 = insertvalue { ptr, i32 } poison, ptr %137, 0
  %140 = insertvalue { ptr, i32 } %139, i32 %138, 1
  resume { ptr, i32 } %140
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) #2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2

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

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

attributes #0 = { mustprogress norecurse 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 = { "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!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::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"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 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"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] }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  %4 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #4
  %6 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 1 dereferenceable(1) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  %7 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %8 unwind label %43

8:                                                ; preds = %0
  %9 = sitofp i32 %5 to double
  %10 = insertelement <2 x double> poison, double %9, i64 0
  %11 = shufflevector <2 x double> %10, <2 x double> poison, <2 x i32> zeroinitializer
  %12 = fmul <2 x double> %11, <double 5.000000e-01, double 1.100000e-01>
  %13 = fptrunc <2 x double> %12 to <2 x float>
  %14 = fptosi <2 x float> %13 to <2 x i32>
  %15 = extractelement <2 x i32> %14, i64 1
  %16 = add nsw i32 %15, 1
  %17 = sitofp i32 %16 to float
  %18 = sitofp <2 x i32> %14 to <2 x float>
  %19 = fsub <2 x float> %13, %18
  %20 = fcmp ogt <2 x float> %19, <float 5.000000e-01, float 5.000000e-01>
  %21 = extractelement <2 x i1> %20, i64 1
  %22 = extractelement <2 x float> %18, i64 1
  %.030 = select i1 %21, float %17, float %22
  %23 = extractelement <2 x i32> %14, i64 0
  %24 = add nsw i32 %23, 1
  %25 = sitofp i32 %24 to float
  %26 = extractelement <2 x i1> %20, i64 0
  %27 = extractelement <2 x float> %18, i64 0
  %.031 = select i1 %26, float %25, float %27
  %28 = fmul double %9, 2.000000e-01
  %29 = fptrunc double %28 to float
  %30 = fptosi float %29 to i32
  %31 = sitofp i32 %30 to float
  %32 = fsub float %29, %31
  %33 = fcmp ogt float %32, 5.000000e-01
  %34 = add nsw i32 %30, 1
  %35 = sitofp i32 %34 to float
  %.032 = select i1 %33, float %35, float %31
  %36 = load i32, ptr %1, align 4, !tbaa !5
  %37 = sitofp i32 %36 to float
  %38 = fadd float %.032, %37
  %39 = fadd float %.031, %38
  %40 = fsub float %39, %.030
  %41 = fptosi float %40 to i32
  %42 = load i8, ptr %2, align 1, !tbaa !9
  switch i8 %42, label %47 [
    i8 65, label %.sink.split
    i8 66, label %45
  ]

43:                                               ; preds = %0
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %53

45:                                               ; preds = %8
  br label %.sink.split

.sink.split:                                      ; preds = %8, %45
  %.sink37 = phi i32 [ 1500, %45 ], [ 1700, %8 ]
  %46 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  %.35 = select i1 %46, i32 %.sink37, i32 1300
  br label %47

47:                                               ; preds = %.sink.split, %8
  %.sink = phi i32 [ 1300, %8 ], [ %.35, %.sink.split ]
  %48 = add nsw i32 %.sink, %41
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %48)
          to label %50 unwind label %51

50:                                               ; preds = %47
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret i32 0

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

53:                                               ; preds = %51, %43
  %.pn = phi { ptr, i32 } [ %52, %51 ], [ %44, %43 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  resume { ptr, i32 } %.pn
}

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcEERSt13basic_istreamIT_T0_ES6_RS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZStrsIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2

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

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

attributes #0 = { mustprogress norecurse 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 = { "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}


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