; LLVM IR from kazunetakahashi/atcoder :: 2019/0602_AGC034 (D)

; 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.MinCostFlow = type { i32, ptr, ptr, ptr, ptr, ptr, i64 }
%"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" }

@C = external dso_local global i64, align 8
@N = external dso_local global i32, align 4
@S = external dso_local global i64, align 8
@RX = external dso_local global [1010 x i64], align 16
@RY = external dso_local global [1010 x i64], align 16
@RC = external dso_local global [1010 x i64], align 16
@BX = external dso_local global [1010 x i64], align 16
@BY = external dso_local global [1010 x i64], align 16
@BC = external dso_local global [1010 x i64], align 16
@flow = external dso_local global %class.MinCostFlow, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %class.MinCostFlow, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %8 = 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 !5
  br label %9

9:                                                ; preds = %27, %0
  %10 = load i32, ptr %2, align 4, !tbaa !5
  %11 = load i32, ptr @N, align 4, !tbaa !5
  %12 = icmp slt i32 %10, %11
  br i1 %12, label %14, label %13

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

14:                                               ; preds = %9
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [1010 x i64], ptr @RX, i64 0, i64 %16
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %17)
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [1010 x i64], ptr @RY, i64 0, i64 %20
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) %21)
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds [1010 x i64], ptr @RC, i64 0, i64 %24
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(8) %25)
  br label %27

27:                                               ; preds = %14
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %2, align 4, !tbaa !5
  br label %9, !llvm.loop !9

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

31:                                               ; preds = %49, %30
  %32 = load i32, ptr %3, align 4, !tbaa !5
  %33 = load i32, ptr @N, align 4, !tbaa !5
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %36, label %35

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

36:                                               ; preds = %31
  %37 = load i32, ptr %3, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [1010 x i64], ptr @BX, i64 0, i64 %38
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %39)
  %41 = load i32, ptr %3, align 4, !tbaa !5
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds [1010 x i64], ptr @BY, i64 0, i64 %42
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(8) %43)
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [1010 x i64], ptr @BC, i64 0, i64 %46
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(8) %47)
  br label %49

49:                                               ; preds = %36
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %3, align 4, !tbaa !5
  br label %31, !llvm.loop !11

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

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

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

58:                                               ; preds = %53
  %59 = load i32, ptr %4, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [1010 x i64], ptr @RC, i64 0, i64 %60
  %62 = load i64, ptr %61, align 8, !tbaa !12
  %63 = load i64, ptr @S, align 8, !tbaa !12
  %64 = add nsw i64 %63, %62
  store i64 %64, ptr @S, align 8, !tbaa !12
  br label %65

65:                                               ; preds = %58
  %66 = load i32, ptr %4, align 4, !tbaa !5
  %67 = add nsw i32 %66, 1
  store i32 %67, ptr %4, align 4, !tbaa !5
  br label %53, !llvm.loop !14

68:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 56, ptr %5) #6
  call void @_ZN11MinCostFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(56) %5, i32 noundef 2010)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 @flow, ptr align 8 %5, i64 56, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 56, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %69

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

73:                                               ; preds = %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %225

74:                                               ; preds = %69
  %75 = load i32, ptr %6, align 4, !tbaa !5
  %76 = load i32, ptr %6, align 4, !tbaa !5
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [1010 x i64], ptr @RC, i64 0, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !12
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2000, i32 noundef %75, i64 noundef %79, i64 noundef 0)
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [1010 x i64], ptr @RC, i64 0, i64 %82
  %84 = load i64, ptr %83, align 8, !tbaa !12
  %85 = load i64, ptr @C, align 8, !tbaa !12
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [1010 x i64], ptr @RX, i64 0, i64 %87
  %89 = load i64, ptr %88, align 8, !tbaa !12
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [1010 x i64], ptr @RY, i64 0, i64 %91
  %93 = load i64, ptr %92, align 8, !tbaa !12
  %94 = add nsw i64 %89, %93
  %95 = sub nsw i64 %85, %94
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %80, i32 noundef 2001, i64 noundef %84, i64 noundef %95)
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = load i32, ptr %6, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [1010 x i64], ptr @RC, i64 0, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !12
  %101 = load i64, ptr @C, align 8, !tbaa !12
  %102 = load i32, ptr %6, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [1010 x i64], ptr @RX, i64 0, i64 %103
  %105 = load i64, ptr %104, align 8, !tbaa !12
  %106 = sub nsw i64 0, %105
  %107 = load i32, ptr %6, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [1010 x i64], ptr @RY, i64 0, i64 %108
  %110 = load i64, ptr %109, align 8, !tbaa !12
  %111 = add nsw i64 %106, %110
  %112 = sub nsw i64 %101, %111
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %96, i32 noundef 2002, i64 noundef %100, i64 noundef %112)
  %113 = load i32, ptr %6, align 4, !tbaa !5
  %114 = load i32, ptr %6, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [1010 x i64], ptr @RC, i64 0, i64 %115
  %117 = load i64, ptr %116, align 8, !tbaa !12
  %118 = load i64, ptr @C, align 8, !tbaa !12
  %119 = load i32, ptr %6, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [1010 x i64], ptr @RX, i64 0, i64 %120
  %122 = load i64, ptr %121, align 8, !tbaa !12
  %123 = load i32, ptr %6, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [1010 x i64], ptr @RY, i64 0, i64 %124
  %126 = load i64, ptr %125, align 8, !tbaa !12
  %127 = sub nsw i64 %122, %126
  %128 = sub nsw i64 %118, %127
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %113, i32 noundef 2003, i64 noundef %117, i64 noundef %128)
  %129 = load i32, ptr %6, align 4, !tbaa !5
  %130 = load i32, ptr %6, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [1010 x i64], ptr @RC, i64 0, i64 %131
  %133 = load i64, ptr %132, align 8, !tbaa !12
  %134 = load i64, ptr @C, align 8, !tbaa !12
  %135 = load i32, ptr %6, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [1010 x i64], ptr @RX, i64 0, i64 %136
  %138 = load i64, ptr %137, align 8, !tbaa !12
  %139 = sub nsw i64 0, %138
  %140 = load i32, ptr %6, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [1010 x i64], ptr @RY, i64 0, i64 %141
  %143 = load i64, ptr %142, align 8, !tbaa !12
  %144 = sub nsw i64 %139, %143
  %145 = sub nsw i64 %134, %144
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %129, i32 noundef 2004, i64 noundef %133, i64 noundef %145)
  %146 = load i32, ptr %6, align 4, !tbaa !5
  %147 = add nsw i32 1000, %146
  %148 = load i32, ptr %6, align 4, !tbaa !5
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [1010 x i64], ptr @BC, i64 0, i64 %149
  %151 = load i64, ptr %150, align 8, !tbaa !12
  %152 = load i64, ptr @C, align 8, !tbaa !12
  %153 = load i32, ptr %6, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [1010 x i64], ptr @BX, i64 0, i64 %154
  %156 = load i64, ptr %155, align 8, !tbaa !12
  %157 = load i32, ptr %6, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [1010 x i64], ptr @BY, i64 0, i64 %158
  %160 = load i64, ptr %159, align 8, !tbaa !12
  %161 = add nsw i64 %156, %160
  %162 = add nsw i64 %152, %161
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2001, i32 noundef %147, i64 noundef %151, i64 noundef %162)
  %163 = load i32, ptr %6, align 4, !tbaa !5
  %164 = add nsw i32 1000, %163
  %165 = load i32, ptr %6, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [1010 x i64], ptr @BC, i64 0, i64 %166
  %168 = load i64, ptr %167, align 8, !tbaa !12
  %169 = load i64, ptr @C, align 8, !tbaa !12
  %170 = load i32, ptr %6, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [1010 x i64], ptr @BX, i64 0, i64 %171
  %173 = load i64, ptr %172, align 8, !tbaa !12
  %174 = sub nsw i64 0, %173
  %175 = load i32, ptr %6, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [1010 x i64], ptr @BY, i64 0, i64 %176
  %178 = load i64, ptr %177, align 8, !tbaa !12
  %179 = add nsw i64 %174, %178
  %180 = add nsw i64 %169, %179
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2002, i32 noundef %164, i64 noundef %168, i64 noundef %180)
  %181 = load i32, ptr %6, align 4, !tbaa !5
  %182 = add nsw i32 1000, %181
  %183 = load i32, ptr %6, align 4, !tbaa !5
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [1010 x i64], ptr @BC, i64 0, i64 %184
  %186 = load i64, ptr %185, align 8, !tbaa !12
  %187 = load i64, ptr @C, align 8, !tbaa !12
  %188 = load i32, ptr %6, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [1010 x i64], ptr @BX, i64 0, i64 %189
  %191 = load i64, ptr %190, align 8, !tbaa !12
  %192 = load i32, ptr %6, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [1010 x i64], ptr @BY, i64 0, i64 %193
  %195 = load i64, ptr %194, align 8, !tbaa !12
  %196 = sub nsw i64 %191, %195
  %197 = add nsw i64 %187, %196
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2003, i32 noundef %182, i64 noundef %186, i64 noundef %197)
  %198 = load i32, ptr %6, align 4, !tbaa !5
  %199 = add nsw i32 1000, %198
  %200 = load i32, ptr %6, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [1010 x i64], ptr @BC, i64 0, i64 %201
  %203 = load i64, ptr %202, align 8, !tbaa !12
  %204 = load i64, ptr @C, align 8, !tbaa !12
  %205 = load i32, ptr %6, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [1010 x i64], ptr @BX, i64 0, i64 %206
  %208 = load i64, ptr %207, align 8, !tbaa !12
  %209 = sub nsw i64 0, %208
  %210 = load i32, ptr %6, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [1010 x i64], ptr @BY, i64 0, i64 %211
  %213 = load i64, ptr %212, align 8, !tbaa !12
  %214 = sub nsw i64 %209, %213
  %215 = add nsw i64 %204, %214
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2004, i32 noundef %199, i64 noundef %203, i64 noundef %215)
  %216 = load i32, ptr %6, align 4, !tbaa !5
  %217 = add nsw i32 1000, %216
  %218 = load i32, ptr %6, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [1010 x i64], ptr @BC, i64 0, i64 %219
  %221 = load i64, ptr %220, align 8, !tbaa !12
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %217, i32 noundef 2005, i64 noundef %221, i64 noundef 0)
  br label %222

