; LLVM IR from AnneLivia/Competitive-Programming :: Online Judges/Neps Academy/Magic Square - CODCAD (main)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [10 x [10 x i32]], align 16
  %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
  %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
  %19 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 400, ptr %2) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #4
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %20 = 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)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %44, %0
  %22 = load i32, ptr %7, align 4, !tbaa !5
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  store i32 2, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %47

26:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %40, %26
  %28 = load i32, ptr %9, align 4, !tbaa !5
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = icmp slt i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  store i32 5, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %43

32:                                               ; preds = %27
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %34
  %36 = load i32, ptr %9, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [10 x i32], ptr %35, i64 0, 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 = %32
  %41 = load i32, ptr %9, align 4, !tbaa !5
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %9, align 4, !tbaa !5
  br label %27, !llvm.loop !9

43:                                               ; preds = %31
  br label %44

44:                                               ; preds = %43
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %7, align 4, !tbaa !5
  br label %21, !llvm.loop !11

47:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %48

48:                                               ; preds = %73, %47
  %49 = load i32, ptr %10, align 4, !tbaa !5
  %50 = icmp slt i32 %49, 1
  br i1 %50, label %52, label %51

51:                                               ; preds = %48
  store i32 8, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %76

52:                                               ; preds = %48
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %53

53:                                               ; preds = %68, %52
  %54 = load i32, ptr %11, align 4, !tbaa !5
  %55 = load i32, ptr %3, align 4, !tbaa !5
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 11, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %71

58:                                               ; preds = %53
  %59 = load i32, ptr %10, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %60
  %62 = load i32, ptr %11, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [10 x i32], ptr %61, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !5
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = add nsw i32 %66, %65
  store i32 %67, ptr %5, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %58
  %69 = load i32, ptr %11, align 4, !tbaa !5
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %11, align 4, !tbaa !5
  br label %53, !llvm.loop !12

71:                                               ; preds = %57
  %72 = load i32, ptr %5, align 4, !tbaa !5
  store i32 %72, ptr %6, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %71
  %74 = load i32, ptr %10, align 4, !tbaa !5
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %10, align 4, !tbaa !5
  br label %48, !llvm.loop !13

76:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %109, %76
  %78 = load i32, ptr %12, align 4, !tbaa !5
  %79 = load i32, ptr %3, align 4, !tbaa !5
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 14, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  br label %112

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

83:                                               ; preds = %98, %82
  %84 = load i32, ptr %13, align 4, !tbaa !5
  %85 = load i32, ptr %3, align 4, !tbaa !5
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %88, label %87

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

88:                                               ; preds = %83
  %89 = load i32, ptr %12, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %90
  %92 = load i32, ptr %13, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [10 x i32], ptr %91, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = load i32, ptr %5, align 4, !tbaa !5
  %97 = add nsw i32 %96, %95
  store i32 %97, ptr %5, align 4, !tbaa !5
  br label %98

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

101:                                              ; preds = %87
  %102 = load i32, ptr %5, align 4, !tbaa !5
  %103 = load i32, ptr %6, align 4, !tbaa !5
  %104 = icmp eq i32 %102, %103
  br i1 %104, label %105, label %108

105:                                              ; preds = %101
  %106 = load i32, ptr %4, align 4, !tbaa !5
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %4, align 4, !tbaa !5
  br label %108

108:                                              ; preds = %105, %101
  br label %109

109:                                              ; preds = %108
  %110 = load i32, ptr %12, align 4, !tbaa !5
  %111 = add nsw i32 %110, 1
  store i32 %111, ptr %12, align 4, !tbaa !5
  br label %77, !llvm.loop !15

112:                                              ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %145, %112
  %114 = load i32, ptr %14, align 4, !tbaa !5
  %115 = load i32, ptr %3, align 4, !tbaa !5
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %118, label %117

117:                                              ; preds = %113
  store i32 20, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %148

118:                                              ; preds = %113
  store i32 0, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %119

119:                                              ; preds = %134, %118
  %120 = load i32, ptr %15, align 4, !tbaa !5
  %121 = load i32, ptr %3, align 4, !tbaa !5
  %122 = icmp slt i32 %120, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  store i32 23, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %137

124:                                              ; preds = %119
  %125 = load i32, ptr %15, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %126
  %128 = load i32, ptr %14, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [10 x i32], ptr %127, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = load i32, ptr %5, align 4, !tbaa !5
  %133 = add nsw i32 %132, %131
  store i32 %133, ptr %5, align 4, !tbaa !5
  br label %134

134:                                              ; preds = %124
  %135 = load i32, ptr %15, align 4, !tbaa !5
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %15, align 4, !tbaa !5
  br label %119, !llvm.loop !16

