; LLVM IR from tangjz/acm-icpc :: lydsy (3694)

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

%struct.Edge = type { i32, i32, i32, i32, i32 }

@e = external dso_local global [200002 x %struct.Edge], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@pre = external dso_local global [4001 x i32], align 16
@dis = external dso_local global [4001 x i32], align 16
@dep = external dso_local global [4001 x i32], align 16
@fa = external dso_local global [4001 x [13 x i32]], align 16
@nxt = external dso_local global [4001 x i32], align 16
@ans = external dso_local global [4001 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(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 nounwind uwtable
declare dso_local noundef i32 @_Z3lcaii(i32 noundef, i32 noundef) #2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %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 %struct.Edge, align 4
  %7 = alloca %struct.Edge, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  call void @llvm.memset.p0.i64(ptr align 16 @pre, i8 -1, i64 16004, i1 false)
  br label %23

23:                                               ; preds = %27, %0
  %24 = load i32, ptr @m, align 4, !tbaa !5
  %25 = add nsw i32 %24, -1
  store i32 %25, ptr @m, align 4, !tbaa !5
  %26 = icmp ne i32 %24, 0
  br i1 %26, label %27, label %73

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  call void @llvm.lifetime.start.p0(i64 20, ptr %6) #8
  %29 = getelementptr inbounds %struct.Edge, ptr %6, i32 0, i32 0
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [4001 x i32], ptr @pre, i64 0, i64 %31
  %33 = load i32, ptr %32, align 4, !tbaa !5
  store i32 %33, ptr %29, align 4, !tbaa !9
  %34 = getelementptr inbounds %struct.Edge, ptr %6, i32 0, i32 1
  %35 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %35, ptr %34, align 4, !tbaa !11
  %36 = getelementptr inbounds %struct.Edge, ptr %6, i32 0, i32 2
  %37 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %37, ptr %36, align 4, !tbaa !12
  %38 = getelementptr inbounds %struct.Edge, ptr %6, i32 0, i32 3
  %39 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %39, ptr %38, align 4, !tbaa !13
  %40 = getelementptr inbounds %struct.Edge, ptr %6, i32 0, i32 4
  %41 = load i32, ptr %5, align 4, !tbaa !5
  %42 = xor i32 %41, 1
  store i32 %42, ptr %40, align 4, !tbaa !14
  %43 = load i32, ptr @tot, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %44
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %45, ptr align 4 %6, i64 20, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 20, ptr %6) #8
  %46 = load i32, ptr @tot, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr @tot, align 4, !tbaa !5
  %48 = load i32, ptr %2, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [4001 x i32], ptr @pre, i64 0, i64 %49
  store i32 %46, ptr %50, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 20, ptr %7) #8
  %51 = getelementptr inbounds %struct.Edge, ptr %7, i32 0, i32 0
  %52 = load i32, ptr %3, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [4001 x i32], ptr @pre, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  store i32 %55, ptr %51, align 4, !tbaa !9
  %56 = getelementptr inbounds %struct.Edge, ptr %7, i32 0, i32 1
  %57 = load i32, ptr %3, align 4, !tbaa !5
  store i32 %57, ptr %56, align 4, !tbaa !11
  %58 = getelementptr inbounds %struct.Edge, ptr %7, i32 0, i32 2
  %59 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %59, ptr %58, align 4, !tbaa !12
  %60 = getelementptr inbounds %struct.Edge, ptr %7, i32 0, i32 3
  %61 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %61, ptr %60, align 4, !tbaa !13
  %62 = getelementptr inbounds %struct.Edge, ptr %7, i32 0, i32 4
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = xor i32 %63, 1
  store i32 %64, ptr %62, align 4, !tbaa !14
  %65 = load i32, ptr @tot, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %66
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %67, ptr align 4 %7, i64 20, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.end.p0(i64 20, ptr %7) #8
  %68 = load i32, ptr @tot, align 4, !tbaa !5
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr @tot, align 4, !tbaa !5
  %70 = load i32, ptr %3, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [4001 x i32], ptr @pre, i64 0, i64 %71
  store i32 %68, ptr %72, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %23, !llvm.loop !16

73:                                               ; preds = %23
  store i32 1, ptr getelementptr inbounds ([4001 x i32], ptr @dep, i64 0, i64 1), align 4, !tbaa !5
  call void @_Z3dfsi(i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 1, ptr %8, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %141, %73
  %75 = load i32, ptr %8, align 4, !tbaa !5
  %76 = load i32, ptr @n, align 4, !tbaa !5
  %77 = icmp sle i32 %75, %76
  br i1 %77, label %79, label %78

78:                                               ; preds = %74
  store i32 4, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %144

79:                                               ; preds = %74
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = load i32, ptr %8, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [4001 x i32], ptr @nxt, i64 0, i64 %82
  store i32 %80, ptr %83, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %84 = load i32, ptr %8, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [4001 x i32], ptr @pre, i64 0, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !5
  store i32 %87, ptr %10, align 4, !tbaa !5
  br label %88

88:                                               ; preds = %134, %79
  %89 = load i32, ptr %10, align 4, !tbaa !5
  %90 = icmp ne i32 %89, -1
  br i1 %90, label %92, label %91

91:                                               ; preds = %88
  store i32 7, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %140

92:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %93 = load i32, ptr %10, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %94
  %96 = getelementptr inbounds %struct.Edge, ptr %95, i32 0, i32 2
  store ptr %96, ptr %11, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %97 = load i32, ptr %10, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %98
  %100 = getelementptr inbounds %struct.Edge, ptr %99, i32 0, i32 3
  store ptr %100, ptr %12, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %101 = load i32, ptr %10, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %102
  %104 = getelementptr inbounds %struct.Edge, ptr %103, i32 0, i32 4
  store ptr %104, ptr %13, align 8, !tbaa !18
  %105 = load ptr, ptr %13, align 8, !tbaa !18
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %133

108:                                              ; preds = %92
  %109 = load i32, ptr %10, align 4, !tbaa !5
  %110 = and i32 %109, 1
  %111 = icmp ne i32 %110, 0
  br i1 %111, label %112, label %126

112:                                              ; preds = %108
  %113 = load i32, ptr %8, align 4, !tbaa !5
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [4001 x i32], ptr @dis, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !5
  %117 = load ptr, ptr %11, align 8, !tbaa !18
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [4001 x i32], ptr @dis, i64 0, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = add nsw i32 %116, %121
  %123 = load ptr, ptr %12, align 8, !tbaa !18
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = add nsw i32 %122, %124
  br label %127

126:                                              ; preds = %108
  br label %127

127:                                              ; preds = %126, %112
  %128 = phi i32 [ %125, %112 ], [ 0, %126 ]
  %129 = load i32, ptr %10, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %130
  %132 = getelementptr inbounds %struct.Edge, ptr %131, i32 0, i32 4
  store i32 %128, ptr %132, align 4, !tbaa !14
  br label %133

133:                                              ; preds = %127, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  br label %134

134:                                              ; preds = %133
  %135 = load i32, ptr %10, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %136
  %138 = getelementptr inbounds %struct.Edge, ptr %137, i32 0, i32 0
  %139 = load i32, ptr %138, align 4, !tbaa !9
  store i32 %139, ptr %10, align 4, !tbaa !5
  br label %88, !llvm.loop !20

140:                                              ; preds = %91
  br label %141

141:                                              ; preds = %140
  %142 = load i32, ptr %8, align 4, !tbaa !5
  %143 = add nsw i32 %142, 1
  store i32 %143, ptr %8, align 4, !tbaa !5
  br label %74, !llvm.loop !21

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

145:                                              ; preds = %181, %144
  %146 = load i32, ptr %14, align 4, !tbaa !5
  %147 = icmp slt i32 %146, 13
  br i1 %147, label %149, label %148

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

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

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

154:                                              ; preds = %150
  store i32 13, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  br label %180

155:                                              ; preds = %150
  %156 = load i32, ptr %15, align 4, !tbaa !5
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %157
  %159 = load i32, ptr %14, align 4, !tbaa !5
  %160 = sub nsw i32 %159, 1
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [13 x i32], ptr %158, i64 0, i64 %161
  %163 = load i32, ptr %162, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %164
  %166 = load i32, ptr %14, align 4, !tbaa !5
  %167 = sub nsw i32 %166, 1
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [13 x i32], ptr %165, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = load i32, ptr %15, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %172
  %174 = load i32, ptr %14, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [13 x i32], ptr %173, i64 0, i64 %175
  store i32 %170, ptr %176, align 4, !tbaa !5
  br label %177

177:                                              ; preds = %155
  %178 = load i32, ptr %15, align 4, !tbaa !5
  %179 = add nsw i32 %178, 1
  store i32 %179, ptr %15, align 4, !tbaa !5
  br label %150, !llvm.loop !22

180:                                              ; preds = %154
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %14, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %14, align 4, !tbaa !5
  br label %145, !llvm.loop !23

184:                                              ; preds = %148
  %185 = load i32, ptr @tot, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds %struct.Edge, ptr @e, i64 %186
  call void @_ZSt4sortIP4EdgeEvT_S2_(ptr noundef @e, ptr noundef %187)
  call void @llvm.memset.p0.i64(ptr align 16 @ans, i8 -1, i64 16004, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %188

188:                                              ; preds = %229, %184
  %189 = load i32, ptr %16, align 4, !tbaa !5
  %190 = load i32, ptr @tot, align 4, !tbaa !5
  %191 = icmp slt i32 %189, %190
  br i1 %191, label %193, label %192

192:                                              ; preds = %188
  store i32 16, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %232

193:                                              ; preds = %188
  %194 = load i32, ptr %16, align 4, !tbaa !5
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %195
  %197 = getelementptr inbounds %struct.Edge, ptr %196, i32 0, i32 4
  %198 = load i32, ptr %197, align 4, !tbaa !14
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %201, label %200

200:                                              ; preds = %193
  br label %229

201:                                              ; preds = %193
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %202 = load i32, ptr %16, align 4, !tbaa !5
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %203
  %205 = getelementptr inbounds %struct.Edge, ptr %204, i32 0, i32 1
  store ptr %205, ptr %17, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %206 = load i32, ptr %16, align 4, !tbaa !5
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %207
  %209 = getelementptr inbounds %struct.Edge, ptr %208, i32 0, i32 2
  store ptr %209, ptr %18, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %210 = load i32, ptr %16, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %211
  %213 = getelementptr inbounds %struct.Edge, ptr %212, i32 0, i32 4
  store ptr %213, ptr %19, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %214 = load ptr, ptr %17, align 8, !tbaa !18
  %215 = load i32, ptr %214, align 4, !tbaa !5
  %216 = load ptr, ptr %18, align 8, !tbaa !18
  %217 = load i32, ptr %216, align 4, !tbaa !5
  %218 = call noundef i32 @_Z3lcaii(i32 noundef %215, i32 noundef %217)
  store i32 %218, ptr %20, align 4, !tbaa !5
  %219 = load ptr, ptr %17, align 8, !tbaa !18
  %220 = load i32, ptr %219, align 4, !tbaa !5
  %221 = load i32, ptr %20, align 4, !tbaa !5
  %222 = load ptr, ptr %19, align 8, !tbaa !18
  %223 = load i32, ptr %222, align 4, !tbaa !5
  call void @_Z6updateiii(i32 noundef %220, i32 noundef %221, i32 noundef %223)
  %224 = load ptr, ptr %18, align 8, !tbaa !18
  %225 = load i32, ptr %224, align 4, !tbaa !5
  %226 = load i32, ptr %20, align 4, !tbaa !5
  %227 = load ptr, ptr %19, align 8, !tbaa !18
  %228 = load i32, ptr %227, align 4, !tbaa !5
  call void @_Z6updateiii(i32 noundef %225, i32 noundef %226, i32 noundef %228)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %229

229:                                              ; preds = %201, %200
  %230 = load i32, ptr %16, align 4, !tbaa !5
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %16, align 4, !tbaa !5
  br label %188, !llvm.loop !24

232:                                              ; preds = %192
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 2, ptr %21, align 4, !tbaa !5
  br label %233

233:                                              ; preds = %244, %232
  %234 = load i32, ptr %21, align 4, !tbaa !5
  %235 = load i32, ptr @n, align 4, !tbaa !5
  %236 = icmp sle i32 %234, %235
  br i1 %236, label %238, label %237

237:                                              ; preds = %233
  store i32 19, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %247

238:                                              ; preds = %233
  %239 = load i32, ptr %21, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [4001 x i32], ptr @ans, i64 0, i64 %240
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %242)
  br label %244

244:                                              ; preds = %238
  %245 = load i32, ptr %21, align 4, !tbaa !5
  %246 = add nsw i32 %245, 1
  store i32 %246, ptr %21, align 4, !tbaa !5
  br label %233, !llvm.loop !25

247:                                              ; preds = %237
  %248 = call i32 @putchar(i32 noundef 10)
  ret i32 0
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP4EdgeEvT_S2_(ptr noundef, ptr noundef) #7

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

; Function Attrs: inlinehint mustprogress uwtable
declare i32 @putchar(i32 noundef) #7

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


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

%struct.Edge = type { i32, i32, i32, i32, i32 }

@e = external dso_local global [200002 x %struct.Edge], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@pre = external dso_local local_unnamed_addr global [4001 x i32], align 16
@dis = external dso_local local_unnamed_addr global [4001 x i32], align 16
@dep = external dso_local local_unnamed_addr global [4001 x i32], align 16
@fa = external dso_local local_unnamed_addr global [4001 x [13 x i32]], align 16
@nxt = external dso_local local_unnamed_addr global [4001 x i32], align 16
@ans = external dso_local local_unnamed_addr global [4001 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsi(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 nounwind uwtable
declare dso_local noundef i32 @_Z3lcaii(i32 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16004) @pre, i8 -1, i64 16004, i1 false)
  %6 = load i32, ptr @m, align 4, !tbaa !5
  %7 = add nsw i32 %6, -1
  store i32 %7, ptr @m, align 4, !tbaa !5
  %.not60 = icmp eq i32 %6, 0
  br i1 %.not60, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0, %.lr.ph
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %9 = load i32, ptr %1, align 4, !tbaa !5
  %10 = sext i32 %9 to i64
  %11 = getelementptr inbounds [4001 x i32], ptr @pre, i64 0, i64 %10
  %12 = load i32, ptr %11, align 4, !tbaa !5
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = load i32, ptr %4, align 4, !tbaa !5
  %16 = xor i32 %15, 1
  %17 = load i32, ptr @tot, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %18
  store i32 %12, ptr %19, align 4, !tbaa !5
  %.sroa.442.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 4
  store i32 %9, ptr %.sroa.442.0..sroa_idx, align 4, !tbaa !5
  %.sroa.543.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 8
  store i32 %13, ptr %.sroa.543.0..sroa_idx, align 4, !tbaa !5
  %.sroa.644.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 12
  store i32 %14, ptr %.sroa.644.0..sroa_idx, align 4, !tbaa !5
  %.sroa.745.0..sroa_idx = getelementptr inbounds i8, ptr %19, i64 16
  store i32 %16, ptr %.sroa.745.0..sroa_idx, align 4, !tbaa !5
  %20 = add nsw i32 %17, 1
  store i32 %17, ptr %11, align 4, !tbaa !5
  %21 = sext i32 %13 to i64
  %22 = getelementptr inbounds [4001 x i32], ptr @pre, i64 0, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %24 = sext i32 %20 to i64
  %25 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %24
  store i32 %23, ptr %25, align 4, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %25, i64 4
  store i32 %13, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %25, i64 8
  store i32 %9, ptr %.sroa.5.0..sroa_idx, align 4, !tbaa !5
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %25, i64 12
  store i32 %14, ptr %.sroa.6.0..sroa_idx, align 4, !tbaa !5
  %.sroa.7.0..sroa_idx = getelementptr inbounds i8, ptr %25, i64 16
  store i32 %16, ptr %.sroa.7.0..sroa_idx, align 4, !tbaa !5
  %26 = add nsw i32 %17, 2
  store i32 %26, ptr @tot, align 4, !tbaa !5
  store i32 %20, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %27 = load i32, ptr @m, align 4, !tbaa !5
  %28 = add nsw i32 %27, -1
  store i32 %28, ptr @m, align 4, !tbaa !5
  %.not = icmp eq i32 %27, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %0
  store i32 1, ptr getelementptr inbounds (i8, ptr @dep, i64 4), align 4, !tbaa !5
  call void @_Z3dfsi(i32 noundef 1)
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %.not5167 = icmp slt i32 %29, 1
  br i1 %.not5167, label %.split.us, label %.lr.ph70.preheader

.lr.ph70.preheader:                               ; preds = %._crit_edge
  %30 = add nuw i32 %29, 1
  %wide.trip.count = zext i32 %30 to i64
  br label %.lr.ph70

.preheader59:                                     ; preds = %._crit_edge66
  br i1 %.not5167, label %.split.us, label %.preheader58.preheader

.preheader58.preheader:                           ; preds = %.preheader59
  %31 = zext nneg i32 %29 to i64
  %32 = add nsw i64 %wide.trip.count, -2
  %xtraiter = and i64 %31, 1
  %33 = icmp eq i64 %32, 0
  br i1 %33, label %._crit_edge74.preheader.unr-lcssa, label %.preheader58.preheader.new

.preheader58.preheader.new:                       ; preds = %.preheader58.preheader
  %unroll_iter = and i64 %31, 2147483646
  br label %272

.lr.ph70:                                         ; preds = %.lr.ph70.preheader, %._crit_edge66
  %indvars.iv = phi i64 [ 1, %.lr.ph70.preheader ], [ %indvars.iv.next, %._crit_edge66 ]
  %34 = getelementptr inbounds [4001 x i32], ptr @nxt, i64 0, i64 %indvars.iv
  %35 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %35, ptr %34, align 4, !tbaa !5
  %36 = getelementptr inbounds [4001 x i32], ptr @pre, i64 0, i64 %indvars.iv
  %.04761 = load i32, ptr %36, align 4, !tbaa !5
  %.not5562 = icmp eq i32 %.04761, -1
  br i1 %.not5562, label %._crit_edge66, label %.lr.ph65

.lr.ph65:                                         ; preds = %.lr.ph70
  %37 = getelementptr inbounds [4001 x i32], ptr @dis, i64 0, i64 %indvars.iv
  br label %38

._crit_edge66:                                    ; preds = %58, %.lr.ph70
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader59, label %.lr.ph70, !llvm.loop !11

38:                                               ; preds = %.lr.ph65, %58
  %.04763 = phi i32 [ %.04761, %.lr.ph65 ], [ %.047, %58 ]
  %39 = sext i32 %.04763 to i64
  %40 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %39
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  %42 = getelementptr inbounds i8, ptr %40, i64 12
  %43 = getelementptr inbounds i8, ptr %40, i64 16
  %44 = load i32, ptr %43, align 4, !tbaa !5
  %.not56 = icmp eq i32 %44, 0
  br i1 %.not56, label %58, label %45

45:                                               ; preds = %38
  %46 = and i32 %.04763, 1
  %.not57 = icmp eq i32 %46, 0
  br i1 %.not57, label %56, label %47

47:                                               ; preds = %45
  %48 = load i32, ptr %37, align 4, !tbaa !5
  %49 = load i32, ptr %41, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [4001 x i32], ptr @dis, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = add nsw i32 %52, %48
  %54 = load i32, ptr %42, align 4, !tbaa !5
  %55 = add nsw i32 %53, %54
  br label %56

56:                                               ; preds = %45, %47
  %57 = phi i32 [ %55, %47 ], [ 0, %45 ]
  store i32 %57, ptr %43, align 4, !tbaa !12
  br label %58

58:                                               ; preds = %56, %38
  %.047 = load i32, ptr %40, align 4, !tbaa !5
  %.not55 = icmp eq i32 %.047, -1
  br i1 %.not55, label %._crit_edge66, label %38, !llvm.loop !14

.split.us.loopexit.unr-lcssa:                     ; preds = %._crit_edge74.10, %._crit_edge74.10.preheader
  %indvars.iv85.11.unr = phi i64 [ 1, %._crit_edge74.10.preheader ], [ %indvars.iv.next86.11.1, %._crit_edge74.10 ]
  %lcmp.mod144.not = icmp eq i64 %xtraiter143, 0
  br i1 %lcmp.mod144.not, label %.split.us, label %._crit_edge74.10.epil

._crit_edge74.10.epil:                            ; preds = %.split.us.loopexit.unr-lcssa
  %59 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.11.unr, i64 11
  %60 = load i32, ptr %59, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %61, i64 11
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.11.unr, i64 12
  store i32 %63, ptr %64, align 4, !tbaa !5
  br label %.split.us

.split.us:                                        ; preds = %._crit_edge74.10.epil, %.split.us.loopexit.unr-lcssa, %._crit_edge, %.preheader59
  %65 = load i32, ptr @tot, align 4, !tbaa !5
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds %struct.Edge, ptr @e, i64 %66
  call void @_ZSt4sortIP4EdgeEvT_S2_(ptr noundef nonnull @e, ptr noundef nonnull %67)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16004) @ans, i8 -1, i64 16004, i1 false)
  %68 = load i32, ptr @tot, align 4, !tbaa !5
  %69 = icmp sgt i32 %68, 0
  br i1 %69, label %.lr.ph78, label %.preheader

._crit_edge74:                                    ; preds = %._crit_edge74, %._crit_edge74.preheader.new
  %indvars.iv85.1 = phi i64 [ 1, %._crit_edge74.preheader.new ], [ %indvars.iv.next86.1.1, %._crit_edge74 ]
  %niter105 = phi i64 [ 0, %._crit_edge74.preheader.new ], [ %niter105.next.1, %._crit_edge74 ]
  %70 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.1, i64 1
  %71 = load i32, ptr %70, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %72, i64 1
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.1, i64 2
  store i32 %74, ptr %75, align 4, !tbaa !5
  %indvars.iv.next86.1 = add nuw nsw i64 %indvars.iv85.1, 1
  %76 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.1, i64 1
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %78, i64 1
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.1, i64 2
  store i32 %80, ptr %81, align 4, !tbaa !5
  %indvars.iv.next86.1.1 = add nuw nsw i64 %indvars.iv85.1, 2
  %niter105.next.1 = add i64 %niter105, 2
  %niter105.ncmp.1 = icmp eq i64 %niter105.next.1, %unroll_iter104
  br i1 %niter105.ncmp.1, label %._crit_edge74.1.preheader.unr-lcssa, label %._crit_edge74, !llvm.loop !15

._crit_edge74.1.preheader.unr-lcssa:              ; preds = %._crit_edge74, %._crit_edge74.preheader
  %indvars.iv85.1.unr = phi i64 [ 1, %._crit_edge74.preheader ], [ %indvars.iv.next86.1.1, %._crit_edge74 ]
  %lcmp.mod103.not = icmp eq i64 %xtraiter102, 0
  br i1 %lcmp.mod103.not, label %._crit_edge74.1.preheader, label %._crit_edge74.epil

._crit_edge74.epil:                               ; preds = %._crit_edge74.1.preheader.unr-lcssa
  %82 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.1.unr, i64 1
  %83 = load i32, ptr %82, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %84, i64 1
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.1.unr, i64 2
  store i32 %86, ptr %87, align 4, !tbaa !5
  br label %._crit_edge74.1.preheader

._crit_edge74.1.preheader:                        ; preds = %._crit_edge74.1.preheader.unr-lcssa, %._crit_edge74.epil
  %xtraiter107 = and i64 %31, 1
  %88 = icmp eq i64 %32, 0
  br i1 %88, label %._crit_edge74.2.preheader.unr-lcssa, label %._crit_edge74.1.preheader.new

._crit_edge74.1.preheader.new:                    ; preds = %._crit_edge74.1.preheader
  %unroll_iter109 = and i64 %31, 2147483646
  br label %._crit_edge74.1

._crit_edge74.1:                                  ; preds = %._crit_edge74.1, %._crit_edge74.1.preheader.new
  %indvars.iv85.2 = phi i64 [ 1, %._crit_edge74.1.preheader.new ], [ %indvars.iv.next86.2.1, %._crit_edge74.1 ]
  %niter110 = phi i64 [ 0, %._crit_edge74.1.preheader.new ], [ %niter110.next.1, %._crit_edge74.1 ]
  %89 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.2, i64 2
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %91, i64 2
  %93 = load i32, ptr %92, align 4, !tbaa !5
  %94 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.2, i64 3
  store i32 %93, ptr %94, align 4, !tbaa !5
  %indvars.iv.next86.2 = add nuw nsw i64 %indvars.iv85.2, 1
  %95 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.2, i64 2
  %96 = load i32, ptr %95, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %97, i64 2
  %99 = load i32, ptr %98, align 4, !tbaa !5
  %100 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.2, i64 3
  store i32 %99, ptr %100, align 4, !tbaa !5
  %indvars.iv.next86.2.1 = add nuw nsw i64 %indvars.iv85.2, 2
  %niter110.next.1 = add i64 %niter110, 2
  %niter110.ncmp.1 = icmp eq i64 %niter110.next.1, %unroll_iter109
  br i1 %niter110.ncmp.1, label %._crit_edge74.2.preheader.unr-lcssa, label %._crit_edge74.1, !llvm.loop !15

._crit_edge74.2.preheader.unr-lcssa:              ; preds = %._crit_edge74.1, %._crit_edge74.1.preheader
  %indvars.iv85.2.unr = phi i64 [ 1, %._crit_edge74.1.preheader ], [ %indvars.iv.next86.2.1, %._crit_edge74.1 ]
  %lcmp.mod108.not = icmp eq i64 %xtraiter107, 0
  br i1 %lcmp.mod108.not, label %._crit_edge74.2.preheader, label %._crit_edge74.1.epil

._crit_edge74.1.epil:                             ; preds = %._crit_edge74.2.preheader.unr-lcssa
  %101 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.2.unr, i64 2
  %102 = load i32, ptr %101, align 4, !tbaa !5
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %103, i64 2
  %105 = load i32, ptr %104, align 4, !tbaa !5
  %106 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.2.unr, i64 3
  store i32 %105, ptr %106, align 4, !tbaa !5
  br label %._crit_edge74.2.preheader

._crit_edge74.2.preheader:                        ; preds = %._crit_edge74.2.preheader.unr-lcssa, %._crit_edge74.1.epil
  %xtraiter111 = and i64 %31, 1
  %107 = icmp eq i64 %32, 0
  br i1 %107, label %._crit_edge74.3.preheader.unr-lcssa, label %._crit_edge74.2.preheader.new

._crit_edge74.2.preheader.new:                    ; preds = %._crit_edge74.2.preheader
  %unroll_iter113 = and i64 %31, 2147483646
  br label %._crit_edge74.2

._crit_edge74.2:                                  ; preds = %._crit_edge74.2, %._crit_edge74.2.preheader.new
  %indvars.iv85.3 = phi i64 [ 1, %._crit_edge74.2.preheader.new ], [ %indvars.iv.next86.3.1, %._crit_edge74.2 ]
  %niter114 = phi i64 [ 0, %._crit_edge74.2.preheader.new ], [ %niter114.next.1, %._crit_edge74.2 ]
  %108 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.3, i64 3
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %110, i64 3
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.3, i64 4
  store i32 %112, ptr %113, align 4, !tbaa !5
  %indvars.iv.next86.3 = add nuw nsw i64 %indvars.iv85.3, 1
  %114 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.3, i64 3
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %116, i64 3
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.3, i64 4
  store i32 %118, ptr %119, align 4, !tbaa !5
  %indvars.iv.next86.3.1 = add nuw nsw i64 %indvars.iv85.3, 2
  %niter114.next.1 = add i64 %niter114, 2
  %niter114.ncmp.1 = icmp eq i64 %niter114.next.1, %unroll_iter113
  br i1 %niter114.ncmp.1, label %._crit_edge74.3.preheader.unr-lcssa, label %._crit_edge74.2, !llvm.loop !15

._crit_edge74.3.preheader.unr-lcssa:              ; preds = %._crit_edge74.2, %._crit_edge74.2.preheader
  %indvars.iv85.3.unr = phi i64 [ 1, %._crit_edge74.2.preheader ], [ %indvars.iv.next86.3.1, %._crit_edge74.2 ]
  %lcmp.mod112.not = icmp eq i64 %xtraiter111, 0
  br i1 %lcmp.mod112.not, label %._crit_edge74.3.preheader, label %._crit_edge74.2.epil

._crit_edge74.2.epil:                             ; preds = %._crit_edge74.3.preheader.unr-lcssa
  %120 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.3.unr, i64 3
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %122, i64 3
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.3.unr, i64 4
  store i32 %124, ptr %125, align 4, !tbaa !5
  br label %._crit_edge74.3.preheader

._crit_edge74.3.preheader:                        ; preds = %._crit_edge74.3.preheader.unr-lcssa, %._crit_edge74.2.epil
  %xtraiter115 = and i64 %31, 1
  %126 = icmp eq i64 %32, 0
  br i1 %126, label %._crit_edge74.4.preheader.unr-lcssa, label %._crit_edge74.3.preheader.new

._crit_edge74.3.preheader.new:                    ; preds = %._crit_edge74.3.preheader
  %unroll_iter117 = and i64 %31, 2147483646
  br label %._crit_edge74.3

._crit_edge74.3:                                  ; preds = %._crit_edge74.3, %._crit_edge74.3.preheader.new
  %indvars.iv85.4 = phi i64 [ 1, %._crit_edge74.3.preheader.new ], [ %indvars.iv.next86.4.1, %._crit_edge74.3 ]
  %niter118 = phi i64 [ 0, %._crit_edge74.3.preheader.new ], [ %niter118.next.1, %._crit_edge74.3 ]
  %127 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.4, i64 4
  %128 = load i32, ptr %127, align 4, !tbaa !5
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %129, i64 4
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.4, i64 5
  store i32 %131, ptr %132, align 4, !tbaa !5
  %indvars.iv.next86.4 = add nuw nsw i64 %indvars.iv85.4, 1
  %133 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.4, i64 4
  %134 = load i32, ptr %133, align 4, !tbaa !5
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %135, i64 4
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.4, i64 5
  store i32 %137, ptr %138, align 4, !tbaa !5
  %indvars.iv.next86.4.1 = add nuw nsw i64 %indvars.iv85.4, 2
  %niter118.next.1 = add i64 %niter118, 2
  %niter118.ncmp.1 = icmp eq i64 %niter118.next.1, %unroll_iter117
  br i1 %niter118.ncmp.1, label %._crit_edge74.4.preheader.unr-lcssa, label %._crit_edge74.3, !llvm.loop !15

._crit_edge74.4.preheader.unr-lcssa:              ; preds = %._crit_edge74.3, %._crit_edge74.3.preheader
  %indvars.iv85.4.unr = phi i64 [ 1, %._crit_edge74.3.preheader ], [ %indvars.iv.next86.4.1, %._crit_edge74.3 ]
  %lcmp.mod116.not = icmp eq i64 %xtraiter115, 0
  br i1 %lcmp.mod116.not, label %._crit_edge74.4.preheader, label %._crit_edge74.3.epil

._crit_edge74.3.epil:                             ; preds = %._crit_edge74.4.preheader.unr-lcssa
  %139 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.4.unr, i64 4
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %141, i64 4
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.4.unr, i64 5
  store i32 %143, ptr %144, align 4, !tbaa !5
  br label %._crit_edge74.4.preheader

._crit_edge74.4.preheader:                        ; preds = %._crit_edge74.4.preheader.unr-lcssa, %._crit_edge74.3.epil
  %xtraiter119 = and i64 %31, 1
  %145 = icmp eq i64 %32, 0
  br i1 %145, label %._crit_edge74.5.preheader.unr-lcssa, label %._crit_edge74.4.preheader.new

._crit_edge74.4.preheader.new:                    ; preds = %._crit_edge74.4.preheader
  %unroll_iter121 = and i64 %31, 2147483646
  br label %._crit_edge74.4

._crit_edge74.4:                                  ; preds = %._crit_edge74.4, %._crit_edge74.4.preheader.new
  %indvars.iv85.5 = phi i64 [ 1, %._crit_edge74.4.preheader.new ], [ %indvars.iv.next86.5.1, %._crit_edge74.4 ]
  %niter122 = phi i64 [ 0, %._crit_edge74.4.preheader.new ], [ %niter122.next.1, %._crit_edge74.4 ]
  %146 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.5, i64 5
  %147 = load i32, ptr %146, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %148, i64 5
  %150 = load i32, ptr %149, align 4, !tbaa !5
  %151 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.5, i64 6
  store i32 %150, ptr %151, align 4, !tbaa !5
  %indvars.iv.next86.5 = add nuw nsw i64 %indvars.iv85.5, 1
  %152 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.5, i64 5
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %154, i64 5
  %156 = load i32, ptr %155, align 4, !tbaa !5
  %157 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.5, i64 6
  store i32 %156, ptr %157, align 4, !tbaa !5
  %indvars.iv.next86.5.1 = add nuw nsw i64 %indvars.iv85.5, 2
  %niter122.next.1 = add i64 %niter122, 2
  %niter122.ncmp.1 = icmp eq i64 %niter122.next.1, %unroll_iter121
  br i1 %niter122.ncmp.1, label %._crit_edge74.5.preheader.unr-lcssa, label %._crit_edge74.4, !llvm.loop !15

._crit_edge74.5.preheader.unr-lcssa:              ; preds = %._crit_edge74.4, %._crit_edge74.4.preheader
  %indvars.iv85.5.unr = phi i64 [ 1, %._crit_edge74.4.preheader ], [ %indvars.iv.next86.5.1, %._crit_edge74.4 ]
  %lcmp.mod120.not = icmp eq i64 %xtraiter119, 0
  br i1 %lcmp.mod120.not, label %._crit_edge74.5.preheader, label %._crit_edge74.4.epil

._crit_edge74.4.epil:                             ; preds = %._crit_edge74.5.preheader.unr-lcssa
  %158 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.5.unr, i64 5
  %159 = load i32, ptr %158, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %160, i64 5
  %162 = load i32, ptr %161, align 4, !tbaa !5
  %163 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.5.unr, i64 6
  store i32 %162, ptr %163, align 4, !tbaa !5
  br label %._crit_edge74.5.preheader

._crit_edge74.5.preheader:                        ; preds = %._crit_edge74.5.preheader.unr-lcssa, %._crit_edge74.4.epil
  %xtraiter123 = and i64 %31, 1
  %164 = icmp eq i64 %32, 0
  br i1 %164, label %._crit_edge74.6.preheader.unr-lcssa, label %._crit_edge74.5.preheader.new

._crit_edge74.5.preheader.new:                    ; preds = %._crit_edge74.5.preheader
  %unroll_iter125 = and i64 %31, 2147483646
  br label %._crit_edge74.5

._crit_edge74.5:                                  ; preds = %._crit_edge74.5, %._crit_edge74.5.preheader.new
  %indvars.iv85.6 = phi i64 [ 1, %._crit_edge74.5.preheader.new ], [ %indvars.iv.next86.6.1, %._crit_edge74.5 ]
  %niter126 = phi i64 [ 0, %._crit_edge74.5.preheader.new ], [ %niter126.next.1, %._crit_edge74.5 ]
  %165 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.6, i64 6
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %167, i64 6
  %169 = load i32, ptr %168, align 4, !tbaa !5
  %170 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.6, i64 7
  store i32 %169, ptr %170, align 4, !tbaa !5
  %indvars.iv.next86.6 = add nuw nsw i64 %indvars.iv85.6, 1
  %171 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.6, i64 6
  %172 = load i32, ptr %171, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %173, i64 6
  %175 = load i32, ptr %174, align 4, !tbaa !5
  %176 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.6, i64 7
  store i32 %175, ptr %176, align 4, !tbaa !5
  %indvars.iv.next86.6.1 = add nuw nsw i64 %indvars.iv85.6, 2
  %niter126.next.1 = add i64 %niter126, 2
  %niter126.ncmp.1 = icmp eq i64 %niter126.next.1, %unroll_iter125
  br i1 %niter126.ncmp.1, label %._crit_edge74.6.preheader.unr-lcssa, label %._crit_edge74.5, !llvm.loop !15

._crit_edge74.6.preheader.unr-lcssa:              ; preds = %._crit_edge74.5, %._crit_edge74.5.preheader
  %indvars.iv85.6.unr = phi i64 [ 1, %._crit_edge74.5.preheader ], [ %indvars.iv.next86.6.1, %._crit_edge74.5 ]
  %lcmp.mod124.not = icmp eq i64 %xtraiter123, 0
  br i1 %lcmp.mod124.not, label %._crit_edge74.6.preheader, label %._crit_edge74.5.epil

._crit_edge74.5.epil:                             ; preds = %._crit_edge74.6.preheader.unr-lcssa
  %177 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.6.unr, i64 6
  %178 = load i32, ptr %177, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %179, i64 6
  %181 = load i32, ptr %180, align 4, !tbaa !5
  %182 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.6.unr, i64 7
  store i32 %181, ptr %182, align 4, !tbaa !5
  br label %._crit_edge74.6.preheader

._crit_edge74.6.preheader:                        ; preds = %._crit_edge74.6.preheader.unr-lcssa, %._crit_edge74.5.epil
  %xtraiter127 = and i64 %31, 1
  %183 = icmp eq i64 %32, 0
  br i1 %183, label %._crit_edge74.7.preheader.unr-lcssa, label %._crit_edge74.6.preheader.new

._crit_edge74.6.preheader.new:                    ; preds = %._crit_edge74.6.preheader
  %unroll_iter129 = and i64 %31, 2147483646
  br label %._crit_edge74.6

._crit_edge74.6:                                  ; preds = %._crit_edge74.6, %._crit_edge74.6.preheader.new
  %indvars.iv85.7 = phi i64 [ 1, %._crit_edge74.6.preheader.new ], [ %indvars.iv.next86.7.1, %._crit_edge74.6 ]
  %niter130 = phi i64 [ 0, %._crit_edge74.6.preheader.new ], [ %niter130.next.1, %._crit_edge74.6 ]
  %184 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.7, i64 7
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %186, i64 7
  %188 = load i32, ptr %187, align 4, !tbaa !5
  %189 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.7, i64 8
  store i32 %188, ptr %189, align 4, !tbaa !5
  %indvars.iv.next86.7 = add nuw nsw i64 %indvars.iv85.7, 1
  %190 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.7, i64 7
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %192, i64 7
  %194 = load i32, ptr %193, align 4, !tbaa !5
  %195 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.7, i64 8
  store i32 %194, ptr %195, align 4, !tbaa !5
  %indvars.iv.next86.7.1 = add nuw nsw i64 %indvars.iv85.7, 2
  %niter130.next.1 = add i64 %niter130, 2
  %niter130.ncmp.1 = icmp eq i64 %niter130.next.1, %unroll_iter129
  br i1 %niter130.ncmp.1, label %._crit_edge74.7.preheader.unr-lcssa, label %._crit_edge74.6, !llvm.loop !15

._crit_edge74.7.preheader.unr-lcssa:              ; preds = %._crit_edge74.6, %._crit_edge74.6.preheader
  %indvars.iv85.7.unr = phi i64 [ 1, %._crit_edge74.6.preheader ], [ %indvars.iv.next86.7.1, %._crit_edge74.6 ]
  %lcmp.mod128.not = icmp eq i64 %xtraiter127, 0
  br i1 %lcmp.mod128.not, label %._crit_edge74.7.preheader, label %._crit_edge74.6.epil

._crit_edge74.6.epil:                             ; preds = %._crit_edge74.7.preheader.unr-lcssa
  %196 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.7.unr, i64 7
  %197 = load i32, ptr %196, align 4, !tbaa !5
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %198, i64 7
  %200 = load i32, ptr %199, align 4, !tbaa !5
  %201 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.7.unr, i64 8
  store i32 %200, ptr %201, align 4, !tbaa !5
  br label %._crit_edge74.7.preheader

._crit_edge74.7.preheader:                        ; preds = %._crit_edge74.7.preheader.unr-lcssa, %._crit_edge74.6.epil
  %xtraiter131 = and i64 %31, 1
  %202 = icmp eq i64 %32, 0
  br i1 %202, label %._crit_edge74.8.preheader.unr-lcssa, label %._crit_edge74.7.preheader.new

._crit_edge74.7.preheader.new:                    ; preds = %._crit_edge74.7.preheader
  %unroll_iter133 = and i64 %31, 2147483646
  br label %._crit_edge74.7

._crit_edge74.7:                                  ; preds = %._crit_edge74.7, %._crit_edge74.7.preheader.new
  %indvars.iv85.8 = phi i64 [ 1, %._crit_edge74.7.preheader.new ], [ %indvars.iv.next86.8.1, %._crit_edge74.7 ]
  %niter134 = phi i64 [ 0, %._crit_edge74.7.preheader.new ], [ %niter134.next.1, %._crit_edge74.7 ]
  %203 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.8, i64 8
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %205, i64 8
  %207 = load i32, ptr %206, align 4, !tbaa !5
  %208 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.8, i64 9
  store i32 %207, ptr %208, align 4, !tbaa !5
  %indvars.iv.next86.8 = add nuw nsw i64 %indvars.iv85.8, 1
  %209 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.8, i64 8
  %210 = load i32, ptr %209, align 4, !tbaa !5
  %211 = sext i32 %210 to i64
  %212 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %211, i64 8
  %213 = load i32, ptr %212, align 4, !tbaa !5
  %214 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.8, i64 9
  store i32 %213, ptr %214, align 4, !tbaa !5
  %indvars.iv.next86.8.1 = add nuw nsw i64 %indvars.iv85.8, 2
  %niter134.next.1 = add i64 %niter134, 2
  %niter134.ncmp.1 = icmp eq i64 %niter134.next.1, %unroll_iter133
  br i1 %niter134.ncmp.1, label %._crit_edge74.8.preheader.unr-lcssa, label %._crit_edge74.7, !llvm.loop !15

._crit_edge74.8.preheader.unr-lcssa:              ; preds = %._crit_edge74.7, %._crit_edge74.7.preheader
  %indvars.iv85.8.unr = phi i64 [ 1, %._crit_edge74.7.preheader ], [ %indvars.iv.next86.8.1, %._crit_edge74.7 ]
  %lcmp.mod132.not = icmp eq i64 %xtraiter131, 0
  br i1 %lcmp.mod132.not, label %._crit_edge74.8.preheader, label %._crit_edge74.7.epil

._crit_edge74.7.epil:                             ; preds = %._crit_edge74.8.preheader.unr-lcssa
  %215 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.8.unr, i64 8
  %216 = load i32, ptr %215, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %217, i64 8
  %219 = load i32, ptr %218, align 4, !tbaa !5
  %220 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.8.unr, i64 9
  store i32 %219, ptr %220, align 4, !tbaa !5
  br label %._crit_edge74.8.preheader

._crit_edge74.8.preheader:                        ; preds = %._crit_edge74.8.preheader.unr-lcssa, %._crit_edge74.7.epil
  %xtraiter135 = and i64 %31, 1
  %221 = icmp eq i64 %32, 0
  br i1 %221, label %._crit_edge74.9.preheader.unr-lcssa, label %._crit_edge74.8.preheader.new

._crit_edge74.8.preheader.new:                    ; preds = %._crit_edge74.8.preheader
  %unroll_iter137 = and i64 %31, 2147483646
  br label %._crit_edge74.8

._crit_edge74.8:                                  ; preds = %._crit_edge74.8, %._crit_edge74.8.preheader.new
  %indvars.iv85.9 = phi i64 [ 1, %._crit_edge74.8.preheader.new ], [ %indvars.iv.next86.9.1, %._crit_edge74.8 ]
  %niter138 = phi i64 [ 0, %._crit_edge74.8.preheader.new ], [ %niter138.next.1, %._crit_edge74.8 ]
  %222 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.9, i64 9
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %224, i64 9
  %226 = load i32, ptr %225, align 4, !tbaa !5
  %227 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.9, i64 10
  store i32 %226, ptr %227, align 4, !tbaa !5
  %indvars.iv.next86.9 = add nuw nsw i64 %indvars.iv85.9, 1
  %228 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.9, i64 9
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %230, i64 9
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.9, i64 10
  store i32 %232, ptr %233, align 4, !tbaa !5
  %indvars.iv.next86.9.1 = add nuw nsw i64 %indvars.iv85.9, 2
  %niter138.next.1 = add i64 %niter138, 2
  %niter138.ncmp.1 = icmp eq i64 %niter138.next.1, %unroll_iter137
  br i1 %niter138.ncmp.1, label %._crit_edge74.9.preheader.unr-lcssa, label %._crit_edge74.8, !llvm.loop !15

._crit_edge74.9.preheader.unr-lcssa:              ; preds = %._crit_edge74.8, %._crit_edge74.8.preheader
  %indvars.iv85.9.unr = phi i64 [ 1, %._crit_edge74.8.preheader ], [ %indvars.iv.next86.9.1, %._crit_edge74.8 ]
  %lcmp.mod136.not = icmp eq i64 %xtraiter135, 0
  br i1 %lcmp.mod136.not, label %._crit_edge74.9.preheader, label %._crit_edge74.8.epil

._crit_edge74.8.epil:                             ; preds = %._crit_edge74.9.preheader.unr-lcssa
  %234 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.9.unr, i64 9
  %235 = load i32, ptr %234, align 4, !tbaa !5
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %236, i64 9
  %238 = load i32, ptr %237, align 4, !tbaa !5
  %239 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.9.unr, i64 10
  store i32 %238, ptr %239, align 4, !tbaa !5
  br label %._crit_edge74.9.preheader

._crit_edge74.9.preheader:                        ; preds = %._crit_edge74.9.preheader.unr-lcssa, %._crit_edge74.8.epil
  %xtraiter139 = and i64 %31, 1
  %240 = icmp eq i64 %32, 0
  br i1 %240, label %._crit_edge74.10.preheader.unr-lcssa, label %._crit_edge74.9.preheader.new

._crit_edge74.9.preheader.new:                    ; preds = %._crit_edge74.9.preheader
  %unroll_iter141 = and i64 %31, 2147483646
  br label %._crit_edge74.9

._crit_edge74.9:                                  ; preds = %._crit_edge74.9, %._crit_edge74.9.preheader.new
  %indvars.iv85.10 = phi i64 [ 1, %._crit_edge74.9.preheader.new ], [ %indvars.iv.next86.10.1, %._crit_edge74.9 ]
  %niter142 = phi i64 [ 0, %._crit_edge74.9.preheader.new ], [ %niter142.next.1, %._crit_edge74.9 ]
  %241 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.10, i64 10
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %243, i64 10
  %245 = load i32, ptr %244, align 4, !tbaa !5
  %246 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.10, i64 11
  store i32 %245, ptr %246, align 4, !tbaa !5
  %indvars.iv.next86.10 = add nuw nsw i64 %indvars.iv85.10, 1
  %247 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.10, i64 10
  %248 = load i32, ptr %247, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %249, i64 10
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.10, i64 11
  store i32 %251, ptr %252, align 4, !tbaa !5
  %indvars.iv.next86.10.1 = add nuw nsw i64 %indvars.iv85.10, 2
  %niter142.next.1 = add i64 %niter142, 2
  %niter142.ncmp.1 = icmp eq i64 %niter142.next.1, %unroll_iter141
  br i1 %niter142.ncmp.1, label %._crit_edge74.10.preheader.unr-lcssa, label %._crit_edge74.9, !llvm.loop !15

._crit_edge74.10.preheader.unr-lcssa:             ; preds = %._crit_edge74.9, %._crit_edge74.9.preheader
  %indvars.iv85.10.unr = phi i64 [ 1, %._crit_edge74.9.preheader ], [ %indvars.iv.next86.10.1, %._crit_edge74.9 ]
  %lcmp.mod140.not = icmp eq i64 %xtraiter139, 0
  br i1 %lcmp.mod140.not, label %._crit_edge74.10.preheader, label %._crit_edge74.9.epil

._crit_edge74.9.epil:                             ; preds = %._crit_edge74.10.preheader.unr-lcssa
  %253 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.10.unr, i64 10
  %254 = load i32, ptr %253, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %255, i64 10
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.10.unr, i64 11
  store i32 %257, ptr %258, align 4, !tbaa !5
  br label %._crit_edge74.10.preheader

._crit_edge74.10.preheader:                       ; preds = %._crit_edge74.10.preheader.unr-lcssa, %._crit_edge74.9.epil
  %xtraiter143 = and i64 %31, 1
  %259 = icmp eq i64 %32, 0
  br i1 %259, label %.split.us.loopexit.unr-lcssa, label %._crit_edge74.10.preheader.new

._crit_edge74.10.preheader.new:                   ; preds = %._crit_edge74.10.preheader
  %unroll_iter145 = and i64 %31, 2147483646
  br label %._crit_edge74.10

._crit_edge74.10:                                 ; preds = %._crit_edge74.10, %._crit_edge74.10.preheader.new
  %indvars.iv85.11 = phi i64 [ 1, %._crit_edge74.10.preheader.new ], [ %indvars.iv.next86.11.1, %._crit_edge74.10 ]
  %niter146 = phi i64 [ 0, %._crit_edge74.10.preheader.new ], [ %niter146.next.1, %._crit_edge74.10 ]
  %260 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.11, i64 11
  %261 = load i32, ptr %260, align 4, !tbaa !5
  %262 = sext i32 %261 to i64
  %263 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %262, i64 11
  %264 = load i32, ptr %263, align 4, !tbaa !5
  %265 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.11, i64 12
  store i32 %264, ptr %265, align 4, !tbaa !5
  %indvars.iv.next86.11 = add nuw nsw i64 %indvars.iv85.11, 1
  %266 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.11, i64 11
  %267 = load i32, ptr %266, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %268, i64 11
  %270 = load i32, ptr %269, align 4, !tbaa !5
  %271 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86.11, i64 12
  store i32 %270, ptr %271, align 4, !tbaa !5
  %indvars.iv.next86.11.1 = add nuw nsw i64 %indvars.iv85.11, 2
  %niter146.next.1 = add i64 %niter146, 2
  %niter146.ncmp.1 = icmp eq i64 %niter146.next.1, %unroll_iter145
  br i1 %niter146.ncmp.1, label %.split.us.loopexit.unr-lcssa, label %._crit_edge74.10, !llvm.loop !15

272:                                              ; preds = %272, %.preheader58.preheader.new
  %indvars.iv85 = phi i64 [ 1, %.preheader58.preheader.new ], [ %indvars.iv.next86.1101, %272 ]
  %niter = phi i64 [ 0, %.preheader58.preheader.new ], [ %niter.next.1, %272 ]
  %273 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85, i64 0
  %274 = load i32, ptr %273, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %275, i64 0
  %277 = load i32, ptr %276, align 4, !tbaa !5
  %278 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85, i64 1
  store i32 %277, ptr %278, align 4, !tbaa !5
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %279 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86, i64 0
  %280 = load i32, ptr %279, align 4, !tbaa !5
  %281 = sext i32 %280 to i64
  %282 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %281, i64 0
  %283 = load i32, ptr %282, align 4, !tbaa !5
  %284 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv.next86, i64 1
  store i32 %283, ptr %284, align 4, !tbaa !5
  %indvars.iv.next86.1101 = add nuw nsw i64 %indvars.iv85, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge74.preheader.unr-lcssa, label %272, !llvm.loop !15

._crit_edge74.preheader.unr-lcssa:                ; preds = %272, %.preheader58.preheader
  %indvars.iv85.unr = phi i64 [ 1, %.preheader58.preheader ], [ %indvars.iv.next86.1101, %272 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge74.preheader, label %._crit_edge74.preheader.epilog-lcssa

._crit_edge74.preheader.epilog-lcssa:             ; preds = %._crit_edge74.preheader.unr-lcssa
  %285 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.unr, i64 0
  %286 = load i32, ptr %285, align 4, !tbaa !5
  %287 = sext i32 %286 to i64
  %288 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %287, i64 0
  %289 = load i32, ptr %288, align 4, !tbaa !5
  %290 = getelementptr inbounds [4001 x [13 x i32]], ptr @fa, i64 0, i64 %indvars.iv85.unr, i64 1
  store i32 %289, ptr %290, align 4, !tbaa !5
  br label %._crit_edge74.preheader

._crit_edge74.preheader:                          ; preds = %._crit_edge74.preheader.unr-lcssa, %._crit_edge74.preheader.epilog-lcssa
  %xtraiter102 = and i64 %31, 1
  %291 = icmp eq i64 %32, 0
  br i1 %291, label %._crit_edge74.1.preheader.unr-lcssa, label %._crit_edge74.preheader.new

._crit_edge74.preheader.new:                      ; preds = %._crit_edge74.preheader
  %unroll_iter104 = and i64 %31, 2147483646
  br label %._crit_edge74

.preheader:                                       ; preds = %307, %.split.us
  %292 = load i32, ptr @n, align 4, !tbaa !5
  %.not5279 = icmp slt i32 %292, 2
  br i1 %.not5279, label %._crit_edge82, label %.lr.ph81

.lr.ph78:                                         ; preds = %.split.us, %307
  %293 = phi i32 [ %308, %307 ], [ %68, %.split.us ]
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %307 ], [ 0, %.split.us ]
  %294 = getelementptr inbounds [200002 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv94
  %295 = getelementptr inbounds i8, ptr %294, i64 16
  %296 = load i32, ptr %295, align 4, !tbaa !12
  %.not53 = icmp eq i32 %296, 0
  br i1 %.not53, label %307, label %297

297:                                              ; preds = %.lr.ph78
  %298 = getelementptr inbounds i8, ptr %294, i64 4
  %299 = getelementptr inbounds i8, ptr %294, i64 8
  %300 = load i32, ptr %298, align 4, !tbaa !5
  %301 = load i32, ptr %299, align 4, !tbaa !5
  %302 = call noundef i32 @_Z3lcaii(i32 noundef %300, i32 noundef %301)
  %303 = load i32, ptr %298, align 4, !tbaa !5
  %304 = load i32, ptr %295, align 4, !tbaa !5
  call void @_Z6updateiii(i32 noundef %303, i32 noundef %302, i32 noundef %304)
  %305 = load i32, ptr %299, align 4, !tbaa !5
  %306 = load i32, ptr %295, align 4, !tbaa !5
  call void @_Z6updateiii(i32 noundef %305, i32 noundef %302, i32 noundef %306)
  %.pre = load i32, ptr @tot, align 4, !tbaa !5
  br label %307

307:                                              ; preds = %.lr.ph78, %297
  %308 = phi i32 [ %293, %.lr.ph78 ], [ %.pre, %297 ]
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %309 = sext i32 %308 to i64
  %310 = icmp slt i64 %indvars.iv.next95, %309
  br i1 %310, label %.lr.ph78, label %.preheader, !llvm.loop !16

._crit_edge82:                                    ; preds = %.lr.ph81, %.preheader
  %311 = call i32 @putchar(i32 noundef 10)
  ret i32 0

.lr.ph81:                                         ; preds = %.preheader, %.lr.ph81
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %.lr.ph81 ], [ 2, %.preheader ]
  %312 = getelementptr inbounds [4001 x i32], ptr @ans, i64 0, i64 %indvars.iv97
  %313 = load i32, ptr %312, align 4, !tbaa !5
  %314 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %313)
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %315 = load i32, ptr @n, align 4, !tbaa !5
  %316 = sext i32 %315 to i64
  %.not52.not = icmp slt i64 %indvars.iv97, %316
  br i1 %.not52.not, label %.lr.ph81, label %._crit_edge82, !llvm.loop !17
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIP4EdgeEvT_S2_(ptr noundef, ptr noundef) local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #7

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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress 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 #4 = { 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 #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { 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 #7 = { inlinehint mustprogress nofree 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 #8 = { 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, !6, i64 16}
!13 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}


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