222:                                              ; preds = %74
  %223 = load i32, ptr %6, align 4, !tbaa !5
  %224 = add nsw i32 %223, 1
  store i32 %224, ptr %6, align 4, !tbaa !5
  br label %69, !llvm.loop !18

225:                                              ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %226 = load i64, ptr @S, align 8, !tbaa !12
  %227 = call noundef i64 @_ZN11MinCostFlow13min_cost_flowEiix(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2000, i32 noundef 2005, i64 noundef %226)
  store i64 %227, ptr %7, align 8, !tbaa !12
  %228 = load i64, ptr @S, align 8, !tbaa !12
  %229 = mul nsw i64 2, %228
  %230 = load i64, ptr @C, align 8, !tbaa !12
  %231 = mul nsw i64 %229, %230
  %232 = load i64, ptr %7, align 8, !tbaa !12
  %233 = sub nsw i64 %231, %232
  %234 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %233)
  %235 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %234, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %236 = load i32, ptr %1, align 4
  ret i32 %236
}

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) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #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 uwtable
declare dso_local void @_ZN11MinCostFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) unnamed_addr #3 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, i64 noundef, i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN11MinCostFlow13min_cost_flowEiix(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = distinct !{!14, !10}
!15 = !{i64 0, i64 4, !5, i64 8, i64 8, !16, i64 16, i64 8, !16, i64 24, i64 8, !16, i64 32, i64 8, !16, i64 40, i64 8, !16, i64 48, i64 8, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = distinct !{!18, !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.MinCostFlow = type { i32, ptr, ptr, ptr, ptr, ptr, i64 }
%"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" }

@C = external dso_local local_unnamed_addr global i64, align 8
@N = external dso_local global i32, align 4
@S = external dso_local local_unnamed_addr global i64, align 8
@RX = external dso_local global [1010 x i64], align 16
@RY = external dso_local global [1010 x i64], align 16
@RC = external dso_local global [1010 x i64], align 16
@BX = external dso_local global [1010 x i64], align 16
@BY = external dso_local global [1010 x i64], align 16
@BC = external dso_local global [1010 x i64], align 16
@flow = external dso_local global %class.MinCostFlow, align 8
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca %class.MinCostFlow, align 8
  %2 = 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)
  %3 = load i32, ptr @N, align 4, !tbaa !5
  %4 = icmp sgt i32 %3, 0
  br i1 %4, label %.lr.ph, label %.preheader.thread

.preheader67:                                     ; preds = %.lr.ph
  %5 = icmp sgt i32 %12, 0
  br i1 %5, label %.lr.ph70, label %.preheader.thread

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %6 = getelementptr inbounds [1010 x i64], ptr @RX, i64 0, i64 %indvars.iv
  %7 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %8 = getelementptr inbounds [1010 x i64], ptr @RY, i64 0, i64 %indvars.iv
  %9 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %10 = getelementptr inbounds [1010 x i64], ptr @RC, i64 0, i64 %indvars.iv
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = load i32, ptr @N, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = icmp slt i64 %indvars.iv.next, %13
  br i1 %14, label %.lr.ph, label %.preheader67, !llvm.loop !9

.preheader:                                       ; preds = %.lr.ph70
  %15 = icmp sgt i32 %29, 0
  br i1 %15, label %.lr.ph72.preheader, label %.preheader.thread

.lr.ph72.preheader:                               ; preds = %.preheader
  %S.promoted = load i64, ptr @S, align 8, !tbaa !11
  %wide.trip.count = zext nneg i32 %29 to i64
  %min.iters.check = icmp ult i32 %29, 4
  br i1 %min.iters.check, label %.lr.ph72.preheader97, label %vector.ph

.lr.ph72.preheader97:                             ; preds = %middle.block, %.lr.ph72.preheader
  %indvars.iv84.ph = phi i64 [ 0, %.lr.ph72.preheader ], [ %n.vec, %middle.block ]
  %.ph = phi i64 [ %S.promoted, %.lr.ph72.preheader ], [ %22, %middle.block ]
  br label %.lr.ph72

vector.ph:                                        ; preds = %.lr.ph72.preheader
  %n.vec = and i64 %wide.trip.count, 2147483644
  %16 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %S.promoted, i64 0
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ %16, %vector.ph ], [ %19, %vector.body ]
  %vec.phi95 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %20, %vector.body ]
  %17 = getelementptr inbounds [1010 x i64], ptr @RC, i64 0, i64 %index
  %18 = getelementptr inbounds i8, ptr %17, i64 16
  %wide.load = load <2 x i64>, ptr %17, align 16, !tbaa !11
  %wide.load96 = load <2 x i64>, ptr %18, align 16, !tbaa !11
  %19 = add <2 x i64> %vec.phi, %wide.load
  %20 = add <2 x i64> %vec.phi95, %wide.load96
  %index.next = add nuw i64 %index, 4
  %21 = icmp eq i64 %index.next, %n.vec
  br i1 %21, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i64> %20, %19
  %22 = tail call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph72.preheader97

.lr.ph70:                                         ; preds = %.preheader67, %.lr.ph70
  %indvars.iv81 = phi i64 [ %indvars.iv.next82, %.lr.ph70 ], [ 0, %.preheader67 ]
  %23 = getelementptr inbounds [1010 x i64], ptr @BX, i64 0, i64 %indvars.iv81
  %24 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %25 = getelementptr inbounds [1010 x i64], ptr @BY, i64 0, i64 %indvars.iv81
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(8) %25)
  %27 = getelementptr inbounds [1010 x i64], ptr @BC, i64 0, i64 %indvars.iv81
  %28 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(8) %27)
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %29 = load i32, ptr @N, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = icmp slt i64 %indvars.iv.next82, %30
  br i1 %31, label %.lr.ph70, label %.preheader, !llvm.loop !16

._crit_edge:                                      ; preds = %.lr.ph72, %middle.block
  %.lcssa = phi i64 [ %22, %middle.block ], [ %37, %.lr.ph72 ]
  store i64 %.lcssa, ptr @S, align 8, !tbaa !11
  br label %.preheader.thread

.preheader.thread:                                ; preds = %0, %.preheader67, %._crit_edge, %.preheader
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %1) #7
  call void @_ZN11MinCostFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(56) %1, i32 noundef 2010)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(56) @flow, ptr noundef nonnull align 8 dereferenceable(56) %1, i64 56, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %1) #7
  %32 = load i32, ptr @N, align 4, !tbaa !5
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph76, label %._crit_edge77

.lr.ph72:                                         ; preds = %.lr.ph72.preheader97, %.lr.ph72
  %indvars.iv84 = phi i64 [ %indvars.iv.next85, %.lr.ph72 ], [ %indvars.iv84.ph, %.lr.ph72.preheader97 ]
  %34 = phi i64 [ %37, %.lr.ph72 ], [ %.ph, %.lr.ph72.preheader97 ]
  %35 = getelementptr inbounds [1010 x i64], ptr @RC, i64 0, i64 %indvars.iv84
  %36 = load i64, ptr %35, align 8, !tbaa !11
  %37 = add nsw i64 %34, %36
  %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph72, !llvm.loop !20

._crit_edge77:                                    ; preds = %.lr.ph76, %.preheader.thread
  %38 = load i64, ptr @S, align 8, !tbaa !11
  %39 = call noundef i64 @_ZN11MinCostFlow13min_cost_flowEiix(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2000, i32 noundef 2005, i64 noundef %38)
  %40 = load i64, ptr @S, align 8, !tbaa !11
  %41 = shl nsw i64 %40, 1
  %42 = load i64, ptr @C, align 8, !tbaa !11
  %43 = mul nsw i64 %41, %42
  %44 = sub nsw i64 %43, %39
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %44)
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  ret i32 0

.lr.ph76:                                         ; preds = %.preheader.thread, %.lr.ph76
  %indvars.iv87 = phi i64 [ %indvars.iv.next88, %.lr.ph76 ], [ 0, %.preheader.thread ]
  %47 = getelementptr inbounds [1010 x i64], ptr @RC, i64 0, i64 %indvars.iv87
  %48 = load i64, ptr %47, align 8, !tbaa !11
  %49 = trunc nuw nsw i64 %indvars.iv87 to i32
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2000, i32 noundef %49, i64 noundef %48, i64 noundef 0)
  %50 = load i64, ptr %47, align 8, !tbaa !11
  %51 = load i64, ptr @C, align 8, !tbaa !11
  %52 = getelementptr inbounds [1010 x i64], ptr @RX, i64 0, i64 %indvars.iv87
  %53 = load i64, ptr %52, align 8, !tbaa !11
  %54 = getelementptr inbounds [1010 x i64], ptr @RY, i64 0, i64 %indvars.iv87
  %55 = load i64, ptr %54, align 8, !tbaa !11
  %56 = add i64 %53, %55
  %57 = sub i64 %51, %56
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %49, i32 noundef 2001, i64 noundef %50, i64 noundef %57)
  %58 = load i64, ptr %47, align 8, !tbaa !11
  %59 = load i64, ptr @C, align 8, !tbaa !11
  %60 = load i64, ptr %52, align 8, !tbaa !11
  %61 = load i64, ptr %54, align 8, !tbaa !11
  %.neg = add i64 %60, %59
  %62 = sub i64 %.neg, %61
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %49, i32 noundef 2002, i64 noundef %58, i64 noundef %62)
  %63 = load i64, ptr %47, align 8, !tbaa !11
  %64 = load i64, ptr @C, align 8, !tbaa !11
  %65 = load i64, ptr %52, align 8, !tbaa !11
  %66 = load i64, ptr %54, align 8, !tbaa !11
  %.neg56 = sub i64 %64, %65
  %67 = add i64 %.neg56, %66
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %49, i32 noundef 2003, i64 noundef %63, i64 noundef %67)
  %68 = load i64, ptr %47, align 8, !tbaa !11
  %69 = load i64, ptr @C, align 8, !tbaa !11
  %70 = load i64, ptr %52, align 8, !tbaa !11
  %71 = load i64, ptr %54, align 8, !tbaa !11
  %72 = add i64 %70, %69
  %73 = add i64 %72, %71
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %49, i32 noundef 2004, i64 noundef %68, i64 noundef %73)
  %74 = getelementptr inbounds [1010 x i64], ptr @BC, i64 0, i64 %indvars.iv87
  %75 = load i64, ptr %74, align 8, !tbaa !11
  %76 = load i64, ptr @C, align 8, !tbaa !11
  %77 = getelementptr inbounds [1010 x i64], ptr @BX, i64 0, i64 %indvars.iv87
  %78 = load i64, ptr %77, align 8, !tbaa !11
  %79 = getelementptr inbounds [1010 x i64], ptr @BY, i64 0, i64 %indvars.iv87
  %80 = load i64, ptr %79, align 8, !tbaa !11
  %81 = add i64 %78, %76
  %82 = add i64 %81, %80
  %83 = trunc i64 %indvars.iv87 to i32
  %84 = add i32 %83, 1000
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2001, i32 noundef %84, i64 noundef %75, i64 noundef %82)
  %85 = load i64, ptr %74, align 8, !tbaa !11
  %86 = load i64, ptr @C, align 8, !tbaa !11
  %87 = load i64, ptr %77, align 8, !tbaa !11
  %88 = load i64, ptr %79, align 8, !tbaa !11
  %89 = sub i64 %86, %87
  %90 = add i64 %89, %88
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2002, i32 noundef %84, i64 noundef %85, i64 noundef %90)
  %91 = load i64, ptr %74, align 8, !tbaa !11
  %92 = load i64, ptr @C, align 8, !tbaa !11
  %93 = load i64, ptr %77, align 8, !tbaa !11
  %94 = load i64, ptr %79, align 8, !tbaa !11
  %95 = add i64 %93, %92
  %96 = sub i64 %95, %94
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2003, i32 noundef %84, i64 noundef %91, i64 noundef %96)
  %97 = load i64, ptr %74, align 8, !tbaa !11
  %98 = load i64, ptr @C, align 8, !tbaa !11
  %99 = load i64, ptr %77, align 8, !tbaa !11
  %100 = load i64, ptr %79, align 8, !tbaa !11
  %101 = add i64 %99, %100
  %102 = sub i64 %98, %101
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef 2004, i32 noundef %84, i64 noundef %97, i64 noundef %102)
  %103 = load i64, ptr %74, align 8, !tbaa !11
  call void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56) @flow, i32 noundef %84, i32 noundef 2005, i64 noundef %103, i64 noundef 0)
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %104 = load i32, ptr @N, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = icmp slt i64 %indvars.iv.next88, %105
  br i1 %106, label %.lr.ph76, label %._crit_edge77, !llvm.loop !21
}

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) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) 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 uwtable
declare dso_local void @_ZN11MinCostFlowC2Ei(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11MinCostFlow8add_edgeEiixx(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, i64 noundef, i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZN11MinCostFlow13min_cost_flowEiix(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #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 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !10, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !10}
!17 = !{i64 0, i64 4, !5, i64 8, i64 8, !18, i64 16, i64 8, !18, i64 24, i64 8, !18, i64 32, i64 8, !18, i64 40, i64 8, !18, i64 48, i64 8, !11}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}
!20 = distinct !{!20, !10, !15, !14}
!21 = distinct !{!21, !10}


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