; LLVM IR from tangjz/acm-icpc :: hdu (6081)

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

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@e = external dso_local global [3001 x [3001 x i32]], align 16
@dsu = external dso_local global [3001 x i32], align 16
@dt = external dso_local global [3001 x i32], align 16
@fa = external dso_local global [13 x [3001 x i32]], align 16
@ans = external dso_local global i32, align 4
@g = external dso_local global [100001 x %struct.Edge], align 16
@ee = external dso_local global [3001 x %"class.std::vector"], align 16
@perm = external dso_local global [100001 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z9dsu_mergeii(i32 noundef, i32 noundef) #0

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z3lcaii(i32 noundef, i32 noundef) #2

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.Edge, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector", align 8
  %15 = alloca i32, align 4
  %16 = alloca %"struct.std::pair", align 4
  %17 = alloca %"struct.std::pair", align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  br label %23

23:                                               ; preds = %369, %0
  %24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  %25 = icmp eq i32 %24, 2
  br i1 %25, label %26, label %372

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

27:                                               ; preds = %41, %26
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = load i32, ptr @n, align 4, !tbaa !5
  %30 = icmp sle i32 %28, %29
  br i1 %30, label %32, label %31

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #10
  br label %44

32:                                               ; preds = %27
  %33 = load i32, ptr %2, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %34
  %36 = getelementptr inbounds [3001 x i32], ptr %35, i64 0, i64 0
  %37 = getelementptr inbounds i32, ptr %36, i64 1
  %38 = load i32, ptr @n, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = mul i64 %39, 4
  call void @llvm.memset.p0.i64(ptr align 4 %37, i8 0, i64 %40, i1 false)
  br label %41

41:                                               ; preds = %32
  %42 = load i32, ptr %2, align 4, !tbaa !5
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %2, align 4, !tbaa !5
  br label %27, !llvm.loop !9

44:                                               ; preds = %31
  br label %45

45:                                               ; preds = %55, %44
  %46 = load i32, ptr @m, align 4, !tbaa !5
  %47 = add nsw i32 %46, -1
  store i32 %47, ptr @m, align 4, !tbaa !5
  %48 = icmp ne i32 %46, 0
  br i1 %48, label %49, label %65

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #10
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #10
  %50 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  %51 = load i32, ptr %3, align 4, !tbaa !5
  %52 = load i32, ptr %4, align 4, !tbaa !5
  %53 = icmp sgt i32 %51, %52
  br i1 %53, label %54, label %55

54:                                               ; preds = %49
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4) #10
  br label %55

55:                                               ; preds = %54, %49
  %56 = load i32, ptr %5, align 4, !tbaa !5
  %57 = load i32, ptr %3, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %58
  %60 = load i32, ptr %4, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [3001 x i32], ptr %59, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = add nsw i32 %63, %56
  store i32 %64, ptr %62, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #10
  br label %45, !llvm.loop !11

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

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

70:                                               ; preds = %66
  store i32 9, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #10
  br label %114

71:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  %72 = load i32, ptr %6, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %8, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %107, %71
  %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 12, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  br label %110

79:                                               ; preds = %74
  %80 = load i32, ptr %6, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %81
  %83 = load i32, ptr %8, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [3001 x i32], ptr %82, i64 0, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !5
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %106

88:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #10
  %89 = getelementptr inbounds %struct.Edge, ptr %9, i32 0, i32 0
  %90 = load i32, ptr %6, align 4, !tbaa !5
  store i32 %90, ptr %89, align 4, !tbaa !12
  %91 = getelementptr inbounds %struct.Edge, ptr %9, i32 0, i32 1
  %92 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %92, ptr %91, align 4, !tbaa !15
  %93 = getelementptr inbounds %struct.Edge, ptr %9, i32 0, i32 2
  %94 = load i32, ptr %6, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %95
  %97 = load i32, ptr %8, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [3001 x i32], ptr %96, i64 0, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !5
  store i32 %100, ptr %93, align 4, !tbaa !16
  %101 = getelementptr inbounds %struct.Edge, ptr %9, i32 0, i32 3
  store i8 0, ptr %101, align 4, !tbaa !17
  %102 = load i32, ptr @m, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr @m, align 4, !tbaa !5
  %104 = sext i32 %102 to i64
  %105 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %104
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %105, ptr align 4 %9, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #10
  br label %106

106:                                              ; preds = %88, %79
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %8, align 4, !tbaa !5
  %109 = add nsw i32 %108, 1
  store i32 %109, ptr %8, align 4, !tbaa !5
  br label %74, !llvm.loop !20

110:                                              ; preds = %78
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %6, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %6, align 4, !tbaa !5
  br label %66, !llvm.loop !21

114:                                              ; preds = %70
  %115 = load i32, ptr @m, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds %struct.Edge, ptr @g, i64 %116
  call void @_ZSt4sortIP4EdgeEvT_S2_(ptr noundef @g, ptr noundef %117)
  store i32 1061109567, ptr @ans, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #10
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %128, %114
  %119 = load i32, ptr %10, align 4, !tbaa !5
  %120 = load i32, ptr @m, align 4, !tbaa !5
  %121 = icmp slt i32 %119, %120
  br i1 %121, label %123, label %122

122:                                              ; preds = %118
  store i32 15, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #10
  br label %131

123:                                              ; preds = %118
  %124 = load i32, ptr %10, align 4, !tbaa !5
  %125 = load i32, ptr %10, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [100001 x i32], ptr @perm, i64 0, i64 %126
  store i32 %124, ptr %127, align 4, !tbaa !5
  br label %128

128:                                              ; preds = %123
  %129 = load i32, ptr %10, align 4, !tbaa !5
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %10, align 4, !tbaa !5
  br label %118, !llvm.loop !22

131:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #10
  store i32 1, ptr %11, align 4, !tbaa !5
  br label %132

132:                                              ; preds = %365, %131
  %133 = load i32, ptr %11, align 4, !tbaa !5
  %134 = icmp slt i32 %133, 10
  br i1 %134, label %136, label %135

135:                                              ; preds = %132
  store i32 18, ptr %7, align 4
  br label %368

136:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  %137 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %137, ptr %12, align 4, !tbaa !5
  %138 = load i32, ptr @n, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = mul i64 %139, 4
  call void @llvm.memset.p0.i64(ptr align 4 getelementptr inbounds (i32, ptr @dsu, i64 1), i8 -1, i64 %140, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #10
  store i32 1, ptr %13, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %150, %136
  %142 = load i32, ptr %13, align 4, !tbaa !5
  %143 = load i32, ptr @n, align 4, !tbaa !5
  %144 = icmp sle i32 %142, %143
  br i1 %144, label %146, label %145

145:                                              ; preds = %141
  store i32 21, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #10
  br label %153

146:                                              ; preds = %141
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #10
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #10
  %147 = load i32, ptr %13, align 4, !tbaa !5
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [3001 x %"class.std::vector"], ptr @ee, i64 0, i64 %148
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %149) #10
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #10
  br label %150

150:                                              ; preds = %146
  %151 = load i32, ptr %13, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %13, align 4, !tbaa !5
  br label %141, !llvm.loop !23

153:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #10
  store i32 0, ptr %15, align 4, !tbaa !5
  br label %154

154:                                              ; preds = %212, %153
  %155 = load i32, ptr %15, align 4, !tbaa !5
  %156 = load i32, ptr @m, align 4, !tbaa !5
  %157 = icmp slt i32 %155, %156
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  store i32 24, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #10
  br label %215

159:                                              ; preds = %154
  %160 = load i32, ptr %15, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %161
  %163 = getelementptr inbounds %struct.Edge, ptr %162, i32 0, i32 0
  %164 = load i32, ptr %163, align 16, !tbaa !12
  %165 = load i32, ptr %15, align 4, !tbaa !5
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %166
  %168 = getelementptr inbounds %struct.Edge, ptr %167, i32 0, i32 1
  %169 = load i32, ptr %168, align 4, !tbaa !15
  %170 = call noundef zeroext i1 @_Z9dsu_mergeii(i32 noundef %164, i32 noundef %169)
  %171 = load i32, ptr %15, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %172
  %174 = getelementptr inbounds %struct.Edge, ptr %173, i32 0, i32 3
  %175 = zext i1 %170 to i8
  store i8 %175, ptr %174, align 4, !tbaa !17
  br i1 %170, label %176, label %211

176:                                              ; preds = %159
  %177 = load i32, ptr %15, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %178
  %180 = getelementptr inbounds %struct.Edge, ptr %179, i32 0, i32 0
  %181 = load i32, ptr %180, align 16, !tbaa !12
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [3001 x %"class.std::vector"], ptr @ee, i64 0, i64 %182
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  %184 = load i32, ptr %15, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %185
  %187 = getelementptr inbounds %struct.Edge, ptr %186, i32 0, i32 1
  %188 = load i32, ptr %15, align 4, !tbaa !5
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %189
  %191 = getelementptr inbounds %struct.Edge, ptr %190, i32 0, i32 2
  %192 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %187, ptr noundef nonnull align 4 dereferenceable(4) %191)
  store i64 %192, ptr %16, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %183, ptr noundef nonnull align 4 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #10
  %193 = load i32, ptr %15, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %194
  %196 = getelementptr inbounds %struct.Edge, ptr %195, i32 0, i32 1
  %197 = load i32, ptr %196, align 4, !tbaa !15
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [3001 x %"class.std::vector"], ptr @ee, i64 0, i64 %198
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %200 = load i32, ptr %15, align 4, !tbaa !5
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %201
  %203 = getelementptr inbounds %struct.Edge, ptr %202, i32 0, i32 0
  %204 = load i32, ptr %15, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %205
  %207 = getelementptr inbounds %struct.Edge, ptr %206, i32 0, i32 2
  %208 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %203, ptr noundef nonnull align 4 dereferenceable(4) %207)
  store i64 %208, ptr %17, align 4
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %199, ptr noundef nonnull align 4 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  %209 = load i32, ptr %12, align 4, !tbaa !5
  %210 = add nsw i32 %209, -1
  store i32 %210, ptr %12, align 4, !tbaa !5
  br label %211

211:                                              ; preds = %176, %159
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %15, align 4, !tbaa !5
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %15, align 4, !tbaa !5
  br label %154, !llvm.loop !24

215:                                              ; preds = %158
  %216 = load i32, ptr %12, align 4, !tbaa !5
  %217 = icmp sgt i32 %216, 1
  br i1 %217, label %218, label %219

218:                                              ; preds = %215
  store i32 0, ptr @ans, align 4, !tbaa !5
  store i32 18, ptr %7, align 4
  br label %362

