; LLVM IR from VastoLorde95/Competitive-Programming :: Hackerrank/Company Contests/CodeStorm/Problem C (C)

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

@n = external dso_local global i32, align 4
@a = external dso_local global [10001 x i32], align 16
@cnt = external dso_local global [20002 x i32], align 16
@cnt2 = external dso_local global [100000001 x i32], align 16
@v = external dso_local global %"class.std::vector", align 8
@c1 = external dso_local global i64, align 8
@c2 = external dso_local global i64, align 8
@c3 = external dso_local global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 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
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %22

22:                                               ; preds = %62, %0
  %23 = load i32, ptr %3, align 4, !tbaa !5
  %24 = load i32, ptr @n, align 4, !tbaa !5
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %22
  %28 = load i32, ptr %3, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds [10001 x i32], ptr @a, i64 0, i64 %29
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %30)
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [10001 x i32], ptr @a, i64 0, i64 %33
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = sext i32 %40 to i64
  %42 = getelementptr inbounds [10001 x i32], ptr @a, i64 0, i64 %41
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = load i32, ptr %3, align 4, !tbaa !5
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [10001 x i32], ptr @a, i64 0, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = mul nsw i32 %43, %47
  store i32 %48, ptr %4, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %50) #6
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = add nsw i32 %55, 1
  store i32 %56, ptr %54, align 4, !tbaa !5
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %58) #6
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %59)
  %61 = load i32, ptr %60, align 4, !tbaa !5
  store i32 %61, ptr %2, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %27
  %63 = load i32, ptr %3, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %3, align 4, !tbaa !5
  br label %22, !llvm.loop !9

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

66:                                               ; preds = %82, %65
  %67 = load i32, ptr %5, align 4, !tbaa !5
  %68 = load i32, ptr %2, align 4, !tbaa !5
  %69 = icmp sle i32 %67, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  br label %85

71:                                               ; preds = %66
  %72 = load i32, ptr %5, align 4, !tbaa !5
  %73 = sub nsw i32 %72, 1
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = load i32, ptr %5, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = add nsw i32 %80, %76
  store i32 %81, ptr %79, align 4, !tbaa !5
  br label %82

82:                                               ; preds = %71
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %5, align 4, !tbaa !5
  br label %66, !llvm.loop !11

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

86:                                               ; preds = %101, %85
  %87 = load i32, ptr %6, align 4, !tbaa !5
  %88 = icmp sle i32 %87, 10000
  br i1 %88, label %90, label %89

89:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %104

90:                                               ; preds = %86
  %91 = load i32, ptr %6, align 4, !tbaa !5
  %92 = sub nsw i32 %91, 1
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %93
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %97
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = add nsw i32 %99, %95
  store i32 %100, ptr %98, align 4, !tbaa !5
  br label %101

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

104:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %105

105:                                              ; preds = %223, %104
  %106 = load i32, ptr %16, align 4, !tbaa !5
  %107 = load i32, ptr @n, align 4, !tbaa !5
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  store i32 11, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %226

110:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %111 = load i32, ptr %16, align 4, !tbaa !5
  %112 = add nsw i32 %111, 1
  store i32 %112, ptr %18, align 4, !tbaa !5
  br label %113

113:                                              ; preds = %219, %110
  %114 = load i32, ptr %18, align 4, !tbaa !5
  %115 = load i32, ptr @n, align 4, !tbaa !5
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %118, label %117

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

118:                                              ; preds = %113
  %119 = load i32, ptr %16, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %120) #6
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = load i32, ptr %18, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %124) #6
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = add nsw i32 %122, %126
  %128 = load i32, ptr %2, align 4, !tbaa !5
  %129 = icmp sle i32 %127, %128
  br i1 %129, label %130, label %157

130:                                              ; preds = %118
  %131 = load i32, ptr %16, align 4, !tbaa !5
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %132) #6
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = load i32, ptr %18, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %136) #6
  %138 = load i32, ptr %137, align 4, !tbaa !5
  %139 = add nsw i32 %134, %138
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %140
  %142 = load i32, ptr %141, align 4, !tbaa !5
  %143 = load i32, ptr %16, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %144) #6
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = load i32, ptr %18, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %148) #6
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = add nsw i32 %146, %150
  %152 = sub nsw i32 %151, 1
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %153
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = sub nsw i32 %142, %155
  store i32 %156, ptr %12, align 4, !tbaa !5
  br label %158

157:                                              ; preds = %118
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %158

158:                                              ; preds = %157, %130
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %159 = load i32, ptr %16, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %160) #6
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = load i32, ptr %18, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %164) #6
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = add nsw i32 %162, %166
  %168 = sub nsw i32 %167, 1
  store i32 %168, ptr %19, align 4, !tbaa !5
  %169 = 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) %19)
  %170 = load i32, ptr %169, align 4, !tbaa !5
  store i32 %170, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  %171 = load i32, ptr %9, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %172
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = load i32, ptr %18, align 4, !tbaa !5
  %176 = sub nsw i32 %174, %175
  %177 = sub nsw i32 %176, 1
  store i32 %177, ptr %14, align 4, !tbaa !5
  %178 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %178, ptr %11, align 4, !tbaa !5
  %179 = load i32, ptr %16, align 4, !tbaa !5
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [10001 x i32], ptr @a, i64 0, i64 %180
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = load i32, ptr %18, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [10001 x i32], ptr @a, i64 0, i64 %184
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = add nsw i32 %182, %186
  %188 = sub nsw i32 %187, 1
  store i32 %188, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 10000, ptr %20, align 4, !tbaa !5
  %189 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %190 = load i32, ptr %189, align 4, !tbaa !5
  store i32 %190, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  %191 = load i32, ptr %7, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %192
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = load i32, ptr %18, align 4, !tbaa !5
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [10001 x i32], ptr @a, i64 0, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = sub nsw i32 %194, %201
  %203 = load i32, ptr %11, align 4, !tbaa !5
  %204 = load i32, ptr %12, align 4, !tbaa !5
  %205 = add nsw i32 %203, %204
  %206 = sub nsw i32 %202, %205
  store i32 %206, ptr %13, align 4, !tbaa !5
  %207 = load i32, ptr %11, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = load i64, ptr @c1, align 8, !tbaa !13
  %210 = add nsw i64 %209, %208
  store i64 %210, ptr @c1, align 8, !tbaa !13
  %211 = load i32, ptr %12, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = load i64, ptr @c2, align 8, !tbaa !13
  %214 = add nsw i64 %213, %212
  store i64 %214, ptr @c2, align 8, !tbaa !13
  %215 = load i32, ptr %13, align 4, !tbaa !5
  %216 = sext i32 %215 to i64
  %217 = load i64, ptr @c3, align 8, !tbaa !13
  %218 = add nsw i64 %217, %216
  store i64 %218, ptr @c3, align 8, !tbaa !13
  br label %219

219:                                              ; preds = %158
  %220 = load i32, ptr %18, align 4, !tbaa !5
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %18, align 4, !tbaa !5
  br label %113, !llvm.loop !15

222:                                              ; preds = %117
  br label %223

223:                                              ; preds = %222
  %224 = load i32, ptr %16, align 4, !tbaa !5
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %16, align 4, !tbaa !5
  br label %105, !llvm.loop !16

226:                                              ; preds = %109
  %227 = load i64, ptr @c1, align 8, !tbaa !13
  %228 = load i64, ptr @c2, align 8, !tbaa !13
  %229 = load i64, ptr @c3, align 8, !tbaa !13
  %230 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i64 noundef %227, i64 noundef %228, i64 noundef %229)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %231 = load i32, ptr %1, align 4
  ret i32 %231
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

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

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

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

declare i32 @printf(ptr 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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

%"class.std::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 }

@n = external dso_local global i32, align 4
@a = external dso_local global [10001 x i32], align 16
@cnt = external dso_local local_unnamed_addr global [20002 x i32], align 16
@cnt2 = external dso_local local_unnamed_addr global [100000001 x i32], align 16
@v = external dso_local global %"class.std::vector", align 8
@c1 = external dso_local local_unnamed_addr global i64, align 8
@c2 = external dso_local local_unnamed_addr global i64, align 8
@c3 = external dso_local local_unnamed_addr global i64, align 8
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 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 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  store i32 0, ptr %1, align 4, !tbaa !5
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %8 = icmp sgt i32 %7, 0
  br i1 %8, label %.lr.ph, label %.preheader

.preheader50:                                     ; preds = %.lr.ph
  %.not52 = icmp slt i32 %27, 1
  br i1 %.not52, label %.preheader, label %.lr.ph54.preheader

.lr.ph54.preheader:                               ; preds = %.preheader50
  %.pre = load i32, ptr @cnt2, align 16, !tbaa !5
  %9 = zext nneg i32 %27 to i64
  %xtraiter = and i64 %9, 3
  %10 = icmp ult i32 %27, 4
  br i1 %10, label %.preheader.loopexit.unr-lcssa, label %.lr.ph54.preheader.new

.lr.ph54.preheader.new:                           ; preds = %.lr.ph54.preheader
  %unroll_iter = and i64 %9, 2147483644
  br label %.lr.ph54

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %11 = getelementptr inbounds [10001 x i32], ptr @a, i64 0, i64 %indvars.iv
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %11)
  %13 = load i32, ptr %11, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %14
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = add nsw i32 %16, 1
  store i32 %17, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %18 = mul nsw i32 %13, %13
  store i32 %18, ptr %2, align 4, !tbaa !5
  call void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) @v, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv) #6
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %22, align 4, !tbaa !5
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv) #6
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %25)
  %27 = load i32, ptr %26, align 4, !tbaa !5
  store i32 %27, ptr %1, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %28 = load i32, ptr @n, align 4, !tbaa !5
  %29 = sext i32 %28 to i64
  %30 = icmp slt i64 %indvars.iv.next, %29
  br i1 %30, label %.lr.ph, label %.preheader50, !llvm.loop !9

.preheader.loopexit.unr-lcssa:                    ; preds = %.lr.ph54, %.lr.ph54.preheader
  %.unr = phi i32 [ %.pre, %.lr.ph54.preheader ], [ %48, %.lr.ph54 ]
  %indvars.iv61.unr = phi i64 [ 1, %.lr.ph54.preheader ], [ %indvars.iv.next62.3, %.lr.ph54 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader, label %.lr.ph54.epil

.lr.ph54.epil:                                    ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph54.epil
  %31 = phi i32 [ %34, %.lr.ph54.epil ], [ %.unr, %.preheader.loopexit.unr-lcssa ]
  %indvars.iv61.epil = phi i64 [ %indvars.iv.next62.epil, %.lr.ph54.epil ], [ %indvars.iv61.unr, %.preheader.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph54.epil ], [ 0, %.preheader.loopexit.unr-lcssa ]
  %32 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %indvars.iv61.epil
  %33 = load i32, ptr %32, align 4, !tbaa !5
  %34 = add nsw i32 %33, %31
  store i32 %34, ptr %32, align 4, !tbaa !5
  %indvars.iv.next62.epil = add nuw nsw i64 %indvars.iv61.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 %.preheader, label %.lr.ph54.epil, !llvm.loop !11

.preheader:                                       ; preds = %.preheader.loopexit.unr-lcssa, %.lr.ph54.epil, %0, %.preheader50
  %35 = phi i32 [ %28, %.preheader50 ], [ %7, %0 ], [ %28, %.lr.ph54.epil ], [ %28, %.preheader.loopexit.unr-lcssa ]
  %.pre76 = load i32, ptr @cnt, align 16, !tbaa !5
  br label %51

.lr.ph54:                                         ; preds = %.lr.ph54, %.lr.ph54.preheader.new
  %36 = phi i32 [ %.pre, %.lr.ph54.preheader.new ], [ %48, %.lr.ph54 ]
  %indvars.iv61 = phi i64 [ 1, %.lr.ph54.preheader.new ], [ %indvars.iv.next62.3, %.lr.ph54 ]
  %niter = phi i64 [ 0, %.lr.ph54.preheader.new ], [ %niter.next.3, %.lr.ph54 ]
  %37 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %indvars.iv61
  %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.next62 = add nuw nsw i64 %indvars.iv61, 1
  %40 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %indvars.iv.next62
  %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.next62.1 = add nuw nsw i64 %indvars.iv61, 2
  %43 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %indvars.iv.next62.1
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %45 = add nsw i32 %44, %42
  store i32 %45, ptr %43, align 4, !tbaa !5
  %indvars.iv.next62.2 = add nuw nsw i64 %indvars.iv61, 3
  %46 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %indvars.iv.next62.2
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %48 = add nsw i32 %47, %45
  store i32 %48, ptr %46, align 4, !tbaa !5
  %indvars.iv.next62.3 = add nuw nsw i64 %indvars.iv61, 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 %.preheader.loopexit.unr-lcssa, label %.lr.ph54, !llvm.loop !13

49:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %50 = icmp sgt i32 %35, 0
  br i1 %50, label %.lr.ph59, label %._crit_edge

51:                                               ; preds = %51, %.preheader
  %52 = phi i32 [ %.pre76, %.preheader ], [ %67, %51 ]
  %indvars.iv64 = phi i64 [ 1, %.preheader ], [ %indvars.iv.next65.4, %51 ]
  %53 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %indvars.iv64
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = add nsw i32 %54, %52
  store i32 %55, ptr %53, align 4, !tbaa !5
  %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1
  %56 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %indvars.iv.next65
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = add nsw i32 %57, %55
  store i32 %58, ptr %56, align 4, !tbaa !5
  %indvars.iv.next65.1 = add nuw nsw i64 %indvars.iv64, 2
  %59 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %indvars.iv.next65.1
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = add nsw i32 %60, %58
  store i32 %61, ptr %59, align 4, !tbaa !5
  %indvars.iv.next65.2 = add nuw nsw i64 %indvars.iv64, 3
  %62 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %indvars.iv.next65.2
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = add nsw i32 %63, %61
  store i32 %64, ptr %62, align 4, !tbaa !5
  %indvars.iv.next65.3 = add nuw nsw i64 %indvars.iv64, 4
  %65 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %indvars.iv.next65.3
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = add nsw i32 %66, %64
  store i32 %67, ptr %65, align 4, !tbaa !5
  %indvars.iv.next65.4 = add nuw nsw i64 %indvars.iv64, 5
  %exitcond67.not.4 = icmp eq i64 %indvars.iv.next65.4, 10001
  br i1 %exitcond67.not.4, label %49, label %51, !llvm.loop !14

.loopexit.loopexit:                               ; preds = %104
  %.pre77 = sext i32 %145 to i64
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %.lr.ph59
  %.pre-phi = phi i64 [ %.pre77, %.loopexit.loopexit ], [ %75, %.lr.ph59 ]
  %68 = phi i32 [ %145, %.loopexit.loopexit ], [ %74, %.lr.ph59 ]
  %69 = icmp slt i64 %indvars.iv.next74, %.pre-phi
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1
  br i1 %69, label %.lr.ph59, label %._crit_edge, !llvm.loop !15

._crit_edge:                                      ; preds = %.loopexit, %49
  %70 = load i64, ptr @c1, align 8, !tbaa !16
  %71 = load i64, ptr @c2, align 8, !tbaa !16
  %72 = load i64, ptr @c3, align 8, !tbaa !16
  %73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %70, i64 noundef %71, i64 noundef %72)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph59:                                         ; preds = %49, %.loopexit
  %74 = phi i32 [ %68, %.loopexit ], [ %35, %49 ]
  %indvars.iv73 = phi i64 [ %indvars.iv.next74, %.loopexit ], [ 0, %49 ]
  %indvars.iv68 = phi i64 [ %indvars.iv.next69, %.loopexit ], [ 1, %49 ]
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %75 = sext i32 %74 to i64
  %76 = icmp slt i64 %indvars.iv.next74, %75
  br i1 %76, label %.lr.ph57, label %.loopexit

.lr.ph57:                                         ; preds = %.lr.ph59
  %77 = getelementptr inbounds [10001 x i32], ptr @a, i64 0, i64 %indvars.iv73
  br label %78

78:                                               ; preds = %.lr.ph57, %104
  %indvars.iv70 = phi i64 [ %indvars.iv68, %.lr.ph57 ], [ %indvars.iv.next71, %104 ]
  %79 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv73) #6
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv70) #6
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = add nsw i32 %82, %80
  %84 = load i32, ptr %1, align 4, !tbaa !5
  %.not46 = icmp sgt i32 %83, %84
  br i1 %.not46, label %104, label %85

85:                                               ; preds = %78
  %86 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv73) #6
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv70) #6
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = add nsw i32 %89, %87
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %91
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv73) #6
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv70) #6
  %97 = load i32, ptr %96, align 4, !tbaa !5
  %98 = add i32 %95, -1
  %99 = add i32 %98, %97
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %100
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = sub nsw i32 %93, %102
  br label %104

104:                                              ; preds = %78, %85
  %.044 = phi i32 [ %103, %85 ], [ 0, %78 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %105 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv73) #6
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) @v, i64 noundef %indvars.iv70) #6
  %108 = load i32, ptr %107, align 4, !tbaa !5
  %109 = add i32 %106, -1
  %110 = add i32 %109, %108
  store i32 %110, ptr %4, align 4, !tbaa !5
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %112 = load i32, ptr %111, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [100000001 x i32], ptr @cnt2, i64 0, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = trunc nuw nsw i64 %indvars.iv70 to i32
  %117 = xor i32 %116, -1
  %118 = add i32 %115, %117
  %119 = load i32, ptr %77, align 4, !tbaa !5
  %120 = getelementptr inbounds [10001 x i32], ptr @a, i64 0, i64 %indvars.iv70
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = add i32 %119, -1
  %123 = add i32 %122, %121
  store i32 %123, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 10000, ptr %5, align 4, !tbaa !5
  %124 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %125 = load i32, ptr %124, align 4, !tbaa !5
  store i32 %125, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %126
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = load i32, ptr %120, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [20002 x i32], ptr @cnt, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !5
  %133 = add i32 %118, %.044
  %134 = add i32 %133, %132
  %135 = sub i32 %128, %134
  %136 = sext i32 %118 to i64
  %137 = load i64, ptr @c1, align 8, !tbaa !16
  %138 = add nsw i64 %137, %136
  store i64 %138, ptr @c1, align 8, !tbaa !16
  %139 = sext i32 %.044 to i64
  %140 = load i64, ptr @c2, align 8, !tbaa !16
  %141 = add nsw i64 %140, %139
  store i64 %141, ptr @c2, align 8, !tbaa !16
  %142 = sext i32 %135 to i64
  %143 = load i64, ptr @c3, align 8, !tbaa !16
  %144 = add nsw i64 %143, %142
  store i64 %144, ptr @c3, align 8, !tbaa !16
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %145 = load i32, ptr @n, align 4, !tbaa !5
  %146 = trunc nuw i64 %indvars.iv.next71 to i32
  %147 = icmp sgt i32 %145, %146
  br i1 %147, label %78, label %.loopexit.loopexit, !llvm.loop !18
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) 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) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = { 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, !12}
!12 = !{!"llvm.loop.unroll.disable"}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = !{!17, !17, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = distinct !{!18, !10}


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