137:                                              ; preds = %123
  %138 = load i32, ptr %5, align 4, !tbaa !5
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = icmp eq i32 %138, %139
  br i1 %140, label %141, label %144

141:                                              ; preds = %137
  %142 = load i32, ptr %4, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %4, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %141, %137
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %14, align 4, !tbaa !5
  %147 = add nsw i32 %146, 1
  store i32 %147, ptr %14, align 4, !tbaa !5
  br label %113, !llvm.loop !17

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

149:                                              ; preds = %179, %148
  %150 = load i32, ptr %16, align 4, !tbaa !5
  %151 = load i32, ptr %3, align 4, !tbaa !5
  %152 = icmp slt i32 %150, %151
  br i1 %152, label %154, label %153

153:                                              ; preds = %149
  store i32 26, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %182

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

155:                                              ; preds = %175, %154
  %156 = load i32, ptr %17, align 4, !tbaa !5
  %157 = load i32, ptr %3, align 4, !tbaa !5
  %158 = icmp slt i32 %156, %157
  br i1 %158, label %160, label %159

159:                                              ; preds = %155
  store i32 29, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %178

160:                                              ; preds = %155
  %161 = load i32, ptr %16, align 4, !tbaa !5
  %162 = load i32, ptr %17, align 4, !tbaa !5
  %163 = icmp eq i32 %161, %162
  br i1 %163, label %164, label %174

164:                                              ; preds = %160
  %165 = load i32, ptr %16, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %166
  %168 = load i32, ptr %17, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [10 x i32], ptr %167, i64 0, i64 %169
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = load i32, ptr %5, align 4, !tbaa !5
  %173 = add nsw i32 %172, %171
  store i32 %173, ptr %5, align 4, !tbaa !5
  br label %174

174:                                              ; preds = %164, %160
  br label %175

175:                                              ; preds = %174
  %176 = load i32, ptr %17, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %17, align 4, !tbaa !5
  br label %155, !llvm.loop !18

178:                                              ; preds = %159
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %16, align 4, !tbaa !5
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %16, align 4, !tbaa !5
  br label %149, !llvm.loop !19

182:                                              ; preds = %153
  %183 = load i32, ptr %5, align 4, !tbaa !5
  %184 = load i32, ptr %6, align 4, !tbaa !5
  %185 = icmp eq i32 %183, %184
  br i1 %185, label %186, label %189

186:                                              ; preds = %182
  %187 = load i32, ptr %4, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %4, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %186, %182
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %190 = load i32, ptr %3, align 4, !tbaa !5
  %191 = sub nsw i32 %190, 1
  store i32 %191, ptr %19, align 4, !tbaa !5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %192

192:                                              ; preds = %195, %189
  %193 = load i32, ptr %19, align 4, !tbaa !5
  %194 = icmp sge i32 %193, 0
  br i1 %194, label %195, label %207

195:                                              ; preds = %192
  %196 = load i32, ptr %18, align 4, !tbaa !5
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %18, align 4, !tbaa !5
  %198 = sext i32 %196 to i64
  %199 = getelementptr inbounds [10 x [10 x i32]], ptr %2, i64 0, i64 %198
  %200 = load i32, ptr %19, align 4, !tbaa !5
  %201 = add nsw i32 %200, -1
  store i32 %201, ptr %19, align 4, !tbaa !5
  %202 = sext i32 %200 to i64
  %203 = getelementptr inbounds [10 x i32], ptr %199, i64 0, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = load i32, ptr %5, align 4, !tbaa !5
  %206 = add nsw i32 %205, %204
  store i32 %206, ptr %5, align 4, !tbaa !5
  br label %192, !llvm.loop !20

207:                                              ; preds = %192
  %208 = load i32, ptr %5, align 4, !tbaa !5
  %209 = load i32, ptr %6, align 4, !tbaa !5
  %210 = icmp eq i32 %208, %209
  br i1 %210, label %211, label %214

211:                                              ; preds = %207
  %212 = load i32, ptr %4, align 4, !tbaa !5
  %213 = add nsw i32 %212, 1
  store i32 %213, ptr %4, align 4, !tbaa !5
  br label %214

214:                                              ; preds = %211, %207
  %215 = load i32, ptr %4, align 4, !tbaa !5
  %216 = load i32, ptr %3, align 4, !tbaa !5
  %217 = mul nsw i32 2, %216
  %218 = add nsw i32 %217, 2
  %219 = icmp eq i32 %215, %218
  br i1 %219, label %220, label %224

220:                                              ; preds = %214
  %221 = load i32, ptr %6, align 4, !tbaa !5
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %221)
  %223 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %222, ptr noundef @.str)
  br label %226