219:                                              ; preds = %215
  call void @_Z3pfsi(i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #10
  store i32 1, ptr %18, align 4, !tbaa !5
  br label %220

220:                                              ; preds = %256, %219
  %221 = load i32, ptr %18, align 4, !tbaa !5
  %222 = icmp slt i32 %221, 13
  br i1 %222, label %224, label %223

223:                                              ; preds = %220
  store i32 27, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #10
  br label %259

224:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %225

225:                                              ; preds = %252, %224
  %226 = load i32, ptr %19, align 4, !tbaa !5
  %227 = load i32, ptr @n, align 4, !tbaa !5
  %228 = icmp sle i32 %226, %227
  br i1 %228, label %230, label %229

229:                                              ; preds = %225
  store i32 30, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  br label %255

230:                                              ; preds = %225
  %231 = load i32, ptr %18, align 4, !tbaa !5
  %232 = sub nsw i32 %231, 1
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 %233
  %235 = load i32, ptr %18, align 4, !tbaa !5
  %236 = sub nsw i32 %235, 1
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 %237
  %239 = load i32, ptr %19, align 4, !tbaa !5
  %240 = sext i32 %239 to i64
  %241 = getelementptr inbounds [3001 x i32], ptr %238, i64 0, i64 %240
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [3001 x i32], ptr %234, i64 0, i64 %243
  %245 = load i32, ptr %244, align 4, !tbaa !5
  %246 = load i32, ptr %18, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 %247
  %249 = load i32, ptr %19, align 4, !tbaa !5
  %250 = sext i32 %249 to i64
  %251 = getelementptr inbounds [3001 x i32], ptr %248, i64 0, i64 %250
  store i32 %245, ptr %251, align 4, !tbaa !5
  br label %252

252:                                              ; preds = %230
  %253 = load i32, ptr %19, align 4, !tbaa !5
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %19, align 4, !tbaa !5
  br label %225, !llvm.loop !25

255:                                              ; preds = %229
  br label %256

256:                                              ; preds = %255
  %257 = load i32, ptr %18, align 4, !tbaa !5
  %258 = add nsw i32 %257, 1
  store i32 %258, ptr %18, align 4, !tbaa !5
  br label %220, !llvm.loop !26

259:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #10
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %260

260:                                              ; preds = %324, %259
  %261 = load i32, ptr %20, align 4, !tbaa !5
  %262 = load i32, ptr @m, align 4, !tbaa !5
  %263 = icmp slt i32 %261, %262
  br i1 %263, label %265, label %264

264:                                              ; preds = %260
  store i32 33, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  br label %327

265:                                              ; preds = %260
  %266 = load i32, ptr %20, align 4, !tbaa !5
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %267
  %269 = getelementptr inbounds %struct.Edge, ptr %268, i32 0, i32 3
  %270 = load i8, ptr %269, align 4, !tbaa !17, !range !27, !noundef !28
  %271 = trunc i8 %270 to i1
  br i1 %271, label %323, label %272

272:                                              ; preds = %265
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #10
  %273 = load i32, ptr %20, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %274
  %276 = getelementptr inbounds %struct.Edge, ptr %275, i32 0, i32 0
  %277 = load i32, ptr %276, align 16, !tbaa !12
  %278 = load i32, ptr %20, align 4, !tbaa !5
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %279
  %281 = getelementptr inbounds %struct.Edge, ptr %280, i32 0, i32 1
  %282 = load i32, ptr %281, align 4, !tbaa !15
  %283 = call noundef i32 @_Z3lcaii(i32 noundef %277, i32 noundef %282)
  store i32 %283, ptr %21, align 4, !tbaa !5
  %284 = load i32, ptr %20, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %285
  %287 = getelementptr inbounds %struct.Edge, ptr %286, i32 0, i32 2
  %288 = load i32, ptr %287, align 8, !tbaa !16
  %289 = load i32, ptr %20, align 4, !tbaa !5
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %290
  %292 = getelementptr inbounds %struct.Edge, ptr %291, i32 0, i32 0
  %293 = load i32, ptr %292, align 16, !tbaa !12
  %294 = sext i32 %293 to i64
  %295 = getelementptr inbounds [3001 x i32], ptr @dt, i64 0, i64 %294
  %296 = load i32, ptr %295, align 4, !tbaa !5
  %297 = add nsw i32 %296, %288
  store i32 %297, ptr %295, align 4, !tbaa !5
  %298 = load i32, ptr %20, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %299
  %301 = getelementptr inbounds %struct.Edge, ptr %300, i32 0, i32 2
  %302 = load i32, ptr %301, align 8, !tbaa !16
  %303 = load i32, ptr %20, align 4, !tbaa !5
  %304 = sext i32 %303 to i64
  %305 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %304
  %306 = getelementptr inbounds %struct.Edge, ptr %305, i32 0, i32 1
  %307 = load i32, ptr %306, align 4, !tbaa !15
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [3001 x i32], ptr @dt, i64 0, i64 %308
  %310 = load i32, ptr %309, align 4, !tbaa !5
  %311 = add nsw i32 %310, %302
  store i32 %311, ptr %309, align 4, !tbaa !5
  %312 = load i32, ptr %20, align 4, !tbaa !5
  %313 = sext i32 %312 to i64
  %314 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %313
  %315 = getelementptr inbounds %struct.Edge, ptr %314, i32 0, i32 2
  %316 = load i32, ptr %315, align 8, !tbaa !16
  %317 = shl i32 %316, 1
  %318 = load i32, ptr %21, align 4, !tbaa !5
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds [3001 x i32], ptr @dt, i64 0, i64 %319
  %321 = load i32, ptr %320, align 4, !tbaa !5
  %322 = sub nsw i32 %321, %317
  store i32 %322, ptr %320, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #10
  br label %323

323:                                              ; preds = %272, %265
  br label %324

324:                                              ; preds = %323
  %325 = load i32, ptr %20, align 4, !tbaa !5
  %326 = add nsw i32 %325, 1
  store i32 %326, ptr %20, align 4, !tbaa !5
  br label %260, !llvm.loop !29

327:                                              ; preds = %264
  call void @_Z3dfsi(i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #10
  store i32 0, ptr %22, align 4, !tbaa !5
  br label %328

328:                                              ; preds = %358, %327
  %329 = load i32, ptr %22, align 4, !tbaa !5
  %330 = load i32, ptr @m, align 4, !tbaa !5
  %331 = icmp slt i32 %329, %330
  br i1 %331, label %333, label %332

332:                                              ; preds = %328
  store i32 36, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #10
  br label %361

333:                                              ; preds = %328
  %334 = load i32, ptr %22, align 4, !tbaa !5
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds [100001 x i32], ptr @perm, i64 0, i64 %335
  %337 = load i32, ptr %22, align 4, !tbaa !5
  %338 = call i32 @rand() #10
  %339 = shl i32 %338, 15
  %340 = call i32 @rand() #10
  %341 = or i32 %339, %340
  %342 = load i32, ptr @m, align 4, !tbaa !5
  %343 = load i32, ptr %22, align 4, !tbaa !5
  %344 = sub nsw i32 %342, %343
  %345 = srem i32 %341, %344
  %346 = add nsw i32 %337, %345
  %347 = sext i32 %346 to i64
  %348 = getelementptr inbounds [100001 x i32], ptr @perm, i64 0, i64 %347
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %336, ptr noundef nonnull align 4 dereferenceable(4) %348) #10
  %349 = load i32, ptr %22, align 4, !tbaa !5
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %350
  %352 = load i32, ptr %22, align 4, !tbaa !5
  %353 = sext i32 %352 to i64
  %354 = getelementptr inbounds [100001 x i32], ptr @perm, i64 0, i64 %353
  %355 = load i32, ptr %354, align 4, !tbaa !5
  %356 = sext i32 %355 to i64
  %357 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %356
  call void @_ZSt4swapI4EdgeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(16) %351, ptr noundef nonnull align 4 dereferenceable(16) %357) #10
  br label %358

358:                                              ; preds = %333
  %359 = load i32, ptr %22, align 4, !tbaa !5
  %360 = add nsw i32 %359, 1
  store i32 %360, ptr %22, align 4, !tbaa !5
  br label %328, !llvm.loop !30

361:                                              ; preds = %332
  store i32 0, ptr %7, align 4
  br label %362

362:                                              ; preds = %361, %218
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  %363 = load i32, ptr %7, align 4
  switch i32 %363, label %368 [
    i32 0, label %364
  ]

364:                                              ; preds = %362
  br label %365

365:                                              ; preds = %364
  %366 = load i32, ptr %11, align 4, !tbaa !5
  %367 = add nsw i32 %366, 1
  store i32 %367, ptr %11, align 4, !tbaa !5
  br label %132, !llvm.loop !31

368:                                              ; preds = %362, %135
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #10
  br label %369

369:                                              ; preds = %368
  %370 = load i32, ptr @ans, align 4, !tbaa !5
  %371 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %370)
  br label %23, !llvm.loop !32

372:                                              ; preds = %23
  ret i32 0
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0

; Function Attrs: nounwind
declare i32 @rand() #9

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

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

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

%struct.Edge = type { i32, i32, i32, i8 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<int, int>, std::allocator<std::pair<int, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair" = type { i32, i32 }

@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@e = external dso_local local_unnamed_addr global [3001 x [3001 x i32]], align 16
@dsu = external dso_local local_unnamed_addr global [3001 x i32], align 16
@dt = external dso_local local_unnamed_addr global [3001 x i32], align 16
@fa = external dso_local local_unnamed_addr global [13 x [3001 x i32]], align 16
@ans = external dso_local local_unnamed_addr global i32, align 4
@g = external dso_local global [100001 x %struct.Edge], align 16
@ee = external dso_local global [3001 x %"class.std::vector"], align 16
@perm = external dso_local global [100001 x i32], align 16
@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z9dsu_mergeii(i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3pfsi(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) #3

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

; Function Attrs: 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 @_Z3dfsi(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"struct.std::pair", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %8 = icmp eq i32 %7, 2
  br i1 %8, label %.preheader88, label %._crit_edge132

.preheader88:                                     ; preds = %0, %.loopexit86
  %9 = load i32, ptr @n, align 4, !tbaa !5
  %.not89 = icmp slt i32 %9, 1
  br i1 %.not89, label %.preheader87, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader88
  %10 = zext nneg i32 %9 to i64
  %11 = shl nuw nsw i64 %10, 2
  %12 = zext nneg i32 %9 to i64
  %xtraiter = and i64 %12, 7
  %13 = icmp ult i32 %9, 8
  br i1 %13, label %.preheader87.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %12, 2147483640
  br label %17

.preheader87.loopexit.unr-lcssa:                  ; preds = %17, %.lr.ph
  %indvars.iv.unr = phi i64 [ 1, %.lr.ph ], [ %indvars.iv.next.7, %17 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader87, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader87.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %.preheader87.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader87.loopexit.unr-lcssa ]
  %14 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %indvars.iv.epil, i64 1
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %14, i8 0, i64 %11, i1 false)
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader87, label %.epil.preheader, !llvm.loop !9

.preheader87:                                     ; preds = %.preheader87.loopexit.unr-lcssa, %.epil.preheader, %.preheader88
  %15 = load i32, ptr @m, align 4, !tbaa !5
  %16 = add nsw i32 %15, -1
  store i32 %16, ptr @m, align 4, !tbaa !5
  %.not7791 = icmp eq i32 %15, 0
  br i1 %.not7791, label %._crit_edge, label %.lr.ph92

17:                                               ; preds = %17, %.lr.ph.new
  %indvars.iv = phi i64 [ 1, %.lr.ph.new ], [ %indvars.iv.next.7, %17 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.7, %17 ]
  %18 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %indvars.iv, i64 1
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %18, i8 0, i64 %11, i1 false)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %19 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %indvars.iv.next, i64 1
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %19, i8 0, i64 %11, i1 false)
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %20 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %indvars.iv.next.1, i64 1
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %20, i8 0, i64 %11, i1 false)
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %21 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %indvars.iv.next.2, i64 1
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %21, i8 0, i64 %11, i1 false)
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %22 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %indvars.iv.next.3, i64 1
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %22, i8 0, i64 %11, i1 false)
  %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5
  %23 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %indvars.iv.next.4, i64 1
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %23, i8 0, i64 %11, i1 false)
  %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv, 6
  %24 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %indvars.iv.next.5, i64 1
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %24, i8 0, i64 %11, i1 false)
  %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv, 7
  %25 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %indvars.iv.next.6, i64 1
  call void @llvm.memset.p0.i64(ptr nonnull align 4 %25, i8 0, i64 %11, i1 false)
  %indvars.iv.next.7 = add nuw nsw i64 %indvars.iv, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %.preheader87.loopexit.unr-lcssa, label %17, !llvm.loop !11

.lr.ph92:                                         ; preds = %.preheader87, %31
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #9
  %26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = icmp sgt i32 %27, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %.lr.ph92
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2) #9
  %.pre = load i32, ptr %1, align 4, !tbaa !5
  %.pre173 = load i32, ptr %2, align 4, !tbaa !5
  br label %31

31:                                               ; preds = %30, %.lr.ph92
  %32 = phi i32 [ %.pre173, %30 ], [ %28, %.lr.ph92 ]
  %33 = phi i32 [ %.pre, %30 ], [ %27, %.lr.ph92 ]
  %34 = load i32, ptr %3, align 4, !tbaa !5
  %35 = sext i32 %33 to i64
  %36 = sext i32 %32 to i64
  %37 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %35, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = add nsw i32 %38, %34
  store i32 %39, ptr %37, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #9
  %40 = load i32, ptr @m, align 4, !tbaa !5
  %41 = add nsw i32 %40, -1
  store i32 %41, ptr @m, align 4, !tbaa !5
  %.not77 = icmp eq i32 %40, 0
  br i1 %.not77, label %._crit_edge.loopexit, label %.lr.ph92, !llvm.loop !13

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

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.preheader87
  %42 = phi i32 [ %.pre174, %._crit_edge.loopexit ], [ %9, %.preheader87 ]
  store i32 0, ptr @m, align 4, !tbaa !5
  %.not78102 = icmp slt i32 %42, 1
  br i1 %.not78102, label %._crit_edge107, label %.lr.ph106.preheader

