; LLVM IR from abeaumont/competitive-programming :: cses (1715)

; 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] }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@M = external dso_local global i64, align 8
@freq = external dso_local global [26 x i32], align 16
@f = external dso_local global [1000001 x i64], align 16
@inv = external dso_local global [1000001 x i64], align 16
@invf = external dso_local global [1000001 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %2) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %21 = 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) %2)
          to label %22 unwind label %29

22:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %23 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  %24 = trunc i64 %23 to i32
  store i32 %24, ptr %5, align 4, !tbaa !8
  store i64 1, ptr getelementptr inbounds ([1000001 x i64], ptr @f, i64 0, i64 1), align 8, !tbaa !11
  store i64 1, ptr @f, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 2, ptr %6, align 4, !tbaa !8
  br label %25

25:                                               ; preds = %47, %22
  %26 = load i32, ptr %6, align 4, !tbaa !8
  %27 = icmp sle i32 %26, 1000000
  br i1 %27, label %33, label %28

28:                                               ; preds = %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %50

29:                                               ; preds = %0
  %30 = landingpad { ptr, i32 }
          cleanup
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %3, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %4, align 4
  br label %166

33:                                               ; preds = %25
  %34 = load i32, ptr %6, align 4, !tbaa !8
  %35 = sub nsw i32 %34, 1
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [1000001 x i64], ptr @f, i64 0, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !11
  %39 = load i32, ptr %6, align 4, !tbaa !8
  %40 = sext i32 %39 to i64
  %41 = mul nsw i64 %38, %40
  %42 = load i64, ptr @M, align 8, !tbaa !11
  %43 = srem i64 %41, %42
  %44 = load i32, ptr %6, align 4, !tbaa !8
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [1000001 x i64], ptr @f, i64 0, i64 %45
  store i64 %43, ptr %46, align 8, !tbaa !11
  br label %47

47:                                               ; preds = %33
  %48 = load i32, ptr %6, align 4, !tbaa !8
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %6, align 4, !tbaa !8
  br label %25, !llvm.loop !13

50:                                               ; preds = %28
  store i64 1, ptr getelementptr inbounds ([1000001 x i64], ptr @inv, i64 0, i64 1), align 8, !tbaa !11
  store i64 1, ptr @inv, align 16, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 2, ptr %7, align 4, !tbaa !8
  br label %51

51:                                               ; preds = %74, %50
  %52 = load i32, ptr %7, align 4, !tbaa !8
  %53 = icmp sle i32 %52, 1000000
  br i1 %53, label %55, label %54

54:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %77

55:                                               ; preds = %51
  %56 = load i64, ptr @M, align 8, !tbaa !11
  %57 = load i64, ptr @M, align 8, !tbaa !11
  %58 = load i32, ptr %7, align 4, !tbaa !8
  %59 = sext i32 %58 to i64
  %60 = sdiv i64 %57, %59
  %61 = load i64, ptr @M, align 8, !tbaa !11
  %62 = load i32, ptr %7, align 4, !tbaa !8
  %63 = sext i32 %62 to i64
  %64 = srem i64 %61, %63
  %65 = getelementptr inbounds [1000001 x i64], ptr @inv, i64 0, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !11
  %67 = mul nsw i64 %60, %66
  %68 = load i64, ptr @M, align 8, !tbaa !11
  %69 = srem i64 %67, %68
  %70 = sub nsw i64 %56, %69
  %71 = load i32, ptr %7, align 4, !tbaa !8
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [1000001 x i64], ptr @inv, i64 0, i64 %72
  store i64 %70, ptr %73, align 8, !tbaa !11
  br label %74

74:                                               ; preds = %55
  %75 = load i32, ptr %7, align 4, !tbaa !8
  %76 = add nsw i32 %75, 1
  store i32 %76, ptr %7, align 4, !tbaa !8
  br label %51, !llvm.loop !15

77:                                               ; preds = %54
  store i64 1, ptr @invf, align 16, !tbaa !11
  store i64 1, ptr getelementptr inbounds ([1000001 x i64], ptr @invf, i64 0, i64 1), align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 2, ptr %8, align 4, !tbaa !8
  br label %78

78:                                               ; preds = %98, %77
  %79 = load i32, ptr %8, align 4, !tbaa !8
  %80 = icmp sle i32 %79, 1000000
  br i1 %80, label %82, label %81

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

82:                                               ; preds = %78
  %83 = load i32, ptr %8, align 4, !tbaa !8
  %84 = sub nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %85
  %87 = load i64, ptr %86, align 8, !tbaa !11
  %88 = load i32, ptr %8, align 4, !tbaa !8
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [1000001 x i64], ptr @inv, i64 0, i64 %89
  %91 = load i64, ptr %90, align 8, !tbaa !11
  %92 = mul nsw i64 %87, %91
  %93 = load i64, ptr @M, align 8, !tbaa !11
  %94 = srem i64 %92, %93
  %95 = load i32, ptr %8, align 4, !tbaa !8
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %96
  store i64 %94, ptr %97, align 8, !tbaa !11
  br label %98

98:                                               ; preds = %82
  %99 = load i32, ptr %8, align 4, !tbaa !8
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %8, align 4, !tbaa !8
  br label %78, !llvm.loop !16

101:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store ptr %2, ptr %9, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %102 = load ptr, ptr %9, align 8, !tbaa !17
  %103 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %102) #7
  %104 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %103, ptr %104, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %105 = load ptr, ptr %9, align 8, !tbaa !17
  %106 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %105) #7
  %107 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %106, ptr %107, align 8
  br label %108

108:                                              ; preds = %121, %101
  %109 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br i1 %109, label %111, label %110

110:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %123

111:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %112 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  %113 = load i8, ptr %112, align 1, !tbaa !19
  %114 = sext i8 %113 to i32
  store i32 %114, ptr %12, align 4, !tbaa !8
  %115 = load i32, ptr %12, align 4, !tbaa !8
  %116 = sub nsw i32 %115, 97
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [26 x i32], ptr @freq, i64 0, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !8
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %118, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %121

121:                                              ; preds = %111
  %122 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  br label %108

123:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %124 = load i32, ptr %5, align 4, !tbaa !8
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [1000001 x i64], ptr @f, i64 0, i64 %125
  %127 = load i64, ptr %126, align 8, !tbaa !11
  store i64 %127, ptr %13, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !8
  br label %128

128:                                              ; preds = %145, %123
  %129 = load i32, ptr %14, align 4, !tbaa !8
  %130 = icmp slt i32 %129, 26
  br i1 %130, label %132, label %131

131:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %148

132:                                              ; preds = %128
  %133 = load i64, ptr @M, align 8, !tbaa !11
  %134 = load i32, ptr %14, align 4, !tbaa !8
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [26 x i32], ptr @freq, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !8
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !11
  %141 = load i64, ptr %13, align 8, !tbaa !11
  %142 = mul nsw i64 %141, %140
  store i64 %142, ptr %13, align 8, !tbaa !11
  %143 = load i64, ptr %13, align 8, !tbaa !11
  %144 = srem i64 %143, %133
  store i64 %144, ptr %13, align 8, !tbaa !11
  br label %145

145:                                              ; preds = %132
  %146 = load i32, ptr %14, align 4, !tbaa !8
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %14, align 4, !tbaa !8
  br label %128, !llvm.loop !20

148:                                              ; preds = %131
  %149 = load i64, ptr %13, align 8, !tbaa !11
  %150 = icmp slt i64 %149, 0
  br i1 %150, label %151, label %155

151:                                              ; preds = %148
  %152 = load i64, ptr @M, align 8, !tbaa !11
  %153 = load i64, ptr %13, align 8, !tbaa !11
  %154 = add nsw i64 %153, %152
  store i64 %154, ptr %13, align 8, !tbaa !11
  br label %155

155:                                              ; preds = %151, %148
  %156 = load i64, ptr %13, align 8, !tbaa !11
  %157 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %156)
          to label %158 unwind label %162

158:                                              ; preds = %155
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %157, i8 noundef signext 10)
          to label %160 unwind label %162

160:                                              ; preds = %158
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #7
  %161 = load i32, ptr %1, align 4
  ret i32 %161

162:                                              ; preds = %158, %155
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %3, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %166