224:                                              ; preds = %214
  %225 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  br label %226

226:                                              ; preds = %224, %220
  store i32 0, ptr %1, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 400, ptr %2) #4
  %227 = load i32, ptr %1, align 4
  ret i32 %227
}

; 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 uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #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 = { 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 #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = 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}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !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" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [10 x [10 x i32]], align 16
  %2 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %3 = 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)
  %4 = load i32, ptr %2, align 4, !tbaa !5
  %5 = icmp sgt i32 %4, 0
  br i1 %5, label %.preheader85, label %._crit_edge118.thread

.preheader85:                                     ; preds = %0, %._crit_edge
  %6 = phi i32 [ %18, %._crit_edge ], [ %4, %0 ]
  %indvars.iv135 = phi i64 [ %indvars.iv.next136, %._crit_edge ], [ 0, %0 ]
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph, label %.preheader85.._crit_edge_crit_edge

.preheader85.._crit_edge_crit_edge:               ; preds = %.preheader85
  %.pre = sext i32 %6 to i64
  br label %._crit_edge

.preheader84:                                     ; preds = %._crit_edge
  %8 = icmp sgt i32 %18, 0
  br i1 %8, label %.preheader83.us.preheader, label %._crit_edge118.thread

.preheader83.us.preheader:                        ; preds = %.preheader84
  %wide.trip.count = zext nneg i32 %18 to i64
  %min.iters.check = icmp ult i32 %18, 8
  br i1 %min.iters.check, label %.preheader83.us.preheader260, label %vector.ph

vector.ph:                                        ; preds = %.preheader83.us.preheader
  %n.vec = and i64 %wide.trip.count, 2147483640
  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 ], [ %11, %vector.body ]
  %vec.phi220 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %12, %vector.body ]
  %9 = getelementptr inbounds [10 x i32], ptr %1, i64 0, i64 %index
  %10 = getelementptr inbounds i8, ptr %9, i64 16
  %wide.load = load <4 x i32>, ptr %9, align 16, !tbaa !5
  %wide.load221 = load <4 x i32>, ptr %10, align 16, !tbaa !5
  %11 = add <4 x i32> %wide.load, %vec.phi
  %12 = add <4 x i32> %wide.load221, %vec.phi220
  %index.next = add nuw i64 %index, 8
  %13 = icmp eq i64 %index.next, %n.vec
  br i1 %13, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %12, %11
  %14 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.preheader82, label %.preheader83.us.preheader260

.preheader83.us.preheader260:                     ; preds = %middle.block, %.preheader83.us.preheader
  %indvars.iv138.ph = phi i64 [ 0, %.preheader83.us.preheader ], [ %n.vec, %middle.block ]
  %.06888.us.ph = phi i32 [ 0, %.preheader83.us.preheader ], [ %14, %middle.block ]
  br label %.preheader83.us

.preheader83.us:                                  ; preds = %.preheader83.us.preheader260, %.preheader83.us
  %indvars.iv138 = phi i64 [ %indvars.iv.next139, %.preheader83.us ], [ %indvars.iv138.ph, %.preheader83.us.preheader260 ]
  %.06888.us = phi i32 [ %17, %.preheader83.us ], [ %.06888.us.ph, %.preheader83.us.preheader260 ]
  %15 = getelementptr inbounds [10 x i32], ptr %1, i64 0, i64 %indvars.iv138
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = add nsw i32 %16, %.06888.us
  %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next139, %wide.trip.count
  br i1 %exitcond.not, label %.preheader82, label %.preheader83.us, !llvm.loop !13

._crit_edge:                                      ; preds = %.lr.ph, %.preheader85.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.preheader85.._crit_edge_crit_edge ], [ %23, %.lr.ph ]
  %18 = phi i32 [ %6, %.preheader85.._crit_edge_crit_edge ], [ %22, %.lr.ph ]
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %19 = icmp slt i64 %indvars.iv.next136, %.pre-phi
  br i1 %19, label %.preheader85, label %.preheader84, !llvm.loop !14

.lr.ph:                                           ; preds = %.preheader85, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.preheader85 ]
  %20 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv135, i64 %indvars.iv
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr %2, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next, %23
  br i1 %24, label %.lr.ph, label %._crit_edge, !llvm.loop !16

.preheader82:                                     ; preds = %.preheader83.us, %middle.block
  %.lcssa216 = phi i32 [ %14, %middle.block ], [ %17, %.preheader83.us ]
  br i1 %8, label %.preheader81.us.preheader, label %._crit_edge118.thread

.preheader81.us.preheader:                        ; preds = %.preheader82
  %wide.trip.count149 = zext nneg i32 %18 to i64
  %min.iters.check224 = icmp ult i32 %18, 8
  %n.vec227 = and i64 %wide.trip.count, 2147483640
  %cmp.n237 = icmp eq i64 %n.vec227, %wide.trip.count
  br label %.preheader81.us

.preheader81.us:                                  ; preds = %.preheader81.us.preheader, %._crit_edge96.us
  %indvars.iv146 = phi i64 [ 0, %.preheader81.us.preheader ], [ %indvars.iv.next147, %._crit_edge96.us ]
  %.06998.us = phi i32 [ 0, %.preheader81.us.preheader ], [ %spec.select.us, %._crit_edge96.us ]
  br i1 %min.iters.check224, label %scalar.ph223.preheader, label %vector.body229

vector.body229:                                   ; preds = %.preheader81.us, %vector.body229
  %index230 = phi i64 [ %index.next235, %vector.body229 ], [ 0, %.preheader81.us ]
  %vec.phi231 = phi <4 x i32> [ %27, %vector.body229 ], [ zeroinitializer, %.preheader81.us ]
  %vec.phi232 = phi <4 x i32> [ %28, %vector.body229 ], [ zeroinitializer, %.preheader81.us ]
  %25 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv146, i64 %index230
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %wide.load233 = load <4 x i32>, ptr %25, align 8, !tbaa !5
  %wide.load234 = load <4 x i32>, ptr %26, align 8, !tbaa !5
  %27 = add <4 x i32> %wide.load233, %vec.phi231
  %28 = add <4 x i32> %wide.load234, %vec.phi232
  %index.next235 = add nuw i64 %index230, 8
  %29 = icmp eq i64 %index.next235, %n.vec227
  br i1 %29, label %middle.block222, label %vector.body229, !llvm.loop !17

middle.block222:                                  ; preds = %vector.body229
  %bin.rdx236 = add <4 x i32> %28, %27
  %30 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx236)
  br i1 %cmp.n237, label %._crit_edge96.us, label %scalar.ph223.preheader

scalar.ph223.preheader:                           ; preds = %middle.block222, %.preheader81.us
  %indvars.iv141.ph = phi i64 [ 0, %.preheader81.us ], [ %n.vec227, %middle.block222 ]
  %.193.us.ph = phi i32 [ 0, %.preheader81.us ], [ %30, %middle.block222 ]
  br label %scalar.ph223

scalar.ph223:                                     ; preds = %scalar.ph223.preheader, %scalar.ph223
  %indvars.iv141 = phi i64 [ %indvars.iv.next142, %scalar.ph223 ], [ %indvars.iv141.ph, %scalar.ph223.preheader ]
  %.193.us = phi i32 [ %33, %scalar.ph223 ], [ %.193.us.ph, %scalar.ph223.preheader ]
  %31 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv146, i64 %indvars.iv141
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = add nsw i32 %32, %.193.us
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %exitcond145.not = icmp eq i64 %indvars.iv.next142, %wide.trip.count149
  br i1 %exitcond145.not, label %._crit_edge96.us, label %scalar.ph223, !llvm.loop !18

._crit_edge96.us:                                 ; preds = %scalar.ph223, %middle.block222
  %.lcssa215 = phi i32 [ %30, %middle.block222 ], [ %33, %scalar.ph223 ]
  %34 = icmp eq i32 %.lcssa215, %.lcssa216
  %35 = zext i1 %34 to i32
  %spec.select.us = add nuw nsw i32 %.06998.us, %35
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %exitcond150.not = icmp eq i64 %indvars.iv.next147, %wide.trip.count149
  br i1 %exitcond150.not, label %.preheader80, label %.preheader81.us, !llvm.loop !19

.preheader80:                                     ; preds = %._crit_edge96.us
  br i1 %8, label %.preheader79.us.preheader, label %._crit_edge118.thread

.preheader79.us.preheader:                        ; preds = %.preheader80
  %wide.trip.count159 = zext nneg i32 %18 to i64
  %min.iters.check241 = icmp ult i32 %18, 8
  %n.vec244 = and i64 %wide.trip.count, 2147483640
  %cmp.n252 = icmp eq i64 %n.vec244, %wide.trip.count
  br label %.preheader79.us

.preheader79.us:                                  ; preds = %.preheader79.us.preheader, %._crit_edge105.us
  %indvars.iv156 = phi i64 [ 0, %.preheader79.us.preheader ], [ %indvars.iv.next157, %._crit_edge105.us ]
  %.271107.us = phi i32 [ %spec.select.us, %.preheader79.us.preheader ], [ %spec.select75.us, %._crit_edge105.us ]
  br i1 %min.iters.check241, label %scalar.ph240.preheader, label %vector.body246