.lr.ph106.preheader:                              ; preds = %._crit_edge
  %43 = add nuw i32 %42, 1
  %44 = zext nneg i32 %42 to i64
  %wide.trip.count144 = zext i32 %43 to i64
  br label %.lr.ph106

.loopexit:                                        ; preds = %63, %.lr.ph106
  %m.promoted100 = phi i32 [ %m.promoted101103, %.lr.ph106 ], [ %m.promoted98, %63 ]
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %exitcond145.not = icmp eq i64 %indvars.iv.next142, %wide.trip.count144
  br i1 %exitcond145.not, label %._crit_edge107, label %.lr.ph106, !llvm.loop !14

._crit_edge107:                                   ; preds = %.loopexit, %._crit_edge
  %45 = phi i32 [ 0, %._crit_edge ], [ %m.promoted100, %.loopexit ]
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds %struct.Edge, ptr @g, i64 %46
  call void @_ZSt4sortIP4EdgeEvT_S2_(ptr noundef nonnull @g, ptr noundef nonnull %47)
  store i32 1061109567, ptr @ans, align 4, !tbaa !5
  %48 = load i32, ptr @m, align 4, !tbaa !5
  %49 = icmp sgt i32 %48, 0
  br i1 %49, label %.lr.ph110.preheader, label %.preheader85.preheader

.lr.ph110.preheader:                              ; preds = %._crit_edge107
  %wide.trip.count149 = zext nneg i32 %48 to i64
  %min.iters.check = icmp ult i32 %48, 8
  br i1 %min.iters.check, label %.lr.ph110.preheader179, label %vector.ph

.lr.ph110.preheader179:                           ; preds = %middle.block, %.lr.ph110.preheader
  %indvars.iv146.ph = phi i64 [ 0, %.lr.ph110.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph110

vector.ph:                                        ; preds = %.lr.ph110.preheader
  %n.vec = and i64 %wide.trip.count149, 2147483640
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4>
  %50 = getelementptr inbounds [100001 x i32], ptr @perm, i64 0, i64 %index
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  store <4 x i32> %vec.ind, ptr %50, align 16, !tbaa !5
  store <4 x i32> %step.add, ptr %51, align 16, !tbaa !5
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  %52 = icmp eq i64 %index.next, %n.vec
  br i1 %52, label %middle.block, label %vector.body, !llvm.loop !15

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count149
  br i1 %cmp.n, label %.preheader85.preheader, label %.lr.ph110.preheader179

.lr.ph106:                                        ; preds = %.lr.ph106.preheader, %.loopexit
  %indvars.iv141 = phi i64 [ 1, %.lr.ph106.preheader ], [ %indvars.iv.next142, %.loopexit ]
  %indvars.iv135 = phi i64 [ 2, %.lr.ph106.preheader ], [ %indvars.iv.next136, %.loopexit ]
  %m.promoted101103 = phi i32 [ 0, %.lr.ph106.preheader ], [ %m.promoted100, %.loopexit ]
  %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1
  %.not8193.not = icmp ult i64 %indvars.iv141, %44
  br i1 %.not8193.not, label %.lr.ph96, label %.loopexit

.lr.ph96:                                         ; preds = %.lr.ph106
  %53 = trunc nuw nsw i64 %indvars.iv141 to i32
  br label %54

54:                                               ; preds = %.lr.ph96, %63
  %indvars.iv137 = phi i64 [ %indvars.iv135, %.lr.ph96 ], [ %indvars.iv.next138, %63 ]
  %m.promoted99 = phi i32 [ %m.promoted101103, %.lr.ph96 ], [ %m.promoted98, %63 ]
  %55 = phi i32 [ %m.promoted101103, %.lr.ph96 ], [ %64, %63 ]
  %56 = getelementptr inbounds [3001 x [3001 x i32]], ptr @e, i64 0, i64 %indvars.iv141, i64 %indvars.iv137
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %.not82 = icmp eq i32 %57, 0
  br i1 %.not82, label %63, label %58

58:                                               ; preds = %54
  %59 = add nsw i32 %55, 1
  store i32 %59, ptr @m, align 4, !tbaa !5
  %60 = sext i32 %55 to i64
  %61 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %60
  store i32 %53, ptr %61, align 16, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %61, i64 4
  %62 = trunc nuw i64 %indvars.iv137 to i32
  store i32 %62, ptr %.sroa.4.0..sroa_idx, align 4, !tbaa !5
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %61, i64 8
  store i32 %57, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !5
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %61, i64 12
  store i8 0, ptr %.sroa.6.0..sroa_idx, align 4, !tbaa !18
  br label %63

63:                                               ; preds = %54, %58
  %m.promoted98 = phi i32 [ %m.promoted99, %54 ], [ %59, %58 ]
  %64 = phi i32 [ %55, %54 ], [ %59, %58 ]
  %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next138 to i32
  %exitcond140.not = icmp eq i32 %43, %lftr.wideiv
  br i1 %exitcond140.not, label %.loopexit, label %54, !llvm.loop !20

.lr.ph110:                                        ; preds = %.lr.ph110.preheader179, %.lr.ph110
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %.lr.ph110 ], [ %indvars.iv146.ph, %.lr.ph110.preheader179 ]
  %65 = getelementptr inbounds [100001 x i32], ptr @perm, i64 0, i64 %indvars.iv146
  %66 = trunc nuw nsw i64 %indvars.iv146 to i32
  store i32 %66, ptr %65, align 4, !tbaa !5
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %exitcond150.not = icmp eq i64 %indvars.iv.next147, %wide.trip.count149
  br i1 %exitcond150.not, label %.preheader85.preheader, label %.lr.ph110, !llvm.loop !21

.preheader85.preheader:                           ; preds = %.lr.ph110, %middle.block, %._crit_edge107
  br label %.preheader85

.preheader85:                                     ; preds = %.preheader85.preheader, %._crit_edge130
  %67 = phi i32 [ %529, %._crit_edge130 ], [ %48, %.preheader85.preheader ]
  %.071131 = phi i32 [ %530, %._crit_edge130 ], [ 1, %.preheader85.preheader ]
  %68 = load i32, ptr @n, align 4, !tbaa !5
  %69 = sext i32 %68 to i64
  %70 = shl nsw i64 %69, 2
  call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds (i8, ptr @dsu, i64 4), i8 -1, i64 %70, i1 false)
  %.not79111 = icmp slt i32 %68, 1
  br i1 %.not79111, label %.preheader84, label %.lr.ph114

.preheader84.loopexit:                            ; preds = %.lr.ph114
  %.pre175 = load i32, ptr @m, align 4, !tbaa !5
  br label %.preheader84

.preheader84:                                     ; preds = %.preheader84.loopexit, %.preheader85
  %71 = phi i32 [ %.pre175, %.preheader84.loopexit ], [ %67, %.preheader85 ]
  %72 = icmp sgt i32 %71, 0
  br i1 %72, label %.lr.ph117, label %._crit_edge118

.lr.ph114:                                        ; preds = %.preheader85, %.lr.ph114
  %indvars.iv151 = phi i64 [ %indvars.iv.next152, %.lr.ph114 ], [ 1, %.preheader85 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, i8 0, i64 24, i1 false)
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  %73 = getelementptr inbounds [3001 x %"class.std::vector"], ptr @ee, i64 0, i64 %indvars.iv151
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE4swapERS3_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %73) #9
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %74 = load i32, ptr @n, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %.not79.not = icmp slt i64 %indvars.iv151, %75
  br i1 %.not79.not, label %.lr.ph114, label %.preheader84.loopexit, !llvm.loop !22

._crit_edge118:                                   ; preds = %95, %.preheader84
  %.070.lcssa = phi i32 [ %68, %.preheader84 ], [ %.1, %95 ]
  %76 = icmp slt i32 %.070.lcssa, 2
  br i1 %76, label %99, label %.thread

.lr.ph117:                                        ; preds = %.preheader84, %95
  %indvars.iv154 = phi i64 [ %indvars.iv.next155, %95 ], [ 0, %.preheader84 ]
  %.070115 = phi i32 [ %.1, %95 ], [ %68, %.preheader84 ]
  %77 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %indvars.iv154
  %78 = load i32, ptr %77, align 16, !tbaa !23
  %79 = getelementptr inbounds i8, ptr %77, i64 4
  %80 = load i32, ptr %79, align 4, !tbaa !25
  %81 = call noundef zeroext i1 @_Z9dsu_mergeii(i32 noundef %78, i32 noundef %80)
  %82 = getelementptr inbounds i8, ptr %77, i64 12
  %83 = zext i1 %81 to i8
  store i8 %83, ptr %82, align 4, !tbaa !26
  br i1 %81, label %84, label %95

84:                                               ; preds = %.lr.ph117
  %85 = load i32, ptr %77, align 16, !tbaa !23
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [3001 x %"class.std::vector"], ptr @ee, i64 0, i64 %86
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %88 = getelementptr inbounds i8, ptr %77, i64 8
  %89 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %79, ptr noundef nonnull align 4 dereferenceable(4) %88)
  store i64 %89, ptr %5, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %87, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  %90 = load i32, ptr %79, align 4, !tbaa !25
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [3001 x %"class.std::vector"], ptr @ee, i64 0, i64 %91
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #9
  %93 = call i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4) %77, ptr noundef nonnull align 4 dereferenceable(4) %88)
  store i64 %93, ptr %6, align 8
  call void @_ZNSt6vectorISt4pairIiiESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %92, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #9
  %94 = add nsw i32 %.070115, -1
  br label %95

95:                                               ; preds = %.lr.ph117, %84
  %.1 = phi i32 [ %94, %84 ], [ %.070115, %.lr.ph117 ]
  %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1
  %96 = load i32, ptr @m, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = icmp slt i64 %indvars.iv.next155, %97
  br i1 %98, label %.lr.ph117, label %._crit_edge118, !llvm.loop !27

.thread:                                          ; preds = %._crit_edge118
  store i32 0, ptr @ans, align 4, !tbaa !5
  br label %.loopexit86

99:                                               ; preds = %._crit_edge118
  call void @_Z3pfsi(i32 noundef 1)
  %100 = load i32, ptr @n, align 4, !tbaa !5
  %.not80119 = icmp slt i32 %100, 1
  br i1 %.not80119, label %.preheader83, label %.preheader.preheader

.preheader.preheader:                             ; preds = %99
  %101 = zext nneg i32 %100 to i64
  %xtraiter181 = and i64 %101, 3
  %102 = icmp ult i32 %100, 4
  br i1 %102, label %._crit_edge122.preheader.unr-lcssa, label %.preheader.preheader.new

.preheader.preheader.new:                         ; preds = %.preheader.preheader
  %unroll_iter184 = and i64 %101, 2147483644
  br label %445

.preheader83.loopexit.unr-lcssa:                  ; preds = %._crit_edge122.10, %._crit_edge122.10.preheader
  %indvars.iv157.11.unr = phi i64 [ 1, %._crit_edge122.10.preheader ], [ %indvars.iv.next158.11.3, %._crit_edge122.10 ]
  %lcmp.mod247.not = icmp eq i64 %xtraiter245, 0
  br i1 %lcmp.mod247.not, label %.preheader83, label %._crit_edge122.10.epil

._crit_edge122.10.epil:                           ; preds = %.preheader83.loopexit.unr-lcssa, %._crit_edge122.10.epil
  %indvars.iv157.11.epil = phi i64 [ %indvars.iv.next158.11.epil, %._crit_edge122.10.epil ], [ %indvars.iv157.11.unr, %.preheader83.loopexit.unr-lcssa ]
  %epil.iter246 = phi i64 [ %epil.iter246.next, %._crit_edge122.10.epil ], [ 0, %.preheader83.loopexit.unr-lcssa ]
  %103 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %indvars.iv157.11.epil
  %104 = load i32, ptr %103, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 12, i64 %indvars.iv157.11.epil
  store i32 %107, ptr %108, align 4, !tbaa !5
  %indvars.iv.next158.11.epil = add nuw nsw i64 %indvars.iv157.11.epil, 1
  %epil.iter246.next = add i64 %epil.iter246, 1
  %epil.iter246.cmp.not = icmp eq i64 %epil.iter246.next, %xtraiter245
  br i1 %epil.iter246.cmp.not, label %.preheader83, label %._crit_edge122.10.epil, !llvm.loop !28

.preheader83:                                     ; preds = %.preheader83.loopexit.unr-lcssa, %._crit_edge122.10.epil, %99
  %109 = load i32, ptr @m, align 4, !tbaa !5
  %110 = icmp sgt i32 %109, 0
  br i1 %110, label %.lr.ph125, label %._crit_edge126

._crit_edge122:                                   ; preds = %._crit_edge122, %._crit_edge122.preheader.new
  %indvars.iv157.1 = phi i64 [ 1, %._crit_edge122.preheader.new ], [ %indvars.iv.next158.1.3, %._crit_edge122 ]
  %niter196 = phi i64 [ 0, %._crit_edge122.preheader.new ], [ %niter196.next.3, %._crit_edge122 ]
  %111 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %indvars.iv157.1
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %113
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %indvars.iv157.1
  store i32 %115, ptr %116, align 4, !tbaa !5
  %indvars.iv.next158.1 = add nuw nsw i64 %indvars.iv157.1, 1
  %117 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %indvars.iv.next158.1
  %118 = load i32, ptr %117, align 4, !tbaa !5
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %119
  %121 = load i32, ptr %120, align 4, !tbaa !5
  %122 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %indvars.iv.next158.1
  store i32 %121, ptr %122, align 4, !tbaa !5
  %indvars.iv.next158.1.1 = add nuw nsw i64 %indvars.iv157.1, 2
  %123 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %indvars.iv.next158.1.1
  %124 = load i32, ptr %123, align 4, !tbaa !5
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %125
  %127 = load i32, ptr %126, align 4, !tbaa !5
  %128 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %indvars.iv.next158.1.1
  store i32 %127, ptr %128, align 4, !tbaa !5
  %indvars.iv.next158.1.2 = add nuw nsw i64 %indvars.iv157.1, 3
  %129 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %indvars.iv.next158.1.2
  %130 = load i32, ptr %129, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %131
  %133 = load i32, ptr %132, align 4, !tbaa !5
  %134 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %indvars.iv.next158.1.2
  store i32 %133, ptr %134, align 4, !tbaa !5
  %indvars.iv.next158.1.3 = add nuw nsw i64 %indvars.iv157.1, 4
  %niter196.next.3 = add i64 %niter196, 4
  %niter196.ncmp.3 = icmp eq i64 %niter196.next.3, %unroll_iter195
  br i1 %niter196.ncmp.3, label %._crit_edge122.1.preheader.unr-lcssa, label %._crit_edge122, !llvm.loop !29

._crit_edge122.1.preheader.unr-lcssa:             ; preds = %._crit_edge122, %._crit_edge122.preheader
  %indvars.iv157.1.unr = phi i64 [ 1, %._crit_edge122.preheader ], [ %indvars.iv.next158.1.3, %._crit_edge122 ]
  %lcmp.mod194.not = icmp eq i64 %xtraiter192, 0
  br i1 %lcmp.mod194.not, label %._crit_edge122.1.preheader, label %._crit_edge122.epil

._crit_edge122.epil:                              ; preds = %._crit_edge122.1.preheader.unr-lcssa, %._crit_edge122.epil
  %indvars.iv157.1.epil = phi i64 [ %indvars.iv.next158.1.epil, %._crit_edge122.epil ], [ %indvars.iv157.1.unr, %._crit_edge122.1.preheader.unr-lcssa ]
  %epil.iter193 = phi i64 [ %epil.iter193.next, %._crit_edge122.epil ], [ 0, %._crit_edge122.1.preheader.unr-lcssa ]
  %135 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %indvars.iv157.1.epil
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %indvars.iv157.1.epil
  store i32 %139, ptr %140, align 4, !tbaa !5
  %indvars.iv.next158.1.epil = add nuw nsw i64 %indvars.iv157.1.epil, 1
  %epil.iter193.next = add i64 %epil.iter193, 1
  %epil.iter193.cmp.not = icmp eq i64 %epil.iter193.next, %xtraiter192
  br i1 %epil.iter193.cmp.not, label %._crit_edge122.1.preheader, label %._crit_edge122.epil, !llvm.loop !30

._crit_edge122.1.preheader:                       ; preds = %._crit_edge122.epil, %._crit_edge122.1.preheader.unr-lcssa
  %xtraiter200 = and i64 %101, 3
  %141 = icmp ult i32 %100, 4
  br i1 %141, label %._crit_edge122.2.preheader.unr-lcssa, label %._crit_edge122.1.preheader.new

._crit_edge122.1.preheader.new:                   ; preds = %._crit_edge122.1.preheader
  %unroll_iter203 = and i64 %101, 2147483644
  br label %._crit_edge122.1

._crit_edge122.1:                                 ; preds = %._crit_edge122.1, %._crit_edge122.1.preheader.new
  %indvars.iv157.2 = phi i64 [ 1, %._crit_edge122.1.preheader.new ], [ %indvars.iv.next158.2.3, %._crit_edge122.1 ]
  %niter204 = phi i64 [ 0, %._crit_edge122.1.preheader.new ], [ %niter204.next.3, %._crit_edge122.1 ]
  %142 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %indvars.iv157.2
  %143 = load i32, ptr %142, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !5
  %147 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %indvars.iv157.2
  store i32 %146, ptr %147, align 4, !tbaa !5
  %indvars.iv.next158.2 = add nuw nsw i64 %indvars.iv157.2, 1
  %148 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %indvars.iv.next158.2
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %150
  %152 = load i32, ptr %151, align 4, !tbaa !5
  %153 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %indvars.iv.next158.2
  store i32 %152, ptr %153, align 4, !tbaa !5
  %indvars.iv.next158.2.1 = add nuw nsw i64 %indvars.iv157.2, 2
  %154 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %indvars.iv.next158.2.1
  %155 = load i32, ptr %154, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %indvars.iv.next158.2.1
  store i32 %158, ptr %159, align 4, !tbaa !5
  %indvars.iv.next158.2.2 = add nuw nsw i64 %indvars.iv157.2, 3
  %160 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %indvars.iv.next158.2.2
  %161 = load i32, ptr %160, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %indvars.iv.next158.2.2
  store i32 %164, ptr %165, align 4, !tbaa !5
  %indvars.iv.next158.2.3 = add nuw nsw i64 %indvars.iv157.2, 4
  %niter204.next.3 = add i64 %niter204, 4
  %niter204.ncmp.3 = icmp eq i64 %niter204.next.3, %unroll_iter203
  br i1 %niter204.ncmp.3, label %._crit_edge122.2.preheader.unr-lcssa, label %._crit_edge122.1, !llvm.loop !29

._crit_edge122.2.preheader.unr-lcssa:             ; preds = %._crit_edge122.1, %._crit_edge122.1.preheader
  %indvars.iv157.2.unr = phi i64 [ 1, %._crit_edge122.1.preheader ], [ %indvars.iv.next158.2.3, %._crit_edge122.1 ]
  %lcmp.mod202.not = icmp eq i64 %xtraiter200, 0
  br i1 %lcmp.mod202.not, label %._crit_edge122.2.preheader, label %._crit_edge122.1.epil

._crit_edge122.1.epil:                            ; preds = %._crit_edge122.2.preheader.unr-lcssa, %._crit_edge122.1.epil
  %indvars.iv157.2.epil = phi i64 [ %indvars.iv.next158.2.epil, %._crit_edge122.1.epil ], [ %indvars.iv157.2.unr, %._crit_edge122.2.preheader.unr-lcssa ]
  %epil.iter201 = phi i64 [ %epil.iter201.next, %._crit_edge122.1.epil ], [ 0, %._crit_edge122.2.preheader.unr-lcssa ]
  %166 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %indvars.iv157.2.epil
  %167 = load i32, ptr %166, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 2, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %indvars.iv157.2.epil
  store i32 %170, ptr %171, align 4, !tbaa !5
  %indvars.iv.next158.2.epil = add nuw nsw i64 %indvars.iv157.2.epil, 1
  %epil.iter201.next = add i64 %epil.iter201, 1
  %epil.iter201.cmp.not = icmp eq i64 %epil.iter201.next, %xtraiter200
  br i1 %epil.iter201.cmp.not, label %._crit_edge122.2.preheader, label %._crit_edge122.1.epil, !llvm.loop !31

._crit_edge122.2.preheader:                       ; preds = %._crit_edge122.1.epil, %._crit_edge122.2.preheader.unr-lcssa
  %xtraiter205 = and i64 %101, 3
  %172 = icmp ult i32 %100, 4
  br i1 %172, label %._crit_edge122.3.preheader.unr-lcssa, label %._crit_edge122.2.preheader.new

._crit_edge122.2.preheader.new:                   ; preds = %._crit_edge122.2.preheader
  %unroll_iter208 = and i64 %101, 2147483644
  br label %._crit_edge122.2

._crit_edge122.2:                                 ; preds = %._crit_edge122.2, %._crit_edge122.2.preheader.new
  %indvars.iv157.3 = phi i64 [ 1, %._crit_edge122.2.preheader.new ], [ %indvars.iv.next158.3.3, %._crit_edge122.2 ]
  %niter209 = phi i64 [ 0, %._crit_edge122.2.preheader.new ], [ %niter209.next.3, %._crit_edge122.2 ]
  %173 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %indvars.iv157.3
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %175
  %177 = load i32, ptr %176, align 4, !tbaa !5
  %178 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %indvars.iv157.3
  store i32 %177, ptr %178, align 4, !tbaa !5
  %indvars.iv.next158.3 = add nuw nsw i64 %indvars.iv157.3, 1
  %179 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %indvars.iv.next158.3
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = sext i32 %180 to i64
  %182 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %181
  %183 = load i32, ptr %182, align 4, !tbaa !5
  %184 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %indvars.iv.next158.3
  store i32 %183, ptr %184, align 4, !tbaa !5
  %indvars.iv.next158.3.1 = add nuw nsw i64 %indvars.iv157.3, 2
  %185 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %indvars.iv.next158.3.1
  %186 = load i32, ptr %185, align 4, !tbaa !5
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %187
  %189 = load i32, ptr %188, align 4, !tbaa !5
  %190 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %indvars.iv.next158.3.1
  store i32 %189, ptr %190, align 4, !tbaa !5
  %indvars.iv.next158.3.2 = add nuw nsw i64 %indvars.iv157.3, 3
  %191 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %indvars.iv.next158.3.2
  %192 = load i32, ptr %191, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %193
  %195 = load i32, ptr %194, align 4, !tbaa !5
  %196 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %indvars.iv.next158.3.2
  store i32 %195, ptr %196, align 4, !tbaa !5
  %indvars.iv.next158.3.3 = add nuw nsw i64 %indvars.iv157.3, 4
  %niter209.next.3 = add i64 %niter209, 4
  %niter209.ncmp.3 = icmp eq i64 %niter209.next.3, %unroll_iter208
  br i1 %niter209.ncmp.3, label %._crit_edge122.3.preheader.unr-lcssa, label %._crit_edge122.2, !llvm.loop !29

._crit_edge122.3.preheader.unr-lcssa:             ; preds = %._crit_edge122.2, %._crit_edge122.2.preheader
  %indvars.iv157.3.unr = phi i64 [ 1, %._crit_edge122.2.preheader ], [ %indvars.iv.next158.3.3, %._crit_edge122.2 ]
  %lcmp.mod207.not = icmp eq i64 %xtraiter205, 0
  br i1 %lcmp.mod207.not, label %._crit_edge122.3.preheader, label %._crit_edge122.2.epil

._crit_edge122.2.epil:                            ; preds = %._crit_edge122.3.preheader.unr-lcssa, %._crit_edge122.2.epil
  %indvars.iv157.3.epil = phi i64 [ %indvars.iv.next158.3.epil, %._crit_edge122.2.epil ], [ %indvars.iv157.3.unr, %._crit_edge122.3.preheader.unr-lcssa ]
  %epil.iter206 = phi i64 [ %epil.iter206.next, %._crit_edge122.2.epil ], [ 0, %._crit_edge122.3.preheader.unr-lcssa ]
  %197 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %indvars.iv157.3.epil
  %198 = load i32, ptr %197, align 4, !tbaa !5
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 3, i64 %199
  %201 = load i32, ptr %200, align 4, !tbaa !5
  %202 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %indvars.iv157.3.epil
  store i32 %201, ptr %202, align 4, !tbaa !5
  %indvars.iv.next158.3.epil = add nuw nsw i64 %indvars.iv157.3.epil, 1
  %epil.iter206.next = add i64 %epil.iter206, 1
  %epil.iter206.cmp.not = icmp eq i64 %epil.iter206.next, %xtraiter205
  br i1 %epil.iter206.cmp.not, label %._crit_edge122.3.preheader, label %._crit_edge122.2.epil, !llvm.loop !32

._crit_edge122.3.preheader:                       ; preds = %._crit_edge122.2.epil, %._crit_edge122.3.preheader.unr-lcssa
  %xtraiter210 = and i64 %101, 3
  %203 = icmp ult i32 %100, 4
  br i1 %203, label %._crit_edge122.4.preheader.unr-lcssa, label %._crit_edge122.3.preheader.new

._crit_edge122.3.preheader.new:                   ; preds = %._crit_edge122.3.preheader
  %unroll_iter213 = and i64 %101, 2147483644
  br label %._crit_edge122.3

._crit_edge122.3:                                 ; preds = %._crit_edge122.3, %._crit_edge122.3.preheader.new
  %indvars.iv157.4 = phi i64 [ 1, %._crit_edge122.3.preheader.new ], [ %indvars.iv.next158.4.3, %._crit_edge122.3 ]
  %niter214 = phi i64 [ 0, %._crit_edge122.3.preheader.new ], [ %niter214.next.3, %._crit_edge122.3 ]
  %204 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %indvars.iv157.4
  %205 = load i32, ptr %204, align 4, !tbaa !5
  %206 = sext i32 %205 to i64
  %207 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %206
  %208 = load i32, ptr %207, align 4, !tbaa !5
  %209 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %indvars.iv157.4
  store i32 %208, ptr %209, align 4, !tbaa !5
  %indvars.iv.next158.4 = add nuw nsw i64 %indvars.iv157.4, 1
  %210 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %indvars.iv.next158.4
  %211 = load i32, ptr %210, align 4, !tbaa !5
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %212
  %214 = load i32, ptr %213, align 4, !tbaa !5
  %215 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %indvars.iv.next158.4
  store i32 %214, ptr %215, align 4, !tbaa !5
  %indvars.iv.next158.4.1 = add nuw nsw i64 %indvars.iv157.4, 2
  %216 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %indvars.iv.next158.4.1
  %217 = load i32, ptr %216, align 4, !tbaa !5
  %218 = sext i32 %217 to i64
  %219 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %218
  %220 = load i32, ptr %219, align 4, !tbaa !5
  %221 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %indvars.iv.next158.4.1
  store i32 %220, ptr %221, align 4, !tbaa !5
  %indvars.iv.next158.4.2 = add nuw nsw i64 %indvars.iv157.4, 3
  %222 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %indvars.iv.next158.4.2
  %223 = load i32, ptr %222, align 4, !tbaa !5
  %224 = sext i32 %223 to i64
  %225 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %224
  %226 = load i32, ptr %225, align 4, !tbaa !5
  %227 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %indvars.iv.next158.4.2
  store i32 %226, ptr %227, align 4, !tbaa !5
  %indvars.iv.next158.4.3 = add nuw nsw i64 %indvars.iv157.4, 4
  %niter214.next.3 = add i64 %niter214, 4
  %niter214.ncmp.3 = icmp eq i64 %niter214.next.3, %unroll_iter213
  br i1 %niter214.ncmp.3, label %._crit_edge122.4.preheader.unr-lcssa, label %._crit_edge122.3, !llvm.loop !29

._crit_edge122.4.preheader.unr-lcssa:             ; preds = %._crit_edge122.3, %._crit_edge122.3.preheader
  %indvars.iv157.4.unr = phi i64 [ 1, %._crit_edge122.3.preheader ], [ %indvars.iv.next158.4.3, %._crit_edge122.3 ]
  %lcmp.mod212.not = icmp eq i64 %xtraiter210, 0
  br i1 %lcmp.mod212.not, label %._crit_edge122.4.preheader, label %._crit_edge122.3.epil

._crit_edge122.3.epil:                            ; preds = %._crit_edge122.4.preheader.unr-lcssa, %._crit_edge122.3.epil
  %indvars.iv157.4.epil = phi i64 [ %indvars.iv.next158.4.epil, %._crit_edge122.3.epil ], [ %indvars.iv157.4.unr, %._crit_edge122.4.preheader.unr-lcssa ]
  %epil.iter211 = phi i64 [ %epil.iter211.next, %._crit_edge122.3.epil ], [ 0, %._crit_edge122.4.preheader.unr-lcssa ]
  %228 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %indvars.iv157.4.epil
  %229 = load i32, ptr %228, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 4, i64 %230
  %232 = load i32, ptr %231, align 4, !tbaa !5
  %233 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %indvars.iv157.4.epil
  store i32 %232, ptr %233, align 4, !tbaa !5
  %indvars.iv.next158.4.epil = add nuw nsw i64 %indvars.iv157.4.epil, 1
  %epil.iter211.next = add i64 %epil.iter211, 1
  %epil.iter211.cmp.not = icmp eq i64 %epil.iter211.next, %xtraiter210
  br i1 %epil.iter211.cmp.not, label %._crit_edge122.4.preheader, label %._crit_edge122.3.epil, !llvm.loop !33

._crit_edge122.4.preheader:                       ; preds = %._crit_edge122.3.epil, %._crit_edge122.4.preheader.unr-lcssa
  %xtraiter215 = and i64 %101, 3
  %234 = icmp ult i32 %100, 4
  br i1 %234, label %._crit_edge122.5.preheader.unr-lcssa, label %._crit_edge122.4.preheader.new

._crit_edge122.4.preheader.new:                   ; preds = %._crit_edge122.4.preheader
  %unroll_iter218 = and i64 %101, 2147483644
  br label %._crit_edge122.4

._crit_edge122.4:                                 ; preds = %._crit_edge122.4, %._crit_edge122.4.preheader.new
  %indvars.iv157.5 = phi i64 [ 1, %._crit_edge122.4.preheader.new ], [ %indvars.iv.next158.5.3, %._crit_edge122.4 ]
  %niter219 = phi i64 [ 0, %._crit_edge122.4.preheader.new ], [ %niter219.next.3, %._crit_edge122.4 ]
  %235 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %indvars.iv157.5
  %236 = load i32, ptr %235, align 4, !tbaa !5
  %237 = sext i32 %236 to i64
  %238 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %237
  %239 = load i32, ptr %238, align 4, !tbaa !5
  %240 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %indvars.iv157.5
  store i32 %239, ptr %240, align 4, !tbaa !5
  %indvars.iv.next158.5 = add nuw nsw i64 %indvars.iv157.5, 1
  %241 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %indvars.iv.next158.5
  %242 = load i32, ptr %241, align 4, !tbaa !5
  %243 = sext i32 %242 to i64
  %244 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %243
  %245 = load i32, ptr %244, align 4, !tbaa !5
  %246 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %indvars.iv.next158.5
  store i32 %245, ptr %246, align 4, !tbaa !5
  %indvars.iv.next158.5.1 = add nuw nsw i64 %indvars.iv157.5, 2
  %247 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %indvars.iv.next158.5.1
  %248 = load i32, ptr %247, align 4, !tbaa !5
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %249
  %251 = load i32, ptr %250, align 4, !tbaa !5
  %252 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %indvars.iv.next158.5.1
  store i32 %251, ptr %252, align 4, !tbaa !5
  %indvars.iv.next158.5.2 = add nuw nsw i64 %indvars.iv157.5, 3
  %253 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %indvars.iv.next158.5.2
  %254 = load i32, ptr %253, align 4, !tbaa !5
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %255
  %257 = load i32, ptr %256, align 4, !tbaa !5
  %258 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %indvars.iv.next158.5.2
  store i32 %257, ptr %258, align 4, !tbaa !5
  %indvars.iv.next158.5.3 = add nuw nsw i64 %indvars.iv157.5, 4
  %niter219.next.3 = add i64 %niter219, 4
  %niter219.ncmp.3 = icmp eq i64 %niter219.next.3, %unroll_iter218
  br i1 %niter219.ncmp.3, label %._crit_edge122.5.preheader.unr-lcssa, label %._crit_edge122.4, !llvm.loop !29

._crit_edge122.5.preheader.unr-lcssa:             ; preds = %._crit_edge122.4, %._crit_edge122.4.preheader
  %indvars.iv157.5.unr = phi i64 [ 1, %._crit_edge122.4.preheader ], [ %indvars.iv.next158.5.3, %._crit_edge122.4 ]
  %lcmp.mod217.not = icmp eq i64 %xtraiter215, 0
  br i1 %lcmp.mod217.not, label %._crit_edge122.5.preheader, label %._crit_edge122.4.epil

._crit_edge122.4.epil:                            ; preds = %._crit_edge122.5.preheader.unr-lcssa, %._crit_edge122.4.epil
  %indvars.iv157.5.epil = phi i64 [ %indvars.iv.next158.5.epil, %._crit_edge122.4.epil ], [ %indvars.iv157.5.unr, %._crit_edge122.5.preheader.unr-lcssa ]
  %epil.iter216 = phi i64 [ %epil.iter216.next, %._crit_edge122.4.epil ], [ 0, %._crit_edge122.5.preheader.unr-lcssa ]
  %259 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %indvars.iv157.5.epil
  %260 = load i32, ptr %259, align 4, !tbaa !5
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 5, i64 %261
  %263 = load i32, ptr %262, align 4, !tbaa !5
  %264 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %indvars.iv157.5.epil
  store i32 %263, ptr %264, align 4, !tbaa !5
  %indvars.iv.next158.5.epil = add nuw nsw i64 %indvars.iv157.5.epil, 1
  %epil.iter216.next = add i64 %epil.iter216, 1
  %epil.iter216.cmp.not = icmp eq i64 %epil.iter216.next, %xtraiter215
  br i1 %epil.iter216.cmp.not, label %._crit_edge122.5.preheader, label %._crit_edge122.4.epil, !llvm.loop !34

._crit_edge122.5.preheader:                       ; preds = %._crit_edge122.4.epil, %._crit_edge122.5.preheader.unr-lcssa
  %xtraiter220 = and i64 %101, 3
  %265 = icmp ult i32 %100, 4
  br i1 %265, label %._crit_edge122.6.preheader.unr-lcssa, label %._crit_edge122.5.preheader.new

._crit_edge122.5.preheader.new:                   ; preds = %._crit_edge122.5.preheader
  %unroll_iter223 = and i64 %101, 2147483644
  br label %._crit_edge122.5

._crit_edge122.5:                                 ; preds = %._crit_edge122.5, %._crit_edge122.5.preheader.new
  %indvars.iv157.6 = phi i64 [ 1, %._crit_edge122.5.preheader.new ], [ %indvars.iv.next158.6.3, %._crit_edge122.5 ]
  %niter224 = phi i64 [ 0, %._crit_edge122.5.preheader.new ], [ %niter224.next.3, %._crit_edge122.5 ]
  %266 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %indvars.iv157.6
  %267 = load i32, ptr %266, align 4, !tbaa !5
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %268
  %270 = load i32, ptr %269, align 4, !tbaa !5
  %271 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %indvars.iv157.6
  store i32 %270, ptr %271, align 4, !tbaa !5
  %indvars.iv.next158.6 = add nuw nsw i64 %indvars.iv157.6, 1
  %272 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %indvars.iv.next158.6
  %273 = load i32, ptr %272, align 4, !tbaa !5
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %274
  %276 = load i32, ptr %275, align 4, !tbaa !5
  %277 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %indvars.iv.next158.6
  store i32 %276, ptr %277, align 4, !tbaa !5
  %indvars.iv.next158.6.1 = add nuw nsw i64 %indvars.iv157.6, 2
  %278 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %indvars.iv.next158.6.1
  %279 = load i32, ptr %278, align 4, !tbaa !5
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %280
  %282 = load i32, ptr %281, align 4, !tbaa !5
  %283 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %indvars.iv.next158.6.1
  store i32 %282, ptr %283, align 4, !tbaa !5
  %indvars.iv.next158.6.2 = add nuw nsw i64 %indvars.iv157.6, 3
  %284 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %indvars.iv.next158.6.2
  %285 = load i32, ptr %284, align 4, !tbaa !5
  %286 = sext i32 %285 to i64
  %287 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %286
  %288 = load i32, ptr %287, align 4, !tbaa !5
  %289 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %indvars.iv.next158.6.2
  store i32 %288, ptr %289, align 4, !tbaa !5
  %indvars.iv.next158.6.3 = add nuw nsw i64 %indvars.iv157.6, 4
  %niter224.next.3 = add i64 %niter224, 4
  %niter224.ncmp.3 = icmp eq i64 %niter224.next.3, %unroll_iter223
  br i1 %niter224.ncmp.3, label %._crit_edge122.6.preheader.unr-lcssa, label %._crit_edge122.5, !llvm.loop !29

._crit_edge122.6.preheader.unr-lcssa:             ; preds = %._crit_edge122.5, %._crit_edge122.5.preheader
  %indvars.iv157.6.unr = phi i64 [ 1, %._crit_edge122.5.preheader ], [ %indvars.iv.next158.6.3, %._crit_edge122.5 ]
  %lcmp.mod222.not = icmp eq i64 %xtraiter220, 0
  br i1 %lcmp.mod222.not, label %._crit_edge122.6.preheader, label %._crit_edge122.5.epil

._crit_edge122.5.epil:                            ; preds = %._crit_edge122.6.preheader.unr-lcssa, %._crit_edge122.5.epil
  %indvars.iv157.6.epil = phi i64 [ %indvars.iv.next158.6.epil, %._crit_edge122.5.epil ], [ %indvars.iv157.6.unr, %._crit_edge122.6.preheader.unr-lcssa ]
  %epil.iter221 = phi i64 [ %epil.iter221.next, %._crit_edge122.5.epil ], [ 0, %._crit_edge122.6.preheader.unr-lcssa ]
  %290 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %indvars.iv157.6.epil
  %291 = load i32, ptr %290, align 4, !tbaa !5
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 6, i64 %292
  %294 = load i32, ptr %293, align 4, !tbaa !5
  %295 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %indvars.iv157.6.epil
  store i32 %294, ptr %295, align 4, !tbaa !5
  %indvars.iv.next158.6.epil = add nuw nsw i64 %indvars.iv157.6.epil, 1
  %epil.iter221.next = add i64 %epil.iter221, 1
  %epil.iter221.cmp.not = icmp eq i64 %epil.iter221.next, %xtraiter220
  br i1 %epil.iter221.cmp.not, label %._crit_edge122.6.preheader, label %._crit_edge122.5.epil, !llvm.loop !35

._crit_edge122.6.preheader:                       ; preds = %._crit_edge122.5.epil, %._crit_edge122.6.preheader.unr-lcssa
  %xtraiter225 = and i64 %101, 3
  %296 = icmp ult i32 %100, 4
  br i1 %296, label %._crit_edge122.7.preheader.unr-lcssa, label %._crit_edge122.6.preheader.new

._crit_edge122.6.preheader.new:                   ; preds = %._crit_edge122.6.preheader
  %unroll_iter228 = and i64 %101, 2147483644
  br label %._crit_edge122.6

._crit_edge122.6:                                 ; preds = %._crit_edge122.6, %._crit_edge122.6.preheader.new
  %indvars.iv157.7 = phi i64 [ 1, %._crit_edge122.6.preheader.new ], [ %indvars.iv.next158.7.3, %._crit_edge122.6 ]
  %niter229 = phi i64 [ 0, %._crit_edge122.6.preheader.new ], [ %niter229.next.3, %._crit_edge122.6 ]
  %297 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %indvars.iv157.7
  %298 = load i32, ptr %297, align 4, !tbaa !5
  %299 = sext i32 %298 to i64
  %300 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %299
  %301 = load i32, ptr %300, align 4, !tbaa !5
  %302 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %indvars.iv157.7
  store i32 %301, ptr %302, align 4, !tbaa !5
  %indvars.iv.next158.7 = add nuw nsw i64 %indvars.iv157.7, 1
  %303 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %indvars.iv.next158.7
  %304 = load i32, ptr %303, align 4, !tbaa !5
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %305
  %307 = load i32, ptr %306, align 4, !tbaa !5
  %308 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %indvars.iv.next158.7
  store i32 %307, ptr %308, align 4, !tbaa !5
  %indvars.iv.next158.7.1 = add nuw nsw i64 %indvars.iv157.7, 2
  %309 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %indvars.iv.next158.7.1
  %310 = load i32, ptr %309, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %311
  %313 = load i32, ptr %312, align 4, !tbaa !5
  %314 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %indvars.iv.next158.7.1
  store i32 %313, ptr %314, align 4, !tbaa !5
  %indvars.iv.next158.7.2 = add nuw nsw i64 %indvars.iv157.7, 3
  %315 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %indvars.iv.next158.7.2
  %316 = load i32, ptr %315, align 4, !tbaa !5
  %317 = sext i32 %316 to i64
  %318 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %317
  %319 = load i32, ptr %318, align 4, !tbaa !5
  %320 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %indvars.iv.next158.7.2
  store i32 %319, ptr %320, align 4, !tbaa !5
  %indvars.iv.next158.7.3 = add nuw nsw i64 %indvars.iv157.7, 4
  %niter229.next.3 = add i64 %niter229, 4
  %niter229.ncmp.3 = icmp eq i64 %niter229.next.3, %unroll_iter228
  br i1 %niter229.ncmp.3, label %._crit_edge122.7.preheader.unr-lcssa, label %._crit_edge122.6, !llvm.loop !29

._crit_edge122.7.preheader.unr-lcssa:             ; preds = %._crit_edge122.6, %._crit_edge122.6.preheader
  %indvars.iv157.7.unr = phi i64 [ 1, %._crit_edge122.6.preheader ], [ %indvars.iv.next158.7.3, %._crit_edge122.6 ]
  %lcmp.mod227.not = icmp eq i64 %xtraiter225, 0
  br i1 %lcmp.mod227.not, label %._crit_edge122.7.preheader, label %._crit_edge122.6.epil

._crit_edge122.6.epil:                            ; preds = %._crit_edge122.7.preheader.unr-lcssa, %._crit_edge122.6.epil
  %indvars.iv157.7.epil = phi i64 [ %indvars.iv.next158.7.epil, %._crit_edge122.6.epil ], [ %indvars.iv157.7.unr, %._crit_edge122.7.preheader.unr-lcssa ]
  %epil.iter226 = phi i64 [ %epil.iter226.next, %._crit_edge122.6.epil ], [ 0, %._crit_edge122.7.preheader.unr-lcssa ]
  %321 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %indvars.iv157.7.epil
  %322 = load i32, ptr %321, align 4, !tbaa !5
  %323 = sext i32 %322 to i64
  %324 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 7, i64 %323
  %325 = load i32, ptr %324, align 4, !tbaa !5
  %326 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %indvars.iv157.7.epil
  store i32 %325, ptr %326, align 4, !tbaa !5
  %indvars.iv.next158.7.epil = add nuw nsw i64 %indvars.iv157.7.epil, 1
  %epil.iter226.next = add i64 %epil.iter226, 1
  %epil.iter226.cmp.not = icmp eq i64 %epil.iter226.next, %xtraiter225
  br i1 %epil.iter226.cmp.not, label %._crit_edge122.7.preheader, label %._crit_edge122.6.epil, !llvm.loop !36

._crit_edge122.7.preheader:                       ; preds = %._crit_edge122.6.epil, %._crit_edge122.7.preheader.unr-lcssa
  %xtraiter230 = and i64 %101, 3
  %327 = icmp ult i32 %100, 4
  br i1 %327, label %._crit_edge122.8.preheader.unr-lcssa, label %._crit_edge122.7.preheader.new

._crit_edge122.7.preheader.new:                   ; preds = %._crit_edge122.7.preheader
  %unroll_iter233 = and i64 %101, 2147483644
  br label %._crit_edge122.7

._crit_edge122.7:                                 ; preds = %._crit_edge122.7, %._crit_edge122.7.preheader.new
  %indvars.iv157.8 = phi i64 [ 1, %._crit_edge122.7.preheader.new ], [ %indvars.iv.next158.8.3, %._crit_edge122.7 ]
  %niter234 = phi i64 [ 0, %._crit_edge122.7.preheader.new ], [ %niter234.next.3, %._crit_edge122.7 ]
  %328 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %indvars.iv157.8
  %329 = load i32, ptr %328, align 4, !tbaa !5
  %330 = sext i32 %329 to i64
  %331 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %330
  %332 = load i32, ptr %331, align 4, !tbaa !5
  %333 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %indvars.iv157.8
  store i32 %332, ptr %333, align 4, !tbaa !5
  %indvars.iv.next158.8 = add nuw nsw i64 %indvars.iv157.8, 1
  %334 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %indvars.iv.next158.8
  %335 = load i32, ptr %334, align 4, !tbaa !5
  %336 = sext i32 %335 to i64
  %337 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %336
  %338 = load i32, ptr %337, align 4, !tbaa !5
  %339 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %indvars.iv.next158.8
  store i32 %338, ptr %339, align 4, !tbaa !5
  %indvars.iv.next158.8.1 = add nuw nsw i64 %indvars.iv157.8, 2
  %340 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %indvars.iv.next158.8.1
  %341 = load i32, ptr %340, align 4, !tbaa !5
  %342 = sext i32 %341 to i64
  %343 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %342
  %344 = load i32, ptr %343, align 4, !tbaa !5
  %345 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %indvars.iv.next158.8.1
  store i32 %344, ptr %345, align 4, !tbaa !5
  %indvars.iv.next158.8.2 = add nuw nsw i64 %indvars.iv157.8, 3
  %346 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %indvars.iv.next158.8.2
  %347 = load i32, ptr %346, align 4, !tbaa !5
  %348 = sext i32 %347 to i64
  %349 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %348
  %350 = load i32, ptr %349, align 4, !tbaa !5
  %351 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %indvars.iv.next158.8.2
  store i32 %350, ptr %351, align 4, !tbaa !5
  %indvars.iv.next158.8.3 = add nuw nsw i64 %indvars.iv157.8, 4
  %niter234.next.3 = add i64 %niter234, 4
  %niter234.ncmp.3 = icmp eq i64 %niter234.next.3, %unroll_iter233
  br i1 %niter234.ncmp.3, label %._crit_edge122.8.preheader.unr-lcssa, label %._crit_edge122.7, !llvm.loop !29

._crit_edge122.8.preheader.unr-lcssa:             ; preds = %._crit_edge122.7, %._crit_edge122.7.preheader
  %indvars.iv157.8.unr = phi i64 [ 1, %._crit_edge122.7.preheader ], [ %indvars.iv.next158.8.3, %._crit_edge122.7 ]
  %lcmp.mod232.not = icmp eq i64 %xtraiter230, 0
  br i1 %lcmp.mod232.not, label %._crit_edge122.8.preheader, label %._crit_edge122.7.epil

._crit_edge122.7.epil:                            ; preds = %._crit_edge122.8.preheader.unr-lcssa, %._crit_edge122.7.epil
  %indvars.iv157.8.epil = phi i64 [ %indvars.iv.next158.8.epil, %._crit_edge122.7.epil ], [ %indvars.iv157.8.unr, %._crit_edge122.8.preheader.unr-lcssa ]
  %epil.iter231 = phi i64 [ %epil.iter231.next, %._crit_edge122.7.epil ], [ 0, %._crit_edge122.8.preheader.unr-lcssa ]
  %352 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %indvars.iv157.8.epil
  %353 = load i32, ptr %352, align 4, !tbaa !5
  %354 = sext i32 %353 to i64
  %355 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 8, i64 %354
  %356 = load i32, ptr %355, align 4, !tbaa !5
  %357 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %indvars.iv157.8.epil
  store i32 %356, ptr %357, align 4, !tbaa !5
  %indvars.iv.next158.8.epil = add nuw nsw i64 %indvars.iv157.8.epil, 1
  %epil.iter231.next = add i64 %epil.iter231, 1
  %epil.iter231.cmp.not = icmp eq i64 %epil.iter231.next, %xtraiter230
  br i1 %epil.iter231.cmp.not, label %._crit_edge122.8.preheader, label %._crit_edge122.7.epil, !llvm.loop !37

._crit_edge122.8.preheader:                       ; preds = %._crit_edge122.7.epil, %._crit_edge122.8.preheader.unr-lcssa
  %xtraiter235 = and i64 %101, 3
  %358 = icmp ult i32 %100, 4
  br i1 %358, label %._crit_edge122.9.preheader.unr-lcssa, label %._crit_edge122.8.preheader.new

._crit_edge122.8.preheader.new:                   ; preds = %._crit_edge122.8.preheader
  %unroll_iter238 = and i64 %101, 2147483644
  br label %._crit_edge122.8

._crit_edge122.8:                                 ; preds = %._crit_edge122.8, %._crit_edge122.8.preheader.new
  %indvars.iv157.9 = phi i64 [ 1, %._crit_edge122.8.preheader.new ], [ %indvars.iv.next158.9.3, %._crit_edge122.8 ]
  %niter239 = phi i64 [ 0, %._crit_edge122.8.preheader.new ], [ %niter239.next.3, %._crit_edge122.8 ]
  %359 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %indvars.iv157.9
  %360 = load i32, ptr %359, align 4, !tbaa !5
  %361 = sext i32 %360 to i64
  %362 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %361
  %363 = load i32, ptr %362, align 4, !tbaa !5
  %364 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %indvars.iv157.9
  store i32 %363, ptr %364, align 4, !tbaa !5
  %indvars.iv.next158.9 = add nuw nsw i64 %indvars.iv157.9, 1
  %365 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %indvars.iv.next158.9
  %366 = load i32, ptr %365, align 4, !tbaa !5
  %367 = sext i32 %366 to i64
  %368 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %367
  %369 = load i32, ptr %368, align 4, !tbaa !5
  %370 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %indvars.iv.next158.9
  store i32 %369, ptr %370, align 4, !tbaa !5
  %indvars.iv.next158.9.1 = add nuw nsw i64 %indvars.iv157.9, 2
  %371 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %indvars.iv.next158.9.1
  %372 = load i32, ptr %371, align 4, !tbaa !5
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %373
  %375 = load i32, ptr %374, align 4, !tbaa !5
  %376 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %indvars.iv.next158.9.1
  store i32 %375, ptr %376, align 4, !tbaa !5
  %indvars.iv.next158.9.2 = add nuw nsw i64 %indvars.iv157.9, 3
  %377 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %indvars.iv.next158.9.2
  %378 = load i32, ptr %377, align 4, !tbaa !5
  %379 = sext i32 %378 to i64
  %380 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %379
  %381 = load i32, ptr %380, align 4, !tbaa !5
  %382 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %indvars.iv.next158.9.2
  store i32 %381, ptr %382, align 4, !tbaa !5
  %indvars.iv.next158.9.3 = add nuw nsw i64 %indvars.iv157.9, 4
  %niter239.next.3 = add i64 %niter239, 4
  %niter239.ncmp.3 = icmp eq i64 %niter239.next.3, %unroll_iter238
  br i1 %niter239.ncmp.3, label %._crit_edge122.9.preheader.unr-lcssa, label %._crit_edge122.8, !llvm.loop !29

._crit_edge122.9.preheader.unr-lcssa:             ; preds = %._crit_edge122.8, %._crit_edge122.8.preheader
  %indvars.iv157.9.unr = phi i64 [ 1, %._crit_edge122.8.preheader ], [ %indvars.iv.next158.9.3, %._crit_edge122.8 ]
  %lcmp.mod237.not = icmp eq i64 %xtraiter235, 0
  br i1 %lcmp.mod237.not, label %._crit_edge122.9.preheader, label %._crit_edge122.8.epil

._crit_edge122.8.epil:                            ; preds = %._crit_edge122.9.preheader.unr-lcssa, %._crit_edge122.8.epil
  %indvars.iv157.9.epil = phi i64 [ %indvars.iv.next158.9.epil, %._crit_edge122.8.epil ], [ %indvars.iv157.9.unr, %._crit_edge122.9.preheader.unr-lcssa ]
  %epil.iter236 = phi i64 [ %epil.iter236.next, %._crit_edge122.8.epil ], [ 0, %._crit_edge122.9.preheader.unr-lcssa ]
  %383 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %indvars.iv157.9.epil
  %384 = load i32, ptr %383, align 4, !tbaa !5
  %385 = sext i32 %384 to i64
  %386 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 9, i64 %385
  %387 = load i32, ptr %386, align 4, !tbaa !5
  %388 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %indvars.iv157.9.epil
  store i32 %387, ptr %388, align 4, !tbaa !5
  %indvars.iv.next158.9.epil = add nuw nsw i64 %indvars.iv157.9.epil, 1
  %epil.iter236.next = add i64 %epil.iter236, 1
  %epil.iter236.cmp.not = icmp eq i64 %epil.iter236.next, %xtraiter235
  br i1 %epil.iter236.cmp.not, label %._crit_edge122.9.preheader, label %._crit_edge122.8.epil, !llvm.loop !38

._crit_edge122.9.preheader:                       ; preds = %._crit_edge122.8.epil, %._crit_edge122.9.preheader.unr-lcssa
  %xtraiter240 = and i64 %101, 3
  %389 = icmp ult i32 %100, 4
  br i1 %389, label %._crit_edge122.10.preheader.unr-lcssa, label %._crit_edge122.9.preheader.new

._crit_edge122.9.preheader.new:                   ; preds = %._crit_edge122.9.preheader
  %unroll_iter243 = and i64 %101, 2147483644
  br label %._crit_edge122.9

._crit_edge122.9:                                 ; preds = %._crit_edge122.9, %._crit_edge122.9.preheader.new
  %indvars.iv157.10 = phi i64 [ 1, %._crit_edge122.9.preheader.new ], [ %indvars.iv.next158.10.3, %._crit_edge122.9 ]
  %niter244 = phi i64 [ 0, %._crit_edge122.9.preheader.new ], [ %niter244.next.3, %._crit_edge122.9 ]
  %390 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %indvars.iv157.10
  %391 = load i32, ptr %390, align 4, !tbaa !5
  %392 = sext i32 %391 to i64
  %393 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %392
  %394 = load i32, ptr %393, align 4, !tbaa !5
  %395 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %indvars.iv157.10
  store i32 %394, ptr %395, align 4, !tbaa !5
  %indvars.iv.next158.10 = add nuw nsw i64 %indvars.iv157.10, 1
  %396 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %indvars.iv.next158.10
  %397 = load i32, ptr %396, align 4, !tbaa !5
  %398 = sext i32 %397 to i64
  %399 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %398
  %400 = load i32, ptr %399, align 4, !tbaa !5
  %401 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %indvars.iv.next158.10
  store i32 %400, ptr %401, align 4, !tbaa !5
  %indvars.iv.next158.10.1 = add nuw nsw i64 %indvars.iv157.10, 2
  %402 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %indvars.iv.next158.10.1
  %403 = load i32, ptr %402, align 4, !tbaa !5
  %404 = sext i32 %403 to i64
  %405 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %404
  %406 = load i32, ptr %405, align 4, !tbaa !5
  %407 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %indvars.iv.next158.10.1
  store i32 %406, ptr %407, align 4, !tbaa !5
  %indvars.iv.next158.10.2 = add nuw nsw i64 %indvars.iv157.10, 3
  %408 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %indvars.iv.next158.10.2
  %409 = load i32, ptr %408, align 4, !tbaa !5
  %410 = sext i32 %409 to i64
  %411 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %410
  %412 = load i32, ptr %411, align 4, !tbaa !5
  %413 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %indvars.iv.next158.10.2
  store i32 %412, ptr %413, align 4, !tbaa !5
  %indvars.iv.next158.10.3 = add nuw nsw i64 %indvars.iv157.10, 4
  %niter244.next.3 = add i64 %niter244, 4
  %niter244.ncmp.3 = icmp eq i64 %niter244.next.3, %unroll_iter243
  br i1 %niter244.ncmp.3, label %._crit_edge122.10.preheader.unr-lcssa, label %._crit_edge122.9, !llvm.loop !29

._crit_edge122.10.preheader.unr-lcssa:            ; preds = %._crit_edge122.9, %._crit_edge122.9.preheader
  %indvars.iv157.10.unr = phi i64 [ 1, %._crit_edge122.9.preheader ], [ %indvars.iv.next158.10.3, %._crit_edge122.9 ]
  %lcmp.mod242.not = icmp eq i64 %xtraiter240, 0
  br i1 %lcmp.mod242.not, label %._crit_edge122.10.preheader, label %._crit_edge122.9.epil

._crit_edge122.9.epil:                            ; preds = %._crit_edge122.10.preheader.unr-lcssa, %._crit_edge122.9.epil
  %indvars.iv157.10.epil = phi i64 [ %indvars.iv.next158.10.epil, %._crit_edge122.9.epil ], [ %indvars.iv157.10.unr, %._crit_edge122.10.preheader.unr-lcssa ]
  %epil.iter241 = phi i64 [ %epil.iter241.next, %._crit_edge122.9.epil ], [ 0, %._crit_edge122.10.preheader.unr-lcssa ]
  %414 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %indvars.iv157.10.epil
  %415 = load i32, ptr %414, align 4, !tbaa !5
  %416 = sext i32 %415 to i64
  %417 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 10, i64 %416
  %418 = load i32, ptr %417, align 4, !tbaa !5
  %419 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %indvars.iv157.10.epil
  store i32 %418, ptr %419, align 4, !tbaa !5
  %indvars.iv.next158.10.epil = add nuw nsw i64 %indvars.iv157.10.epil, 1
  %epil.iter241.next = add i64 %epil.iter241, 1
  %epil.iter241.cmp.not = icmp eq i64 %epil.iter241.next, %xtraiter240
  br i1 %epil.iter241.cmp.not, label %._crit_edge122.10.preheader, label %._crit_edge122.9.epil, !llvm.loop !39

._crit_edge122.10.preheader:                      ; preds = %._crit_edge122.9.epil, %._crit_edge122.10.preheader.unr-lcssa
  %xtraiter245 = and i64 %101, 3
  %420 = icmp ult i32 %100, 4
  br i1 %420, label %.preheader83.loopexit.unr-lcssa, label %._crit_edge122.10.preheader.new

._crit_edge122.10.preheader.new:                  ; preds = %._crit_edge122.10.preheader
  %unroll_iter248 = and i64 %101, 2147483644
  br label %._crit_edge122.10

._crit_edge122.10:                                ; preds = %._crit_edge122.10, %._crit_edge122.10.preheader.new
  %indvars.iv157.11 = phi i64 [ 1, %._crit_edge122.10.preheader.new ], [ %indvars.iv.next158.11.3, %._crit_edge122.10 ]
  %niter249 = phi i64 [ 0, %._crit_edge122.10.preheader.new ], [ %niter249.next.3, %._crit_edge122.10 ]
  %421 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %indvars.iv157.11
  %422 = load i32, ptr %421, align 4, !tbaa !5
  %423 = sext i32 %422 to i64
  %424 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %423
  %425 = load i32, ptr %424, align 4, !tbaa !5
  %426 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 12, i64 %indvars.iv157.11
  store i32 %425, ptr %426, align 4, !tbaa !5
  %indvars.iv.next158.11 = add nuw nsw i64 %indvars.iv157.11, 1
  %427 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %indvars.iv.next158.11
  %428 = load i32, ptr %427, align 4, !tbaa !5
  %429 = sext i32 %428 to i64
  %430 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %429
  %431 = load i32, ptr %430, align 4, !tbaa !5
  %432 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 12, i64 %indvars.iv.next158.11
  store i32 %431, ptr %432, align 4, !tbaa !5
  %indvars.iv.next158.11.1 = add nuw nsw i64 %indvars.iv157.11, 2
  %433 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %indvars.iv.next158.11.1
  %434 = load i32, ptr %433, align 4, !tbaa !5
  %435 = sext i32 %434 to i64
  %436 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %435
  %437 = load i32, ptr %436, align 4, !tbaa !5
  %438 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 12, i64 %indvars.iv.next158.11.1
  store i32 %437, ptr %438, align 4, !tbaa !5
  %indvars.iv.next158.11.2 = add nuw nsw i64 %indvars.iv157.11, 3
  %439 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %indvars.iv.next158.11.2
  %440 = load i32, ptr %439, align 4, !tbaa !5
  %441 = sext i32 %440 to i64
  %442 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 11, i64 %441
  %443 = load i32, ptr %442, align 4, !tbaa !5
  %444 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 12, i64 %indvars.iv.next158.11.2
  store i32 %443, ptr %444, align 4, !tbaa !5
  %indvars.iv.next158.11.3 = add nuw nsw i64 %indvars.iv157.11, 4
  %niter249.next.3 = add i64 %niter249, 4
  %niter249.ncmp.3 = icmp eq i64 %niter249.next.3, %unroll_iter248
  br i1 %niter249.ncmp.3, label %.preheader83.loopexit.unr-lcssa, label %._crit_edge122.10, !llvm.loop !29

445:                                              ; preds = %445, %.preheader.preheader.new
  %indvars.iv157 = phi i64 [ 1, %.preheader.preheader.new ], [ %indvars.iv.next158.3191, %445 ]
  %niter185 = phi i64 [ 0, %.preheader.preheader.new ], [ %niter185.next.3, %445 ]
  %446 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 0, i64 %indvars.iv157
  %447 = load i32, ptr %446, align 4, !tbaa !5
  %448 = sext i32 %447 to i64
  %449 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 0, i64 %448
  %450 = load i32, ptr %449, align 4, !tbaa !5
  %451 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %indvars.iv157
  store i32 %450, ptr %451, align 4, !tbaa !5
  %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1
  %452 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 0, i64 %indvars.iv.next158
  %453 = load i32, ptr %452, align 4, !tbaa !5
  %454 = sext i32 %453 to i64
  %455 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 0, i64 %454
  %456 = load i32, ptr %455, align 4, !tbaa !5
  %457 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %indvars.iv.next158
  store i32 %456, ptr %457, align 4, !tbaa !5
  %indvars.iv.next158.1187 = add nuw nsw i64 %indvars.iv157, 2
  %458 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 0, i64 %indvars.iv.next158.1187
  %459 = load i32, ptr %458, align 4, !tbaa !5
  %460 = sext i32 %459 to i64
  %461 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 0, i64 %460
  %462 = load i32, ptr %461, align 4, !tbaa !5
  %463 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %indvars.iv.next158.1187
  store i32 %462, ptr %463, align 4, !tbaa !5
  %indvars.iv.next158.2189 = add nuw nsw i64 %indvars.iv157, 3
  %464 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 0, i64 %indvars.iv.next158.2189
  %465 = load i32, ptr %464, align 4, !tbaa !5
  %466 = sext i32 %465 to i64
  %467 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 0, i64 %466
  %468 = load i32, ptr %467, align 4, !tbaa !5
  %469 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %indvars.iv.next158.2189
  store i32 %468, ptr %469, align 4, !tbaa !5
  %indvars.iv.next158.3191 = add nuw nsw i64 %indvars.iv157, 4
  %niter185.next.3 = add i64 %niter185, 4
  %niter185.ncmp.3 = icmp eq i64 %niter185.next.3, %unroll_iter184
  br i1 %niter185.ncmp.3, label %._crit_edge122.preheader.unr-lcssa, label %445, !llvm.loop !29

._crit_edge122.preheader.unr-lcssa:               ; preds = %445, %.preheader.preheader
  %indvars.iv157.unr = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next158.3191, %445 ]
  %lcmp.mod183.not = icmp eq i64 %xtraiter181, 0
  br i1 %lcmp.mod183.not, label %._crit_edge122.preheader, label %.epil.preheader180

.epil.preheader180:                               ; preds = %._crit_edge122.preheader.unr-lcssa, %.epil.preheader180
  %indvars.iv157.epil = phi i64 [ %indvars.iv.next158.epil, %.epil.preheader180 ], [ %indvars.iv157.unr, %._crit_edge122.preheader.unr-lcssa ]
  %epil.iter182 = phi i64 [ %epil.iter182.next, %.epil.preheader180 ], [ 0, %._crit_edge122.preheader.unr-lcssa ]
  %470 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 0, i64 %indvars.iv157.epil
  %471 = load i32, ptr %470, align 4, !tbaa !5
  %472 = sext i32 %471 to i64
  %473 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 0, i64 %472
  %474 = load i32, ptr %473, align 4, !tbaa !5
  %475 = getelementptr inbounds [13 x [3001 x i32]], ptr @fa, i64 0, i64 1, i64 %indvars.iv157.epil
  store i32 %474, ptr %475, align 4, !tbaa !5
  %indvars.iv.next158.epil = add nuw nsw i64 %indvars.iv157.epil, 1
  %epil.iter182.next = add i64 %epil.iter182, 1
  %epil.iter182.cmp.not = icmp eq i64 %epil.iter182.next, %xtraiter181
  br i1 %epil.iter182.cmp.not, label %._crit_edge122.preheader, label %.epil.preheader180, !llvm.loop !40

._crit_edge122.preheader:                         ; preds = %.epil.preheader180, %._crit_edge122.preheader.unr-lcssa
  %xtraiter192 = and i64 %101, 3
  %476 = icmp ult i32 %100, 4
  br i1 %476, label %._crit_edge122.1.preheader.unr-lcssa, label %._crit_edge122.preheader.new

._crit_edge122.preheader.new:                     ; preds = %._crit_edge122.preheader
  %unroll_iter195 = and i64 %101, 2147483644
  br label %._crit_edge122

._crit_edge126:                                   ; preds = %506, %.preheader83
  call void @_Z3dfsi(i32 noundef 1)
  %477 = load i32, ptr @m, align 4, !tbaa !5
  %478 = icmp sgt i32 %477, 0
  br i1 %478, label %.lr.ph129, label %._crit_edge130

.lr.ph125:                                        ; preds = %.preheader83, %506
  %479 = phi i32 [ %507, %506 ], [ %109, %.preheader83 ]
  %indvars.iv166 = phi i64 [ %indvars.iv.next167, %506 ], [ 0, %.preheader83 ]
  %480 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %indvars.iv166
  %481 = getelementptr inbounds i8, ptr %480, i64 12
  %482 = load i8, ptr %481, align 4, !tbaa !26, !range !41, !noundef !42
  %483 = trunc nuw i8 %482 to i1
  br i1 %483, label %506, label %484

484:                                              ; preds = %.lr.ph125
  %485 = load i32, ptr %480, align 16, !tbaa !23
  %486 = getelementptr inbounds i8, ptr %480, i64 4
  %487 = load i32, ptr %486, align 4, !tbaa !25
  %488 = call noundef i32 @_Z3lcaii(i32 noundef %485, i32 noundef %487)
  %489 = getelementptr inbounds i8, ptr %480, i64 8
  %490 = load i32, ptr %489, align 8, !tbaa !43
  %491 = load i32, ptr %480, align 16, !tbaa !23
  %492 = sext i32 %491 to i64
  %493 = getelementptr inbounds [3001 x i32], ptr @dt, i64 0, i64 %492
  %494 = load i32, ptr %493, align 4, !tbaa !5
  %495 = add nsw i32 %494, %490
  store i32 %495, ptr %493, align 4, !tbaa !5
  %496 = load i32, ptr %486, align 4, !tbaa !25
  %497 = sext i32 %496 to i64
  %498 = getelementptr inbounds [3001 x i32], ptr @dt, i64 0, i64 %497
  %499 = load i32, ptr %498, align 4, !tbaa !5
  %500 = add nsw i32 %499, %490
  store i32 %500, ptr %498, align 4, !tbaa !5
  %501 = shl i32 %490, 1
  %502 = sext i32 %488 to i64
  %503 = getelementptr inbounds [3001 x i32], ptr @dt, i64 0, i64 %502
  %504 = load i32, ptr %503, align 4, !tbaa !5
  %505 = sub nsw i32 %504, %501
  store i32 %505, ptr %503, align 4, !tbaa !5
  %.pre176 = load i32, ptr @m, align 4, !tbaa !5
  br label %506

506:                                              ; preds = %.lr.ph125, %484
  %507 = phi i32 [ %479, %.lr.ph125 ], [ %.pre176, %484 ]
  %indvars.iv.next167 = add nuw nsw i64 %indvars.iv166, 1
  %508 = sext i32 %507 to i64
  %509 = icmp slt i64 %indvars.iv.next167, %508
  br i1 %509, label %.lr.ph125, label %._crit_edge126, !llvm.loop !44

.lr.ph129:                                        ; preds = %._crit_edge126, %.lr.ph129
  %indvars.iv169 = phi i64 [ %indvars.iv.next170, %.lr.ph129 ], [ 0, %._crit_edge126 ]
  %510 = getelementptr inbounds [100001 x i32], ptr @perm, i64 0, i64 %indvars.iv169
  %511 = call i32 @rand() #9
  %512 = shl i32 %511, 15
  %513 = call i32 @rand() #9
  %514 = or i32 %512, %513
  %515 = load i32, ptr @m, align 4, !tbaa !5
  %516 = trunc nuw nsw i64 %indvars.iv169 to i32
  %517 = sub nsw i32 %515, %516
  %518 = srem i32 %514, %517
  %519 = add nsw i32 %518, %516
  %520 = sext i32 %519 to i64
  %521 = getelementptr inbounds [100001 x i32], ptr @perm, i64 0, i64 %520
  call void @_ZSt4swapIiENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 4 dereferenceable(4) %510, ptr noundef nonnull align 4 dereferenceable(4) %521) #9
  %522 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %indvars.iv169
  %523 = load i32, ptr %510, align 4, !tbaa !5
  %524 = sext i32 %523 to i64
  %525 = getelementptr inbounds [100001 x %struct.Edge], ptr @g, i64 0, i64 %524
  call void @_ZSt4swapI4EdgeENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS4_ESt18is_move_assignableIS4_EEE5valueEvE4typeERS4_SD_(ptr noundef nonnull align 4 dereferenceable(16) %522, ptr noundef nonnull align 4 dereferenceable(16) %525) #9
  %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1
  %526 = load i32, ptr @m, align 4, !tbaa !5
  %527 = sext i32 %526 to i64
  %528 = icmp slt i64 %indvars.iv.next170, %527
  br i1 %528, label %.lr.ph129, label %._crit_edge130, !llvm.loop !45

._crit_edge130:                                   ; preds = %.lr.ph129, %._crit_edge126
  %529 = phi i32 [ %477, %._crit_edge126 ], [ %526, %.lr.ph129 ]
  %530 = add nuw nsw i32 %.071131, 1
  %exitcond172.not = icmp eq i32 %530, 10
  br i1 %exitcond172.not, label %.loopexit86.loopexit, label %.preheader85, !llvm.loop !46

.loopexit86.loopexit:                             ; preds = %._crit_edge130
  %.pre177 = load i32, ptr @ans, align 4, !tbaa !5
  br label %.loopexit86

.loopexit86:                                      ; preds = %.loopexit86.loopexit, %.thread
  %531 = phi i32 [ %.pre177, %.loopexit86.loopexit ], [ 0, %.thread ]
  %532 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %531)
  %533 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %534 = icmp eq i32 %533, 2
  br i1 %534, label %.preheader88, label %._crit_edge132, !llvm.loop !47

._crit_edge132:                                   ; preds = %.loopexit86, %0
  ret i32 0
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i64 @_ZSt9make_pairIRiS0_ESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS2_INS3_IT0_E4typeEE6__typeEEOS4_OS9_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0

; Function Attrs: nounwind
declare i32 @rand() local_unnamed_addr #8

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

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

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 "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 #9 = { 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.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12, !17, !16}
!22 = distinct !{!22, !12}
!23 = !{!24, !6, i64 0}
!24 = !{!"_ZTS4Edge", !6, i64 0, !6, i64 4, !6, i64 8, !19, i64 12}
!25 = !{!24, !6, i64 4}
!26 = !{!24, !19, i64 12}
!27 = distinct !{!27, !12}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !12}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}
!33 = distinct !{!33, !10}
!34 = distinct !{!34, !10}
!35 = distinct !{!35, !10}
!36 = distinct !{!36, !10}
!37 = distinct !{!37, !10}
!38 = distinct !{!38, !10}
!39 = distinct !{!39, !10}
!40 = distinct !{!40, !10}
!41 = !{i8 0, i8 2}
!42 = !{}
!43 = !{!24, !6, i64 8}
!44 = distinct !{!44, !12}
!45 = distinct !{!45, !12}
!46 = distinct !{!46, !12}
!47 = distinct !{!47, !12}


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