; LLVM IR from TLE-MEC/Hack-CP-DSA :: Hackerrank/Shrelock and Arrays (solution)

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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@_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 i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  %19 = 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)
  br label %20

20:                                               ; preds = %166, %0
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = add nsw i32 %21, -1
  store i32 %22, ptr %2, align 4, !tbaa !5
  %23 = icmp sgt i32 %21, 0
  br i1 %23, label %24, label %174

24:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %25 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = zext i32 %26 to i64
  %28 = call ptr @llvm.stacksave.p0()
  store ptr %28, ptr %4, align 8
  %29 = alloca i32, i64 %27, align 16
  store i64 %27, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %40, %24
  %31 = load i32, ptr %6, align 4, !tbaa !5
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %35, label %34

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

35:                                               ; preds = %30
  %36 = load i32, ptr %6, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds i32, ptr %29, i64 %37
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %38)
  br label %40

40:                                               ; preds = %35
  %41 = load i32, ptr %6, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %6, align 4, !tbaa !5
  br label %30, !llvm.loop !9

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

44:                                               ; preds = %43
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %45

45:                                               ; preds = %159, %44
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = load i32, ptr %3, align 4, !tbaa !5
  %48 = icmp slt i32 %46, %47
  br i1 %48, label %54, label %49

49:                                               ; preds = %45
  store i32 7, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %162

50:                                               ; preds = %43
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %9, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %10, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  br label %173

54:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !5
  %55 = load i32, ptr %11, align 4, !tbaa !5
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %86

57:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %58 = load i32, ptr %11, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %15, align 4, !tbaa !5
  br label %60

60:                                               ; preds = %72, %57
  %61 = load i32, ptr %15, align 4, !tbaa !5
  %62 = load i32, ptr %3, align 4, !tbaa !5
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %65, label %64

64:                                               ; preds = %60
  store i32 10, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %75

65:                                               ; preds = %60
  %66 = load i32, ptr %14, align 4, !tbaa !5
  %67 = load i32, ptr %15, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds i32, ptr %29, i64 %68
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = add nsw i32 %66, %70
  store i32 %71, ptr %14, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %65
  %73 = load i32, ptr %15, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %15, align 4, !tbaa !5
  br label %60, !llvm.loop !11

75:                                               ; preds = %64
  %76 = load i32, ptr %14, align 4, !tbaa !5
  %77 = icmp eq i32 %76, 0
  br i1 %77, label %78, label %85

78:                                               ; preds = %75
  %79 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef @.str.1)
          to label %80 unwind label %81

80:                                               ; preds = %78
  br label %85

81:                                               ; preds = %153, %111, %78
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %9, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %172

85:                                               ; preds = %80, %75
  br label %158

86:                                               ; preds = %54
  %87 = load i32, ptr %11, align 4, !tbaa !5
  %88 = load i32, ptr %3, align 4, !tbaa !5
  %89 = sub nsw i32 %88, 1
  %90 = icmp eq i32 %87, %89
  br i1 %90, label %91, label %115

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %92

92:                                               ; preds = %105, %91
  %93 = load i32, ptr %16, align 4, !tbaa !5
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = sub nsw i32 %94, 1
  %96 = icmp slt i32 %93, %95
  br i1 %96, label %98, label %97

97:                                               ; preds = %92
  store i32 13, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %108

98:                                               ; preds = %92
  %99 = load i32, ptr %13, align 4, !tbaa !5
  %100 = load i32, ptr %16, align 4, !tbaa !5
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i32, ptr %29, i64 %101
  %103 = load i32, ptr %102, align 4, !tbaa !5
  %104 = add nsw i32 %99, %103
  store i32 %104, ptr %13, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %98
  %106 = load i32, ptr %16, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %16, align 4, !tbaa !5
  br label %92, !llvm.loop !12

108:                                              ; preds = %97
  %109 = load i32, ptr %13, align 4, !tbaa !5
  %110 = icmp eq i32 %109, 0
  br i1 %110, label %111, label %114

111:                                              ; preds = %108
  %112 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef @.str.1)
          to label %113 unwind label %81

113:                                              ; preds = %111
  br label %114

114:                                              ; preds = %113, %108
  br label %157

115:                                              ; preds = %86
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !5
  br label %116

116:                                              ; preds = %128, %115
  %117 = load i32, ptr %17, align 4, !tbaa !5
  %118 = load i32, ptr %11, align 4, !tbaa !5
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %121, label %120

120:                                              ; preds = %116
  store i32 16, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %131

121:                                              ; preds = %116
  %122 = load i32, ptr %13, align 4, !tbaa !5
  %123 = load i32, ptr %17, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds i32, ptr %29, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = add nsw i32 %122, %126
  store i32 %127, ptr %13, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %121
  %129 = load i32, ptr %17, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %17, align 4, !tbaa !5
  br label %116, !llvm.loop !13

131:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %132 = load i32, ptr %11, align 4, !tbaa !5
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %18, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %146, %131
  %135 = load i32, ptr %18, align 4, !tbaa !5
  %136 = load i32, ptr %3, align 4, !tbaa !5
  %137 = icmp slt i32 %135, %136
  br i1 %137, label %139, label %138

138:                                              ; preds = %134
  store i32 19, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %149

139:                                              ; preds = %134
  %140 = load i32, ptr %14, align 4, !tbaa !5
  %141 = load i32, ptr %18, align 4, !tbaa !5
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds i32, ptr %29, i64 %142
  %144 = load i32, ptr %143, align 4, !tbaa !5
  %145 = add nsw i32 %140, %144
  store i32 %145, ptr %14, align 4, !tbaa !5
  br label %146

146:                                              ; preds = %139
  %147 = load i32, ptr %18, align 4, !tbaa !5
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %18, align 4, !tbaa !5
  br label %134, !llvm.loop !14

149:                                              ; preds = %138
  %150 = load i32, ptr %14, align 4, !tbaa !5
  %151 = load i32, ptr %13, align 4, !tbaa !5
  %152 = icmp eq i32 %150, %151
  br i1 %152, label %153, label %156

153:                                              ; preds = %149
  %154 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef @.str.1)
          to label %155 unwind label %81

155:                                              ; preds = %153
  br label %156

156:                                              ; preds = %155, %149
  br label %157

157:                                              ; preds = %156, %114
  br label %158

158:                                              ; preds = %157, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %159

159:                                              ; preds = %158
  %160 = load i32, ptr %11, align 4, !tbaa !5
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %11, align 4, !tbaa !5
  br label %45, !llvm.loop !15

162:                                              ; preds = %49
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %164 unwind label %168

164:                                              ; preds = %162
  %165 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %166 unwind label %168

166:                                              ; preds = %164
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  %167 = load ptr, ptr %4, align 8
  call void @llvm.stackrestore.p0(ptr %167)
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %20, !llvm.loop !16

168:                                              ; preds = %164, %162
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %9, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %10, align 4
  br label %172

172:                                              ; preds = %168, %81
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %173

173:                                              ; preds = %172, %50
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  br label %176

174:                                              ; preds = %20
  store i32 0, ptr %1, align 4
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %175 = load i32, ptr %1, align 4
  ret i32 %175

176:                                              ; preds = %173
  %177 = load ptr, ptr %9, align 8
  %178 = load i32, ptr %10, align 4
  %179 = insertvalue { ptr, i32 } poison, ptr %177, 0
  %180 = insertvalue { ptr, i32 } %179, i32 %178, 1
  resume { ptr, i32 } %180
}

; 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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; 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 @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 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 = { nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 = { 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 = { 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 #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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@_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 i32, align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  %5 = 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)
  %6 = load i32, ptr %1, align 4, !tbaa !5
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr %1, align 4, !tbaa !5
  %8 = icmp sgt i32 %6, 0
  br i1 %8, label %.lr.ph74, label %._crit_edge75

.lr.ph74:                                         ; preds = %0, %90
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  %9 = 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)
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = zext i32 %10 to i64
  %12 = call ptr @llvm.stacksave.p0()
  %13 = alloca i32, i64 %11, align 16
  %14 = load i32, ptr %2, align 4, !tbaa !5
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph74
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %21 unwind label %25

.lr.ph:                                           ; preds = %.lr.ph74, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph74 ]
  %16 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = sext i32 %18 to i64
  %20 = icmp slt i64 %indvars.iv.next, %19
  br i1 %20, label %.lr.ph, label %._crit_edge, !llvm.loop !9

21:                                               ; preds = %._crit_edge
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = icmp sgt i32 %22, 0
  br i1 %23, label %.lr.ph71, label %._crit_edge72

._crit_edge72:                                    ; preds = %84, %21
  %24 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %88 unwind label %94

25:                                               ; preds = %._crit_edge
  %26 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #8
  br label %97

.lr.ph71:                                         ; preds = %21, %84
  %indvars.iv100 = phi i64 [ %indvars.iv.next101, %84 ], [ 0, %21 ]
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %84 ], [ 1, %21 ]
  %27 = phi i32 [ %85, %84 ], [ %22, %21 ]
  %28 = xor i64 %indvars.iv100, -1
  %29 = icmp eq i64 %indvars.iv100, 0
  br i1 %29, label %.preheader, label %44

.preheader:                                       ; preds = %.lr.ph71
  %30 = icmp sgt i32 %27, 1
  br i1 %30, label %.lr.ph66.preheader, label %.invoke

.lr.ph66.preheader:                               ; preds = %.preheader
  %wide.trip.count98 = zext nneg i32 %27 to i64
  %31 = add nsw i64 %wide.trip.count98, -1
  %min.iters.check = icmp ult i32 %27, 9
  br i1 %min.iters.check, label %.lr.ph66.preheader167, label %vector.ph

.lr.ph66.preheader167:                            ; preds = %middle.block, %.lr.ph66.preheader
  %indvars.iv95.ph = phi i64 [ 1, %.lr.ph66.preheader ], [ %ind.end, %middle.block ]
  %.03664.ph = phi i32 [ 0, %.lr.ph66.preheader ], [ %37, %middle.block ]
  br label %.lr.ph66

vector.ph:                                        ; preds = %.lr.ph66.preheader
  %n.vec = and i64 %31, -8
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %34, %vector.body ]
  %vec.phi112 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %35, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %32 = getelementptr inbounds i32, ptr %13, i64 %offset.idx
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  %wide.load = load <4 x i32>, ptr %32, align 4, !tbaa !5
  %wide.load113 = load <4 x i32>, ptr %33, align 4, !tbaa !5
  %34 = add <4 x i32> %wide.load, %vec.phi
  %35 = add <4 x i32> %wide.load113, %vec.phi112
  %index.next = add nuw i64 %index, 8
  %36 = icmp eq i64 %index.next, %n.vec
  br i1 %36, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %35, %34
  %37 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %31, %n.vec
  br i1 %cmp.n, label %._crit_edge67, label %.lr.ph66.preheader167

._crit_edge67:                                    ; preds = %.lr.ph66, %middle.block
  %.lcssa111 = phi i32 [ %37, %middle.block ], [ %41, %.lr.ph66 ]
  %38 = icmp eq i32 %.lcssa111, 0
  br i1 %38, label %.invoke, label %84

.lr.ph66:                                         ; preds = %.lr.ph66.preheader167, %.lr.ph66
  %indvars.iv95 = phi i64 [ %indvars.iv.next96, %.lr.ph66 ], [ %indvars.iv95.ph, %.lr.ph66.preheader167 ]
  %.03664 = phi i32 [ %41, %.lr.ph66 ], [ %.03664.ph, %.lr.ph66.preheader167 ]
  %39 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv95
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = add nsw i32 %40, %.03664
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %exitcond99.not = icmp eq i64 %indvars.iv.next96, %wide.trip.count98
  br i1 %exitcond99.not, label %._crit_edge67, label %.lr.ph66, !llvm.loop !14

42:                                               ; preds = %.invoke
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %96

44:                                               ; preds = %.lr.ph71
  %45 = add nsw i32 %27, -1
  %46 = zext i32 %45 to i64
  %47 = icmp eq i64 %indvars.iv100, %46
  br i1 %47, label %.preheader48, label %.preheader50.preheader

.preheader50.preheader:                           ; preds = %44
  %min.iters.check152 = icmp ult i64 %indvars.iv100, 8
  br i1 %min.iters.check152, label %.preheader50.preheader170, label %vector.ph153

.preheader50.preheader170:                        ; preds = %middle.block150, %.preheader50.preheader
  %indvars.iv80.ph = phi i64 [ 0, %.preheader50.preheader ], [ %n.vec155, %middle.block150 ]
  %.13852.ph = phi i32 [ 0, %.preheader50.preheader ], [ %53, %middle.block150 ]
  br label %.preheader50

vector.ph153:                                     ; preds = %.preheader50.preheader
  %n.vec155 = and i64 %indvars.iv100, 9223372036854775800
  br label %vector.body157

vector.body157:                                   ; preds = %vector.body157, %vector.ph153
  %index158 = phi i64 [ 0, %vector.ph153 ], [ %index.next163, %vector.body157 ]
  %vec.phi159 = phi <4 x i32> [ zeroinitializer, %vector.ph153 ], [ %50, %vector.body157 ]
  %vec.phi160 = phi <4 x i32> [ zeroinitializer, %vector.ph153 ], [ %51, %vector.body157 ]
  %48 = getelementptr inbounds i32, ptr %13, i64 %index158
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %wide.load161 = load <4 x i32>, ptr %48, align 16, !tbaa !5
  %wide.load162 = load <4 x i32>, ptr %49, align 16, !tbaa !5
  %50 = add <4 x i32> %wide.load161, %vec.phi159
  %51 = add <4 x i32> %wide.load162, %vec.phi160
  %index.next163 = add nuw i64 %index158, 8
  %52 = icmp eq i64 %index.next163, %n.vec155
  br i1 %52, label %middle.block150, label %vector.body157, !llvm.loop !15

middle.block150:                                  ; preds = %vector.body157
  %bin.rdx164 = add <4 x i32> %51, %50
  %53 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx164)
  %cmp.n165 = icmp eq i64 %indvars.iv100, %n.vec155
  br i1 %cmp.n165, label %.preheader49, label %.preheader50.preheader170

.preheader48:                                     ; preds = %44
  %54 = icmp sgt i32 %27, 1
  br i1 %54, label %.lr.ph61.preheader, label %.invoke

.lr.ph61.preheader:                               ; preds = %.preheader48
  %min.iters.check116 = icmp ult i64 %indvars.iv100, 8
  br i1 %min.iters.check116, label %.lr.ph61.preheader168, label %vector.ph117

.lr.ph61.preheader168:                            ; preds = %middle.block114, %.lr.ph61.preheader
  %indvars.iv90.ph = phi i64 [ 0, %.lr.ph61.preheader ], [ %n.vec119, %middle.block114 ]
  %.03759.ph = phi i32 [ 0, %.lr.ph61.preheader ], [ %60, %middle.block114 ]
  br label %.lr.ph61

vector.ph117:                                     ; preds = %.lr.ph61.preheader
  %n.vec119 = and i64 %indvars.iv100, 9223372036854775800
  br label %vector.body121

vector.body121:                                   ; preds = %vector.body121, %vector.ph117
  %index122 = phi i64 [ 0, %vector.ph117 ], [ %index.next127, %vector.body121 ]
  %vec.phi123 = phi <4 x i32> [ zeroinitializer, %vector.ph117 ], [ %57, %vector.body121 ]
  %vec.phi124 = phi <4 x i32> [ zeroinitializer, %vector.ph117 ], [ %58, %vector.body121 ]
  %55 = getelementptr inbounds i32, ptr %13, i64 %index122
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  %wide.load125 = load <4 x i32>, ptr %55, align 16, !tbaa !5
  %wide.load126 = load <4 x i32>, ptr %56, align 16, !tbaa !5
  %57 = add <4 x i32> %wide.load125, %vec.phi123
  %58 = add <4 x i32> %wide.load126, %vec.phi124
  %index.next127 = add nuw i64 %index122, 8
  %59 = icmp eq i64 %index.next127, %n.vec119
  br i1 %59, label %middle.block114, label %vector.body121, !llvm.loop !16

middle.block114:                                  ; preds = %vector.body121
  %bin.rdx128 = add <4 x i32> %58, %57
  %60 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx128)
  %cmp.n129 = icmp eq i64 %indvars.iv100, %n.vec119
  br i1 %cmp.n129, label %._crit_edge62, label %.lr.ph61.preheader168

._crit_edge62:                                    ; preds = %.lr.ph61, %middle.block114
  %.lcssa110 = phi i32 [ %60, %middle.block114 ], [ %64, %.lr.ph61 ]
  %61 = icmp eq i32 %.lcssa110, 0
  br i1 %61, label %.invoke, label %84

.lr.ph61:                                         ; preds = %.lr.ph61.preheader168, %.lr.ph61
  %indvars.iv90 = phi i64 [ %indvars.iv.next91, %.lr.ph61 ], [ %indvars.iv90.ph, %.lr.ph61.preheader168 ]
  %.03759 = phi i32 [ %64, %.lr.ph61 ], [ %.03759.ph, %.lr.ph61.preheader168 ]
  %62 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv90
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = add nsw i32 %63, %.03759
  %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1
  %exitcond94.not = icmp eq i64 %indvars.iv.next91, %indvars.iv100
  br i1 %exitcond94.not, label %._crit_edge62, label %.lr.ph61, !llvm.loop !17

.preheader49:                                     ; preds = %.preheader50, %middle.block150
  %.lcssa = phi i32 [ %53, %middle.block150 ], [ %78, %.preheader50 ]
  %65 = add nuw nsw i64 %indvars.iv100, 1
  %66 = sext i32 %27 to i64
  %67 = icmp slt i64 %65, %66
  br i1 %67, label %.lr.ph57.preheader, label %._crit_edge58

.lr.ph57.preheader:                               ; preds = %.preheader49
  %wide.trip.count88 = zext i32 %27 to i64
  %68 = add nsw i64 %28, %wide.trip.count88
  %min.iters.check133 = icmp ult i64 %68, 8
  br i1 %min.iters.check133, label %.lr.ph57.preheader169, label %vector.ph134

.lr.ph57.preheader169:                            ; preds = %middle.block131, %.lr.ph57.preheader
  %indvars.iv85.ph = phi i64 [ %indvars.iv83, %.lr.ph57.preheader ], [ %ind.end137, %middle.block131 ]
  %.155.ph = phi i32 [ 0, %.lr.ph57.preheader ], [ %75, %middle.block131 ]
  br label %.lr.ph57

vector.ph134:                                     ; preds = %.lr.ph57.preheader
  %n.vec136 = and i64 %68, -8
  %ind.end137 = add i64 %indvars.iv83, %n.vec136
  %69 = getelementptr i32, ptr %13, i64 %indvars.iv83
  br label %vector.body139

vector.body139:                                   ; preds = %vector.body139, %vector.ph134
  %index140 = phi i64 [ 0, %vector.ph134 ], [ %index.next146, %vector.body139 ]
  %vec.phi141 = phi <4 x i32> [ zeroinitializer, %vector.ph134 ], [ %72, %vector.body139 ]
  %vec.phi142 = phi <4 x i32> [ zeroinitializer, %vector.ph134 ], [ %73, %vector.body139 ]
  %70 = getelementptr i32, ptr %69, i64 %index140
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  %wide.load144 = load <4 x i32>, ptr %70, align 4, !tbaa !5
  %wide.load145 = load <4 x i32>, ptr %71, align 4, !tbaa !5
  %72 = add <4 x i32> %wide.load144, %vec.phi141
  %73 = add <4 x i32> %wide.load145, %vec.phi142
  %index.next146 = add nuw i64 %index140, 8
  %74 = icmp eq i64 %index.next146, %n.vec136
  br i1 %74, label %middle.block131, label %vector.body139, !llvm.loop !18

