; LLVM IR from tangjz/acm-icpc :: codeforces/gym (101471J)

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

@N = external dso_local global i32, align 4
@M = external dso_local global i32, align 4
@lnk = external dso_local global [201 x i32], align 16
@e = external dso_local global [161605 x %struct.Edge], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@v = external dso_local global x86_fp80, align 16
@a = external dso_local global x86_fp80, align 16
@fmx = external dso_local global x86_fp80, align 16
@wmx = external dso_local global x86_fp80, align 16
@zmx = external dso_local global x86_fp80, align 16
@cap = external dso_local global [2 x [40401 x x86_fp80]], align 16
@ans = external dso_local global x86_fp80, 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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z3sgne(x86_fp80 noundef) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_Z5diniciie(i32 noundef, i32 noundef, x86_fp80 noundef) #5

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #6 {
  %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 x86_fp80, align 16
  %9 = alloca x86_fp80, align 16
  %10 = alloca x86_fp80, align 16
  %11 = alloca i32, align 4
  %12 = alloca x86_fp80, align 16
  %13 = alloca i32, align 4
  %14 = alloca x86_fp80, align 16
  %15 = alloca x86_fp80, align 16
  store i32 0, ptr %1, align 4
  %16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @m)
  %17 = call noundef x86_fp80 @_Z6readDBv()
  store x86_fp80 %17, ptr @v, align 16, !tbaa !5
  %18 = call noundef x86_fp80 @_Z6readDBv()
  store x86_fp80 %18, ptr @a, align 16, !tbaa !5
  %19 = load i32, ptr @n, align 4, !tbaa !9
  store i32 %19, ptr @N, align 4, !tbaa !9
  store i32 0, ptr @M, align 4, !tbaa !9
  %20 = load i32, ptr @N, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = mul i64 %21, 4
  call void @llvm.memset.p0.i64(ptr align 16 @lnk, i8 -1, i64 %22, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #9
  store i32 0, ptr %2, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %42, %0
  %24 = load i32, ptr %2, align 4, !tbaa !9
  %25 = load i32, ptr @m, align 4, !tbaa !9
  %26 = icmp slt i32 %24, %25
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  %29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %3, ptr noundef %4, ptr noundef %5)
  %30 = load i32, ptr %3, align 4, !tbaa !9
  %31 = add nsw i32 %30, -1
  store i32 %31, ptr %3, align 4, !tbaa !9
  %32 = load i32, ptr %4, align 4, !tbaa !9
  %33 = add nsw i32 %32, -1
  store i32 %33, ptr %4, align 4, !tbaa !9
  %34 = load i32, ptr %3, align 4, !tbaa !9
  %35 = load i32, ptr %4, align 4, !tbaa !9
  %36 = load i32, ptr %5, align 4, !tbaa !9
  %37 = sitofp i32 %36 to x86_fp80
  call void @_Z7addEdgeiie(i32 noundef %34, i32 noundef %35, x86_fp80 noundef %37)
  %38 = load i32, ptr %4, align 4, !tbaa !9
  %39 = load i32, ptr %3, align 4, !tbaa !9
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = sitofp i32 %40 to x86_fp80
  call void @_Z7addEdgeiie(i32 noundef %38, i32 noundef %39, x86_fp80 noundef %41)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #9
  br label %42

42:                                               ; preds = %28
  %43 = load i32, ptr %2, align 4, !tbaa !9
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %2, align 4, !tbaa !9
  br label %23, !llvm.loop !11

45:                                               ; preds = %27
  %46 = call noundef x86_fp80 @_Z5diniciie(i32 noundef 0, i32 noundef 2, x86_fp80 noundef 0xK400C9C40000000000000)
  store x86_fp80 %46, ptr @fmx, align 16, !tbaa !5
  %47 = load x86_fp80, ptr @fmx, align 16, !tbaa !5
  %48 = call noundef x86_fp80 @_Z5diniciie(i32 noundef 1, i32 noundef 2, x86_fp80 noundef 0xK400C9C40000000000000)
  %49 = fadd x86_fp80 %47, %48
  store x86_fp80 %49, ptr @zmx, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %104, %45
  %51 = load i32, ptr %6, align 4, !tbaa !9
  %52 = load i32, ptr @M, align 4, !tbaa !9
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %55, label %54

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

55:                                               ; preds = %50
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = ashr i32 %56, 1
  %58 = and i32 %57, 1
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %73

60:                                               ; preds = %55
  %61 = load i32, ptr %6, align 4, !tbaa !9
  %62 = xor i32 %61, 1
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %63
  %65 = getelementptr inbounds %struct.Edge, ptr %64, i32 0, i32 2
  %66 = load x86_fp80, ptr %65, align 16, !tbaa !13
  %67 = load i32, ptr %6, align 4, !tbaa !9
  %68 = ashr i32 %67, 2
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [40401 x x86_fp80], ptr @cap, i64 0, i64 %69
  %71 = load x86_fp80, ptr %70, align 16, !tbaa !5
  %72 = fsub x86_fp80 %71, %66
  store x86_fp80 %72, ptr %70, align 16, !tbaa !5
  br label %86

73:                                               ; preds = %55
  %74 = load i32, ptr %6, align 4, !tbaa !9
  %75 = xor i32 %74, 1
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %76
  %78 = getelementptr inbounds %struct.Edge, ptr %77, i32 0, i32 2
  %79 = load x86_fp80, ptr %78, align 16, !tbaa !13
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = ashr i32 %80, 2
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [40401 x x86_fp80], ptr @cap, i64 0, i64 %82
  %84 = load x86_fp80, ptr %83, align 16, !tbaa !5
  %85 = fadd x86_fp80 %84, %79
  store x86_fp80 %85, ptr %83, align 16, !tbaa !5
  br label %86

86:                                               ; preds = %73, %60
  %87 = load i32, ptr %6, align 4, !tbaa !9
  %88 = xor i32 %87, 1
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %89
  %91 = getelementptr inbounds %struct.Edge, ptr %90, i32 0, i32 2
  %92 = load x86_fp80, ptr %91, align 16, !tbaa !13
  %93 = load i32, ptr %6, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %94
  %96 = getelementptr inbounds %struct.Edge, ptr %95, i32 0, i32 2
  %97 = load x86_fp80, ptr %96, align 16, !tbaa !13
  %98 = fadd x86_fp80 %97, %92
  store x86_fp80 %98, ptr %96, align 16, !tbaa !13
  %99 = load i32, ptr %6, align 4, !tbaa !9
  %100 = xor i32 %99, 1
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %101
  %103 = getelementptr inbounds %struct.Edge, ptr %102, i32 0, i32 2
  store x86_fp80 0xK00000000000000000000, ptr %103, align 16, !tbaa !13
  br label %104

104:                                              ; preds = %86
  %105 = load i32, ptr %6, align 4, !tbaa !9
  %106 = add nsw i32 %105, 2
  store i32 %106, ptr %6, align 4, !tbaa !9
  br label %50, !llvm.loop !15

107:                                              ; preds = %54
  %108 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %109 = call noundef x86_fp80 @_Z5diniciie(i32 noundef 1, i32 noundef 2, x86_fp80 noundef %108)
  store x86_fp80 %109, ptr @wmx, align 16, !tbaa !5
  %110 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %111 = load x86_fp80, ptr @wmx, align 16, !tbaa !5
  %112 = fsub x86_fp80 %110, %111
  %113 = call noundef x86_fp80 @_Z5diniciie(i32 noundef 0, i32 noundef 2, x86_fp80 noundef %112)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #9
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %114

114:                                              ; preds = %168, %107
  %115 = load i32, ptr %7, align 4, !tbaa !9
  %116 = load i32, ptr @M, align 4, !tbaa !9
  %117 = icmp slt i32 %115, %116
  br i1 %117, label %119, label %118

118:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #9
  br label %171

119:                                              ; preds = %114
  %120 = load i32, ptr %7, align 4, !tbaa !9
  %121 = ashr i32 %120, 1
  %122 = and i32 %121, 1
  %123 = icmp ne i32 %122, 0
  br i1 %123, label %124, label %137

124:                                              ; preds = %119
  %125 = load i32, ptr %7, align 4, !tbaa !9
  %126 = xor i32 %125, 1
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %127
  %129 = getelementptr inbounds %struct.Edge, ptr %128, i32 0, i32 2
  %130 = load x86_fp80, ptr %129, align 16, !tbaa !13
  %131 = load i32, ptr %7, align 4, !tbaa !9
  %132 = ashr i32 %131, 2
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [40401 x x86_fp80], ptr getelementptr inbounds ([2 x [40401 x x86_fp80]], ptr @cap, i64 0, i64 1), i64 0, i64 %133
  %135 = load x86_fp80, ptr %134, align 16, !tbaa !5
  %136 = fsub x86_fp80 %135, %130
  store x86_fp80 %136, ptr %134, align 16, !tbaa !5
  br label %150

137:                                              ; preds = %119
  %138 = load i32, ptr %7, align 4, !tbaa !9
  %139 = xor i32 %138, 1
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %140
  %142 = getelementptr inbounds %struct.Edge, ptr %141, i32 0, i32 2
  %143 = load x86_fp80, ptr %142, align 16, !tbaa !13
  %144 = load i32, ptr %7, align 4, !tbaa !9
  %145 = ashr i32 %144, 2
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [40401 x x86_fp80], ptr getelementptr inbounds ([2 x [40401 x x86_fp80]], ptr @cap, i64 0, i64 1), i64 0, i64 %146
  %148 = load x86_fp80, ptr %147, align 16, !tbaa !5
  %149 = fadd x86_fp80 %148, %143
  store x86_fp80 %149, ptr %147, align 16, !tbaa !5
  br label %150

150:                                              ; preds = %137, %124
  %151 = load i32, ptr %7, align 4, !tbaa !9
  %152 = xor i32 %151, 1
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %153
  %155 = getelementptr inbounds %struct.Edge, ptr %154, i32 0, i32 2
  %156 = load x86_fp80, ptr %155, align 16, !tbaa !13
  %157 = load i32, ptr %7, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %158
  %160 = getelementptr inbounds %struct.Edge, ptr %159, i32 0, i32 2
  %161 = load x86_fp80, ptr %160, align 16, !tbaa !13
  %162 = fadd x86_fp80 %161, %156
  store x86_fp80 %162, ptr %160, align 16, !tbaa !13
  %163 = load i32, ptr %7, align 4, !tbaa !9
  %164 = xor i32 %163, 1
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %165
  %167 = getelementptr inbounds %struct.Edge, ptr %166, i32 0, i32 2
  store x86_fp80 0xK00000000000000000000, ptr %167, align 16, !tbaa !13
  br label %168

168:                                              ; preds = %150
  %169 = load i32, ptr %7, align 4, !tbaa !9
  %170 = add nsw i32 %169, 2
  store i32 %170, ptr %7, align 4, !tbaa !9
  br label %114, !llvm.loop !16

171:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #9
  %172 = load x86_fp80, ptr @a, align 16, !tbaa !5
  %173 = fsub x86_fp80 0xK3FFF8000000000000000, %172
  %174 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %175 = fmul x86_fp80 %173, %174
  store x86_fp80 %175, ptr %8, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #9
  %176 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %177 = load x86_fp80, ptr @fmx, align 16, !tbaa !5
  %178 = fsub x86_fp80 %176, %177
  store x86_fp80 %178, ptr %9, align 16, !tbaa !5
  %179 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZSt3maxIeERKT_S2_S2_(ptr noundef nonnull align 16 dereferenceable(16) %8, ptr noundef nonnull align 16 dereferenceable(16) %9)
  %180 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZSt3minIeERKT_S2_S2_(ptr noundef nonnull align 16 dereferenceable(16) %179, ptr noundef nonnull align 16 dereferenceable(16) @wmx)
  %181 = load x86_fp80, ptr %180, align 16, !tbaa !5
  store x86_fp80 %181, ptr @ans, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #9
  %182 = load x86_fp80, ptr @fmx, align 16, !tbaa !5
  %183 = load x86_fp80, ptr @wmx, align 16, !tbaa !5
  %184 = fadd x86_fp80 %182, %183
  %185 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %186 = fsub x86_fp80 %184, %185
  %187 = call noundef i32 @_Z3sgne(x86_fp80 noundef %186)
  %188 = icmp sgt i32 %187, 0
  br i1 %188, label %189, label %199

189:                                              ; preds = %171
  %190 = load x86_fp80, ptr @wmx, align 16, !tbaa !5
  %191 = load x86_fp80, ptr @ans, align 16, !tbaa !5
  %192 = fsub x86_fp80 %190, %191
  %193 = load x86_fp80, ptr @fmx, align 16, !tbaa !5
  %194 = load x86_fp80, ptr @wmx, align 16, !tbaa !5
  %195 = fadd x86_fp80 %193, %194
  %196 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %197 = fsub x86_fp80 %195, %196
  %198 = fdiv x86_fp80 %192, %197
  br label %200

199:                                              ; preds = %171
  br label %200

200:                                              ; preds = %199, %189
  %201 = phi x86_fp80 [ %198, %189 ], [ 0xK00000000000000000000, %199 ]
  store x86_fp80 %201, ptr %10, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %202

202:                                              ; preds = %249, %200
  %203 = load i32, ptr %11, align 4, !tbaa !9
  %204 = load i32, ptr @m, align 4, !tbaa !9
  %205 = icmp slt i32 %203, %204
  br i1 %205, label %207, label %206

206:                                              ; preds = %202
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %252

207:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #9
  %208 = load x86_fp80, ptr %10, align 16, !tbaa !5
  %209 = load i32, ptr %11, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [40401 x x86_fp80], ptr @cap, i64 0, i64 %210
  %212 = load x86_fp80, ptr %211, align 16, !tbaa !5
  %213 = load x86_fp80, ptr %10, align 16, !tbaa !5
  %214 = fsub x86_fp80 0xK3FFF8000000000000000, %213
  %215 = load i32, ptr %11, align 4, !tbaa !9
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [40401 x x86_fp80], ptr getelementptr inbounds ([2 x [40401 x x86_fp80]], ptr @cap, i64 0, i64 1), i64 0, i64 %216
  %218 = load x86_fp80, ptr %217, align 16, !tbaa !5
  %219 = fmul x86_fp80 %214, %218
  %220 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %208, x86_fp80 %212, x86_fp80 %219)
  store x86_fp80 %220, ptr %12, align 16, !tbaa !5
  %221 = load x86_fp80, ptr %12, align 16, !tbaa !5
  %222 = call noundef i32 @_Z3sgne(x86_fp80 noundef %221)
  %223 = icmp sgt i32 %222, 0
  br i1 %223, label %224, label %226

224:                                              ; preds = %207
  %225 = load x86_fp80, ptr %12, align 16, !tbaa !5
  br label %227

226:                                              ; preds = %207
  br label %227

227:                                              ; preds = %226, %224
  %228 = phi x86_fp80 [ %225, %224 ], [ 0xK00000000000000000000, %226 ]
  %229 = load i32, ptr %11, align 4, !tbaa !9
  %230 = shl i32 %229, 2
  %231 = sext i32 %230 to i64
  %232 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %231
  %233 = getelementptr inbounds %struct.Edge, ptr %232, i32 0, i32 2
  store x86_fp80 %228, ptr %233, align 16, !tbaa !13
  %234 = load x86_fp80, ptr %12, align 16, !tbaa !5
  %235 = call noundef i32 @_Z3sgne(x86_fp80 noundef %234)
  %236 = icmp slt i32 %235, 0
  br i1 %236, label %237, label %240

237:                                              ; preds = %227
  %238 = load x86_fp80, ptr %12, align 16, !tbaa !5
  %239 = fneg x86_fp80 %238
  br label %241

240:                                              ; preds = %227
  br label %241

241:                                              ; preds = %240, %237
  %242 = phi x86_fp80 [ %239, %237 ], [ 0xK00000000000000000000, %240 ]
  %243 = load i32, ptr %11, align 4, !tbaa !9
  %244 = shl i32 %243, 2
  %245 = or i32 %244, 2
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %246
  %248 = getelementptr inbounds %struct.Edge, ptr %247, i32 0, i32 2
  store x86_fp80 %242, ptr %248, align 16, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  br label %249

249:                                              ; preds = %241
  %250 = load i32, ptr %11, align 4, !tbaa !9
  %251 = add nsw i32 %250, 1
  store i32 %251, ptr %11, align 4, !tbaa !9
  br label %202, !llvm.loop !17

252:                                              ; preds = %206
  %253 = load x86_fp80, ptr @ans, align 16, !tbaa !5
  %254 = call noundef x86_fp80 @_Z5diniciie(i32 noundef 1, i32 noundef 2, x86_fp80 noundef %253)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %255

255:                                              ; preds = %295, %252
  %256 = load i32, ptr %13, align 4, !tbaa !9
  %257 = load i32, ptr @m, align 4, !tbaa !9
  %258 = icmp slt i32 %256, %257
  br i1 %258, label %260, label %259

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

260:                                              ; preds = %255
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #9
  %261 = load x86_fp80, ptr %10, align 16, !tbaa !5
  %262 = load i32, ptr %13, align 4, !tbaa !9
  %263 = sext i32 %262 to i64
  %264 = getelementptr inbounds [40401 x x86_fp80], ptr @cap, i64 0, i64 %263
  %265 = load x86_fp80, ptr %264, align 16, !tbaa !5
  %266 = load x86_fp80, ptr %10, align 16, !tbaa !5
  %267 = fsub x86_fp80 0xK3FFF8000000000000000, %266
  %268 = load i32, ptr %13, align 4, !tbaa !9
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [40401 x x86_fp80], ptr getelementptr inbounds ([2 x [40401 x x86_fp80]], ptr @cap, i64 0, i64 1), i64 0, i64 %269
  %271 = load x86_fp80, ptr %270, align 16, !tbaa !5
  %272 = fmul x86_fp80 %267, %271
  %273 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %261, x86_fp80 %265, x86_fp80 %272)
  store x86_fp80 %273, ptr %14, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #9
  %274 = load i32, ptr %13, align 4, !tbaa !9
  %275 = shl i32 %274, 2
  %276 = or i32 %275, 1
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %277
  %279 = getelementptr inbounds %struct.Edge, ptr %278, i32 0, i32 2
  %280 = load x86_fp80, ptr %279, align 16, !tbaa !13
  %281 = load i32, ptr %13, align 4, !tbaa !9
  %282 = shl i32 %281, 2
  %283 = or i32 %282, 3
  %284 = sext i32 %283 to i64
  %285 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %284
  %286 = getelementptr inbounds %struct.Edge, ptr %285, i32 0, i32 2
  %287 = load x86_fp80, ptr %286, align 16, !tbaa !13
  %288 = fsub x86_fp80 %280, %287
  store x86_fp80 %288, ptr %15, align 16, !tbaa !5
  %289 = load x86_fp80, ptr %14, align 16, !tbaa !5
  %290 = load x86_fp80, ptr %15, align 16, !tbaa !5
  %291 = fsub x86_fp80 %289, %290
  %292 = load x86_fp80, ptr @v, align 16, !tbaa !5
  %293 = fdiv x86_fp80 %291, %292
  call void @_Z7writeDBec(x86_fp80 noundef %293, i8 noundef signext 32)
  %294 = load x86_fp80, ptr %15, align 16, !tbaa !5
  call void @_Z7writeDBec(x86_fp80 noundef %294, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #9
  br label %295

295:                                              ; preds = %260
  %296 = load i32, ptr %13, align 4, !tbaa !9
  %297 = add nsw i32 %296, 1
  store i32 %297, ptr %13, align 4, !tbaa !9
  br label %255, !llvm.loop !18

298:                                              ; preds = %259
  %299 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %300 = load x86_fp80, ptr @ans, align 16, !tbaa !5
  %301 = fsub x86_fp80 %299, %300
  %302 = load x86_fp80, ptr @v, align 16, !tbaa !5
  %303 = fdiv x86_fp80 %301, %302
  %304 = load x86_fp80, ptr @a, align 16, !tbaa !5
  %305 = call noundef x86_fp80 @_ZSt3powee(x86_fp80 noundef %303, x86_fp80 noundef %304)
  %306 = load x86_fp80, ptr @ans, align 16, !tbaa !5
  %307 = load x86_fp80, ptr @a, align 16, !tbaa !5
  %308 = fsub x86_fp80 0xK3FFF8000000000000000, %307
  %309 = call noundef x86_fp80 @_ZSt3powee(x86_fp80 noundef %306, x86_fp80 noundef %308)
  %310 = fmul x86_fp80 %305, %309
  call void @_Z7writeDBec(x86_fp80 noundef %310, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #9
  ret i32 0
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef x86_fp80 @_Z6readDBv() #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z7writeDBec(x86_fp80 noundef, i8 noundef signext) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt3powee(x86_fp80 noundef, x86_fp80 noundef) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { 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 #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"long double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTS4Edge", !10, i64 0, !10, i64 4, !6, i64 16}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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

@N = external dso_local local_unnamed_addr global i32, align 4
@M = external dso_local local_unnamed_addr global i32, align 4
@lnk = external dso_local local_unnamed_addr global [201 x i32], align 16
@e = external dso_local local_unnamed_addr global [161605 x %struct.Edge], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@v = external dso_local local_unnamed_addr global x86_fp80, align 16
@a = external dso_local local_unnamed_addr global x86_fp80, align 16
@fmx = external dso_local local_unnamed_addr global x86_fp80, align 16
@wmx = external dso_local global x86_fp80, align 16
@zmx = external dso_local local_unnamed_addr global x86_fp80, align 16
@cap = external dso_local local_unnamed_addr global [2 x [40401 x x86_fp80]], align 16
@ans = external dso_local local_unnamed_addr global x86_fp80, 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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i32 @_Z3sgne(x86_fp80 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef x86_fp80 @_Z5diniciie(i32 noundef, i32 noundef, x86_fp80 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #6 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca x86_fp80, align 16
  %5 = alloca x86_fp80, align 16
  %6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m)
  %7 = tail call noundef x86_fp80 @_Z6readDBv()
  store x86_fp80 %7, ptr @v, align 16, !tbaa !5
  %8 = tail call noundef x86_fp80 @_Z6readDBv()
  store x86_fp80 %8, ptr @a, align 16, !tbaa !5
  %9 = load i32, ptr @n, align 4, !tbaa !9
  store i32 %9, ptr @N, align 4, !tbaa !9
  store i32 0, ptr @M, align 4, !tbaa !9
  %10 = sext i32 %9 to i64
  %11 = shl nsw i64 %10, 2
  tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @lnk, i8 -1, i64 %11, i1 false)
  %12 = load i32, ptr @m, align 4, !tbaa !9
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %14 = call noundef x86_fp80 @_Z5diniciie(i32 noundef 0, i32 noundef 2, x86_fp80 noundef 0xK400C9C40000000000000)
  store x86_fp80 %14, ptr @fmx, align 16, !tbaa !5
  %15 = call noundef x86_fp80 @_Z5diniciie(i32 noundef 1, i32 noundef 2, x86_fp80 noundef 0xK400C9C40000000000000)
  %16 = fadd x86_fp80 %14, %15
  store x86_fp80 %16, ptr @zmx, align 16, !tbaa !5
  %17 = load i32, ptr @M, align 4, !tbaa !9
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.lr.ph53.preheader, label %._crit_edge54

.lr.ph53.preheader:                               ; preds = %._crit_edge
  %19 = zext nneg i32 %17 to i64
  br label %.lr.ph53

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.050 = phi i32 [ %31, %.lr.ph ], [ 0, %0 ]
  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
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %3)
  %21 = load i32, ptr %1, align 4, !tbaa !9
  %22 = add nsw i32 %21, -1
  store i32 %22, ptr %1, align 4, !tbaa !9
  %23 = load i32, ptr %2, align 4, !tbaa !9
  %24 = add nsw i32 %23, -1
  store i32 %24, ptr %2, align 4, !tbaa !9
  %25 = load i32, ptr %3, align 4, !tbaa !9
  %26 = sitofp i32 %25 to x86_fp80
  call void @_Z7addEdgeiie(i32 noundef %22, i32 noundef %24, x86_fp80 noundef %26)
  %27 = load i32, ptr %2, align 4, !tbaa !9
  %28 = load i32, ptr %1, align 4, !tbaa !9
  %29 = load i32, ptr %3, align 4, !tbaa !9
  %30 = sitofp i32 %29 to x86_fp80
  call void @_Z7addEdgeiie(i32 noundef %27, i32 noundef %28, x86_fp80 noundef %30)
  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
  %31 = add nuw nsw i32 %.050, 1
  %32 = load i32, ptr @m, align 4, !tbaa !9
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge54:                                    ; preds = %.lr.ph53, %._crit_edge
  %34 = call noundef x86_fp80 @_Z5diniciie(i32 noundef 1, i32 noundef 2, x86_fp80 noundef %16)
  store x86_fp80 %34, ptr @wmx, align 16, !tbaa !5
  %35 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %36 = fsub x86_fp80 %35, %34
  %37 = call noundef x86_fp80 @_Z5diniciie(i32 noundef 0, i32 noundef 2, x86_fp80 noundef %36)
  %38 = load i32, ptr @M, align 4, !tbaa !9
  %39 = icmp sgt i32 %38, 0
  br i1 %39, label %.lr.ph57.preheader, label %._crit_edge58

.lr.ph57.preheader:                               ; preds = %._crit_edge54
  %40 = zext nneg i32 %38 to i64
  br label %.lr.ph57

.lr.ph53:                                         ; preds = %.lr.ph53.preheader, %.lr.ph53
  %indvars.iv = phi i64 [ 0, %.lr.ph53.preheader ], [ %indvars.iv.next, %.lr.ph53 ]
  %41 = and i64 %indvars.iv, 2
  %.not49 = icmp eq i64 %41, 0
  %42 = or disjoint i64 %indvars.iv, 1
  %43 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %42, i32 2
  %44 = load x86_fp80, ptr %43, align 16, !tbaa !13
  %45 = lshr i64 %indvars.iv, 2
  %46 = and i64 %45, 1073741823
  %47 = getelementptr inbounds [40401 x x86_fp80], ptr @cap, i64 0, i64 %46
  %48 = load x86_fp80, ptr %47, align 16, !tbaa !5
  %49 = fneg x86_fp80 %44
  %.sink.p = select i1 %.not49, x86_fp80 %44, x86_fp80 %49
  %.sink = fadd x86_fp80 %48, %.sink.p
  store x86_fp80 %.sink, ptr %47, align 16, !tbaa !5
  %50 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %42, i32 2
  %51 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv, i32 2
  %52 = load x86_fp80, ptr %51, align 16, !tbaa !13
  %53 = fadd x86_fp80 %44, %52
  store x86_fp80 %53, ptr %51, align 16, !tbaa !13
  store x86_fp80 0xK00000000000000000000, ptr %50, align 16, !tbaa !13
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 2
  %54 = icmp ult i64 %indvars.iv.next, %19
  br i1 %54, label %.lr.ph53, label %._crit_edge54, !llvm.loop !15

._crit_edge58:                                    ; preds = %.lr.ph57, %._crit_edge54
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #9
  %55 = load x86_fp80, ptr @a, align 16, !tbaa !5
  %56 = fsub x86_fp80 0xK3FFF8000000000000000, %55
  %57 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %58 = fmul x86_fp80 %56, %57
  store x86_fp80 %58, ptr %4, align 16, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #9
  %59 = load x86_fp80, ptr @fmx, align 16, !tbaa !5
  %60 = fsub x86_fp80 %57, %59
  store x86_fp80 %60, ptr %5, align 16, !tbaa !5
  %61 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZSt3maxIeERKT_S2_S2_(ptr noundef nonnull align 16 dereferenceable(16) %4, ptr noundef nonnull align 16 dereferenceable(16) %5)
  %62 = call noundef nonnull align 16 dereferenceable(16) ptr @_ZSt3minIeERKT_S2_S2_(ptr noundef nonnull align 16 dereferenceable(16) %61, ptr noundef nonnull align 16 dereferenceable(16) @wmx)
  %63 = load x86_fp80, ptr %62, align 16, !tbaa !5
  store x86_fp80 %63, ptr @ans, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #9
  %64 = load x86_fp80, ptr @fmx, align 16, !tbaa !5
  %65 = load x86_fp80, ptr @wmx, align 16, !tbaa !5
  %66 = fadd x86_fp80 %64, %65
  %67 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %68 = fsub x86_fp80 %66, %67
  %69 = call noundef i32 @_Z3sgne(x86_fp80 noundef %68)
  %70 = icmp sgt i32 %69, 0
  br i1 %70, label %85, label %94

.lr.ph57:                                         ; preds = %.lr.ph57.preheader, %.lr.ph57
  %indvars.iv68 = phi i64 [ 0, %.lr.ph57.preheader ], [ %indvars.iv.next69, %.lr.ph57 ]
  %71 = and i64 %indvars.iv68, 2
  %.not = icmp eq i64 %71, 0
  %72 = or disjoint i64 %indvars.iv68, 1
  %73 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %72, i32 2
  %74 = load x86_fp80, ptr %73, align 16, !tbaa !13
  %75 = lshr i64 %indvars.iv68, 2
  %76 = and i64 %75, 1073741823
  %77 = getelementptr inbounds [40401 x x86_fp80], ptr getelementptr inbounds (i8, ptr @cap, i64 646416), i64 0, i64 %76
  %78 = load x86_fp80, ptr %77, align 16, !tbaa !5
  %79 = fneg x86_fp80 %74
  %.sink78.p = select i1 %.not, x86_fp80 %74, x86_fp80 %79
  %.sink78 = fadd x86_fp80 %78, %.sink78.p
  store x86_fp80 %.sink78, ptr %77, align 16, !tbaa !5
  %80 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %72, i32 2
  %81 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %indvars.iv68, i32 2
  %82 = load x86_fp80, ptr %81, align 16, !tbaa !13
  %83 = fadd x86_fp80 %74, %82
  store x86_fp80 %83, ptr %81, align 16, !tbaa !13
  store x86_fp80 0xK00000000000000000000, ptr %80, align 16, !tbaa !13
  %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 2
  %84 = icmp ult i64 %indvars.iv.next69, %40
  br i1 %84, label %.lr.ph57, label %._crit_edge58, !llvm.loop !16

85:                                               ; preds = %._crit_edge58
  %86 = load x86_fp80, ptr @wmx, align 16, !tbaa !5
  %87 = load x86_fp80, ptr @ans, align 16, !tbaa !5
  %88 = fsub x86_fp80 %86, %87
  %89 = load x86_fp80, ptr @fmx, align 16, !tbaa !5
  %90 = fadd x86_fp80 %86, %89
  %91 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %92 = fsub x86_fp80 %90, %91
  %93 = fdiv x86_fp80 %88, %92
  br label %94

94:                                               ; preds = %._crit_edge58, %85
  %95 = phi x86_fp80 [ %93, %85 ], [ 0xK00000000000000000000, %._crit_edge58 ]
  %96 = load i32, ptr @m, align 4, !tbaa !9
  %97 = icmp sgt i32 %96, 0
  br i1 %97, label %.lr.ph61, label %._crit_edge62

.lr.ph61:                                         ; preds = %94
  %98 = fsub x86_fp80 0xK3FFF8000000000000000, %95
  br label %104

._crit_edge62:                                    ; preds = %104, %94
  %99 = load x86_fp80, ptr @ans, align 16, !tbaa !5
  %100 = call noundef x86_fp80 @_Z5diniciie(i32 noundef 1, i32 noundef 2, x86_fp80 noundef %99)
  %101 = load i32, ptr @m, align 4, !tbaa !9
  %102 = icmp sgt i32 %101, 0
  br i1 %102, label %.lr.ph65, label %._crit_edge66

.lr.ph65:                                         ; preds = %._crit_edge62
  %103 = fsub x86_fp80 0xK3FFF8000000000000000, %95
  br label %140

104:                                              ; preds = %.lr.ph61, %104
  %indvars.iv71 = phi i64 [ 0, %.lr.ph61 ], [ %indvars.iv.next72, %104 ]
  %105 = getelementptr inbounds [40401 x x86_fp80], ptr @cap, i64 0, i64 %indvars.iv71
  %106 = load x86_fp80, ptr %105, align 16, !tbaa !5
  %107 = getelementptr inbounds [40401 x x86_fp80], ptr getelementptr inbounds (i8, ptr @cap, i64 646416), i64 0, i64 %indvars.iv71
  %108 = load x86_fp80, ptr %107, align 16, !tbaa !5
  %109 = fmul x86_fp80 %98, %108
  %110 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %95, x86_fp80 %106, x86_fp80 %109)
  %111 = call noundef i32 @_Z3sgne(x86_fp80 noundef %110)
  %112 = icmp sgt i32 %111, 0
  %113 = select i1 %112, x86_fp80 %110, x86_fp80 0xK00000000000000000000
  %114 = trunc nuw nsw i64 %indvars.iv71 to i32
  %115 = shl i32 %114, 2
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %116, i32 2
  store x86_fp80 %113, ptr %117, align 16, !tbaa !13
  %118 = call noundef i32 @_Z3sgne(x86_fp80 noundef %110)
  %119 = icmp slt i32 %118, 0
  %120 = fneg x86_fp80 %110
  %121 = select i1 %119, x86_fp80 %120, x86_fp80 0xK00000000000000000000
  %122 = or disjoint i32 %115, 2
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %123, i32 2
  store x86_fp80 %121, ptr %124, align 16, !tbaa !13
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %125 = load i32, ptr @m, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = icmp slt i64 %indvars.iv.next72, %126
  br i1 %127, label %104, label %._crit_edge62, !llvm.loop !17

._crit_edge66:                                    ; preds = %140, %._crit_edge62
  %128 = load x86_fp80, ptr @zmx, align 16, !tbaa !5
  %129 = load x86_fp80, ptr @ans, align 16, !tbaa !5
  %130 = fsub x86_fp80 %128, %129
  %131 = load x86_fp80, ptr @v, align 16, !tbaa !5
  %132 = fdiv x86_fp80 %130, %131
  %133 = load x86_fp80, ptr @a, align 16, !tbaa !5
  %134 = call noundef x86_fp80 @_ZSt3powee(x86_fp80 noundef %132, x86_fp80 noundef %133)
  %135 = load x86_fp80, ptr @ans, align 16, !tbaa !5
  %136 = load x86_fp80, ptr @a, align 16, !tbaa !5
  %137 = fsub x86_fp80 0xK3FFF8000000000000000, %136
  %138 = call noundef x86_fp80 @_ZSt3powee(x86_fp80 noundef %135, x86_fp80 noundef %137)
  %139 = fmul x86_fp80 %134, %138
  call void @_Z7writeDBec(x86_fp80 noundef %139, i8 noundef signext 10)
  ret i32 0

140:                                              ; preds = %.lr.ph65, %140
  %indvars.iv74 = phi i64 [ 0, %.lr.ph65 ], [ %indvars.iv.next75, %140 ]
  %141 = getelementptr inbounds [40401 x x86_fp80], ptr @cap, i64 0, i64 %indvars.iv74
  %142 = load x86_fp80, ptr %141, align 16, !tbaa !5
  %143 = getelementptr inbounds [40401 x x86_fp80], ptr getelementptr inbounds (i8, ptr @cap, i64 646416), i64 0, i64 %indvars.iv74
  %144 = load x86_fp80, ptr %143, align 16, !tbaa !5
  %145 = fmul x86_fp80 %103, %144
  %146 = call x86_fp80 @llvm.fmuladd.f80(x86_fp80 %95, x86_fp80 %142, x86_fp80 %145)
  %147 = trunc nuw nsw i64 %indvars.iv74 to i32
  %148 = shl i32 %147, 2
  %149 = or disjoint i32 %148, 1
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %150, i32 2
  %152 = load x86_fp80, ptr %151, align 16, !tbaa !13
  %153 = or disjoint i32 %148, 3
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [161605 x %struct.Edge], ptr @e, i64 0, i64 %154, i32 2
  %156 = load x86_fp80, ptr %155, align 16, !tbaa !13
  %157 = fsub x86_fp80 %152, %156
  %158 = fsub x86_fp80 %146, %157
  %159 = load x86_fp80, ptr @v, align 16, !tbaa !5
  %160 = fdiv x86_fp80 %158, %159
  call void @_Z7writeDBec(x86_fp80 noundef %160, i8 noundef signext 32)
  call void @_Z7writeDBec(x86_fp80 noundef %157, i8 noundef signext 10)
  %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1
  %161 = load i32, ptr @m, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = icmp slt i64 %indvars.iv.next75, %162
  br i1 %163, label %140, label %._crit_edge66, !llvm.loop !18
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef x86_fp80 @_Z6readDBv() local_unnamed_addr #3

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.fmuladd.f80(x86_fp80, x86_fp80, x86_fp80) #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z7writeDBec(x86_fp80 noundef, i8 noundef signext) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef x86_fp80 @_ZSt3powee(x86_fp80 noundef, x86_fp80 noundef) local_unnamed_addr #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { 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 #5 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 #7 = { 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 #8 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"long double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTS4Edge", !10, i64 0, !10, i64 4, !6, i64 16}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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