vector.body246:                                   ; preds = %.preheader79.us, %vector.body246
  %index247 = phi i64 [ %index.next250, %vector.body246 ], [ 0, %.preheader79.us ]
  %vec.phi248 = phi <4 x i32> [ %67, %vector.body246 ], [ zeroinitializer, %.preheader79.us ]
  %vec.phi249 = phi <4 x i32> [ %68, %vector.body246 ], [ zeroinitializer, %.preheader79.us ]
  %36 = or disjoint i64 %index247, 1
  %37 = or disjoint i64 %index247, 2
  %38 = or disjoint i64 %index247, 3
  %39 = or disjoint i64 %index247, 4
  %40 = or disjoint i64 %index247, 5
  %41 = or disjoint i64 %index247, 6
  %42 = or disjoint i64 %index247, 7
  %43 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %index247, i64 %indvars.iv156
  %44 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %36, i64 %indvars.iv156
  %45 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %37, i64 %indvars.iv156
  %46 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %38, i64 %indvars.iv156
  %47 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %39, i64 %indvars.iv156
  %48 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %40, i64 %indvars.iv156
  %49 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %41, i64 %indvars.iv156
  %50 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %42, i64 %indvars.iv156
  %51 = load i32, ptr %43, align 4, !tbaa !5
  %52 = load i32, ptr %44, align 4, !tbaa !5
  %53 = load i32, ptr %45, align 4, !tbaa !5
  %54 = load i32, ptr %46, align 4, !tbaa !5
  %55 = insertelement <4 x i32> poison, i32 %51, i64 0
  %56 = insertelement <4 x i32> %55, i32 %52, i64 1
  %57 = insertelement <4 x i32> %56, i32 %53, i64 2
  %58 = insertelement <4 x i32> %57, i32 %54, i64 3
  %59 = load i32, ptr %47, align 4, !tbaa !5
  %60 = load i32, ptr %48, align 4, !tbaa !5
  %61 = load i32, ptr %49, align 4, !tbaa !5
  %62 = load i32, ptr %50, align 4, !tbaa !5
  %63 = insertelement <4 x i32> poison, i32 %59, i64 0
  %64 = insertelement <4 x i32> %63, i32 %60, i64 1
  %65 = insertelement <4 x i32> %64, i32 %61, i64 2
  %66 = insertelement <4 x i32> %65, i32 %62, i64 3
  %67 = add <4 x i32> %58, %vec.phi248
  %68 = add <4 x i32> %66, %vec.phi249
  %index.next250 = add nuw i64 %index247, 8
  %69 = icmp eq i64 %index.next250, %n.vec244
  br i1 %69, label %middle.block239, label %vector.body246, !llvm.loop !20

middle.block239:                                  ; preds = %vector.body246
  %bin.rdx251 = add <4 x i32> %68, %67
  %70 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx251)
  br i1 %cmp.n252, label %._crit_edge105.us, label %scalar.ph240.preheader

scalar.ph240.preheader:                           ; preds = %middle.block239, %.preheader79.us
  %indvars.iv151.ph = phi i64 [ 0, %.preheader79.us ], [ %n.vec244, %middle.block239 ]
  %.2102.us.ph = phi i32 [ 0, %.preheader79.us ], [ %70, %middle.block239 ]
  br label %scalar.ph240

scalar.ph240:                                     ; preds = %scalar.ph240.preheader, %scalar.ph240
  %indvars.iv151 = phi i64 [ %indvars.iv.next152, %scalar.ph240 ], [ %indvars.iv151.ph, %scalar.ph240.preheader ]
  %.2102.us = phi i32 [ %73, %scalar.ph240 ], [ %.2102.us.ph, %scalar.ph240.preheader ]
  %71 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv151, i64 %indvars.iv156
  %72 = load i32, ptr %71, align 4, !tbaa !5
  %73 = add nsw i32 %72, %.2102.us
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %exitcond155.not = icmp eq i64 %indvars.iv.next152, %wide.trip.count159
  br i1 %exitcond155.not, label %._crit_edge105.us, label %scalar.ph240, !llvm.loop !21

._crit_edge105.us:                                ; preds = %scalar.ph240, %middle.block239
  %.lcssa214 = phi i32 [ %70, %middle.block239 ], [ %73, %scalar.ph240 ]
  %74 = icmp eq i32 %.lcssa214, %.lcssa216
  %75 = zext i1 %74 to i32
  %spec.select75.us = add nuw nsw i32 %.271107.us, %75
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %exitcond160.not = icmp eq i64 %indvars.iv.next157, %wide.trip.count159
  br i1 %exitcond160.not, label %.preheader78, label %.preheader79.us, !llvm.loop !22

.preheader78:                                     ; preds = %._crit_edge105.us
  br i1 %8, label %.preheader.us.preheader, label %._crit_edge118.thread

.preheader.us.preheader:                          ; preds = %.preheader78
  %wide.trip.count169 = zext nneg i32 %18 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %76 = icmp ult i32 %18, 4
  %unroll_iter = and i64 %wide.trip.count, 2147483644
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge114.us
  %indvars.iv166 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next167, %._crit_edge114.us ]
  %.3116.us = phi i32 [ 0, %.preheader.us.preheader ], [ %.5.us.lcssa, %._crit_edge114.us ]
  %77 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv166, i64 %indvars.iv166
  br i1 %76, label %._crit_edge114.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %97
  %indvars.iv161 = phi i64 [ %indvars.iv.next162.3, %97 ], [ 0, %.preheader.us ]
  %.4111.us = phi i32 [ %.5.us.3, %97 ], [ %.3116.us, %.preheader.us ]
  %niter = phi i64 [ %niter.next.3, %97 ], [ 0, %.preheader.us ]
  %78 = icmp eq i64 %indvars.iv166, %indvars.iv161
  br i1 %78, label %79, label %82

79:                                               ; preds = %.preheader.us.new
  %80 = load i32, ptr %77, align 4, !tbaa !5
  %81 = add nsw i32 %80, %.4111.us
  br label %82

82:                                               ; preds = %79, %.preheader.us.new
  %.5.us = phi i32 [ %81, %79 ], [ %.4111.us, %.preheader.us.new ]
  %indvars.iv.next162 = or disjoint i64 %indvars.iv161, 1
  %83 = icmp eq i64 %indvars.iv166, %indvars.iv.next162
  br i1 %83, label %84, label %87

84:                                               ; preds = %82
  %85 = load i32, ptr %77, align 4, !tbaa !5
  %86 = add nsw i32 %85, %.5.us
  br label %87

87:                                               ; preds = %84, %82
  %.5.us.1 = phi i32 [ %86, %84 ], [ %.5.us, %82 ]
  %indvars.iv.next162.1 = or disjoint i64 %indvars.iv161, 2
  %88 = icmp eq i64 %indvars.iv166, %indvars.iv.next162.1
  br i1 %88, label %89, label %92

89:                                               ; preds = %87
  %90 = load i32, ptr %77, align 4, !tbaa !5
  %91 = add nsw i32 %90, %.5.us.1
  br label %92

92:                                               ; preds = %89, %87
  %.5.us.2 = phi i32 [ %91, %89 ], [ %.5.us.1, %87 ]
  %indvars.iv.next162.2 = or disjoint i64 %indvars.iv161, 3
  %93 = icmp eq i64 %indvars.iv166, %indvars.iv.next162.2
  br i1 %93, label %94, label %97

94:                                               ; preds = %92
  %95 = load i32, ptr %77, align 4, !tbaa !5
  %96 = add nsw i32 %95, %.5.us.2
  br label %97

97:                                               ; preds = %94, %92
  %.5.us.3 = phi i32 [ %96, %94 ], [ %.5.us.2, %92 ]
  %indvars.iv.next162.3 = add nuw nsw i64 %indvars.iv161, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge114.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !23

._crit_edge114.us.unr-lcssa:                      ; preds = %97, %.preheader.us
  %.5.us.lcssa.ph = phi i32 [ poison, %.preheader.us ], [ %.5.us.3, %97 ]
  %indvars.iv161.unr = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next162.3, %97 ]
  %.4111.us.unr = phi i32 [ %.3116.us, %.preheader.us ], [ %.5.us.3, %97 ]
  br i1 %lcmp.mod.not, label %._crit_edge114.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge114.us.unr-lcssa, %102
  %indvars.iv161.epil = phi i64 [ %indvars.iv.next162.epil, %102 ], [ %indvars.iv161.unr, %._crit_edge114.us.unr-lcssa ]
  %.4111.us.epil = phi i32 [ %.5.us.epil, %102 ], [ %.4111.us.unr, %._crit_edge114.us.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %102 ], [ 0, %._crit_edge114.us.unr-lcssa ]
  %98 = icmp eq i64 %indvars.iv166, %indvars.iv161.epil
  br i1 %98, label %99, label %102

99:                                               ; preds = %.epil.preheader
  %100 = load i32, ptr %77, align 4, !tbaa !5
  %101 = add nsw i32 %100, %.4111.us.epil
  br label %102

102:                                              ; preds = %99, %.epil.preheader
  %.5.us.epil = phi i32 [ %101, %99 ], [ %.4111.us.epil, %.epil.preheader ]
  %indvars.iv.next162.epil = add nuw nsw i64 %indvars.iv161.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge114.us, label %.epil.preheader, !llvm.loop !24

._crit_edge114.us:                                ; preds = %102, %._crit_edge114.us.unr-lcssa
  %.5.us.lcssa = phi i32 [ %.5.us.lcssa.ph, %._crit_edge114.us.unr-lcssa ], [ %.5.us.epil, %102 ]
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  %exitcond170.not = icmp eq i64 %indvars.iv.next167, %wide.trip.count169
  br i1 %exitcond170.not, label %._crit_edge118, label %.preheader.us, !llvm.loop !26

._crit_edge118.thread:                            ; preds = %.preheader78, %.preheader80, %.preheader82, %.preheader84, %0
  %.271.lcssa198.ph = phi i32 [ %spec.select75.us, %.preheader78 ], [ %spec.select.us, %.preheader80 ], [ 0, %.preheader82 ], [ 0, %.preheader84 ], [ 0, %0 ]
  %.us-phi92185190197.ph = phi i32 [ %.lcssa216, %.preheader78 ], [ %.lcssa216, %.preheader80 ], [ %.lcssa216, %.preheader82 ], [ 0, %.preheader84 ], [ 0, %0 ]
  %.lcssa181184191196.ph = phi i32 [ %18, %.preheader78 ], [ %18, %.preheader80 ], [ %18, %.preheader82 ], [ %18, %.preheader84 ], [ %4, %0 ]
  %103 = icmp eq i32 %.us-phi92185190197.ph, 0
  %104 = zext i1 %103 to i32
  %spec.select76204 = add nsw i32 %.271.lcssa198.ph, %104
  br label %._crit_edge126

._crit_edge118:                                   ; preds = %._crit_edge114.us
  %105 = icmp eq i32 %.5.us.lcssa, %.lcssa216
  %106 = zext i1 %105 to i32
  %spec.select76 = add nuw nsw i32 %spec.select75.us, %106
  br i1 %8, label %.lr.ph125.preheader, label %._crit_edge126

.lr.ph125.preheader:                              ; preds = %._crit_edge118
  %107 = zext nneg i32 %18 to i64
  %xtraiter268 = and i64 %wide.trip.count, 3
  %108 = icmp ult i32 %18, 4
  br i1 %108, label %._crit_edge126.loopexit.unr-lcssa, label %.lr.ph125.preheader.new

.lr.ph125.preheader.new:                          ; preds = %.lr.ph125.preheader
  %unroll_iter272 = and i64 %wide.trip.count, 2147483644
  br label %.lr.ph125

.lr.ph125:                                        ; preds = %.lr.ph125, %.lr.ph125.preheader.new
  %indvars.iv173 = phi i64 [ 0, %.lr.ph125.preheader.new ], [ %indvars.iv.next174.3, %.lr.ph125 ]
  %indvars.iv171 = phi i64 [ %107, %.lr.ph125.preheader.new ], [ %indvars.iv.next172.3, %.lr.ph125 ]
  %.6121 = phi i32 [ 0, %.lr.ph125.preheader.new ], [ %120, %.lr.ph125 ]
  %niter273 = phi i64 [ 0, %.lr.ph125.preheader.new ], [ %niter273.next.3, %.lr.ph125 ]
  %indvars.iv.next172 = add nsw i64 %indvars.iv171, -1
  %indvars.iv.next174 = or disjoint i64 %indvars.iv173, 1
  %109 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv173, i64 %indvars.iv.next172
  %110 = load i32, ptr %109, align 4, !tbaa !5
  %111 = add nsw i32 %110, %.6121
  %indvars.iv.next172.1 = add nsw i64 %indvars.iv171, -2
  %indvars.iv.next174.1 = or disjoint i64 %indvars.iv173, 2
  %112 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv.next174, i64 %indvars.iv.next172.1
  %113 = load i32, ptr %112, align 4, !tbaa !5
  %114 = add nsw i32 %113, %111
  %indvars.iv.next172.2 = add nsw i64 %indvars.iv171, -3
  %indvars.iv.next174.2 = or disjoint i64 %indvars.iv173, 3
  %115 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv.next174.1, i64 %indvars.iv.next172.2
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = add nsw i32 %116, %114
  %indvars.iv.next172.3 = add nsw i64 %indvars.iv171, -4
  %indvars.iv.next174.3 = add nuw nsw i64 %indvars.iv173, 4
  %118 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv.next174.2, i64 %indvars.iv.next172.3
  %119 = load i32, ptr %118, align 4, !tbaa !5
  %120 = add nsw i32 %119, %117
  %niter273.next.3 = add i64 %niter273, 4
  %niter273.ncmp.3 = icmp eq i64 %niter273.next.3, %unroll_iter272
  br i1 %niter273.ncmp.3, label %._crit_edge126.loopexit.unr-lcssa, label %.lr.ph125, !llvm.loop !27

._crit_edge126.loopexit.unr-lcssa:                ; preds = %.lr.ph125, %.lr.ph125.preheader
  %.lcssa.ph = phi i32 [ poison, %.lr.ph125.preheader ], [ %120, %.lr.ph125 ]
  %indvars.iv173.unr = phi i64 [ 0, %.lr.ph125.preheader ], [ %indvars.iv.next174.3, %.lr.ph125 ]
  %indvars.iv171.unr = phi i64 [ %107, %.lr.ph125.preheader ], [ %indvars.iv.next172.3, %.lr.ph125 ]
  %.6121.unr = phi i32 [ 0, %.lr.ph125.preheader ], [ %120, %.lr.ph125 ]
  %lcmp.mod270.not = icmp eq i64 %xtraiter268, 0
  br i1 %lcmp.mod270.not, label %._crit_edge126, label %.lr.ph125.epil

.lr.ph125.epil:                                   ; preds = %._crit_edge126.loopexit.unr-lcssa, %.lr.ph125.epil
  %indvars.iv173.epil = phi i64 [ %indvars.iv.next174.epil, %.lr.ph125.epil ], [ %indvars.iv173.unr, %._crit_edge126.loopexit.unr-lcssa ]
  %indvars.iv171.epil = phi i64 [ %indvars.iv.next172.epil, %.lr.ph125.epil ], [ %indvars.iv171.unr, %._crit_edge126.loopexit.unr-lcssa ]
  %.6121.epil = phi i32 [ %123, %.lr.ph125.epil ], [ %.6121.unr, %._crit_edge126.loopexit.unr-lcssa ]
  %epil.iter269 = phi i64 [ %epil.iter269.next, %.lr.ph125.epil ], [ 0, %._crit_edge126.loopexit.unr-lcssa ]
  %indvars.iv.next172.epil = add nsw i64 %indvars.iv171.epil, -1
  %indvars.iv.next174.epil = add nuw nsw i64 %indvars.iv173.epil, 1
  %121 = getelementptr inbounds [10 x [10 x i32]], ptr %1, i64 0, i64 %indvars.iv173.epil, i64 %indvars.iv.next172.epil
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = add nsw i32 %122, %.6121.epil
  %epil.iter269.next = add i64 %epil.iter269, 1
  %epil.iter269.cmp.not = icmp eq i64 %epil.iter269.next, %xtraiter268
  br i1 %epil.iter269.cmp.not, label %._crit_edge126, label %.lr.ph125.epil, !llvm.loop !28

._crit_edge126:                                   ; preds = %._crit_edge126.loopexit.unr-lcssa, %.lr.ph125.epil, %._crit_edge118.thread, %._crit_edge118
  %spec.select76207 = phi i32 [ %spec.select76, %._crit_edge118 ], [ %spec.select76204, %._crit_edge118.thread ], [ %spec.select76, %.lr.ph125.epil ], [ %spec.select76, %._crit_edge126.loopexit.unr-lcssa ]
  %.lcssa181184191196206 = phi i32 [ %18, %._crit_edge118 ], [ %.lcssa181184191196.ph, %._crit_edge118.thread ], [ %18, %.lr.ph125.epil ], [ %18, %._crit_edge126.loopexit.unr-lcssa ]
  %.us-phi92185190197205 = phi i32 [ %.lcssa216, %._crit_edge118 ], [ %.us-phi92185190197.ph, %._crit_edge118.thread ], [ %.lcssa216, %.lr.ph125.epil ], [ %.lcssa216, %._crit_edge126.loopexit.unr-lcssa ]
  %.6.lcssa = phi i32 [ 0, %._crit_edge118 ], [ 0, %._crit_edge118.thread ], [ %.lcssa.ph, %._crit_edge126.loopexit.unr-lcssa ], [ %123, %.lr.ph125.epil ]
  %124 = icmp eq i32 %.6.lcssa, %.us-phi92185190197205
  %125 = zext i1 %124 to i32
  %spec.select77 = add nsw i32 %spec.select76207, %125
  %126 = shl nsw i32 %.lcssa181184191196206, 1
  %127 = add nsw i32 %126, 2
  %128 = icmp eq i32 %spec.select77, %127
  br i1 %128, label %129, label %132

129:                                              ; preds = %._crit_edge126
  %130 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %.us-phi92185190197205)
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %130, ptr noundef nonnull @.str)
  br label %134

132:                                              ; preds = %._crit_edge126
  %133 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  br label %134

134:                                              ; preds = %132, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %1) #5
  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 memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) 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: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4

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


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