; LLVM IR from eyangch/competitive-programming :: USACOcontests/gold/2018.02 (taming)

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

@N = external dso_local global i32, align 4
@a = external dso_local global [100 x i32], align 16
@dp = external dso_local global [100 x [100 x i32]], align 16
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; 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
  %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
  store i32 0, ptr %1, align 4
  %17 = load ptr, ptr @stdin, align 8, !tbaa !5
  %18 = call ptr @freopen(ptr noundef @.str, ptr noundef @.str.1, ptr noundef %17)
  %19 = load ptr, ptr @stdout, align 8, !tbaa !5
  %20 = call ptr @freopen(ptr noundef @.str.2, ptr noundef @.str.3, ptr noundef %19)
  %21 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %22 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !9
  %23 = getelementptr i8, ptr %22, i64 -24
  %24 = load i64, ptr %23, align 8
  %25 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %24
  %26 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %25, ptr noundef null)
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !11
  br label %28

28:                                               ; preds = %38, %0
  %29 = load i32, ptr %2, align 4, !tbaa !11
  %30 = load i32, ptr @N, align 4, !tbaa !11
  %31 = icmp slt i32 %29, %30
  br i1 %31, label %33, label %32

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

33:                                               ; preds = %28
  %34 = load i32, ptr %2, align 4, !tbaa !11
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %35
  %37 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %36)
  br label %38

38:                                               ; preds = %33
  %39 = load i32, ptr %2, align 4, !tbaa !11
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %2, align 4, !tbaa !11
  br label %28, !llvm.loop !13

41:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !11
  br label %42

42:                                               ; preds = %65, %41
  %43 = load i32, ptr %3, align 4, !tbaa !11
  %44 = load i32, ptr @N, align 4, !tbaa !11
  %45 = icmp slt i32 %43, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %68

47:                                               ; preds = %42
  %48 = load i32, ptr %3, align 4, !tbaa !11
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !11
  %52 = load i32, ptr %3, align 4, !tbaa !11
  %53 = icmp ne i32 %51, %52
  %54 = zext i1 %53 to i32
  %55 = load i32, ptr %3, align 4, !tbaa !11
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [100 x i32], ptr @dp, i64 0, i64 %56
  store i32 %54, ptr %57, align 4, !tbaa !11
  %58 = load i32, ptr %3, align 4, !tbaa !11
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %60, label %64

60:                                               ; preds = %47
  %61 = load i32, ptr %3, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [100 x i32], ptr @dp, i64 0, i64 %62
  store i32 1000000000, ptr %63, align 4, !tbaa !11
  br label %64

64:                                               ; preds = %60, %47
  br label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %3, align 4, !tbaa !11
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %3, align 4, !tbaa !11
  br label %42, !llvm.loop !15

68:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !11
  br label %69

69:                                               ; preds = %157, %68
  %70 = load i32, ptr %4, align 4, !tbaa !11
  %71 = load i32, ptr @N, align 4, !tbaa !11
  %72 = icmp slt i32 %70, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %69
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %160

74:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %75 = load i32, ptr %4, align 4, !tbaa !11
  store i32 %75, ptr %6, align 4, !tbaa !11
  br label %76

76:                                               ; preds = %153, %74
  %77 = load i32, ptr %6, align 4, !tbaa !11
  %78 = load i32, ptr @N, align 4, !tbaa !11
  %79 = icmp slt i32 %77, %78
  br i1 %79, label %81, label %80

80:                                               ; preds = %76
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %156

81:                                               ; preds = %76
  %82 = load i32, ptr %4, align 4, !tbaa !11
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [100 x [100 x i32]], ptr @dp, i64 0, i64 %83
  %85 = load i32, ptr %6, align 4, !tbaa !11
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [100 x i32], ptr %84, i64 0, i64 %86
  store i32 1000000000, ptr %87, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %88 = load i32, ptr %6, align 4, !tbaa !11
  store i32 %88, ptr %7, align 4, !tbaa !11
  br label %89

89:                                               ; preds = %149, %81
  %90 = load i32, ptr %7, align 4, !tbaa !11
  %91 = load i32, ptr %4, align 4, !tbaa !11
  %92 = icmp sge i32 %90, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %89
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %152

94:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %95 = load i32, ptr %6, align 4, !tbaa !11
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !11
  %99 = icmp ne i32 %98, 0
  %100 = zext i1 %99 to i32
  store i32 %100, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  %101 = load i32, ptr %7, align 4, !tbaa !11
  store i32 %101, ptr %9, align 4, !tbaa !11
  br label %102

102:                                              ; preds = %120, %94
  %103 = load i32, ptr %9, align 4, !tbaa !11
  %104 = load i32, ptr %6, align 4, !tbaa !11
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %107, label %106

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

107:                                              ; preds = %102
  %108 = load i32, ptr %9, align 4, !tbaa !11
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %109
  %111 = load i32, ptr %110, align 4, !tbaa !11
  %112 = load i32, ptr %9, align 4, !tbaa !11
  %113 = load i32, ptr %7, align 4, !tbaa !11
  %114 = sub nsw i32 %112, %113
  %115 = add nsw i32 %114, 1
  %116 = icmp ne i32 %111, %115
  %117 = zext i1 %116 to i32
  %118 = load i32, ptr %8, align 4, !tbaa !11
  %119 = add nsw i32 %118, %117
  store i32 %119, ptr %8, align 4, !tbaa !11
  br label %120

120:                                              ; preds = %107
  %121 = load i32, ptr %9, align 4, !tbaa !11
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %9, align 4, !tbaa !11
  br label %102, !llvm.loop !16

123:                                              ; preds = %106
  %124 = load i32, ptr %4, align 4, !tbaa !11
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [100 x [100 x i32]], ptr @dp, i64 0, i64 %125
  %127 = load i32, ptr %6, align 4, !tbaa !11
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [100 x i32], ptr %126, i64 0, i64 %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %130 = load i32, ptr %4, align 4, !tbaa !11
  %131 = sub nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [100 x [100 x i32]], ptr @dp, i64 0, i64 %132
  %134 = load i32, ptr %7, align 4, !tbaa !11
  %135 = sub nsw i32 %134, 1
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [100 x i32], ptr %133, i64 0, i64 %136
  %138 = load i32, ptr %137, align 4, !tbaa !11
  %139 = load i32, ptr %8, align 4, !tbaa !11
  %140 = add nsw i32 %138, %139
  store i32 %140, ptr %10, align 4, !tbaa !11
  %141 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %129, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %142 = load i32, ptr %141, align 4, !tbaa !11
  %143 = load i32, ptr %4, align 4, !tbaa !11
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100 x [100 x i32]], ptr @dp, i64 0, i64 %144
  %146 = load i32, ptr %6, align 4, !tbaa !11
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [100 x i32], ptr %145, i64 0, i64 %147
  store i32 %142, ptr %148, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %149

149:                                              ; preds = %123
  %150 = load i32, ptr %7, align 4, !tbaa !11
  %151 = add nsw i32 %150, -1
  store i32 %151, ptr %7, align 4, !tbaa !11
  br label %89, !llvm.loop !17

152:                                              ; preds = %93
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %6, align 4, !tbaa !11
  %155 = add nsw i32 %154, 1
  store i32 %155, ptr %6, align 4, !tbaa !11
  br label %76, !llvm.loop !18

156:                                              ; preds = %80
  br label %157

157:                                              ; preds = %156
  %158 = load i32, ptr %4, align 4, !tbaa !11
  %159 = add nsw i32 %158, 1
  store i32 %159, ptr %4, align 4, !tbaa !11
  br label %69, !llvm.loop !19

160:                                              ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %161

161:                                              ; preds = %216, %160
  %162 = load i32, ptr %11, align 4, !tbaa !11
  %163 = load i32, ptr @N, align 4, !tbaa !11
  %164 = icmp slt i32 %162, %163
  br i1 %164, label %166, label %165

165:                                              ; preds = %161
  store i32 20, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %219

166:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1000000000, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %167 = load i32, ptr @N, align 4, !tbaa !11
  %168 = sub nsw i32 %167, 1
  store i32 %168, ptr %13, align 4, !tbaa !11
  br label %169

169:                                              ; preds = %209, %166
  %170 = load i32, ptr %13, align 4, !tbaa !11
  %171 = load i32, ptr %11, align 4, !tbaa !11
  %172 = icmp sge i32 %170, %171
  br i1 %172, label %174, label %173

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

174:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %175 = load i32, ptr %13, align 4, !tbaa !11
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %15, align 4, !tbaa !11
  br label %177

177:                                              ; preds = %194, %174
  %178 = load i32, ptr %15, align 4, !tbaa !11
  %179 = load i32, ptr @N, align 4, !tbaa !11
  %180 = icmp slt i32 %178, %179
  br i1 %180, label %182, label %181

181:                                              ; preds = %177
  store i32 26, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %197

182:                                              ; preds = %177
  %183 = load i32, ptr %15, align 4, !tbaa !11
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !11
  %187 = load i32, ptr %15, align 4, !tbaa !11
  %188 = load i32, ptr %13, align 4, !tbaa !11
  %189 = sub nsw i32 %187, %188
  %190 = icmp ne i32 %186, %189
  %191 = zext i1 %190 to i32
  %192 = load i32, ptr %14, align 4, !tbaa !11
  %193 = add nsw i32 %192, %191
  store i32 %193, ptr %14, align 4, !tbaa !11
  br label %194

194:                                              ; preds = %182
  %195 = load i32, ptr %15, align 4, !tbaa !11
  %196 = add nsw i32 %195, 1
  store i32 %196, ptr %15, align 4, !tbaa !11
  br label %177, !llvm.loop !20

197:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %198 = load i32, ptr %11, align 4, !tbaa !11
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [100 x [100 x i32]], ptr @dp, i64 0, i64 %199
  %201 = load i32, ptr %13, align 4, !tbaa !11
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [100 x i32], ptr %200, i64 0, i64 %202
  %204 = load i32, ptr %203, align 4, !tbaa !11
  %205 = load i32, ptr %14, align 4, !tbaa !11
  %206 = add nsw i32 %204, %205
  store i32 %206, ptr %16, align 4, !tbaa !11
  %207 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %208 = load i32, ptr %207, align 4, !tbaa !11
  store i32 %208, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %209

209:                                              ; preds = %197
  %210 = load i32, ptr %13, align 4, !tbaa !11
  %211 = add nsw i32 %210, -1
  store i32 %211, ptr %13, align 4, !tbaa !11
  br label %169, !llvm.loop !21

212:                                              ; preds = %173
  %213 = load i32, ptr %12, align 4, !tbaa !11
  %214 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %213)
  %215 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %214, ptr noundef @.str.4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %216

216:                                              ; preds = %212
  %217 = load i32, ptr %11, align 4, !tbaa !11
  %218 = add nsw i32 %217, 1
  store i32 %218, ptr %11, align 4, !tbaa !11
  br label %161, !llvm.loop !22

219:                                              ; preds = %165
  ret i32 0
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) #1

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

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

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

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

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

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

; 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) #5

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@N = external dso_local global i32, align 4
@a = external dso_local global [100 x i32], align 16
@dp = external dso_local global [100 x [100 x i32]], align 16
@.str = external hidden unnamed_addr constant [10 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@stdin = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1

; 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
  %4 = load ptr, ptr @stdin, align 8, !tbaa !5
  %5 = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %4)
  %6 = load ptr, ptr @stdout, align 8, !tbaa !5
  %7 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %6)
  %8 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %9 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !9
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %11
  %13 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %12, ptr noundef null)
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %15 = load i32, ptr @N, align 4, !tbaa !11
  %16 = icmp sgt i32 %15, 0
  br i1 %16, label %.lr.ph, label %._crit_edge93

.preheader66:                                     ; preds = %.lr.ph
  %17 = icmp sgt i32 %27, 0
  br i1 %17, label %.lr.ph69.preheader, label %._crit_edge93

.lr.ph69.preheader:                               ; preds = %.preheader66
  %wide.trip.count = zext nneg i32 %27 to i64
  %18 = load i32, ptr @a, align 16, !tbaa !11
  %19 = icmp ne i32 %18, 0
  %20 = zext i1 %19 to i32
  store i32 %20, ptr @dp, align 16, !tbaa !11
  %exitcond.peel.not = icmp eq i32 %27, 1
  br i1 %exitcond.peel.not, label %.lr.ph92.preheader, label %.lr.ph69.preheader132

.lr.ph69.preheader132:                            ; preds = %.lr.ph69.preheader
  %21 = add nsw i64 %wide.trip.count, -1
  %min.iters.check = icmp ult i32 %27, 9
  br i1 %min.iters.check, label %.lr.ph69.preheader201, label %vector.ph

.lr.ph69.preheader201:                            ; preds = %middle.block, %.lr.ph69.preheader132
  %indvars.iv99.ph = phi i64 [ 1, %.lr.ph69.preheader132 ], [ %ind.end, %middle.block ]
  br label %.lr.ph69

vector.ph:                                        ; preds = %.lr.ph69.preheader132
  %n.vec = and i64 %21, -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 ]
  %offset.idx = or disjoint i64 %index, 1
  %22 = getelementptr inbounds [100 x i32], ptr @dp, i64 0, i64 %offset.idx
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %22, align 4, !tbaa !11
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %23, align 4, !tbaa !11
  %index.next = add nuw i64 %index, 8
  %24 = icmp eq i64 %index.next, %n.vec
  br i1 %24, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %21, %n.vec
  br i1 %cmp.n, label %.preheader64.preheader, label %.lr.ph69.preheader201

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %25 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %indvars.iv
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %27 = load i32, ptr @N, align 4, !tbaa !11
  %28 = sext i32 %27 to i64
  %29 = icmp slt i64 %indvars.iv.next, %28
  br i1 %29, label %.lr.ph, label %.preheader66, !llvm.loop !18

.lr.ph69:                                         ; preds = %.lr.ph69.preheader201, %.lr.ph69
  %indvars.iv99 = phi i64 [ %indvars.iv.next100, %.lr.ph69 ], [ %indvars.iv99.ph, %.lr.ph69.preheader201 ]
  %30 = getelementptr inbounds [100 x i32], ptr @dp, i64 0, i64 %indvars.iv99
  store i32 1000000000, ptr %30, align 4, !tbaa !11
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next100, %wide.trip.count
  br i1 %exitcond.not, label %.preheader64.preheader, label %.lr.ph69, !llvm.loop !19

.preheader64.preheader:                           ; preds = %.lr.ph69, %middle.block
  br label %.preheader64

.preheader64:                                     ; preds = %.preheader64.preheader, %._crit_edge81
  %indvar142 = phi i64 [ %indvar.next143, %._crit_edge81 ], [ 0, %.preheader64.preheader ]
  %indvar = phi i32 [ %indvar.next, %._crit_edge81 ], [ 0, %.preheader64.preheader ]
  %31 = phi i32 [ %38, %._crit_edge81 ], [ %27, %.preheader64.preheader ]
  %indvars.iv103 = phi i64 [ %indvars.iv.next104, %._crit_edge81 ], [ 1, %.preheader64.preheader ]
  %32 = add i64 %indvar142, 2
  %33 = add i32 %indvar, 2
  %34 = sext i32 %31 to i64
  %35 = icmp slt i64 %indvars.iv103, %34
  br i1 %35, label %.lr.ph80, label %._crit_edge81

.lr.ph80:                                         ; preds = %.preheader64
  %36 = add nsw i64 %indvars.iv103, -1
  br label %40

.preheader63:                                     ; preds = %._crit_edge81
  %37 = icmp sgt i32 %38, 0
  br i1 %37, label %.lr.ph92.preheader, label %._crit_edge93

.lr.ph92.preheader:                               ; preds = %.lr.ph69.preheader, %.preheader63
  %.ph = phi i32 [ %38, %.preheader63 ], [ 1, %.lr.ph69.preheader ]
  br label %.lr.ph92

._crit_edge81.loopexit:                           ; preds = %._crit_edge78
  %.pre125 = sext i32 %48 to i64
  br label %._crit_edge81

._crit_edge81:                                    ; preds = %._crit_edge81.loopexit, %.preheader64
  %.pre-phi = phi i64 [ %.pre125, %._crit_edge81.loopexit ], [ %34, %.preheader64 ]
  %38 = phi i32 [ %48, %._crit_edge81.loopexit ], [ %31, %.preheader64 ]
  %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1
  %39 = icmp slt i64 %indvars.iv.next104, %.pre-phi
  %indvar.next = add i32 %indvar, 1
  %indvar.next143 = add i64 %indvar142, 1
  br i1 %39, label %.preheader64, label %.preheader63, !llvm.loop !20

40:                                               ; preds = %.lr.ph80, %._crit_edge78
  %indvar144 = phi i64 [ 0, %.lr.ph80 ], [ %indvar.next145, %._crit_edge78 ]
  %indvar138 = phi i32 [ 0, %.lr.ph80 ], [ %indvar.next139, %._crit_edge78 ]
  %41 = phi i32 [ %31, %.lr.ph80 ], [ %48, %._crit_edge78 ]
  %42 = phi i32 [ %31, %.lr.ph80 ], [ %49, %._crit_edge78 ]
  %indvars.iv105 = phi i64 [ %indvars.iv103, %.lr.ph80 ], [ %indvars.iv.next106, %._crit_edge78 ]
  %43 = add i64 %32, %indvar144
  %44 = trunc i64 %43 to i32
  %45 = add i32 %33, %indvar138
  %46 = getelementptr inbounds [100 x [100 x i32]], ptr @dp, i64 0, i64 %indvars.iv103, i64 %indvars.iv105
  store i32 1000000000, ptr %46, align 4, !tbaa !11
  %.not74 = icmp ult i64 %indvars.iv105, %indvars.iv103
  br i1 %.not74, label %._crit_edge78, label %.lr.ph77

.lr.ph77:                                         ; preds = %40
  %47 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %indvars.iv105
  br label %52

._crit_edge78.loopexit:                           ; preds = %._crit_edge
  %.pre = load i32, ptr @N, align 4, !tbaa !11
  br label %._crit_edge78

._crit_edge78:                                    ; preds = %._crit_edge78.loopexit, %40
  %48 = phi i32 [ %.pre, %._crit_edge78.loopexit ], [ %41, %40 ]
  %49 = phi i32 [ %.pre, %._crit_edge78.loopexit ], [ %42, %40 ]
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %indvars.iv.next106, %50
  %indvar.next139 = add i32 %indvar138, 1
  %indvar.next145 = add i64 %indvar144, 1
  br i1 %51, label %40, label %._crit_edge81.loopexit, !llvm.loop !21

52:                                               ; preds = %.lr.ph77, %._crit_edge
  %indvar140 = phi i32 [ 0, %.lr.ph77 ], [ %indvar.next141, %._crit_edge ]
  %indvars.iv107 = phi i64 [ %indvars.iv105, %.lr.ph77 ], [ %indvars.iv.next108, %._crit_edge ]
  %53 = sub i32 %44, %indvar140
  %54 = zext i32 %53 to i64
  %55 = sub i64 %43, %54
  %56 = sub i32 %45, %indvar140
  %57 = zext i32 %56 to i64
  %58 = sub nsw i64 %indvars.iv105, %57
  %59 = load i32, ptr %47, align 4, !tbaa !11
  %60 = icmp ne i32 %59, 0
  %61 = zext i1 %60 to i32
  %62 = icmp slt i64 %indvars.iv107, %indvars.iv105
  br i1 %62, label %.lr.ph72, label %._crit_edge

.lr.ph72:                                         ; preds = %52
  %63 = trunc nsw i64 %indvars.iv107 to i32
  %min.iters.check148 = icmp ult i64 %55, 8
  br i1 %min.iters.check148, label %scalar.ph147.preheader, label %vector.scevcheck

scalar.ph147.preheader:                           ; preds = %middle.block146, %vector.scevcheck, %.lr.ph72
  %indvars.iv109.ph = phi i64 [ %indvars.iv107, %vector.scevcheck ], [ %indvars.iv107, %.lr.ph72 ], [ %ind.end152, %middle.block146 ]
  %.05670.ph = phi i32 [ %61, %vector.scevcheck ], [ %61, %.lr.ph72 ], [ %84, %middle.block146 ]
  br label %scalar.ph147

vector.scevcheck:                                 ; preds = %.lr.ph72
  %64 = trunc i64 %58 to i32
  %65 = xor i32 %56, -1
  %66 = icmp ult i32 %65, %64
  %67 = icmp ugt i64 %58, 4294967295
  %68 = or i1 %66, %67
  br i1 %68, label %scalar.ph147.preheader, label %vector.ph149

vector.ph149:                                     ; preds = %vector.scevcheck
  %n.vec151 = and i64 %55, -8
  %ind.end152 = add i64 %indvars.iv107, %n.vec151
  %69 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %61, i64 0
  %70 = trunc i64 %indvars.iv107 to i32
  %.splatinsert = insertelement <4 x i32> poison, i32 %70, i64 0
  %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %induction = add <4 x i32> %.splat, <i32 0, i32 1, i32 2, i32 3>
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %63, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body154

vector.body154:                                   ; preds = %vector.body154, %vector.ph149
  %index155 = phi i64 [ 0, %vector.ph149 ], [ %index.next160, %vector.body154 ]
  %vec.phi = phi <4 x i32> [ %69, %vector.ph149 ], [ %81, %vector.body154 ]
  %vec.phi156 = phi <4 x i32> [ zeroinitializer, %vector.ph149 ], [ %82, %vector.body154 ]
  %vec.ind = phi <4 x i32> [ %induction, %vector.ph149 ], [ %vec.ind.next, %vector.body154 ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %offset.idx158 = add i64 %indvars.iv107, %index155
  %71 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %offset.idx158
  %72 = getelementptr inbounds i8, ptr %71, i64 16
  %wide.load = load <4 x i32>, ptr %71, align 4, !tbaa !11
  %wide.load159 = load <4 x i32>, ptr %72, align 4, !tbaa !11
  %73 = sub <4 x i32> %vec.ind, %broadcast.splat
  %74 = sub <4 x i32> %step.add, %broadcast.splat
  %75 = add <4 x i32> %73, <i32 1, i32 1, i32 1, i32 1>
  %76 = add <4 x i32> %74, <i32 1, i32 1, i32 1, i32 1>
  %77 = icmp ne <4 x i32> %wide.load, %75
  %78 = icmp ne <4 x i32> %wide.load159, %76
  %79 = zext <4 x i1> %77 to <4 x i32>
  %80 = zext <4 x i1> %78 to <4 x i32>
  %81 = add <4 x i32> %vec.phi, %79
  %82 = add <4 x i32> %vec.phi156, %80
  %index.next160 = add nuw i64 %index155, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %83 = icmp eq i64 %index.next160, %n.vec151
  br i1 %83, label %middle.block146, label %vector.body154, !llvm.loop !22

middle.block146:                                  ; preds = %vector.body154
  %bin.rdx = add <4 x i32> %82, %81
  %84 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n161 = icmp eq i64 %55, %n.vec151
  br i1 %cmp.n161, label %._crit_edge, label %scalar.ph147.preheader

._crit_edge:                                      ; preds = %scalar.ph147, %middle.block146, %52
  %.056.lcssa = phi i32 [ %61, %52 ], [ %84, %middle.block146 ], [ %96, %scalar.ph147 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %indvars.iv.next108 = add nsw i64 %indvars.iv107, -1
  %85 = getelementptr inbounds [100 x [100 x i32]], ptr @dp, i64 0, i64 %36, i64 %indvars.iv.next108
  %86 = load i32, ptr %85, align 4, !tbaa !11
  %87 = add nsw i32 %86, %.056.lcssa
  store i32 %87, ptr %1, align 4, !tbaa !11
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %46, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %89 = load i32, ptr %88, align 4, !tbaa !11
  store i32 %89, ptr %46, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  %.not.not94 = icmp sgt i64 %indvars.iv107, %indvars.iv103
  %indvar.next141 = add i32 %indvar140, 1
  br i1 %.not.not94, label %52, label %._crit_edge78.loopexit, !llvm.loop !23

scalar.ph147:                                     ; preds = %scalar.ph147.preheader, %scalar.ph147
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %scalar.ph147 ], [ %indvars.iv109.ph, %scalar.ph147.preheader ]
  %.05670 = phi i32 [ %96, %scalar.ph147 ], [ %.05670.ph, %scalar.ph147.preheader ]
  %90 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %indvars.iv109
  %91 = load i32, ptr %90, align 4, !tbaa !11
  %92 = trunc nsw i64 %indvars.iv109 to i32
  %reass.sub = sub i32 %92, %63
  %93 = add i32 %reass.sub, 1
  %94 = icmp ne i32 %91, %93
  %95 = zext i1 %94 to i32
  %96 = add nuw nsw i32 %.05670, %95
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %97 = and i64 %indvars.iv.next110, 4294967295
  %exitcond112.not = icmp eq i64 %97, %indvars.iv105
  br i1 %exitcond112.not, label %._crit_edge, label %scalar.ph147, !llvm.loop !24

._crit_edge93:                                    ; preds = %119, %0, %.preheader66, %.preheader63
  ret i32 0

.lr.ph92:                                         ; preds = %.lr.ph92.preheader, %119
  %indvars.iv122 = phi i64 [ %indvars.iv.next123, %119 ], [ 0, %.lr.ph92.preheader ]
  %98 = phi i32 [ %122, %119 ], [ %.ph, %.lr.ph92.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 1000000000, ptr %2, align 4, !tbaa !11
  %99 = sext i32 %98 to i64
  br label %.preheader

.preheader:                                       ; preds = %.lr.ph92, %._crit_edge86
  %indvar162 = phi i64 [ 0, %.lr.ph92 ], [ %indvar.next163, %._crit_edge86 ]
  %indvars.iv116 = phi i64 [ %99, %.lr.ph92 ], [ %indvars.iv.next117, %._crit_edge86 ]
  %indvars.iv.next117 = add nsw i64 %indvars.iv116, -1
  %100 = load i32, ptr @N, align 4, !tbaa !11
  %101 = sext i32 %100 to i64
  %102 = icmp slt i64 %indvars.iv116, %101
  br i1 %102, label %.lr.ph85.preheader, label %._crit_edge86

.lr.ph85.preheader:                               ; preds = %.preheader
  %103 = sub i64 %indvar162, %99
  %104 = add i64 %103, %101
  %min.iters.check166 = icmp ult i64 %104, 8
  br i1 %min.iters.check166, label %.lr.ph85.preheader192, label %vector.ph167

.lr.ph85.preheader192:                            ; preds = %middle.block164, %.lr.ph85.preheader
  %indvars.iv118.ph = phi i64 [ %indvars.iv116, %.lr.ph85.preheader ], [ %ind.end170, %middle.block164 ]
  %.05283.ph = phi i32 [ 0, %.lr.ph85.preheader ], [ %118, %middle.block164 ]
  br label %.lr.ph85

vector.ph167:                                     ; preds = %.lr.ph85.preheader
  %n.vec169 = and i64 %104, -8
  %ind.end170 = add i64 %indvars.iv116, %n.vec169
  %.splatinsert174 = insertelement <4 x i64> poison, i64 %indvars.iv116, i64 0
  %.splat175 = shufflevector <4 x i64> %.splatinsert174, <4 x i64> poison, <4 x i32> zeroinitializer
  %induction176 = add <4 x i64> %.splat175, <i64 0, i64 1, i64 2, i64 3>
  %broadcast.splatinsert186 = insertelement <4 x i64> poison, i64 %indvars.iv.next117, i64 0
  %broadcast.splat187 = shufflevector <4 x i64> %broadcast.splatinsert186, <4 x i64> poison, <4 x i32> zeroinitializer
  br label %vector.body172

vector.body172:                                   ; preds = %vector.body172, %vector.ph167
  %index173 = phi i64 [ 0, %vector.ph167 ], [ %index.next188, %vector.body172 ]
  %vec.ind177 = phi <4 x i64> [ %induction176, %vector.ph167 ], [ %vec.ind.next180, %vector.body172 ]
  %vec.phi181 = phi <4 x i32> [ zeroinitializer, %vector.ph167 ], [ %115, %vector.body172 ]
  %vec.phi182 = phi <4 x i32> [ zeroinitializer, %vector.ph167 ], [ %116, %vector.body172 ]
  %step.add178 = add <4 x i64> %vec.ind177, <i64 4, i64 4, i64 4, i64 4>
  %offset.idx183 = add i64 %indvars.iv116, %index173
  %105 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %offset.idx183
  %106 = getelementptr inbounds i8, ptr %105, i64 16
  %wide.load184 = load <4 x i32>, ptr %105, align 4, !tbaa !11
  %wide.load185 = load <4 x i32>, ptr %106, align 4, !tbaa !11
  %107 = sub nsw <4 x i64> %vec.ind177, %broadcast.splat187
  %108 = sub nsw <4 x i64> %step.add178, %broadcast.splat187
  %109 = trunc <4 x i64> %107 to <4 x i32>
  %110 = trunc <4 x i64> %108 to <4 x i32>
  %111 = icmp ne <4 x i32> %wide.load184, %109
  %112 = icmp ne <4 x i32> %wide.load185, %110
  %113 = zext <4 x i1> %111 to <4 x i32>
  %114 = zext <4 x i1> %112 to <4 x i32>
  %115 = add <4 x i32> %vec.phi181, %113
  %116 = add <4 x i32> %vec.phi182, %114
  %index.next188 = add nuw i64 %index173, 8
  %vec.ind.next180 = add <4 x i64> %vec.ind177, <i64 8, i64 8, i64 8, i64 8>
  %117 = icmp eq i64 %index.next188, %n.vec169
  br i1 %117, label %middle.block164, label %vector.body172, !llvm.loop !25

middle.block164:                                  ; preds = %vector.body172
  %bin.rdx189 = add <4 x i32> %116, %115
  %118 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx189)
  %cmp.n190 = icmp eq i64 %104, %n.vec169
  br i1 %cmp.n190, label %._crit_edge86, label %.lr.ph85.preheader192

119:                                              ; preds = %._crit_edge86
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %129)
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %120, ptr noundef nonnull @.str.4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1
  %122 = load i32, ptr @N, align 4, !tbaa !11
  %123 = sext i32 %122 to i64
  %124 = icmp slt i64 %indvars.iv.next123, %123
  br i1 %124, label %.lr.ph92, label %._crit_edge93, !llvm.loop !26