166:                                              ; preds = %162, %29
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %2) #7
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %3, align 8
  %169 = load i32, ptr %4, align 4
  %170 = insertvalue { ptr, i32 } poison, ptr %168, 0
  %171 = insertvalue { ptr, i32 } %170, i32 %169, 1
  resume { ptr, i32 } %171
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #3

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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)) #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 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) #5

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

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

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = !{!18, !18, i64 0}
!18 = !{!"any pointer", !10, i64 0}
!19 = !{!10, !10, i64 0}
!20 = distinct !{!20, !14}


; 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] }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@M = external dso_local local_unnamed_addr global i64, align 8
@freq = external dso_local local_unnamed_addr global [26 x i32], align 16
@f = external dso_local local_unnamed_addr global [1000001 x i64], align 16
@inv = external dso_local local_unnamed_addr global [1000001 x i64], align 16
@invf = external dso_local local_unnamed_addr global [1000001 x i64], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; 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 norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %5 = getelementptr i8, ptr %4, i64 -24
  %6 = load i64, ptr %5, align 8
  %7 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %6
  %8 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %7, ptr noundef null)
  %9 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  %10 = 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) %1)
          to label %11 unwind label %15

11:                                               ; preds = %0
  %12 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  store i64 1, ptr getelementptr inbounds (i8, ptr @f, i64 8), align 8, !tbaa !8
  store i64 1, ptr @f, align 16, !tbaa !8
  %13 = load i64, ptr @M, align 8, !tbaa !8
  br label %17

14:                                               ; preds = %17
  store i64 1, ptr getelementptr inbounds (i8, ptr @inv, i64 8), align 8, !tbaa !8
  store i64 1, ptr @inv, align 16, !tbaa !8
  br label %29

15:                                               ; preds = %0
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %233

17:                                               ; preds = %17, %11
  %18 = phi i64 [ 1, %11 ], [ %26, %17 ]
  %indvars.iv = phi i64 [ 2, %11 ], [ %indvars.iv.next.2, %17 ]
  %19 = mul nsw i64 %18, %indvars.iv
  %20 = srem i64 %19, %13
  %21 = getelementptr inbounds [1000001 x i64], ptr @f, i64 0, i64 %indvars.iv
  store i64 %20, ptr %21, align 8, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = mul nsw i64 %20, %indvars.iv.next
  %23 = srem i64 %22, %13
  %24 = getelementptr inbounds [1000001 x i64], ptr @f, i64 0, i64 %indvars.iv.next
  store i64 %23, ptr %24, align 8, !tbaa !8
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %25 = mul nsw i64 %23, %indvars.iv.next.1
  %26 = srem i64 %25, %13
  %27 = getelementptr inbounds [1000001 x i64], ptr @f, i64 0, i64 %indvars.iv.next.1
  store i64 %26, ptr %27, align 8, !tbaa !8
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %exitcond.not.2 = icmp eq i64 %indvars.iv.next.2, 1000001
  br i1 %exitcond.not.2, label %14, label %17, !llvm.loop !11

28:                                               ; preds = %29
  store i64 1, ptr @invf, align 16, !tbaa !8
  store i64 1, ptr getelementptr inbounds (i8, ptr @invf, i64 8), align 8, !tbaa !8
  br label %42

29:                                               ; preds = %14, %29
  %indvars.iv42 = phi i64 [ 2, %14 ], [ %indvars.iv.next43, %29 ]
  %30 = sdiv i64 %13, %indvars.iv42
  %31 = srem i64 %13, %indvars.iv42
  %32 = getelementptr inbounds [1000001 x i64], ptr @inv, i64 0, i64 %31
  %33 = load i64, ptr %32, align 8, !tbaa !8
  %34 = mul nsw i64 %33, %30
  %35 = srem i64 %34, %13
  %36 = sub nsw i64 %13, %35
  %37 = getelementptr inbounds [1000001 x i64], ptr @inv, i64 0, i64 %indvars.iv42
  store i64 %36, ptr %37, align 8, !tbaa !8
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  %exitcond45.not = icmp eq i64 %indvars.iv.next43, 1000001
  br i1 %exitcond45.not, label %28, label %29, !llvm.loop !13

38:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %39 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  store ptr %39, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %40 = call ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  store ptr %40, ptr %3, align 8
  %41 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  br i1 %41, label %.lr.ph, label %._crit_edge

42:                                               ; preds = %49, %28
  %43 = phi i64 [ 1, %28 ], [ %53, %49 ]
  %indvars.iv46 = phi i64 [ 2, %28 ], [ %indvars.iv.next47.1, %49 ]
  %44 = getelementptr inbounds [1000001 x i64], ptr @inv, i64 0, i64 %indvars.iv46
  %45 = load i64, ptr %44, align 16, !tbaa !8
  %46 = mul nsw i64 %45, %43
  %47 = srem i64 %46, %13
  %48 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %indvars.iv46
  store i64 %47, ptr %48, align 16, !tbaa !8
  %exitcond49.not = icmp eq i64 %indvars.iv46, 1000000
  br i1 %exitcond49.not, label %38, label %49, !llvm.loop !14

49:                                               ; preds = %42
  %indvars.iv.next47 = or disjoint i64 %indvars.iv46, 1
  %50 = getelementptr inbounds [1000001 x i64], ptr @inv, i64 0, i64 %indvars.iv.next47
  %51 = load i64, ptr %50, align 8, !tbaa !8
  %52 = mul nsw i64 %51, %47
  %53 = srem i64 %52, %13
  %54 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %indvars.iv.next47
  store i64 %53, ptr %54, align 8, !tbaa !8
  %indvars.iv.next47.1 = add nuw nsw i64 %indvars.iv46, 2
  br label %42

._crit_edge:                                      ; preds = %.lr.ph, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %sext = shl i64 %12, 32
  %55 = ashr exact i64 %sext, 32
  %56 = getelementptr inbounds [1000001 x i64], ptr @f, i64 0, i64 %55
  %57 = load i64, ptr %56, align 8, !tbaa !8
  %58 = load i64, ptr @M, align 8, !tbaa !8
  %59 = load i32, ptr @freq, align 16, !tbaa !15
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !8
  %63 = mul nsw i64 %62, %57
  %64 = srem i64 %63, %58
  %65 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 4), align 4, !tbaa !15
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %66
  %68 = load i64, ptr %67, align 8, !tbaa !8
  %69 = mul nsw i64 %68, %64
  %70 = srem i64 %69, %58
  %71 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 8), align 8, !tbaa !15
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %72
  %74 = load i64, ptr %73, align 8, !tbaa !8
  %75 = mul nsw i64 %74, %70
  %76 = srem i64 %75, %58
  %77 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 12), align 4, !tbaa !15
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %78
  %80 = load i64, ptr %79, align 8, !tbaa !8
  %81 = mul nsw i64 %80, %76
  %82 = srem i64 %81, %58
  %83 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 16), align 16, !tbaa !15
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !8
  %87 = mul nsw i64 %86, %82
  %88 = srem i64 %87, %58
  %89 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 20), align 4, !tbaa !15
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !8
  %93 = mul nsw i64 %92, %88
  %94 = srem i64 %93, %58
  %95 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 24), align 8, !tbaa !15
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %96
  %98 = load i64, ptr %97, align 8, !tbaa !8
  %99 = mul nsw i64 %98, %94
  %100 = srem i64 %99, %58
  %101 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 28), align 4, !tbaa !15
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !8
  %105 = mul nsw i64 %104, %100
  %106 = srem i64 %105, %58
  %107 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 32), align 16, !tbaa !15
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %108
  %110 = load i64, ptr %109, align 8, !tbaa !8
  %111 = mul nsw i64 %110, %106
  %112 = srem i64 %111, %58
  %113 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 36), align 4, !tbaa !15
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %114
  %116 = load i64, ptr %115, align 8, !tbaa !8
  %117 = mul nsw i64 %116, %112
  %118 = srem i64 %117, %58
  %119 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 40), align 8, !tbaa !15
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !8
  %123 = mul nsw i64 %122, %118
  %124 = srem i64 %123, %58
  %125 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 44), align 4, !tbaa !15
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %126
  %128 = load i64, ptr %127, align 8, !tbaa !8
  %129 = mul nsw i64 %128, %124
  %130 = srem i64 %129, %58
  %131 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 48), align 16, !tbaa !15
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %132
  %134 = load i64, ptr %133, align 8, !tbaa !8
  %135 = mul nsw i64 %134, %130
  %136 = srem i64 %135, %58
  %137 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 52), align 4, !tbaa !15
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %138
  %140 = load i64, ptr %139, align 8, !tbaa !8
  %141 = mul nsw i64 %140, %136
  %142 = srem i64 %141, %58
  %143 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 56), align 8, !tbaa !15
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %144
  %146 = load i64, ptr %145, align 8, !tbaa !8
  %147 = mul nsw i64 %146, %142
  %148 = srem i64 %147, %58
  %149 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 60), align 4, !tbaa !15
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %150
  %152 = load i64, ptr %151, align 8, !tbaa !8
  %153 = mul nsw i64 %152, %148
  %154 = srem i64 %153, %58
  %155 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 64), align 16, !tbaa !15
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %156
  %158 = load i64, ptr %157, align 8, !tbaa !8
  %159 = mul nsw i64 %158, %154
  %160 = srem i64 %159, %58
  %161 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 68), align 4, !tbaa !15
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %162
  %164 = load i64, ptr %163, align 8, !tbaa !8
  %165 = mul nsw i64 %164, %160
  %166 = srem i64 %165, %58
  %167 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 72), align 8, !tbaa !15
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %168
  %170 = load i64, ptr %169, align 8, !tbaa !8
  %171 = mul nsw i64 %170, %166
  %172 = srem i64 %171, %58
  %173 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 76), align 4, !tbaa !15
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %174
  %176 = load i64, ptr %175, align 8, !tbaa !8
  %177 = mul nsw i64 %176, %172
  %178 = srem i64 %177, %58
  %179 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 80), align 16, !tbaa !15
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %180
  %182 = load i64, ptr %181, align 8, !tbaa !8
  %183 = mul nsw i64 %182, %178
  %184 = srem i64 %183, %58
  %185 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 84), align 4, !tbaa !15
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %186
  %188 = load i64, ptr %187, align 8, !tbaa !8
  %189 = mul nsw i64 %188, %184
  %190 = srem i64 %189, %58
  %191 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 88), align 8, !tbaa !15
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %192
  %194 = load i64, ptr %193, align 8, !tbaa !8
  %195 = mul nsw i64 %194, %190
  %196 = srem i64 %195, %58
  %197 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 92), align 4, !tbaa !15
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %198
  %200 = load i64, ptr %199, align 8, !tbaa !8
  %201 = mul nsw i64 %200, %196
  %202 = srem i64 %201, %58
  %203 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 96), align 16, !tbaa !15
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %204
  %206 = load i64, ptr %205, align 8, !tbaa !8
  %207 = mul nsw i64 %206, %202
  %208 = srem i64 %207, %58
  %209 = load i32, ptr getelementptr inbounds (i8, ptr @freq, i64 100), align 4, !tbaa !15
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [1000001 x i64], ptr @invf, i64 0, i64 %210
  %212 = load i64, ptr %211, align 8, !tbaa !8
  %213 = mul nsw i64 %212, %208
  %214 = srem i64 %213, %58
  %215 = icmp slt i64 %214, 0
  %216 = load i64, ptr @M, align 8
  %217 = select i1 %215, i64 %216, i64 0
  %.1 = add nsw i64 %217, %214
  %218 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.1)
          to label %228 unwind label %231

.lr.ph:                                           ; preds = %38, %.lr.ph
  %219 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  %220 = load i8, ptr %219, align 1, !tbaa !17
  %221 = sext i8 %220 to i64
  %222 = add nsw i64 %221, -97
  %223 = getelementptr inbounds [26 x i32], ptr @freq, i64 0, i64 %222
  %224 = load i32, ptr %223, align 4, !tbaa !15
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %223, align 4, !tbaa !15
  %226 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  %227 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  br i1 %227, label %.lr.ph, label %._crit_edge

228:                                              ; preds = %._crit_edge
  %229 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %218, i8 noundef signext 10)
          to label %230 unwind label %231

230:                                              ; preds = %228
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  ret i32 0

231:                                              ; preds = %228, %._crit_edge
  %232 = landingpad { ptr, i32 }
          cleanup
  br label %233

233:                                              ; preds = %231, %15
  %.pn = phi { ptr, i32 } [ %232, %231 ], [ %16, %15 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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 #3

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2 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 #5

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

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

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !10, i64 0}
!17 = !{!10, !10, i64 0}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass