; LLVM IR from brpapa/algorithms :: solutions/uva (108)

; 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" }

@sumAcc = external dso_local global [110 x [110 x i32]], align 16
@_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 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %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 i32, align 4
  %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) #6
  %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) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %13

13:                                               ; preds = %98, %0
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %13
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %101

18:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %19

19:                                               ; preds = %94, %18
  %20 = load i32, ptr %5, align 4, !tbaa !5
  %21 = load i32, ptr %2, align 4, !tbaa !5
  %22 = icmp slt i32 %20, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %19
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %97

24:                                               ; preds = %19
  %25 = load i32, ptr %3, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %26
  %28 = load i32, ptr %5, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [110 x i32], ptr %27, i64 0, i64 %29
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %30)
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %33
  %35 = load i32, ptr %5, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [110 x i32], ptr %34, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = load i32, ptr %3, align 4, !tbaa !5
  %40 = icmp sgt i32 %39, 0
  br i1 %40, label %41, label %50

41:                                               ; preds = %24
  %42 = load i32, ptr %3, align 4, !tbaa !5
  %43 = sub nsw i32 %42, 1
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %44
  %46 = load i32, ptr %5, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [110 x i32], ptr %45, i64 0, i64 %47
  %49 = load i32, ptr %48, align 4, !tbaa !5
  br label %51

50:                                               ; preds = %24
  br label %51

51:                                               ; preds = %50, %41
  %52 = phi i32 [ %49, %41 ], [ 0, %50 ]
  %53 = add nsw i32 %38, %52
  %54 = load i32, ptr %5, align 4, !tbaa !5
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %56, label %65

56:                                               ; preds = %51
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %58
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sub nsw i32 %60, 1
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [110 x i32], ptr %59, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  br label %66

65:                                               ; preds = %51
  br label %66

66:                                               ; preds = %65, %56
  %67 = phi i32 [ %64, %56 ], [ 0, %65 ]
  %68 = add nsw i32 %53, %67
  %69 = load i32, ptr %3, align 4, !tbaa !5
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %71, label %84

71:                                               ; preds = %66
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %74, label %84

74:                                               ; preds = %71
  %75 = load i32, ptr %3, align 4, !tbaa !5
  %76 = sub nsw i32 %75, 1
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %77
  %79 = load i32, ptr %5, align 4, !tbaa !5
  %80 = sub nsw i32 %79, 1
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [110 x i32], ptr %78, i64 0, i64 %81
  %83 = load i32, ptr %82, align 4, !tbaa !5
  br label %85

84:                                               ; preds = %71, %66
  br label %85

85:                                               ; preds = %84, %74
  %86 = phi i32 [ %83, %74 ], [ 0, %84 ]
  %87 = sub nsw i32 %68, %86
  %88 = load i32, ptr %3, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %89
  %91 = load i32, ptr %5, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [110 x i32], ptr %90, i64 0, i64 %92
  store i32 %87, ptr %93, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %85
  %95 = load i32, ptr %5, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %5, align 4, !tbaa !5
  br label %19, !llvm.loop !9

97:                                               ; preds = %23
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %3, align 4, !tbaa !5
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %3, align 4, !tbaa !5
  br label %13, !llvm.loop !11

101:                                              ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 -1073741824, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %198, %101
  %103 = load i32, ptr %7, align 4, !tbaa !5
  %104 = load i32, ptr %2, align 4, !tbaa !5
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

106:                                              ; preds = %102
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %201

107:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %194, %107
  %109 = load i32, ptr %8, align 4, !tbaa !5
  %110 = load i32, ptr %2, align 4, !tbaa !5
  %111 = icmp slt i32 %109, %110
  br i1 %111, label %113, label %112

112:                                              ; preds = %108
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %197

113:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %114 = load i32, ptr %7, align 4, !tbaa !5
  store i32 %114, ptr %9, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %190, %113
  %116 = load i32, ptr %9, align 4, !tbaa !5
  %117 = load i32, ptr %2, align 4, !tbaa !5
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %193

120:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %121 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %121, ptr %10, align 4, !tbaa !5
  br label %122

122:                                              ; preds = %186, %120
  %123 = load i32, ptr %10, align 4, !tbaa !5
  %124 = load i32, ptr %2, align 4, !tbaa !5
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %122
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %189

127:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %128 = load i32, ptr %9, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %129
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [110 x i32], ptr %130, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = load i32, ptr %7, align 4, !tbaa !5
  %136 = icmp sgt i32 %135, 0
  br i1 %136, label %137, label %146

137:                                              ; preds = %127
  %138 = load i32, ptr %7, align 4, !tbaa !5
  %139 = sub nsw i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %140
  %142 = load i32, ptr %10, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [110 x i32], ptr %141, i64 0, i64 %143
  %145 = load i32, ptr %144, align 4, !tbaa !5
  br label %147

146:                                              ; preds = %127
  br label %147

147:                                              ; preds = %146, %137
  %148 = phi i32 [ %145, %137 ], [ 0, %146 ]
  %149 = sub nsw i32 %134, %148
  %150 = load i32, ptr %8, align 4, !tbaa !5
  %151 = icmp sgt i32 %150, 0
  br i1 %151, label %152, label %161

152:                                              ; preds = %147
  %153 = load i32, ptr %9, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %154
  %156 = load i32, ptr %8, align 4, !tbaa !5
  %157 = sub nsw i32 %156, 1
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [110 x i32], ptr %155, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !5
  br label %162

161:                                              ; preds = %147
  br label %162

162:                                              ; preds = %161, %152
  %163 = phi i32 [ %160, %152 ], [ 0, %161 ]
  %164 = sub nsw i32 %149, %163
  %165 = load i32, ptr %7, align 4, !tbaa !5
  %166 = icmp sgt i32 %165, 0
  br i1 %166, label %167, label %180

167:                                              ; preds = %162
  %168 = load i32, ptr %8, align 4, !tbaa !5
  %169 = icmp sgt i32 %168, 0
  br i1 %169, label %170, label %180

170:                                              ; preds = %167
  %171 = load i32, ptr %7, align 4, !tbaa !5
  %172 = sub nsw i32 %171, 1
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %173
  %175 = load i32, ptr %8, align 4, !tbaa !5
  %176 = sub nsw i32 %175, 1
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds [110 x i32], ptr %174, i64 0, i64 %177
  %179 = load i32, ptr %178, align 4, !tbaa !5
  br label %181

180:                                              ; preds = %167, %162
  br label %181

181:                                              ; preds = %180, %170
  %182 = phi i32 [ %179, %170 ], [ 0, %180 ]
  %183 = add nsw i32 %164, %182
  store i32 %183, ptr %11, align 4, !tbaa !5
  %184 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %185 = load i32, ptr %184, align 4, !tbaa !5
  store i32 %185, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %186

186:                                              ; preds = %181
  %187 = load i32, ptr %10, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %10, align 4, !tbaa !5
  br label %122, !llvm.loop !12

189:                                              ; preds = %126
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %9, align 4, !tbaa !5
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %9, align 4, !tbaa !5
  br label %115, !llvm.loop !13

193:                                              ; preds = %119
  br label %194

194:                                              ; preds = %193
  %195 = load i32, ptr %8, align 4, !tbaa !5
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %8, align 4, !tbaa !5
  br label %108, !llvm.loop !14

197:                                              ; preds = %112
  br label %198

198:                                              ; preds = %197
  %199 = load i32, ptr %7, align 4, !tbaa !5
  %200 = add nsw i32 %199, 1
  store i32 %200, ptr %7, align 4, !tbaa !5
  br label %102, !llvm.loop !15

201:                                              ; preds = %106
  %202 = load i32, ptr %6, align 4, !tbaa !5
  %203 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %202)
  %204 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %203, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %205 = load i32, ptr %1, align 4
  ret i32 %205
}

; 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 memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 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)) #5

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 = { 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 #4 = { 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 #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 = { 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}


; 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" }

@sumAcc = external dso_local global [110 x [110 x i32]], align 16
@_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 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  %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
  %6 = icmp sgt i32 %5, 0
  br i1 %6, label %.preheader56, label %._crit_edge59.thread

._crit_edge59.thread:                             ; preds = %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 -1073741824, ptr %2, align 4, !tbaa !5
  br label %._crit_edge73

.preheader56:                                     ; preds = %0, %._crit_edge
  %7 = phi i32 [ %38, %._crit_edge ], [ %5, %0 ]
  %indvars.iv91 = phi i64 [ %indvars.iv.next92, %._crit_edge ], [ 0, %0 ]
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader56
  %.not = icmp eq i64 %indvars.iv91, 0
  %9 = add nsw i64 %indvars.iv91, -1
  br i1 %.not, label %.thread.peel, label %.thread.us.peel

.thread.us.peel:                                  ; preds = %.lr.ph
  %10 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %indvars.iv91, i64 0
  %11 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %12 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %9, i64 0
  %13 = load i32, ptr %12, align 8, !tbaa !5
  %14 = load i32, ptr %10, align 8, !tbaa !5
  %15 = add nsw i32 %13, %14
  store i32 %15, ptr %10, align 8, !tbaa !5
  %16 = load i32, ptr %1, align 4, !tbaa !5
  %17 = icmp sgt i32 %16, 1
  br i1 %17, label %.thread.us, label %._crit_edge

.thread.peel:                                     ; preds = %.lr.ph
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @sumAcc)
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 1
  br i1 %20, label %.thread, label %._crit_edge

.thread.us:                                       ; preds = %.thread.us.peel, %.thread.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %.thread.us ], [ 1, %.thread.us.peel ]
  %21 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %indvars.iv91, i64 %indvars.iv
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %21)
  %23 = add nsw i64 %indvars.iv, -1
  %24 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %9, i64 %23
  %25 = load i32, ptr %24, align 4, !tbaa !5
  %26 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %indvars.iv91, i64 %23
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %9, i64 %indvars.iv
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = load i32, ptr %21, align 4, !tbaa !5
  %31 = add nsw i32 %29, %30
  %32 = add nsw i32 %27, %31
  %33 = sub nsw i32 %32, %25
  store i32 %33, ptr %21, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = icmp slt i64 %indvars.iv.next, %35
  br i1 %36, label %.thread.us, label %._crit_edge, !llvm.loop !9

._crit_edge59:                                    ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 -1073741824, ptr %2, align 4, !tbaa !5
  %37 = icmp sgt i32 %38, 0
  br i1 %37, label %.preheader55, label %._crit_edge73

._crit_edge:                                      ; preds = %.thread.us, %.thread, %.thread.us.peel, %.thread.peel, %.preheader56
  %38 = phi i32 [ %7, %.preheader56 ], [ %19, %.thread.peel ], [ %16, %.thread.us.peel ], [ %48, %.thread ], [ %34, %.thread.us ]
  %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1
  %39 = sext i32 %38 to i64
  %40 = icmp slt i64 %indvars.iv.next92, %39
  br i1 %40, label %.preheader56, label %._crit_edge59, !llvm.loop !12

.thread:                                          ; preds = %.thread.peel, %.thread
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %.thread ], [ 1, %.thread.peel ]
  %41 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 0, i64 %indvars.iv87
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %41)
  %43 = add nsw i64 %indvars.iv87, -1
  %44 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 0, i64 %43
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = load i32, ptr %41, align 4, !tbaa !5
  %47 = add nsw i32 %45, %46
  store i32 %47, ptr %41, align 4, !tbaa !5
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %48 = load i32, ptr %1, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = icmp slt i64 %indvars.iv.next88, %49
  br i1 %50, label %.thread, label %._crit_edge, !llvm.loop !14

.preheader55:                                     ; preds = %._crit_edge59, %._crit_edge70
  %51 = phi i32 [ %68, %._crit_edge70 ], [ -1073741824, %._crit_edge59 ]
  %52 = phi i32 [ %69, %._crit_edge70 ], [ %38, %._crit_edge59 ]
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %._crit_edge70 ], [ 0, %._crit_edge59 ]
  %53 = icmp sgt i32 %52, 0
  br i1 %53, label %.preheader54.lr.ph, label %._crit_edge70

.preheader54.lr.ph:                               ; preds = %.preheader55
  %.not76 = icmp eq i64 %indvars.iv105, 0
  %54 = add nsw i64 %indvars.iv105, -1
  %55 = zext nneg i32 %52 to i64
  %56 = icmp ult i64 %indvars.iv105, %55
  br i1 %56, label %.preheader54, label %._crit_edge70

._crit_edge73:                                    ; preds = %._crit_edge70, %._crit_edge59.thread, %._crit_edge59
  %57 = phi i32 [ -1073741824, %._crit_edge59 ], [ -1073741824, %._crit_edge59.thread ], [ %68, %._crit_edge70 ]
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %57)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.preheader54:                                     ; preds = %.preheader54.lr.ph, %._crit_edge67
  %60 = phi i32 [ %107, %._crit_edge67 ], [ %51, %.preheader54.lr.ph ]
  %61 = phi i32 [ %108, %._crit_edge67 ], [ %52, %.preheader54.lr.ph ]
  %62 = phi i32 [ %109, %._crit_edge67 ], [ %52, %.preheader54.lr.ph ]
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %._crit_edge67 ], [ 0, %.preheader54.lr.ph ]
  %63 = sext i32 %62 to i64
  %64 = icmp slt i64 %indvars.iv105, %63
  br i1 %64, label %.preheader.lr.ph, label %._crit_edge67

.preheader.lr.ph:                                 ; preds = %.preheader54
  %.not77 = icmp eq i64 %indvars.iv94, 0
  %65 = add nsw i64 %indvars.iv94, -1
  %66 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %54, i64 %65
  %67 = icmp slt i64 %indvars.iv94, %63
  br i1 %67, label %.preheader, label %._crit_edge67

._crit_edge70:                                    ; preds = %._crit_edge67, %.preheader54.lr.ph, %.preheader55
  %68 = phi i32 [ %51, %.preheader55 ], [ %51, %.preheader54.lr.ph ], [ %107, %._crit_edge67 ]
  %69 = phi i32 [ %52, %.preheader55 ], [ %52, %.preheader54.lr.ph ], [ %108, %._crit_edge67 ]
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %70 = sext i32 %69 to i64
  %71 = icmp slt i64 %indvars.iv.next106, %70
  br i1 %71, label %.preheader55, label %._crit_edge73, !llvm.loop !15

.preheader:                                       ; preds = %.preheader.lr.ph, %._crit_edge62
  %72 = phi i32 [ %111, %._crit_edge62 ], [ %60, %.preheader.lr.ph ]
  %73 = phi i32 [ %112, %._crit_edge62 ], [ %61, %.preheader.lr.ph ]
  %74 = phi i32 [ %113, %._crit_edge62 ], [ %62, %.preheader.lr.ph ]
  %75 = phi i32 [ %114, %._crit_edge62 ], [ %62, %.preheader.lr.ph ]
  %indvars.iv107 = phi i64 [ %indvars.iv.next108, %._crit_edge62 ], [ %indvars.iv105, %.preheader.lr.ph ]
  %76 = sext i32 %75 to i64
  %77 = icmp slt i64 %indvars.iv94, %76
  br i1 %77, label %.lr.ph61, label %._crit_edge62

.lr.ph61:                                         ; preds = %.preheader
  %78 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %indvars.iv107, i64 %65
  br i1 %.not77, label %.lr.ph61.split, label %.lr.ph61.split.us

.lr.ph61.split.us:                                ; preds = %.lr.ph61, %.thread52.us
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %.thread52.us ], [ %indvars.iv94, %.lr.ph61 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %79 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %indvars.iv107, i64 %indvars.iv96
  %80 = load i32, ptr %79, align 4, !tbaa !5
  br i1 %.not76, label %.thread112, label %82

.thread112:                                       ; preds = %.lr.ph61.split.us
  %81 = load i32, ptr %78, align 4, !tbaa !5
  br label %.thread52.us

82:                                               ; preds = %.lr.ph61.split.us
  %83 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %54, i64 %indvars.iv96
  %84 = load i32, ptr %83, align 4, !tbaa !5
  %85 = load i32, ptr %78, align 4, !tbaa !5
  %86 = add i32 %85, %84
  %87 = load i32, ptr %66, align 4, !tbaa !5
  br label %.thread52.us

.thread52.us:                                     ; preds = %.thread112, %82
  %88 = phi i32 [ %86, %82 ], [ %81, %.thread112 ]
  %89 = phi i32 [ %87, %82 ], [ 0, %.thread112 ]
  %90 = sub i32 %80, %88
  %91 = add nsw i32 %90, %89
  store i32 %91, ptr %3, align 4, !tbaa !5
  %92 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %93 = load i32, ptr %92, align 4, !tbaa !5
  store i32 %93, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %94 = load i32, ptr %1, align 4, !tbaa !5
  %95 = trunc nuw i64 %indvars.iv.next97 to i32
  %96 = icmp sgt i32 %94, %95
  br i1 %96, label %.lr.ph61.split.us, label %._crit_edge62, !llvm.loop !16

.lr.ph61.split:                                   ; preds = %.lr.ph61
  br i1 %.not76, label %.thread52, label %.thread52.us64

.thread52.us64:                                   ; preds = %.lr.ph61.split, %.thread52.us64
  %indvars.iv99 = phi i64 [ %indvars.iv.next100, %.thread52.us64 ], [ 0, %.lr.ph61.split ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %97 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %indvars.iv107, i64 %indvars.iv99
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %54, i64 %indvars.iv99
  %100 = load i32, ptr %99, align 4, !tbaa !5
  %101 = sub i32 %98, %100
  store i32 %101, ptr %3, align 4, !tbaa !5
  %102 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %103 = load i32, ptr %102, align 4, !tbaa !5
  store i32 %103, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %104 = load i32, ptr %1, align 4, !tbaa !5
  %105 = trunc nuw i64 %indvars.iv.next100 to i32
  %106 = icmp sgt i32 %104, %105
  br i1 %106, label %.thread52.us64, label %._crit_edge62, !llvm.loop !16

._crit_edge67.loopexit:                           ; preds = %._crit_edge62
  %.pre = sext i32 %113 to i64
  br label %._crit_edge67

._crit_edge67:                                    ; preds = %.preheader.lr.ph, %._crit_edge67.loopexit, %.preheader54
  %.pre-phi = phi i64 [ %.pre, %._crit_edge67.loopexit ], [ %63, %.preheader54 ], [ %63, %.preheader.lr.ph ]
  %107 = phi i32 [ %111, %._crit_edge67.loopexit ], [ %60, %.preheader54 ], [ %60, %.preheader.lr.ph ]
  %108 = phi i32 [ %112, %._crit_edge67.loopexit ], [ %61, %.preheader54 ], [ %61, %.preheader.lr.ph ]
  %109 = phi i32 [ %113, %._crit_edge67.loopexit ], [ %62, %.preheader54 ], [ %62, %.preheader.lr.ph ]
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %110 = icmp slt i64 %indvars.iv.next95, %.pre-phi
  br i1 %110, label %.preheader54, label %._crit_edge70, !llvm.loop !17

._crit_edge62:                                    ; preds = %.thread52.us, %.thread52.us64, %.thread52, %.preheader
  %111 = phi i32 [ %72, %.preheader ], [ %120, %.thread52 ], [ %103, %.thread52.us64 ], [ %93, %.thread52.us ]
  %112 = phi i32 [ %73, %.preheader ], [ %121, %.thread52 ], [ %104, %.thread52.us64 ], [ %94, %.thread52.us ]
  %113 = phi i32 [ %74, %.preheader ], [ %121, %.thread52 ], [ %104, %.thread52.us64 ], [ %94, %.thread52.us ]
  %114 = phi i32 [ %75, %.preheader ], [ %121, %.thread52 ], [ %104, %.thread52.us64 ], [ %94, %.thread52.us ]
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %115 = trunc nuw i64 %indvars.iv.next108 to i32
  %116 = icmp sgt i32 %114, %115
  br i1 %116, label %.preheader, label %._crit_edge67.loopexit, !llvm.loop !18

.thread52:                                        ; preds = %.lr.ph61.split, %.thread52
  %indvars.iv102 = phi i64 [ %indvars.iv.next103, %.thread52 ], [ 0, %.lr.ph61.split ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %117 = getelementptr inbounds [110 x [110 x i32]], ptr @sumAcc, i64 0, i64 %indvars.iv107, i64 %indvars.iv102
  %118 = load i32, ptr %117, align 4, !tbaa !5
  store i32 %118, ptr %3, align 4, !tbaa !5
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %120 = load i32, ptr %119, align 4, !tbaa !5
  store i32 %120, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1
  %121 = load i32, ptr %1, align 4, !tbaa !5
  %122 = trunc nuw i64 %indvars.iv.next103 to i32
  %123 = icmp sgt i32 %121, %122
  br i1 %123, label %.thread52, label %._crit_edge62, !llvm.loop !16
}

; 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 memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4 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)) #5

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 = { 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 #4 = { 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 #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 = { 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, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.peeled.count", i32 1}
!12 = distinct !{!12, !10, !13}
!13 = !{!"llvm.loop.unswitch.partial.disable"}
!14 = distinct !{!14, !10, !11}
!15 = distinct !{!15, !10, !13}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10, !13}
!18 = distinct !{!18, !10, !13}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass