; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/208 Division 2/Problem E (E)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.5" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global [1010 x [1010 x i32]], align 16
@r = external dso_local global [1010 x [1010 x i32]], align 16
@c = external dso_local global [1010 x [1010 x i32]], align 16
@tot = external dso_local global i32, align 4
@ans = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2goiii(i32 noundef, i32 noundef, i32 noundef) #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %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 %"class.__gnu_cxx::__normal_iterator.5", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  store i32 0, ptr %1, align 4
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %68, %0
  %18 = load i32, ptr %2, align 4, !tbaa !5
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %20 = icmp sle i32 %18, %19
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %64, %22
  %24 = load i32, ptr %4, align 4, !tbaa !5
  %25 = load i32, ptr @m, align 4, !tbaa !5
  %26 = icmp sle i32 %24, %25
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %23
  %29 = load i32, ptr %2, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [1010 x [1010 x i32]], ptr @g, i64 0, i64 %30
  %32 = load i32, ptr %4, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [1010 x i32], ptr %31, i64 0, i64 %33
  %35 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %34)
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [1010 x [1010 x i32]], ptr @g, i64 0, i64 %37
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [1010 x i32], ptr %38, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [1010 x [1010 x i32]], ptr @c, i64 0, i64 %44
  %46 = load i32, ptr %4, align 4, !tbaa !5
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds [1010 x i32], ptr %45, i64 0, i64 %47
  store i32 %42, ptr %48, align 4, !tbaa !5
  %49 = load i32, ptr %2, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [1010 x [1010 x i32]], ptr @r, i64 0, i64 %50
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [1010 x i32], ptr %51, i64 0, i64 %53
  store i32 %42, ptr %54, align 4, !tbaa !5
  %55 = load i32, ptr %2, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [1010 x [1010 x i32]], ptr @g, i64 0, i64 %56
  %58 = load i32, ptr %4, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [1010 x i32], ptr %57, i64 0, i64 %59
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = load i32, ptr @tot, align 4, !tbaa !5
  %63 = add nsw i32 %62, %61
  store i32 %63, ptr @tot, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %28
  %65 = load i32, ptr %4, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %4, align 4, !tbaa !5
  br label %23, !llvm.loop !9

67:                                               ; preds = %27
  br label %68

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

71:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %104, %71
  %73 = load i32, ptr %5, align 4, !tbaa !5
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = icmp sle i32 %73, %74
  br i1 %75, label %77, label %76

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

77:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %100, %77
  %79 = load i32, ptr %6, align 4, !tbaa !5
  %80 = load i32, ptr @m, align 4, !tbaa !5
  %81 = icmp sle i32 %79, %80
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %103

83:                                               ; preds = %78
  %84 = load i32, ptr %5, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [1010 x [1010 x i32]], ptr @r, i64 0, i64 %85
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = sub nsw i32 %87, 1
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [1010 x i32], ptr %86, i64 0, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = load i32, ptr %5, align 4, !tbaa !5
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [1010 x [1010 x i32]], ptr @r, i64 0, i64 %93
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [1010 x i32], ptr %94, i64 0, i64 %96
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = add nsw i32 %98, %91
  store i32 %99, ptr %97, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %83
  %101 = load i32, ptr %6, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %6, align 4, !tbaa !5
  br label %78, !llvm.loop !12

103:                                              ; preds = %82
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %5, align 4, !tbaa !5
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %5, align 4, !tbaa !5
  br label %72, !llvm.loop !13

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

108:                                              ; preds = %140, %107
  %109 = load i32, ptr %7, align 4, !tbaa !5
  %110 = load i32, ptr @m, align 4, !tbaa !5
  %111 = icmp sle i32 %109, %110
  br i1 %111, label %113, label %112

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

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

114:                                              ; preds = %136, %113
  %115 = load i32, ptr %8, align 4, !tbaa !5
  %116 = load i32, ptr @n, align 4, !tbaa !5
  %117 = icmp sle i32 %115, %116
  br i1 %117, label %119, label %118

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

119:                                              ; preds = %114
  %120 = load i32, ptr %8, align 4, !tbaa !5
  %121 = sub nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [1010 x [1010 x i32]], ptr @c, i64 0, i64 %122
  %124 = load i32, ptr %7, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [1010 x i32], ptr %123, i64 0, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = load i32, ptr %8, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [1010 x [1010 x i32]], ptr @c, i64 0, i64 %129
  %131 = load i32, ptr %7, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds [1010 x i32], ptr %130, i64 0, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = add nsw i32 %134, %127
  store i32 %135, ptr %133, align 4, !tbaa !5
  br label %136