middle.block131:                                  ; preds = %vector.body139
  %bin.rdx147 = add <4 x i32> %73, %72
  %75 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx147)
  %cmp.n148 = icmp eq i64 %68, %n.vec136
  br i1 %cmp.n148, label %._crit_edge58, label %.lr.ph57.preheader169

.preheader50:                                     ; preds = %.preheader50.preheader170, %.preheader50
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %.preheader50 ], [ %indvars.iv80.ph, %.preheader50.preheader170 ]
  %.13852 = phi i32 [ %78, %.preheader50 ], [ %.13852.ph, %.preheader50.preheader170 ]
  %76 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv80
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = add nsw i32 %77, %.13852
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next81, %indvars.iv100
  br i1 %exitcond.not, label %.preheader49, label %.preheader50, !llvm.loop !19

._crit_edge58:                                    ; preds = %.lr.ph57, %middle.block131, %.preheader49
  %.1.lcssa = phi i32 [ 0, %.preheader49 ], [ %75, %middle.block131 ], [ %82, %.lr.ph57 ]
  %79 = icmp eq i32 %.1.lcssa, %.lcssa
  br i1 %79, label %.invoke, label %84

.lr.ph57:                                         ; preds = %.lr.ph57.preheader169, %.lr.ph57
  %indvars.iv85 = phi i64 [ %indvars.iv.next86, %.lr.ph57 ], [ %indvars.iv85.ph, %.lr.ph57.preheader169 ]
  %.155 = phi i32 [ %82, %.lr.ph57 ], [ %.155.ph, %.lr.ph57.preheader169 ]
  %80 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv85
  %81 = load i32, ptr %80, align 4, !tbaa !5
  %82 = add nsw i32 %81, %.155
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count88
  br i1 %exitcond89.not, label %._crit_edge58, label %.lr.ph57, !llvm.loop !20

.invoke:                                          ; preds = %._crit_edge67, %.preheader, %._crit_edge58, %._crit_edge62, %.preheader48
  %83 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.1)
          to label %84 unwind label %42

84:                                               ; preds = %.invoke, %._crit_edge62, %._crit_edge58, %._crit_edge67
  %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1
  %85 = load i32, ptr %2, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = icmp slt i64 %indvars.iv.next101, %86
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  br i1 %87, label %.lr.ph71, label %._crit_edge72, !llvm.loop !21

88:                                               ; preds = %._crit_edge72
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %90 unwind label %94

90:                                               ; preds = %88
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  call void @llvm.stackrestore.p0(ptr %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  %91 = load i32, ptr %1, align 4, !tbaa !5
  %92 = add nsw i32 %91, -1
  store i32 %92, ptr %1, align 4, !tbaa !5
  %93 = icmp sgt i32 %91, 0
  br i1 %93, label %.lr.ph74, label %._crit_edge75, !llvm.loop !22

94:                                               ; preds = %88, %._crit_edge72
  %95 = landingpad { ptr, i32 }
          cleanup
  br label %96

96:                                               ; preds = %94, %42
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %95, %94 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #8
  br label %97

97:                                               ; preds = %96, %25
  %.pn.pn = phi { ptr, i32 } [ %.pn, %96 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  resume { ptr, i32 } %.pn.pn

._crit_edge75:                                    ; preds = %90, %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  ret i32 0
}

; 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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #3

; 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 @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #7

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 nocallback nofree nosync nounwind willreturn }
attributes #4 = { 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 = { 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 = { 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 #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12, !13}
!12 = !{!"llvm.loop.isvectorized", i32 1}
!13 = !{!"llvm.loop.unroll.runtime.disable"}
!14 = distinct !{!14, !10, !13, !12}
!15 = distinct !{!15, !10, !12, !13}
!16 = distinct !{!16, !10, !12, !13}
!17 = distinct !{!17, !10, !13, !12}
!18 = distinct !{!18, !10, !12, !13}
!19 = distinct !{!19, !10, !13, !12}
!20 = distinct !{!20, !10, !13, !12}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass