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

; 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.Node = type { i32, i32, double, double }
%struct.Edge2 = type { i32, i32, i64 }

@N = external dso_local global i32, align 4
@T = external dso_local global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@c = external dso_local global [2 x [2 x i32]], align 16
@sz = external dso_local global [2 x i32], align 4
@sum = external dso_local global [303 x i64], align 16
@mx = external dso_local global i64, align 8
@p = external dso_local global [2 x [303 x %struct.Node]], align 16
@g = external dso_local global [90601 x %struct.Edge2], align 16
@cnt = external dso_local global i32, align 4
@vis = external dso_local global [303 x i8], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5solved(double noundef) #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

; 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 i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #8
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %30

30:                                               ; preds = %350, %0
  %31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @c, ptr noundef getelementptr inbounds ([2 x i32], ptr @c, i64 0, i64 1), ptr noundef getelementptr inbounds ([2 x i32], ptr getelementptr inbounds ([2 x [2 x i32]], ptr @c, i64 0, i64 1), i64 0, i64 1))
  %32 = icmp eq i32 %31, 4
  br i1 %32, label %34, label %33

33:                                               ; preds = %30
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #8
  br label %353

34:                                               ; preds = %30
  %35 = load i32, ptr getelementptr inbounds ([2 x i32], ptr @c, i64 0, i64 1), align 4, !tbaa !5
  store i32 %35, ptr getelementptr inbounds ([2 x [2 x i32]], ptr @c, i64 0, i64 1), align 8, !tbaa !5
  store i32 0, ptr getelementptr inbounds ([2 x i32], ptr @sz, i64 0, i64 1), align 4, !tbaa !5
  store i32 0, ptr @sz, align 4, !tbaa !5
  %36 = load i32, ptr @n, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = mul i64 %37, 8
  call void @llvm.memset.p0.i64(ptr align 16 @sum, i8 0, i64 %38, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 0, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %92, %34
  %40 = load i32, ptr %5, align 4, !tbaa !5
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #8
  %45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %46 = load i8, ptr %6, align 1, !tbaa !9
  %47 = sext i8 %46 to i32
  %48 = icmp eq i32 %47, 107
  %49 = zext i1 %48 to i32
  store i32 %49, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %50 = load i32, ptr %7, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 %51
  %53 = load i32, ptr %7, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [2 x i32], ptr @sz, i64 0, i64 %54
  %56 = load i32, ptr %55, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %55, align 4, !tbaa !5
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [303 x %struct.Node], ptr %52, i64 0, i64 %58
  store ptr %59, ptr %8, align 8, !tbaa !10
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = load ptr, ptr %8, align 8, !tbaa !10
  %62 = getelementptr inbounds %struct.Node, ptr %61, i32 0, i32 0
  store i32 %60, ptr %62, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %63 = load ptr, ptr %8, align 8, !tbaa !10
  %64 = getelementptr inbounds %struct.Node, ptr %63, i32 0, i32 1
  %65 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %9, ptr noundef %10, ptr noundef %64)
  %66 = load double, ptr %9, align 8, !tbaa !15
  %67 = load double, ptr %10, align 8, !tbaa !15
  %68 = call double @cos(double noundef %67) #8
  %69 = fmul double %66, %68
  %70 = load ptr, ptr %8, align 8, !tbaa !10
  %71 = getelementptr inbounds %struct.Node, ptr %70, i32 0, i32 2
  store double %69, ptr %71, align 8, !tbaa !16
  %72 = load double, ptr %9, align 8, !tbaa !15
  %73 = load double, ptr %10, align 8, !tbaa !15
  %74 = call double @sin(double noundef %73) #8
  %75 = fmul double %72, %74
  %76 = load ptr, ptr %8, align 8, !tbaa !10
  %77 = getelementptr inbounds %struct.Node, ptr %76, i32 0, i32 3
  store double %75, ptr %77, align 8, !tbaa !17
  %78 = load ptr, ptr %8, align 8, !tbaa !10
  %79 = getelementptr inbounds %struct.Node, ptr %78, i32 0, i32 1
  %80 = load i32, ptr %79, align 4, !tbaa !18
  %81 = shl i32 %80, 1
  %82 = sext i32 %81 to i64
  %83 = load i32, ptr %5, align 4, !tbaa !5
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [303 x i64], ptr @sum, i64 0, i64 %84
  %86 = load i64, ptr %85, align 8, !tbaa !19
  %87 = add nsw i64 %86, %82
  store i64 %87, ptr %85, align 8, !tbaa !19
  %88 = load ptr, ptr %8, align 8, !tbaa !10
  %89 = getelementptr inbounds %struct.Node, ptr %88, i32 0, i32 1
  %90 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %89)
  %91 = load i32, ptr %90, align 4, !tbaa !5
  store i32 %91, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #8
  br label %92

92:                                               ; preds = %44
  %93 = load i32, ptr %5, align 4, !tbaa !5
  %94 = add nsw i32 %93, 1
  store i32 %94, ptr %5, align 4, !tbaa !5
  br label %39, !llvm.loop !21

95:                                               ; preds = %43
  %96 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.3, ptr noundef @m)
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %97 = load i32, ptr %4, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  store i64 %98, ptr %11, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %99

99:                                               ; preds = %208, %95
  %100 = load i32, ptr %12, align 4, !tbaa !5
  %101 = load i32, ptr @m, align 4, !tbaa !5
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %99
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %211

104:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  %105 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.4, ptr noundef %13, ptr noundef %15, ptr noundef %14, ptr noundef %16)
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %106 = load i8, ptr %13, align 1, !tbaa !9
  %107 = sext i8 %106 to i32
  %108 = icmp eq i32 %107, 107
  %109 = zext i1 %108 to i32
  store i32 %109, ptr %17, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #8
  %110 = load i8, ptr %14, align 1, !tbaa !9
  %111 = sext i8 %110 to i32
  %112 = icmp eq i32 %111, 107
  %113 = zext i1 %112 to i32
  store i32 %113, ptr %18, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %114 = load i32, ptr %17, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 %115
  %117 = load i32, ptr %15, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [303 x %struct.Node], ptr %116, i64 0, i64 %118
  store ptr %119, ptr %19, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %120 = load i32, ptr %18, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 %121
  %123 = load i32, ptr %16, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [303 x %struct.Node], ptr %122, i64 0, i64 %124
  store ptr %125, ptr %20, align 8, !tbaa !10
  %126 = load ptr, ptr %19, align 8, !tbaa !10
  %127 = getelementptr inbounds %struct.Node, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !12
  %129 = load i32, ptr %12, align 4, !tbaa !5
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %130
  %132 = getelementptr inbounds %struct.Edge2, ptr %131, i32 0, i32 0
  store i32 %128, ptr %132, align 16, !tbaa !23
  %133 = load ptr, ptr %20, align 8, !tbaa !10
  %134 = getelementptr inbounds %struct.Node, ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 8, !tbaa !12
  %136 = load i32, ptr %12, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %137
  %139 = getelementptr inbounds %struct.Edge2, ptr %138, i32 0, i32 1
  store i32 %135, ptr %139, align 4, !tbaa !25
  %140 = load ptr, ptr %19, align 8, !tbaa !10
  %141 = getelementptr inbounds %struct.Node, ptr %140, i32 0, i32 2
  %142 = load double, ptr %141, align 8, !tbaa !16
  %143 = load ptr, ptr %20, align 8, !tbaa !10
  %144 = getelementptr inbounds %struct.Node, ptr %143, i32 0, i32 2
  %145 = load double, ptr %144, align 8, !tbaa !16
  %146 = fsub double %142, %145
  %147 = call noundef double @_Z3sqrd(double noundef %146)
  %148 = load ptr, ptr %19, align 8, !tbaa !10
  %149 = getelementptr inbounds %struct.Node, ptr %148, i32 0, i32 3
  %150 = load double, ptr %149, align 8, !tbaa !17
  %151 = load ptr, ptr %20, align 8, !tbaa !10
  %152 = getelementptr inbounds %struct.Node, ptr %151, i32 0, i32 3
  %153 = load double, ptr %152, align 8, !tbaa !17
  %154 = fsub double %150, %153
  %155 = call noundef double @_Z3sqrd(double noundef %154)
  %156 = fadd double %147, %155
  %157 = call double @sqrt(double noundef %156) #8
  %158 = call double @llvm.round.f64(double %157)
  %159 = fptosi double %158 to i64
  %160 = load i32, ptr %17, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds [2 x [2 x i32]], ptr @c, i64 0, i64 %161
  %163 = load i32, ptr %18, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [2 x i32], ptr %162, i64 0, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !5
  %167 = sext i32 %166 to i64
  %168 = mul nsw i64 %159, %167
  %169 = load i32, ptr %12, align 4, !tbaa !5
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %170
  %172 = getelementptr inbounds %struct.Edge2, ptr %171, i32 0, i32 2
  store i64 %168, ptr %172, align 8, !tbaa !26
  %173 = load i32, ptr %12, align 4, !tbaa !5
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %174
  %176 = getelementptr inbounds %struct.Edge2, ptr %175, i32 0, i32 2
  %177 = load i64, ptr %176, align 8, !tbaa !26
  %178 = load i32, ptr %12, align 4, !tbaa !5
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %179
  %181 = getelementptr inbounds %struct.Edge2, ptr %180, i32 0, i32 0
  %182 = load i32, ptr %181, align 16, !tbaa !23
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [303 x i64], ptr @sum, i64 0, i64 %183
  %185 = load i64, ptr %184, align 8, !tbaa !19
  %186 = add nsw i64 %185, %177
  store i64 %186, ptr %184, align 8, !tbaa !19
  %187 = load i32, ptr %12, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %188
  %190 = getelementptr inbounds %struct.Edge2, ptr %189, i32 0, i32 2
  %191 = load i64, ptr %190, align 8, !tbaa !26
  %192 = load i32, ptr %12, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %193
  %195 = getelementptr inbounds %struct.Edge2, ptr %194, i32 0, i32 1
  %196 = load i32, ptr %195, align 4, !tbaa !25
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [303 x i64], ptr @sum, i64 0, i64 %197
  %199 = load i64, ptr %198, align 8, !tbaa !19
  %200 = add nsw i64 %199, %191
  store i64 %200, ptr %198, align 8, !tbaa !19
  %201 = load i32, ptr %12, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %202
  %204 = getelementptr inbounds %struct.Edge2, ptr %203, i32 0, i32 2
  %205 = load i64, ptr %204, align 8, !tbaa !26
  %206 = load i64, ptr %11, align 8, !tbaa !19
  %207 = add nsw i64 %206, %205
  store i64 %207, ptr %11, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #8
  br label %208

208:                                              ; preds = %104
  %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 %99, !llvm.loop !27

211:                                              ; preds = %103
  store i64 0, ptr @mx, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %212

212:                                              ; preds = %223, %211
  %213 = load i32, ptr %21, align 4, !tbaa !5
  %214 = load i32, ptr @n, align 4, !tbaa !5
  %215 = icmp slt i32 %213, %214
  br i1 %215, label %217, label %216

216:                                              ; preds = %212
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %226

217:                                              ; preds = %212
  %218 = load i32, ptr %21, align 4, !tbaa !5
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [303 x i64], ptr @sum, i64 0, i64 %219
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx, ptr noundef nonnull align 8 dereferenceable(8) %220)
  %222 = load i64, ptr %221, align 8, !tbaa !19
  store i64 %222, ptr @mx, align 8, !tbaa !19
  br label %223

223:                                              ; preds = %217
  %224 = load i32, ptr %21, align 4, !tbaa !5
  %225 = add nsw i32 %224, 1
  store i32 %225, ptr %21, align 4, !tbaa !5
  br label %212, !llvm.loop !28

226:                                              ; preds = %216
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %227 = load i32, ptr %4, align 4, !tbaa !5
  %228 = sitofp i32 %227 to double
  store double %228, ptr %22, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %229 = load i64, ptr %11, align 8, !tbaa !19
  %230 = sitofp i64 %229 to double
  store double %230, ptr %23, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #8
  store i32 0, ptr %24, align 4, !tbaa !5
  br label %231

231:                                              ; preds = %253, %226
  %232 = load i32, ptr %24, align 4, !tbaa !5
  %233 = icmp slt i32 %232, 61
  br i1 %233, label %235, label %234

234:                                              ; preds = %231
  store i32 14, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #8
  br label %256

235:                                              ; preds = %231
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %236 = load double, ptr %22, align 8, !tbaa !15
  %237 = load double, ptr %23, align 8, !tbaa !15
  %238 = load double, ptr %22, align 8, !tbaa !15
  %239 = fsub double %237, %238
  %240 = call double @llvm.fmuladd.f64(double %239, double 5.000000e-01, double %236)
  store double %240, ptr %25, align 8, !tbaa !15
  %241 = load double, ptr %25, align 8, !tbaa !15
  %242 = call noundef zeroext i1 @_Z5solved(double noundef %241)
  br i1 %242, label %243, label %250

243:                                              ; preds = %235
  %244 = load double, ptr %25, align 8, !tbaa !15
  store double %244, ptr %23, align 8, !tbaa !15
  %245 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %245, ptr @cnt, align 4, !tbaa !5
  %246 = load i32, ptr @N, align 4, !tbaa !5
  %247 = sext i32 %246 to i64
  %248 = mul i64 %247, 1
  call void @llvm.memset.p0.i64(ptr align 16 @vis, i8 0, i64 %248, i1 false)
  %249 = load i32, ptr @T, align 4, !tbaa !5
  call void @_Z3pfsi(i32 noundef %249)
  br label %252

250:                                              ; preds = %235
  %251 = load double, ptr %25, align 8, !tbaa !15
  store double %251, ptr %22, align 8, !tbaa !15
  br label %252

252:                                              ; preds = %250, %243
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %24, align 4, !tbaa !5
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %24, align 4, !tbaa !5
  br label %231, !llvm.loop !29

256:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #8
  store i64 0, ptr %26, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #8
  store i32 0, ptr %27, align 4, !tbaa !5
  br label %257

257:                                              ; preds = %300, %256
  %258 = load i32, ptr %27, align 4, !tbaa !5
  %259 = icmp slt i32 %258, 2
  br i1 %259, label %261, label %260

260:                                              ; preds = %257
  store i32 17, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #8
  br label %303

261:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #8
  store i32 1, ptr %28, align 4, !tbaa !5
  br label %262

262:                                              ; preds = %296, %261
  %263 = load i32, ptr %28, align 4, !tbaa !5
  %264 = load i32, ptr %27, align 4, !tbaa !5
  %265 = sext i32 %264 to i64
  %266 = getelementptr inbounds [2 x i32], ptr @sz, i64 0, i64 %265
  %267 = load i32, ptr %266, align 4, !tbaa !5
  %268 = icmp sle i32 %263, %267
  br i1 %268, label %270, label %269

269:                                              ; preds = %262
  store i32 20, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #8
  br label %299

270:                                              ; preds = %262
  %271 = load i32, ptr %27, align 4, !tbaa !5
  %272 = sext i32 %271 to i64
  %273 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 %272
  %274 = load i32, ptr %28, align 4, !tbaa !5
  %275 = sext i32 %274 to i64
  %276 = getelementptr inbounds [303 x %struct.Node], ptr %273, i64 0, i64 %275
  %277 = getelementptr inbounds %struct.Node, ptr %276, i32 0, i32 0
  %278 = load i32, ptr %277, align 8, !tbaa !12
  %279 = sext i32 %278 to i64
  %280 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %279
  %281 = load i8, ptr %280, align 1, !tbaa !30, !range !32, !noundef !33
  %282 = trunc i8 %281 to i1
  br i1 %282, label %295, label %283

283:                                              ; preds = %270
  %284 = load i32, ptr %27, align 4, !tbaa !5
  %285 = sext i32 %284 to i64
  %286 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 %285
  %287 = load i32, ptr %28, align 4, !tbaa !5
  %288 = sext i32 %287 to i64
  %289 = getelementptr inbounds [303 x %struct.Node], ptr %286, i64 0, i64 %288
  %290 = getelementptr inbounds %struct.Node, ptr %289, i32 0, i32 1
  %291 = load i32, ptr %290, align 4, !tbaa !18
  %292 = sext i32 %291 to i64
  %293 = load i64, ptr %26, align 8, !tbaa !19
  %294 = add nsw i64 %293, %292
  store i64 %294, ptr %26, align 8, !tbaa !19
  br label %295

295:                                              ; preds = %283, %270
  br label %296

296:                                              ; preds = %295
  %297 = load i32, ptr %28, align 4, !tbaa !5
  %298 = add nsw i32 %297, 1
  store i32 %298, ptr %28, align 4, !tbaa !5
  br label %262, !llvm.loop !34

299:                                              ; preds = %269
  br label %300

300:                                              ; preds = %299
  %301 = load i32, ptr %27, align 4, !tbaa !5
  %302 = add nsw i32 %301, 1
  store i32 %302, ptr %27, align 4, !tbaa !5
  br label %257, !llvm.loop !35

303:                                              ; preds = %260
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 0, ptr %29, align 4, !tbaa !5
  br label %304

304:                                              ; preds = %338, %303
  %305 = load i32, ptr %29, align 4, !tbaa !5
  %306 = load i32, ptr @m, align 4, !tbaa !5
  %307 = icmp slt i32 %305, %306
  br i1 %307, label %309, label %308

308:                                              ; preds = %304
  store i32 23, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  br label %341

309:                                              ; preds = %304
  %310 = load i32, ptr %29, align 4, !tbaa !5
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %311
  %313 = getelementptr inbounds %struct.Edge2, ptr %312, i32 0, i32 0
  %314 = load i32, ptr %313, align 16, !tbaa !23
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %315
  %317 = load i8, ptr %316, align 1, !tbaa !30, !range !32, !noundef !33
  %318 = trunc i8 %317 to i1
  br i1 %318, label %337, label %319

319:                                              ; preds = %309
  %320 = load i32, ptr %29, align 4, !tbaa !5
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %321
  %323 = getelementptr inbounds %struct.Edge2, ptr %322, i32 0, i32 1
  %324 = load i32, ptr %323, align 4, !tbaa !25
  %325 = sext i32 %324 to i64
  %326 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %325
  %327 = load i8, ptr %326, align 1, !tbaa !30, !range !32, !noundef !33
  %328 = trunc i8 %327 to i1
  br i1 %328, label %337, label %329

329:                                              ; preds = %319
  %330 = load i32, ptr %29, align 4, !tbaa !5
  %331 = sext i32 %330 to i64
  %332 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %331
  %333 = getelementptr inbounds %struct.Edge2, ptr %332, i32 0, i32 2
  %334 = load i64, ptr %333, align 8, !tbaa !26
  %335 = load i64, ptr %26, align 8, !tbaa !19
  %336 = add nsw i64 %335, %334
  store i64 %336, ptr %26, align 8, !tbaa !19
  br label %337

337:                                              ; preds = %329, %319, %309
  br label %338

338:                                              ; preds = %337
  %339 = load i32, ptr %29, align 4, !tbaa !5
  %340 = add nsw i32 %339, 1
  store i32 %340, ptr %29, align 4, !tbaa !5
  br label %304, !llvm.loop !36

341:                                              ; preds = %308
  %342 = load i32, ptr %2, align 4, !tbaa !5
  %343 = load i64, ptr %26, align 8, !tbaa !19
  %344 = sitofp i64 %343 to double
  %345 = load i32, ptr @cnt, align 4, !tbaa !5
  %346 = sitofp i32 %345 to double
  %347 = fdiv double %344, %346
  %348 = load i32, ptr @cnt, align 4, !tbaa !5
  %349 = call i32 (ptr, ...) @printf(ptr noundef @.str.5, i32 noundef %342, double noundef %347, i32 noundef %348)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  br label %350

350:                                              ; preds = %341
  %351 = load i32, ptr %2, align 4, !tbaa !5
  %352 = add nsw i32 %351, 1
  store i32 %352, ptr %2, align 4, !tbaa !5
  br label %30, !llvm.loop !37

353:                                              ; preds = %33
  ret i32 0
}

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

; Function Attrs: nounwind
declare double @cos(double noundef) #6

; Function Attrs: nounwind
declare double @sin(double noundef) #6

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_Z3sqrd(double noundef) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.round.f64(double) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #7

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #7 = { 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 #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !14, i64 8, !14, i64 16}
!14 = !{!"double", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!13, !14, i64 8}
!17 = !{!13, !14, i64 16}
!18 = !{!13, !6, i64 4}
!19 = !{!20, !20, i64 0}
!20 = !{!"long long", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !6, i64 0}
!24 = !{!"_ZTS5Edge2", !6, i64 0, !6, i64 4, !20, i64 8}
!25 = !{!24, !6, i64 4}
!26 = !{!24, !20, i64 8}
!27 = distinct !{!27, !22}
!28 = distinct !{!28, !22}
!29 = distinct !{!29, !22}
!30 = !{!31, !31, i64 0}
!31 = !{!"bool", !7, i64 0}
!32 = !{i8 0, i8 2}
!33 = !{}
!34 = distinct !{!34, !22}
!35 = distinct !{!35, !22}
!36 = distinct !{!36, !22}
!37 = distinct !{!37, !22}


; 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.Node = type { i32, i32, double, double }
%struct.Edge2 = type { i32, i32, i64 }

@N = external dso_local local_unnamed_addr global i32, align 4
@T = external dso_local local_unnamed_addr global i32, align 4
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@c = external dso_local global [2 x [2 x i32]], align 16
@sz = external dso_local local_unnamed_addr global [2 x i32], align 4
@sum = external dso_local global [303 x i64], align 16
@mx = external dso_local global i64, align 8
@p = external dso_local global [2 x [303 x %struct.Node]], align 16
@g = external dso_local local_unnamed_addr global [90601 x %struct.Edge2], align 16
@cnt = external dso_local local_unnamed_addr global i32, align 4
@vis = external dso_local local_unnamed_addr global [303 x i8], align 16
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z5solved(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #3

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #4 {
  %1 = alloca i32, align 4
  %2 = alloca i8, align 1
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @c, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 4), ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 12))
  %10 = icmp eq i32 %9, 4
  br i1 %10, label %.lr.ph106, label %._crit_edge107

._crit_edge107:                                   ; preds = %._crit_edge102, %0
  ret i32 0

.lr.ph106:                                        ; preds = %0, %._crit_edge102
  %.066104 = phi i32 [ %227, %._crit_edge102 ], [ 1, %0 ]
  %11 = load i32, ptr getelementptr inbounds (i8, ptr @c, i64 4), align 4, !tbaa !5
  store i32 %11, ptr getelementptr inbounds (i8, ptr @c, i64 8), align 8, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @sz, i64 4), align 4, !tbaa !5
  store i32 0, ptr @sz, align 4, !tbaa !5
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = shl nsw i64 %13, 3
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @sum, i8 0, i64 %14, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #8
  store i32 0, ptr %1, align 4, !tbaa !5
  %15 = icmp sgt i32 %12, 0
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.lr.ph106
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull @m)
  %17 = load i32, ptr %1, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = load i32, ptr @m, align 4, !tbaa !5
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %.lr.ph82, label %._crit_edge83

.lr.ph:                                           ; preds = %.lr.ph106, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %.lr.ph106 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #8
  %21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %2)
  %22 = load i8, ptr %2, align 1, !tbaa !9
  %23 = icmp eq i8 %22, 107
  %24 = zext i1 %23 to i64
  %25 = getelementptr inbounds [2 x i32], ptr @sz, i64 0, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !5
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr %25, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 %24, i64 %28
  %30 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %30, ptr %29, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %31 = getelementptr inbounds i8, ptr %29, i64 4
  %32 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %31)
  %33 = load double, ptr %3, align 8, !tbaa !13
  %34 = load double, ptr %4, align 8, !tbaa !13
  %35 = call double @cos(double noundef %34) #8
  %36 = fmul double %33, %35
  %37 = getelementptr inbounds i8, ptr %29, i64 8
  store double %36, ptr %37, align 8, !tbaa !14
  %38 = load double, ptr %3, align 8, !tbaa !13
  %39 = load double, ptr %4, align 8, !tbaa !13
  %40 = call double @sin(double noundef %39) #8
  %41 = fmul double %38, %40
  %42 = getelementptr inbounds i8, ptr %29, i64 16
  store double %41, ptr %42, align 8, !tbaa !15
  %43 = load i32, ptr %31, align 4, !tbaa !16
  %44 = shl i32 %43, 1
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [303 x i64], ptr @sum, i64 0, i64 %indvars.iv
  %47 = load i64, ptr %46, align 8, !tbaa !17
  %48 = add nsw i64 %47, %45
  store i64 %48, ptr %46, align 8, !tbaa !17
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %31)
  %50 = load i32, ptr %49, align 4, !tbaa !5
  store i32 %50, ptr %1, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %51 = load i32, ptr @n, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = icmp slt i64 %indvars.iv.next, %52
  br i1 %53, label %.lr.ph, label %._crit_edge, !llvm.loop !19

._crit_edge83:                                    ; preds = %.lr.ph82, %._crit_edge
  %.074.lcssa = phi i64 [ %18, %._crit_edge ], [ %104, %.lr.ph82 ]
  store i64 0, ptr @mx, align 8, !tbaa !17
  %54 = load i32, ptr @n, align 4, !tbaa !5
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %.lr.ph86, label %._crit_edge87

.lr.ph82:                                         ; preds = %._crit_edge, %.lr.ph82
  %indvars.iv109 = phi i64 [ %indvars.iv.next110, %.lr.ph82 ], [ 0, %._crit_edge ]
  %.07480 = phi i64 [ %104, %.lr.ph82 ], [ %18, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  %56 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %5, ptr noundef nonnull %7, ptr noundef nonnull %6, ptr noundef nonnull %8)
  %57 = load i8, ptr %5, align 1, !tbaa !9
  %58 = icmp eq i8 %57, 107
  %59 = load i8, ptr %6, align 1, !tbaa !9
  %60 = icmp eq i8 %59, 107
  %61 = zext i1 %58 to i64
  %62 = load i32, ptr %7, align 4, !tbaa !5
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 %61, i64 %63
  %65 = zext i1 %60 to i64
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 %65, i64 %67
  %69 = load i32, ptr %64, align 8, !tbaa !10
  %70 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %indvars.iv109
  store i32 %69, ptr %70, align 16, !tbaa !21
  %71 = load i32, ptr %68, align 8, !tbaa !10
  %72 = getelementptr inbounds i8, ptr %70, i64 4
  store i32 %71, ptr %72, align 4, !tbaa !23
  %73 = getelementptr inbounds i8, ptr %64, i64 8
  %74 = load double, ptr %73, align 8, !tbaa !14
  %75 = getelementptr inbounds i8, ptr %68, i64 8
  %76 = load double, ptr %75, align 8, !tbaa !14
  %77 = fsub double %74, %76
  %78 = call noundef double @_Z3sqrd(double noundef %77)
  %79 = getelementptr inbounds i8, ptr %64, i64 16
  %80 = load double, ptr %79, align 8, !tbaa !15
  %81 = getelementptr inbounds i8, ptr %68, i64 16
  %82 = load double, ptr %81, align 8, !tbaa !15
  %83 = fsub double %80, %82
  %84 = call noundef double @_Z3sqrd(double noundef %83)
  %85 = fadd double %78, %84
  %86 = call double @sqrt(double noundef %85) #8
  %87 = call double @llvm.round.f64(double %86)
  %88 = fptosi double %87 to i64
  %89 = getelementptr inbounds [2 x [2 x i32]], ptr @c, i64 0, i64 %61, i64 %65
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = mul nsw i64 %88, %91
  %93 = getelementptr inbounds i8, ptr %70, i64 8
  store i64 %92, ptr %93, align 8, !tbaa !24
  %94 = load i32, ptr %70, align 16, !tbaa !21
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds [303 x i64], ptr @sum, i64 0, i64 %95
  %97 = load i64, ptr %96, align 8, !tbaa !17
  %98 = add nsw i64 %97, %92
  store i64 %98, ptr %96, align 8, !tbaa !17
  %99 = load i32, ptr %72, align 4, !tbaa !23
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [303 x i64], ptr @sum, i64 0, i64 %100
  %102 = load i64, ptr %101, align 8, !tbaa !17
  %103 = add nsw i64 %102, %92
  store i64 %103, ptr %101, align 8, !tbaa !17
  %104 = add nsw i64 %92, %.07480
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #8
  %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1
  %105 = load i32, ptr @m, align 4, !tbaa !5
  %106 = sext i32 %105 to i64
  %107 = icmp slt i64 %indvars.iv.next110, %106
  br i1 %107, label %.lr.ph82, label %._crit_edge83, !llvm.loop !25

._crit_edge87:                                    ; preds = %.lr.ph86, %._crit_edge83
  %108 = load i32, ptr %1, align 4, !tbaa !5
  %109 = sitofp i32 %108 to double
  %110 = sitofp i64 %.074.lcssa to double
  br label %117

.lr.ph86:                                         ; preds = %._crit_edge83, %.lr.ph86
  %indvars.iv112 = phi i64 [ %indvars.iv.next113, %.lr.ph86 ], [ 0, %._crit_edge83 ]
  %111 = getelementptr inbounds [303 x i64], ptr @sum, i64 0, i64 %indvars.iv112
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) @mx, ptr noundef nonnull align 8 dereferenceable(8) %111)
  %113 = load i64, ptr %112, align 8, !tbaa !17
  store i64 %113, ptr @mx, align 8, !tbaa !17
  %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1
  %114 = load i32, ptr @n, align 4, !tbaa !5
  %115 = sext i32 %114 to i64
  %116 = icmp slt i64 %indvars.iv.next113, %115
  br i1 %116, label %.lr.ph86, label %._crit_edge87, !llvm.loop !26

117:                                              ; preds = %._crit_edge87, %126
  %.06790 = phi i32 [ 0, %._crit_edge87 ], [ %127, %126 ]
  %.06889 = phi double [ %110, %._crit_edge87 ], [ %.169, %126 ]
  %.07088 = phi double [ %109, %._crit_edge87 ], [ %.171, %126 ]
  %118 = fsub double %.06889, %.07088
  %119 = call double @llvm.fmuladd.f64(double %118, double 5.000000e-01, double %.07088)
  %120 = call noundef zeroext i1 @_Z5solved(double noundef %119)
  br i1 %120, label %121, label %126

121:                                              ; preds = %117
  %122 = load i32, ptr @n, align 4, !tbaa !5
  store i32 %122, ptr @cnt, align 4, !tbaa !5
  %123 = load i32, ptr @N, align 4, !tbaa !5
  %124 = sext i32 %123 to i64
  call void @llvm.memset.p0.i64(ptr nonnull align 16 @vis, i8 0, i64 %124, i1 false)
  %125 = load i32, ptr @T, align 4, !tbaa !5
  call void @_Z3pfsi(i32 noundef %125)
  br label %126

126:                                              ; preds = %117, %121
  %.171 = phi double [ %.07088, %121 ], [ %119, %117 ]
  %.169 = phi double [ %119, %121 ], [ %.06889, %117 ]
  %127 = add nuw nsw i32 %.06790, 1
  %exitcond.not = icmp eq i32 %127, 61
  br i1 %exitcond.not, label %.preheader.preheader, label %117, !llvm.loop !27

.preheader.preheader:                             ; preds = %126
  %128 = load i32, ptr @sz, align 4, !tbaa !5
  %.not91 = icmp slt i32 %128, 1
  br i1 %.not91, label %._crit_edge95, label %.lr.ph94.preheader

.lr.ph101.preheader:                              ; preds = %._crit_edge95.1
  %wide.trip.count125 = zext nneg i32 %180 to i64
  %xtraiter138 = and i64 %wide.trip.count125, 1
  %129 = icmp eq i32 %180, 1
  br i1 %129, label %._crit_edge102.loopexit.unr-lcssa, label %.lr.ph101.preheader.new

.lr.ph101.preheader.new:                          ; preds = %.lr.ph101.preheader
  %unroll_iter141 = and i64 %wide.trip.count125, 2147483646
  br label %.lr.ph101

.lr.ph94.preheader:                               ; preds = %.preheader.preheader
  %130 = zext nneg i32 %128 to i64
  %xtraiter = and i64 %130, 1
  %131 = icmp eq i32 %128, 1
  br i1 %131, label %._crit_edge95.loopexit.unr-lcssa, label %.lr.ph94.preheader.new

.lr.ph94.preheader.new:                           ; preds = %.lr.ph94.preheader
  %unroll_iter = and i64 %130, 2147483646
  br label %.lr.ph94

._crit_edge95.loopexit.unr-lcssa:                 ; preds = %204, %.lr.ph94.preheader
  %.2.lcssa.ph = phi i64 [ poison, %.lr.ph94.preheader ], [ %.2.1131, %204 ]
  %indvars.iv115.unr = phi i64 [ 1, %.lr.ph94.preheader ], [ %indvars.iv.next116.1132, %204 ]
  %.192.unr = phi i64 [ 0, %.lr.ph94.preheader ], [ %.2.1131, %204 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge95, label %.lr.ph94.epil

.lr.ph94.epil:                                    ; preds = %._crit_edge95.loopexit.unr-lcssa
  %132 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 0, i64 %indvars.iv115.unr
  %133 = load i32, ptr %132, align 8, !tbaa !10
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %134
  %136 = load i8, ptr %135, align 1, !tbaa !28, !range !30, !noundef !31
  %137 = trunc nuw i8 %136 to i1
  br i1 %137, label %._crit_edge95, label %138

138:                                              ; preds = %.lr.ph94.epil
  %139 = getelementptr inbounds i8, ptr %132, i64 4
  %140 = load i32, ptr %139, align 4, !tbaa !16
  %141 = sext i32 %140 to i64
  %142 = add nsw i64 %.192.unr, %141
  br label %._crit_edge95

._crit_edge95:                                    ; preds = %._crit_edge95.loopexit.unr-lcssa, %138, %.lr.ph94.epil, %.preheader.preheader
  %.1.lcssa = phi i64 [ 0, %.preheader.preheader ], [ %.2.lcssa.ph, %._crit_edge95.loopexit.unr-lcssa ], [ %.192.unr, %.lr.ph94.epil ], [ %142, %138 ]
  %143 = load i32, ptr getelementptr inbounds (i8, ptr @sz, i64 4), align 4, !tbaa !5
  %.not91.1 = icmp slt i32 %143, 1
  br i1 %.not91.1, label %._crit_edge95.1, label %.lr.ph94.preheader.1

.lr.ph94.preheader.1:                             ; preds = %._crit_edge95
  %144 = zext nneg i32 %143 to i64
  %xtraiter133 = and i64 %144, 1
  %145 = icmp eq i32 %143, 1
  br i1 %145, label %._crit_edge95.1.loopexit.unr-lcssa, label %.lr.ph94.preheader.1.new

.lr.ph94.preheader.1.new:                         ; preds = %.lr.ph94.preheader.1
  %unroll_iter136 = and i64 %144, 2147483646
  br label %.lr.ph94.1

.lr.ph94.1:                                       ; preds = %168, %.lr.ph94.preheader.1.new
  %indvars.iv115.1 = phi i64 [ 1, %.lr.ph94.preheader.1.new ], [ %indvars.iv.next116.1.1, %168 ]
  %.192.1 = phi i64 [ %.1.lcssa, %.lr.ph94.preheader.1.new ], [ %.2.1.1, %168 ]
  %niter137 = phi i64 [ 0, %.lr.ph94.preheader.1.new ], [ %niter137.next.1, %168 ]
  %146 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 1, i64 %indvars.iv115.1
  %147 = load i32, ptr %146, align 8, !tbaa !10
  %148 = sext i32 %147 to i64
  %149 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %148
  %150 = load i8, ptr %149, align 1, !tbaa !28, !range !30, !noundef !31
  %151 = trunc nuw i8 %150 to i1
  br i1 %151, label %.lr.ph94.1.1, label %152

152:                                              ; preds = %.lr.ph94.1
  %153 = getelementptr inbounds i8, ptr %146, i64 4
  %154 = load i32, ptr %153, align 4, !tbaa !16
  %155 = sext i32 %154 to i64
  %156 = add nsw i64 %.192.1, %155
  br label %.lr.ph94.1.1

.lr.ph94.1.1:                                     ; preds = %152, %.lr.ph94.1
  %.2.1 = phi i64 [ %.192.1, %.lr.ph94.1 ], [ %156, %152 ]
  %indvars.iv.next116.1 = add nuw nsw i64 %indvars.iv115.1, 1
  %157 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 1, i64 %indvars.iv.next116.1
  %158 = load i32, ptr %157, align 8, !tbaa !10
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %159
  %161 = load i8, ptr %160, align 1, !tbaa !28, !range !30, !noundef !31
  %162 = trunc nuw i8 %161 to i1
  br i1 %162, label %168, label %163

163:                                              ; preds = %.lr.ph94.1.1
  %164 = getelementptr inbounds i8, ptr %157, i64 4
  %165 = load i32, ptr %164, align 4, !tbaa !16
  %166 = sext i32 %165 to i64
  %167 = add nsw i64 %.2.1, %166
  br label %168

168:                                              ; preds = %163, %.lr.ph94.1.1
  %.2.1.1 = phi i64 [ %.2.1, %.lr.ph94.1.1 ], [ %167, %163 ]
  %indvars.iv.next116.1.1 = add nuw nsw i64 %indvars.iv115.1, 2
  %niter137.next.1 = add i64 %niter137, 2
  %niter137.ncmp.1 = icmp eq i64 %niter137.next.1, %unroll_iter136
  br i1 %niter137.ncmp.1, label %._crit_edge95.1.loopexit.unr-lcssa, label %.lr.ph94.1, !llvm.loop !32

._crit_edge95.1.loopexit.unr-lcssa:               ; preds = %168, %.lr.ph94.preheader.1
  %.2.1.lcssa.ph = phi i64 [ poison, %.lr.ph94.preheader.1 ], [ %.2.1.1, %168 ]
  %indvars.iv115.1.unr = phi i64 [ 1, %.lr.ph94.preheader.1 ], [ %indvars.iv.next116.1.1, %168 ]
  %.192.1.unr = phi i64 [ %.1.lcssa, %.lr.ph94.preheader.1 ], [ %.2.1.1, %168 ]
  %lcmp.mod134.not = icmp eq i64 %xtraiter133, 0
  br i1 %lcmp.mod134.not, label %._crit_edge95.1, label %.lr.ph94.1.epil

.lr.ph94.1.epil:                                  ; preds = %._crit_edge95.1.loopexit.unr-lcssa
  %169 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 1, i64 %indvars.iv115.1.unr
  %170 = load i32, ptr %169, align 8, !tbaa !10
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %171
  %173 = load i8, ptr %172, align 1, !tbaa !28, !range !30, !noundef !31
  %174 = trunc nuw i8 %173 to i1
  br i1 %174, label %._crit_edge95.1, label %175

175:                                              ; preds = %.lr.ph94.1.epil
  %176 = getelementptr inbounds i8, ptr %169, i64 4
  %177 = load i32, ptr %176, align 4, !tbaa !16
  %178 = sext i32 %177 to i64
  %179 = add nsw i64 %.192.1.unr, %178
  br label %._crit_edge95.1

._crit_edge95.1:                                  ; preds = %._crit_edge95.1.loopexit.unr-lcssa, %175, %.lr.ph94.1.epil, %._crit_edge95
  %.1.lcssa.1 = phi i64 [ %.1.lcssa, %._crit_edge95 ], [ %.2.1.lcssa.ph, %._crit_edge95.1.loopexit.unr-lcssa ], [ %.192.1.unr, %.lr.ph94.1.epil ], [ %179, %175 ]
  %180 = load i32, ptr @m, align 4, !tbaa !5
  %181 = icmp sgt i32 %180, 0
  br i1 %181, label %.lr.ph101.preheader, label %._crit_edge102

.lr.ph94:                                         ; preds = %204, %.lr.ph94.preheader.new
  %indvars.iv115 = phi i64 [ 1, %.lr.ph94.preheader.new ], [ %indvars.iv.next116.1132, %204 ]
  %.192 = phi i64 [ 0, %.lr.ph94.preheader.new ], [ %.2.1131, %204 ]
  %niter = phi i64 [ 0, %.lr.ph94.preheader.new ], [ %niter.next.1, %204 ]
  %182 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 0, i64 %indvars.iv115
  %183 = load i32, ptr %182, align 8, !tbaa !10
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %184
  %186 = load i8, ptr %185, align 1, !tbaa !28, !range !30, !noundef !31
  %187 = trunc nuw i8 %186 to i1
  br i1 %187, label %.lr.ph94.1130, label %188

188:                                              ; preds = %.lr.ph94
  %189 = getelementptr inbounds i8, ptr %182, i64 4
  %190 = load i32, ptr %189, align 4, !tbaa !16
  %191 = sext i32 %190 to i64
  %192 = add nsw i64 %.192, %191
  br label %.lr.ph94.1130

.lr.ph94.1130:                                    ; preds = %.lr.ph94, %188
  %.2 = phi i64 [ %.192, %.lr.ph94 ], [ %192, %188 ]
  %indvars.iv.next116 = add nuw nsw i64 %indvars.iv115, 1
  %193 = getelementptr inbounds [2 x [303 x %struct.Node]], ptr @p, i64 0, i64 0, i64 %indvars.iv.next116
  %194 = load i32, ptr %193, align 8, !tbaa !10
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %195
  %197 = load i8, ptr %196, align 1, !tbaa !28, !range !30, !noundef !31
  %198 = trunc nuw i8 %197 to i1
  br i1 %198, label %204, label %199

199:                                              ; preds = %.lr.ph94.1130
  %200 = getelementptr inbounds i8, ptr %193, i64 4
  %201 = load i32, ptr %200, align 4, !tbaa !16
  %202 = sext i32 %201 to i64
  %203 = add nsw i64 %.2, %202
  br label %204

204:                                              ; preds = %199, %.lr.ph94.1130
  %.2.1131 = phi i64 [ %.2, %.lr.ph94.1130 ], [ %203, %199 ]
  %indvars.iv.next116.1132 = add nuw nsw i64 %indvars.iv115, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge95.loopexit.unr-lcssa, label %.lr.ph94, !llvm.loop !32

._crit_edge102.loopexit.unr-lcssa:                ; preds = %264, %.lr.ph101.preheader
  %.4.lcssa.ph = phi i64 [ poison, %.lr.ph101.preheader ], [ %.4.1, %264 ]
  %indvars.iv122.unr = phi i64 [ 0, %.lr.ph101.preheader ], [ %indvars.iv.next123.1, %264 ]
  %.399.unr = phi i64 [ %.1.lcssa.1, %.lr.ph101.preheader ], [ %.4.1, %264 ]
  %lcmp.mod139.not = icmp eq i64 %xtraiter138, 0
  br i1 %lcmp.mod139.not, label %._crit_edge102, label %.lr.ph101.epil

.lr.ph101.epil:                                   ; preds = %._crit_edge102.loopexit.unr-lcssa
  %205 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %indvars.iv122.unr
  %206 = load i32, ptr %205, align 16, !tbaa !21
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %207
  %209 = load i8, ptr %208, align 1, !tbaa !28, !range !30, !noundef !31
  %210 = trunc nuw i8 %209 to i1
  br i1 %210, label %._crit_edge102, label %211

211:                                              ; preds = %.lr.ph101.epil
  %212 = getelementptr inbounds i8, ptr %205, i64 4
  %213 = load i32, ptr %212, align 4, !tbaa !23
  %214 = sext i32 %213 to i64
  %215 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %214
  %216 = load i8, ptr %215, align 1, !tbaa !28, !range !30, !noundef !31
  %217 = trunc nuw i8 %216 to i1
  br i1 %217, label %._crit_edge102, label %218

218:                                              ; preds = %211
  %219 = getelementptr inbounds i8, ptr %205, i64 8
  %220 = load i64, ptr %219, align 8, !tbaa !24
  %221 = add nsw i64 %220, %.399.unr
  br label %._crit_edge102

._crit_edge102:                                   ; preds = %._crit_edge102.loopexit.unr-lcssa, %218, %211, %.lr.ph101.epil, %._crit_edge95.1
  %.3.lcssa = phi i64 [ %.1.lcssa.1, %._crit_edge95.1 ], [ %.4.lcssa.ph, %._crit_edge102.loopexit.unr-lcssa ], [ %.399.unr, %.lr.ph101.epil ], [ %.399.unr, %211 ], [ %221, %218 ]
  %222 = sitofp i64 %.3.lcssa to double
  %223 = load i32, ptr @cnt, align 4, !tbaa !5
  %224 = sitofp i32 %223 to double
  %225 = fdiv double %222, %224
  %226 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef %.066104, double noundef %225, i32 noundef %223)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #8
  %227 = add nuw nsw i32 %.066104, 1
  %228 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @c, ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 4), ptr noundef nonnull getelementptr inbounds (i8, ptr @c, i64 12))
  %229 = icmp eq i32 %228, 4
  br i1 %229, label %.lr.ph106, label %._crit_edge107, !llvm.loop !33

.lr.ph101:                                        ; preds = %264, %.lr.ph101.preheader.new
  %indvars.iv122 = phi i64 [ 0, %.lr.ph101.preheader.new ], [ %indvars.iv.next123.1, %264 ]
  %.399 = phi i64 [ %.1.lcssa.1, %.lr.ph101.preheader.new ], [ %.4.1, %264 ]
  %niter142 = phi i64 [ 0, %.lr.ph101.preheader.new ], [ %niter142.next.1, %264 ]
  %230 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %indvars.iv122
  %231 = load i32, ptr %230, align 16, !tbaa !21
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %232
  %234 = load i8, ptr %233, align 1, !tbaa !28, !range !30, !noundef !31
  %235 = trunc nuw i8 %234 to i1
  br i1 %235, label %.lr.ph101.1, label %236

236:                                              ; preds = %.lr.ph101
  %237 = getelementptr inbounds i8, ptr %230, i64 4
  %238 = load i32, ptr %237, align 4, !tbaa !23
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %239
  %241 = load i8, ptr %240, align 1, !tbaa !28, !range !30, !noundef !31
  %242 = trunc nuw i8 %241 to i1
  br i1 %242, label %.lr.ph101.1, label %243

243:                                              ; preds = %236
  %244 = getelementptr inbounds i8, ptr %230, i64 8
  %245 = load i64, ptr %244, align 8, !tbaa !24
  %246 = add nsw i64 %245, %.399
  br label %.lr.ph101.1

.lr.ph101.1:                                      ; preds = %.lr.ph101, %236, %243
  %.4 = phi i64 [ %.399, %.lr.ph101 ], [ %.399, %236 ], [ %246, %243 ]
  %indvars.iv.next123 = or disjoint i64 %indvars.iv122, 1
  %247 = getelementptr inbounds [90601 x %struct.Edge2], ptr @g, i64 0, i64 %indvars.iv.next123
  %248 = load i32, ptr %247, align 16, !tbaa !21
  %249 = sext i32 %248 to i64
  %250 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %249
  %251 = load i8, ptr %250, align 1, !tbaa !28, !range !30, !noundef !31
  %252 = trunc nuw i8 %251 to i1
  br i1 %252, label %264, label %253

253:                                              ; preds = %.lr.ph101.1
  %254 = getelementptr inbounds i8, ptr %247, i64 4
  %255 = load i32, ptr %254, align 4, !tbaa !23
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [303 x i8], ptr @vis, i64 0, i64 %256
  %258 = load i8, ptr %257, align 1, !tbaa !28, !range !30, !noundef !31
  %259 = trunc nuw i8 %258 to i1
  br i1 %259, label %264, label %260

260:                                              ; preds = %253
  %261 = getelementptr inbounds i8, ptr %247, i64 8
  %262 = load i64, ptr %261, align 8, !tbaa !24
  %263 = add nsw i64 %262, %.4
  br label %264

264:                                              ; preds = %260, %253, %.lr.ph101.1
  %.4.1 = phi i64 [ %.4, %.lr.ph101.1 ], [ %.4, %253 ], [ %263, %260 ]
  %indvars.iv.next123.1 = add nuw nsw i64 %indvars.iv122, 2
  %niter142.next.1 = add i64 %niter142, 2
  %niter142.ncmp.1 = icmp eq i64 %niter142.next.1, %unroll_iter141
  br i1 %niter142.ncmp.1, label %._crit_edge102.loopexit.unr-lcssa, label %.lr.ph101, !llvm.loop !34
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #6

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #6

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_Z3sqrd(double noundef) local_unnamed_addr #7

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.round.f64(double) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 0}
!11 = !{!"_ZTS4Node", !6, i64 0, !6, i64 4, !12, i64 8, !12, i64 16}
!12 = !{!"double", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!11, !12, i64 8}
!15 = !{!11, !12, i64 16}
!16 = !{!11, !6, i64 4}
!17 = !{!18, !18, i64 0}
!18 = !{!"long long", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTS5Edge2", !6, i64 0, !6, i64 4, !18, i64 8}
!23 = !{!22, !6, i64 4}
!24 = !{!22, !18, i64 8}
!25 = distinct !{!25, !20}
!26 = distinct !{!26, !20}
!27 = distinct !{!27, !20}
!28 = !{!29, !29, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = distinct !{!32, !20}
!33 = distinct !{!33, !20}
!34 = distinct !{!34, !20}


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