._crit_edge86:                                    ; preds = %.lr.ph85, %middle.block164, %.preheader
  %.052.lcssa = phi i32 [ 0, %.preheader ], [ %118, %middle.block164 ], [ %136, %.lr.ph85 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %125 = getelementptr inbounds [100 x [100 x i32]], ptr @dp, i64 0, i64 %indvars.iv122, i64 %indvars.iv.next117
  %126 = load i32, ptr %125, align 4, !tbaa !11
  %127 = add nsw i32 %126, %.052.lcssa
  store i32 %127, ptr %3, align 4, !tbaa !11
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %129 = load i32, ptr %128, align 4, !tbaa !11
  store i32 %129, ptr %2, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  %.not.not = icmp sgt i64 %indvars.iv.next117, %indvars.iv122
  %indvar.next163 = add i64 %indvar162, 1
  br i1 %.not.not, label %.preheader, label %119, !llvm.loop !27

.lr.ph85:                                         ; preds = %.lr.ph85.preheader192, %.lr.ph85
  %indvars.iv118 = phi i64 [ %indvars.iv.next119, %.lr.ph85 ], [ %indvars.iv118.ph, %.lr.ph85.preheader192 ]
  %.05283 = phi i32 [ %136, %.lr.ph85 ], [ %.05283.ph, %.lr.ph85.preheader192 ]
  %130 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %indvars.iv118
  %131 = load i32, ptr %130, align 4, !tbaa !11
  %132 = sub nsw i64 %indvars.iv118, %indvars.iv.next117
  %133 = trunc nsw i64 %132 to i32
  %134 = icmp ne i32 %131, %133
  %135 = zext i1 %134 to i32
  %136 = add nuw nsw i32 %.05283, %135
  %indvars.iv.next119 = add nsw i64 %indvars.iv118, 1
  %137 = icmp slt i64 %indvars.iv.next119, %101
  br i1 %137, label %.lr.ph85, label %._crit_edge86, !llvm.loop !28
}

declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

; 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 #5

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

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14, !15, !16, !17}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.peeled.count", i32 1}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14, !15, !17, !16}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14, !16, !17}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14, !16}
!25 = distinct !{!25, !14, !16, !17}
!26 = distinct !{!26, !14}
!27 = distinct !{!27, !14}
!28 = distinct !{!28, !14, !17, !16}


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