136:                                              ; preds = %119
  %137 = load i32, ptr %8, align 4, !tbaa !5
  %138 = add nsw i32 %137, 1
  store i32 %138, ptr %8, align 4, !tbaa !5
  br label %114, !llvm.loop !14

139:                                              ; preds = %118
  br label %140

140:                                              ; preds = %139
  %141 = load i32, ptr %7, align 4, !tbaa !5
  %142 = add nsw i32 %141, 1
  store i32 %142, ptr %7, align 4, !tbaa !5
  br label %108, !llvm.loop !15

143:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 -1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 -1, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %144

144:                                              ; preds = %175, %143
  %145 = load i32, ptr %11, align 4, !tbaa !5
  %146 = load i32, ptr @n, align 4, !tbaa !5
  %147 = icmp sle i32 %145, %146
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %178

149:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %150

150:                                              ; preds = %170, %149
  %151 = load i32, ptr %12, align 4, !tbaa !5
  %152 = load i32, ptr @m, align 4, !tbaa !5
  %153 = icmp sle i32 %151, %152
  br i1 %153, label %155, label %154

154:                                              ; preds = %150
  store i32 23, ptr %3, align 4
  br label %173

155:                                              ; preds = %150
  %156 = load i32, ptr %11, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [1010 x [1010 x i32]], ptr @g, i64 0, i64 %157
  %159 = load i32, ptr %12, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [1010 x i32], ptr %158, i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = icmp ne i32 %162, 0
  br i1 %163, label %164, label %169

164:                                              ; preds = %155
  %165 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %165, ptr %9, align 4, !tbaa !5
  %166 = load i32, ptr %12, align 4, !tbaa !5
  store i32 %166, ptr %10, align 4, !tbaa !5
  %167 = load i32, ptr @n, align 4, !tbaa !5
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %11, align 4, !tbaa !5
  store i32 23, ptr %3, align 4
  br label %173

169:                                              ; preds = %155
  br label %170

170:                                              ; preds = %169
  %171 = load i32, ptr %12, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  store i32 %172, ptr %12, align 4, !tbaa !5
  br label %150, !llvm.loop !16

173:                                              ; preds = %164, %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %174

174:                                              ; preds = %173
  br label %175

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

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

179:                                              ; preds = %188, %178
  %180 = load i32, ptr %13, align 4, !tbaa !5
  %181 = load i32, ptr @tot, align 4, !tbaa !5
  %182 = icmp sle i32 %180, %181
  br i1 %182, label %184, label %183

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

184:                                              ; preds = %179
  %185 = load i32, ptr %13, align 4, !tbaa !5
  %186 = load i32, ptr %9, align 4, !tbaa !5
  %187 = load i32, ptr %10, align 4, !tbaa !5
  call void @_Z2goiii(i32 noundef %185, i32 noundef %186, i32 noundef %187)
  br label %188

188:                                              ; preds = %184
  %189 = load i32, ptr %13, align 4, !tbaa !5
  %190 = add nsw i32 %189, 1
  store i32 %190, ptr %13, align 4, !tbaa !5
  br label %179, !llvm.loop !18

191:                                              ; preds = %183
  %192 = call noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #6
  br i1 %192, label %193, label %195

193:                                              ; preds = %191
  %194 = call i32 @puts(ptr noundef @.str.3)
  br label %211

195:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %196 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #6
  %197 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %14, i32 0, i32 0
  store ptr %196, ptr %197, align 8
  br label %198

198:                                              ; preds = %207, %195
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %199 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #6
  %200 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.5", ptr %15, i32 0, i32 0
  store ptr %199, ptr %200, align 8
  %201 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br i1 %201, label %203, label %202

202:                                              ; preds = %198
  store i32 29, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %209

203:                                              ; preds = %198
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %205)
  br label %207

207:                                              ; preds = %203
  %208 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  br label %198, !llvm.loop !19

209:                                              ; preds = %202
  %210 = call i32 @puts(ptr noundef @.str.5)
  br label %211

211:                                              ; preds = %209, %193
  store i32 0, ptr %1, align 4
  store i32 1, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  %212 = load i32, ptr %1, align 4
  ret i32 %212
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

declare i32 @puts(ptr noundef) #3

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

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

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

declare i32 @printf(ptr noundef, ...) #3

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.5" = type { ptr }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@g = external dso_local global [1010 x [1010 x i32]], align 16
@r = external dso_local local_unnamed_addr global [1010 x [1010 x i32]], align 16
@c = external dso_local local_unnamed_addr global [1010 x [1010 x i32]], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@ans = external dso_local global %"class.std::vector", align 8
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [1 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z2goiii(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator.5", align 8
  %3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %4 = load i32, ptr @n, align 4, !tbaa !5
  %.not76 = icmp slt i32 %4, 1
  %.pre142.pre = load i32, ptr @m, align 4, !tbaa !5
  %5 = icmp slt i32 %.pre142.pre, 1
  %or.cond = select i1 %.not76, i1 true, i1 %5
  br i1 %or.cond, label %.preheader, label %.preheader71

.preheader71:                                     ; preds = %0, %._crit_edge
  %6 = phi i32 [ %11, %._crit_edge ], [ %4, %0 ]
  %7 = phi i32 [ %12, %._crit_edge ], [ %.pre142.pre, %0 ]
  %indvars.iv115 = phi i64 [ %indvars.iv.next116, %._crit_edge ], [ 1, %0 ]
  %.not6474 = icmp slt i32 %7, 1
  br i1 %.not6474, label %._crit_edge, label %.lr.ph

.preheader70:                                     ; preds = %._crit_edge
  %.not5682 = icmp slt i32 %11, 1
  br i1 %.not5682, label %.preheader68, label %.preheader69.lr.ph

.preheader69.lr.ph:                               ; preds = %.preheader70
  %.not6378 = icmp slt i32 %12, 1
  br i1 %.not6378, label %.preheader, label %.preheader69.preheader

.preheader69.preheader:                           ; preds = %.preheader69.lr.ph
  %8 = add nuw i32 %11, 1
  %wide.trip.count124 = zext i32 %8 to i64
  %9 = zext nneg i32 %12 to i64
  %xtraiter = and i64 %9, 3
  %10 = icmp ult i32 %12, 4
  %unroll_iter = and i64 %9, 2147483644
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader69

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.pre = load i32, ptr @n, align 4, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader71
  %11 = phi i32 [ %.pre, %._crit_edge.loopexit ], [ %6, %.preheader71 ]
  %12 = phi i32 [ %21, %._crit_edge.loopexit ], [ %7, %.preheader71 ]
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %13 = sext i32 %11 to i64
  %.not.not = icmp slt i64 %indvars.iv115, %13
  br i1 %.not.not, label %.preheader71, label %.preheader70, !llvm.loop !9

.lr.ph:                                           ; preds = %.preheader71, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %.preheader71 ]
  %14 = getelementptr inbounds [1010 x [1010 x i32]], ptr @g, i64 0, i64 %indvars.iv115, i64 %indvars.iv
  %15 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %14)
  %16 = load i32, ptr %14, align 4, !tbaa !5
  %17 = getelementptr inbounds [1010 x [1010 x i32]], ptr @c, i64 0, i64 %indvars.iv115, i64 %indvars.iv
  store i32 %16, ptr %17, align 4, !tbaa !5
  %18 = getelementptr inbounds [1010 x [1010 x i32]], ptr @r, i64 0, i64 %indvars.iv115, i64 %indvars.iv
  store i32 %16, ptr %18, align 4, !tbaa !5
  %19 = load i32, ptr @tot, align 4, !tbaa !5
  %20 = add nsw i32 %19, %16
  store i32 %20, ptr @tot, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %21 = load i32, ptr @m, align 4, !tbaa !5
  %22 = sext i32 %21 to i64
  %.not64.not = icmp slt i64 %indvars.iv, %22
  br i1 %.not64.not, label %.lr.ph, label %._crit_edge.loopexit, !llvm.loop !12

.preheader69:                                     ; preds = %.preheader69.preheader, %._crit_edge81
  %indvars.iv121 = phi i64 [ 1, %.preheader69.preheader ], [ %indvars.iv.next122, %._crit_edge81 ]
  %.phi.trans.insert = getelementptr inbounds [1010 x [1010 x i32]], ptr @r, i64 0, i64 %indvars.iv121, i64 0
  %.pre141 = load i32, ptr %.phi.trans.insert, align 8, !tbaa !5
  br i1 %10, label %._crit_edge81.unr-lcssa, label %.preheader69.new

.preheader68:                                     ; preds = %._crit_edge81, %.preheader70
  %.not5788 = icmp slt i32 %12, 1
  br i1 %.not5788, label %.preheader66, label %.preheader67.lr.ph

.preheader67.lr.ph:                               ; preds = %.preheader68
  br i1 %.not5682, label %.preheader, label %.preheader67.preheader

.preheader67.preheader:                           ; preds = %.preheader67.lr.ph
  %23 = add nuw i32 %12, 1
  %wide.trip.count134 = zext i32 %23 to i64
  %24 = zext nneg i32 %11 to i64
  %xtraiter228 = and i64 %24, 3
  %25 = icmp ult i32 %11, 4
  %unroll_iter232 = and i64 %24, 2147483644
  %lcmp.mod231.not = icmp eq i64 %xtraiter228, 0
  br label %.preheader67

._crit_edge81.unr-lcssa:                          ; preds = %.preheader69.new, %.preheader69
  %.unr = phi i32 [ %.pre141, %.preheader69 ], [ %42, %.preheader69.new ]
  %indvars.iv118.unr = phi i64 [ 1, %.preheader69 ], [ %indvars.iv.next119.3, %.preheader69.new ]
  br i1 %lcmp.mod.not, label %._crit_edge81, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge81.unr-lcssa, %.epil.preheader
  %26 = phi i32 [ %29, %.epil.preheader ], [ %.unr, %._crit_edge81.unr-lcssa ]
  %indvars.iv118.epil = phi i64 [ %indvars.iv.next119.epil, %.epil.preheader ], [ %indvars.iv118.unr, %._crit_edge81.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge81.unr-lcssa ]
  %27 = getelementptr inbounds [1010 x [1010 x i32]], ptr @r, i64 0, i64 %indvars.iv121, i64 %indvars.iv118.epil
  %28 = load i32, ptr %27, align 4, !tbaa !5
  %29 = add nsw i32 %28, %26
  store i32 %29, ptr %27, align 4, !tbaa !5
  %indvars.iv.next119.epil = add nuw nsw i64 %indvars.iv118.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_edge81, label %.epil.preheader, !llvm.loop !13

._crit_edge81:                                    ; preds = %.epil.preheader, %._crit_edge81.unr-lcssa
  %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1
  %exitcond125.not = icmp eq i64 %indvars.iv.next122, %wide.trip.count124
  br i1 %exitcond125.not, label %.preheader68, label %.preheader69, !llvm.loop !15

.preheader69.new:                                 ; preds = %.preheader69, %.preheader69.new
  %30 = phi i32 [ %42, %.preheader69.new ], [ %.pre141, %.preheader69 ]
  %indvars.iv118 = phi i64 [ %indvars.iv.next119.3, %.preheader69.new ], [ 1, %.preheader69 ]
  %niter = phi i64 [ %niter.next.3, %.preheader69.new ], [ 0, %.preheader69 ]
  %31 = getelementptr inbounds [1010 x [1010 x i32]], ptr @r, i64 0, i64 %indvars.iv121, i64 %indvars.iv118
  %32 = load i32, ptr %31, align 4, !tbaa !5
  %33 = add nsw i32 %32, %30
  store i32 %33, ptr %31, align 4, !tbaa !5
  %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1
  %34 = getelementptr inbounds [1010 x [1010 x i32]], ptr @r, i64 0, i64 %indvars.iv121, i64 %indvars.iv.next119
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = add nsw i32 %35, %33
  store i32 %36, ptr %34, align 4, !tbaa !5
  %indvars.iv.next119.1 = add nuw nsw i64 %indvars.iv118, 2
  %37 = getelementptr inbounds [1010 x [1010 x i32]], ptr @r, i64 0, i64 %indvars.iv121, i64 %indvars.iv.next119.1
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = add nsw i32 %38, %36
  store i32 %39, ptr %37, align 4, !tbaa !5
  %indvars.iv.next119.2 = add nuw nsw i64 %indvars.iv118, 3
  %40 = getelementptr inbounds [1010 x [1010 x i32]], ptr @r, i64 0, i64 %indvars.iv121, i64 %indvars.iv.next119.2
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = add nsw i32 %41, %39
  store i32 %42, ptr %40, align 4, !tbaa !5
  %indvars.iv.next119.3 = add nuw nsw i64 %indvars.iv118, 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_edge81.unr-lcssa, label %.preheader69.new, !llvm.loop !16

.preheader67:                                     ; preds = %.preheader67.preheader, %._crit_edge87
  %indvars.iv131 = phi i64 [ 1, %.preheader67.preheader ], [ %indvars.iv.next132, %._crit_edge87 ]
  %.phi.trans.insert143 = getelementptr inbounds [1010 x [1010 x i32]], ptr @c, i64 0, i64 0, i64 %indvars.iv131
  %.pre144 = load i32, ptr %.phi.trans.insert143, align 4, !tbaa !5
  br i1 %25, label %._crit_edge87.unr-lcssa, label %.preheader67.new

.preheader66:                                     ; preds = %._crit_edge87, %.preheader68
  %brmerge = or i1 %.not5682, %.not5788
  br i1 %brmerge, label %.preheader, label %.preheader65.preheader

.preheader65.preheader:                           ; preds = %.preheader66
  %43 = add nuw i32 %12, 1
  %wide.trip.count139 = zext i32 %43 to i64
  br label %.preheader65

._crit_edge87.unr-lcssa:                          ; preds = %.preheader67.new, %.preheader67
  %.unr230 = phi i32 [ %.pre144, %.preheader67 ], [ %60, %.preheader67.new ]
  %indvars.iv126.unr = phi i64 [ 1, %.preheader67 ], [ %indvars.iv.next127.3, %.preheader67.new ]
  br i1 %lcmp.mod231.not, label %._crit_edge87, label %.epil.preheader227

.epil.preheader227:                               ; preds = %._crit_edge87.unr-lcssa, %.epil.preheader227
  %44 = phi i32 [ %47, %.epil.preheader227 ], [ %.unr230, %._crit_edge87.unr-lcssa ]
  %indvars.iv126.epil = phi i64 [ %indvars.iv.next127.epil, %.epil.preheader227 ], [ %indvars.iv126.unr, %._crit_edge87.unr-lcssa ]
  %epil.iter229 = phi i64 [ %epil.iter229.next, %.epil.preheader227 ], [ 0, %._crit_edge87.unr-lcssa ]
  %45 = getelementptr inbounds [1010 x [1010 x i32]], ptr @c, i64 0, i64 %indvars.iv126.epil, i64 %indvars.iv131
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = add nsw i32 %46, %44
  store i32 %47, ptr %45, align 4, !tbaa !5
  %indvars.iv.next127.epil = add nuw nsw i64 %indvars.iv126.epil, 1
  %epil.iter229.next = add i64 %epil.iter229, 1
  %epil.iter229.cmp.not = icmp eq i64 %epil.iter229.next, %xtraiter228
  br i1 %epil.iter229.cmp.not, label %._crit_edge87, label %.epil.preheader227, !llvm.loop !17

._crit_edge87:                                    ; preds = %.epil.preheader227, %._crit_edge87.unr-lcssa
  %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1
  %exitcond135.not = icmp eq i64 %indvars.iv.next132, %wide.trip.count134
  br i1 %exitcond135.not, label %.preheader66, label %.preheader67, !llvm.loop !18

.preheader67.new:                                 ; preds = %.preheader67, %.preheader67.new
  %48 = phi i32 [ %60, %.preheader67.new ], [ %.pre144, %.preheader67 ]
  %indvars.iv126 = phi i64 [ %indvars.iv.next127.3, %.preheader67.new ], [ 1, %.preheader67 ]
  %niter233 = phi i64 [ %niter233.next.3, %.preheader67.new ], [ 0, %.preheader67 ]
  %49 = getelementptr inbounds [1010 x [1010 x i32]], ptr @c, i64 0, i64 %indvars.iv126, i64 %indvars.iv131
  %50 = load i32, ptr %49, align 4, !tbaa !5
  %51 = add nsw i32 %50, %48
  store i32 %51, ptr %49, align 4, !tbaa !5
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %52 = getelementptr inbounds [1010 x [1010 x i32]], ptr @c, i64 0, i64 %indvars.iv.next127, i64 %indvars.iv131
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = add nsw i32 %53, %51
  store i32 %54, ptr %52, align 4, !tbaa !5
  %indvars.iv.next127.1 = add nuw nsw i64 %indvars.iv126, 2
  %55 = getelementptr inbounds [1010 x [1010 x i32]], ptr @c, i64 0, i64 %indvars.iv.next127.1, i64 %indvars.iv131
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, %54
  store i32 %57, ptr %55, align 4, !tbaa !5
  %indvars.iv.next127.2 = add nuw nsw i64 %indvars.iv126, 3
  %58 = getelementptr inbounds [1010 x [1010 x i32]], ptr @c, i64 0, i64 %indvars.iv.next127.2, i64 %indvars.iv131
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = add nsw i32 %59, %57
  store i32 %60, ptr %58, align 4, !tbaa !5
  %indvars.iv.next127.3 = add nuw nsw i64 %indvars.iv126, 4
  %niter233.next.3 = add i64 %niter233, 4
  %niter233.ncmp.3 = icmp eq i64 %niter233.next.3, %unroll_iter232
  br i1 %niter233.ncmp.3, label %._crit_edge87.unr-lcssa, label %.preheader67.new, !llvm.loop !19

.preheader65:                                     ; preds = %.preheader65.preheader, %..loopexit_crit_edge
  %.04598 = phi i32 [ %68, %..loopexit_crit_edge ], [ 1, %.preheader65.preheader ]
  %61 = zext nneg i32 %.04598 to i64
  br label %64

.preheader.loopexit:                              ; preds = %64
  %62 = trunc nuw nsw i64 %indvars.iv136 to i32
  br label %.preheader

.preheader:                                       ; preds = %..loopexit_crit_edge, %.preheader66, %0, %.preheader.loopexit, %.preheader69.lr.ph, %.preheader67.lr.ph
  %.048.lcssa = phi i32 [ -1, %.preheader66 ], [ -1, %.preheader67.lr.ph ], [ -1, %.preheader69.lr.ph ], [ %.04598, %.preheader.loopexit ], [ -1, %0 ], [ -1, %..loopexit_crit_edge ]
  %.046.lcssa = phi i32 [ -1, %.preheader66 ], [ -1, %.preheader67.lr.ph ], [ -1, %.preheader69.lr.ph ], [ %62, %.preheader.loopexit ], [ -1, %0 ], [ -1, %..loopexit_crit_edge ]
  %63 = load i32, ptr @tot, align 4, !tbaa !5
  %.not59103 = icmp slt i32 %63, 2
  br i1 %.not59103, label %._crit_edge106, label %.lr.ph105

64:                                               ; preds = %.preheader65, %67
  %indvars.iv136 = phi i64 [ 1, %.preheader65 ], [ %indvars.iv.next137, %67 ]
  %65 = getelementptr inbounds [1010 x [1010 x i32]], ptr @g, i64 0, i64 %61, i64 %indvars.iv136
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %.not61 = icmp eq i32 %66, 0
  br i1 %.not61, label %67, label %.preheader.loopexit

67:                                               ; preds = %64
  %indvars.iv.next137 = add nuw nsw i64 %indvars.iv136, 1
  %exitcond140.not = icmp eq i64 %indvars.iv.next137, %wide.trip.count139
  br i1 %exitcond140.not, label %..loopexit_crit_edge, label %64, !llvm.loop !20

..loopexit_crit_edge:                             ; preds = %67
  %68 = add nuw nsw i32 %.04598, 1
  %.not58.not = icmp slt i32 %.04598, %11
  br i1 %.not58.not, label %.preheader65, label %.preheader, !llvm.loop !21

._crit_edge106:                                   ; preds = %.lr.ph105, %.preheader
  %69 = tail call noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #6
  br i1 %69, label %72, label %74

.lr.ph105:                                        ; preds = %.preheader, %.lr.ph105
  %.0104 = phi i32 [ %70, %.lr.ph105 ], [ 2, %.preheader ]
  tail call void @_Z2goiii(i32 noundef %.0104, i32 noundef %.048.lcssa, i32 noundef %.046.lcssa)
  %70 = add nuw nsw i32 %.0104, 1
  %71 = load i32, ptr @tot, align 4, !tbaa !5
  %.not59.not = icmp slt i32 %.0104, %71
  br i1 %.not59.not, label %.lr.ph105, label %._crit_edge106, !llvm.loop !22

72:                                               ; preds = %._crit_edge106
  %73 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %85

74:                                               ; preds = %._crit_edge106
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  %75 = tail call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #6
  store ptr %75, ptr %1, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %76 = tail call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #6
  store ptr %76, ptr %2, align 8
  %77 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  br i1 %77, label %.lr.ph108, label %._crit_edge109

._crit_edge109:                                   ; preds = %.lr.ph108, %74
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  %78 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.5)
  br label %85

.lr.ph108:                                        ; preds = %74, %.lr.ph108
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %80)
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %83 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) @ans) #6
  store ptr %83, ptr %2, align 8
  %84 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  br i1 %84, label %.lr.ph108, label %._crit_edge109, !llvm.loop !23

85:                                               ; preds = %._crit_edge109, %72
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIiSaIiEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = distinct !{!23, !10}


; Effective O3 passes: ADCEPass,BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass