; LLVM IR from eyangch/competitive-programming :: Codeforces/1459 (d)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@a = external dso_local global [100 x i32], align 16
@b = external dso_local global [100 x i32], align 16
@tB = external dso_local global i32, align 4
@dp = external dso_local global [2 x [100 x [10001 x i32]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca double, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  store i32 0, ptr %1, align 4
  %14 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %15 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %17
  %19 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  %20 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  store i32 0, ptr %2, align 4, !tbaa !8
  br label %21

21:                                               ; preds = %41, %0
  %22 = load i32, ptr %2, align 4, !tbaa !8
  %23 = load i32, ptr @N, align 4, !tbaa !8
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

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

26:                                               ; preds = %21
  %27 = load i32, ptr %2, align 4, !tbaa !8
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %28
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %31 = load i32, ptr %2, align 4, !tbaa !8
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100 x i32], ptr @b, i64 0, i64 %32
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 4 dereferenceable(4) %33)
  %35 = load i32, ptr %2, align 4, !tbaa !8
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100 x i32], ptr @b, i64 0, i64 %36
  %38 = load i32, ptr %37, align 4, !tbaa !8
  %39 = load i32, ptr @tB, align 4, !tbaa !8
  %40 = add nsw i32 %39, %38
  store i32 %40, ptr @tB, align 4, !tbaa !8
  br label %41

41:                                               ; preds = %26
  %42 = load i32, ptr %2, align 4, !tbaa !8
  %43 = add nsw i32 %42, 1
  store i32 %43, ptr %2, align 4, !tbaa !8
  br label %21, !llvm.loop !11

44:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !8
  br label %45

45:                                               ; preds = %77, %44
  %46 = load i32, ptr %3, align 4, !tbaa !8
  %47 = icmp slt i32 %46, 2
  br i1 %47, label %49, label %48

48:                                               ; preds = %45
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %80

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 0, ptr %5, align 4, !tbaa !8
  br label %50

50:                                               ; preds = %73, %49
  %51 = load i32, ptr %5, align 4, !tbaa !8
  %52 = icmp slt i32 %51, 100
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %76

54:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  store i32 0, ptr %6, align 4, !tbaa !8
  br label %55

55:                                               ; preds = %69, %54
  %56 = load i32, ptr %6, align 4, !tbaa !8
  %57 = icmp slt i32 %56, 10001
  br i1 %57, label %59, label %58

58:                                               ; preds = %55
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  br label %72

59:                                               ; preds = %55
  %60 = load i32, ptr %3, align 4, !tbaa !8
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %61
  %63 = load i32, ptr %5, align 4, !tbaa !8
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [100 x [10001 x i32]], ptr %62, i64 0, i64 %64
  %66 = load i32, ptr %6, align 4, !tbaa !8
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [10001 x i32], ptr %65, i64 0, i64 %67
  store i32 -1000000000, ptr %68, align 4, !tbaa !8
  br label %69

69:                                               ; preds = %59
  %70 = load i32, ptr %6, align 4, !tbaa !8
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %6, align 4, !tbaa !8
  br label %55, !llvm.loop !13

72:                                               ; preds = %58
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %5, align 4, !tbaa !8
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %5, align 4, !tbaa !8
  br label %50, !llvm.loop !14

76:                                               ; preds = %53
  br label %77

77:                                               ; preds = %76
  %78 = load i32, ptr %3, align 4, !tbaa !8
  %79 = add nsw i32 %78, 1
  store i32 %79, ptr %3, align 4, !tbaa !8
  br label %45, !llvm.loop !15

80:                                               ; preds = %48
  %81 = load i32, ptr @b, align 16, !tbaa !8
  %82 = load i32, ptr @a, align 16, !tbaa !8
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [10001 x i32], ptr @dp, i64 0, i64 %83
  store i32 %81, ptr %84, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %85

85:                                               ; preds = %266, %80
  %86 = load i32, ptr %7, align 4, !tbaa !8
  %87 = load i32, ptr @N, align 4, !tbaa !8
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %85
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %269

90:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store double 0.000000e+00, ptr %8, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %91 = load i32, ptr %7, align 4, !tbaa !8
  store i32 %91, ptr %9, align 4, !tbaa !8
  br label %92

92:                                               ; preds = %259, %90
  %93 = load i32, ptr %9, align 4, !tbaa !8
  %94 = load i32, ptr @N, align 4, !tbaa !8
  %95 = icmp slt i32 %93, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %92
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %262

97:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %98

98:                                               ; preds = %255, %97
  %99 = load i32, ptr %10, align 4, !tbaa !8
  %100 = icmp slt i32 %99, 10001
  br i1 %100, label %102, label %101

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

102:                                              ; preds = %98
  %103 = load i32, ptr %9, align 4, !tbaa !8
  %104 = icmp sgt i32 %103, 0
  br i1 %104, label %105, label %185

105:                                              ; preds = %102
  %106 = load i32, ptr %7, align 4, !tbaa !8
  %107 = srem i32 %106, 2
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %108
  %110 = load i32, ptr %9, align 4, !tbaa !8
  %111 = sub nsw i32 %110, 1
  %112 = sext i32 %111 to i64
  %113 = getelementptr inbounds [100 x [10001 x i32]], ptr %109, i64 0, i64 %112
  %114 = load i32, ptr %10, align 4, !tbaa !8
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [10001 x i32], ptr %113, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !8
  %118 = load i32, ptr %7, align 4, !tbaa !8
  %119 = srem i32 %118, 2
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %120
  %122 = load i32, ptr %9, align 4, !tbaa !8
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [100 x [10001 x i32]], ptr %121, i64 0, i64 %123
  %125 = load i32, ptr %10, align 4, !tbaa !8
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [10001 x i32], ptr %124, i64 0, i64 %126
  store i32 %117, ptr %127, align 4, !tbaa !8
  %128 = load i32, ptr %10, align 4, !tbaa !8
  %129 = load i32, ptr %9, align 4, !tbaa !8
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %130
  %132 = load i32, ptr %131, align 4, !tbaa !8
  %133 = sub nsw i32 %128, %132
  %134 = icmp sge i32 %133, 0
  br i1 %134, label %135, label %184

135:                                              ; preds = %105
  %136 = load i32, ptr %7, align 4, !tbaa !8
  %137 = icmp sgt i32 %136, 0
  br i1 %137, label %138, label %184

138:                                              ; preds = %135
  %139 = load i32, ptr %7, align 4, !tbaa !8
  %140 = srem i32 %139, 2
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %141
  %143 = load i32, ptr %9, align 4, !tbaa !8
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100 x [10001 x i32]], ptr %142, i64 0, i64 %144
  %146 = load i32, ptr %10, align 4, !tbaa !8
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [10001 x i32], ptr %145, i64 0, i64 %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %149 = load i32, ptr %7, align 4, !tbaa !8
  %150 = sub nsw i32 %149, 1
  %151 = srem i32 %150, 2
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %152
  %154 = load i32, ptr %9, align 4, !tbaa !8
  %155 = sub nsw i32 %154, 1
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [100 x [10001 x i32]], ptr %153, i64 0, i64 %156
  %158 = load i32, ptr %10, align 4, !tbaa !8
  %159 = load i32, ptr %9, align 4, !tbaa !8
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %160
  %162 = load i32, ptr %161, align 4, !tbaa !8
  %163 = sub nsw i32 %158, %162
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [10001 x i32], ptr %157, i64 0, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !8
  %167 = load i32, ptr %9, align 4, !tbaa !8
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [100 x i32], ptr @b, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !8
  %171 = add nsw i32 %166, %170
  store i32 %171, ptr %11, align 4, !tbaa !8
  %172 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %148, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %173 = load i32, ptr %172, align 4, !tbaa !8
  %174 = load i32, ptr %7, align 4, !tbaa !8
  %175 = srem i32 %174, 2
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %176
  %178 = load i32, ptr %9, align 4, !tbaa !8
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [100 x [10001 x i32]], ptr %177, i64 0, i64 %179
  %181 = load i32, ptr %10, align 4, !tbaa !8
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds [10001 x i32], ptr %180, i64 0, i64 %182
  store i32 %173, ptr %183, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %184

184:                                              ; preds = %138, %135, %105
  br label %185

185:                                              ; preds = %184, %102
  %186 = load i32, ptr %7, align 4, !tbaa !8
  %187 = icmp eq i32 %186, 0
  br i1 %187, label %188, label %221

188:                                              ; preds = %185
  %189 = load i32, ptr %9, align 4, !tbaa !8
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %190
  %192 = load i32, ptr %191, align 4, !tbaa !8
  %193 = load i32, ptr %10, align 4, !tbaa !8
  %194 = icmp eq i32 %192, %193
  br i1 %194, label %195, label %221

195:                                              ; preds = %188
  %196 = load i32, ptr %7, align 4, !tbaa !8
  %197 = srem i32 %196, 2
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %198
  %200 = load i32, ptr %9, align 4, !tbaa !8
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds [100 x [10001 x i32]], ptr %199, i64 0, i64 %201
  %203 = load i32, ptr %10, align 4, !tbaa !8
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [10001 x i32], ptr %202, i64 0, i64 %204
  %206 = load i32, ptr %9, align 4, !tbaa !8
  %207 = sext i32 %206 to i64
  %208 = getelementptr inbounds [100 x i32], ptr @b, i64 0, i64 %207
  %209 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %205, ptr noundef nonnull align 4 dereferenceable(4) %208)
  %210 = load i32, ptr %209, align 4, !tbaa !8
  %211 = load i32, ptr %7, align 4, !tbaa !8
  %212 = srem i32 %211, 2
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %213
  %215 = load i32, ptr %9, align 4, !tbaa !8
  %216 = sext i32 %215 to i64
  %217 = getelementptr inbounds [100 x [10001 x i32]], ptr %214, i64 0, i64 %216
  %218 = load i32, ptr %10, align 4, !tbaa !8
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [10001 x i32], ptr %217, i64 0, i64 %219
  store i32 %210, ptr %220, align 4, !tbaa !8
  br label %221

221:                                              ; preds = %195, %188, %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %222 = load i32, ptr %10, align 4, !tbaa !8
  %223 = sitofp i32 %222 to double
  store double %223, ptr %12, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %224 = load i32, ptr %7, align 4, !tbaa !8
  %225 = srem i32 %224, 2
  %226 = sext i32 %225 to i64
  %227 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %226
  %228 = load i32, ptr %9, align 4, !tbaa !8
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds [100 x [10001 x i32]], ptr %227, i64 0, i64 %229
  %231 = load i32, ptr %10, align 4, !tbaa !8
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds [10001 x i32], ptr %230, i64 0, i64 %232
  %234 = load i32, ptr %233, align 4, !tbaa !8
  %235 = sitofp i32 %234 to double
  %236 = load i32, ptr @tB, align 4, !tbaa !8
  %237 = load i32, ptr %7, align 4, !tbaa !8
  %238 = srem i32 %237, 2
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %239
  %241 = load i32, ptr %9, align 4, !tbaa !8
  %242 = sext i32 %241 to i64
  %243 = getelementptr inbounds [100 x [10001 x i32]], ptr %240, i64 0, i64 %242
  %244 = load i32, ptr %10, align 4, !tbaa !8
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [10001 x i32], ptr %243, i64 0, i64 %245
  %247 = load i32, ptr %246, align 4, !tbaa !8
  %248 = sub nsw i32 %236, %247
  %249 = sitofp i32 %248 to double
  %250 = fdiv double %249, 2.000000e+00
  %251 = fadd double %235, %250
  store double %251, ptr %13, align 8, !tbaa !16
  %252 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %253 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %252)
  %254 = load double, ptr %253, align 8, !tbaa !16
  store double %254, ptr %8, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %255

255:                                              ; preds = %221
  %256 = load i32, ptr %10, align 4, !tbaa !8
  %257 = add nsw i32 %256, 1
  store i32 %257, ptr %10, align 4, !tbaa !8
  br label %98, !llvm.loop !18

258:                                              ; preds = %101
  br label %259

259:                                              ; preds = %258
  %260 = load i32, ptr %9, align 4, !tbaa !8
  %261 = add nsw i32 %260, 1
  store i32 %261, ptr %9, align 4, !tbaa !8
  br label %92, !llvm.loop !19

262:                                              ; preds = %96
  %263 = load double, ptr %8, align 8, !tbaa !16
  %264 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %263)
  %265 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %264, ptr noundef @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %266

266:                                              ; preds = %262
  %267 = load i32, ptr %7, align 4, !tbaa !8
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %7, align 4, !tbaa !8
  br label %85, !llvm.loop !20

269:                                              ; preds = %89
  %270 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %271 = load i32, ptr %1, align 4
  ret i32 %271
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #6 align 2

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i32, align 4
@a = external dso_local global [100 x i32], align 16
@b = external dso_local global [100 x i32], align 16
@tB = external dso_local local_unnamed_addr global i32, align 4
@dp = external dso_local global [2 x [100 x [10001 x i32]]], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca double, align 8
  %2 = alloca i32, align 4
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %6 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %7 = getelementptr i8, ptr %6, i64 -24
  %8 = load i64, ptr %7, align 8
  %9 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %8
  %10 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %9, ptr noundef null)
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @N)
  %12 = load i32, ptr @N, align 4, !tbaa !8
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %.preheader69

.preheader69:                                     ; preds = %.lr.ph, %0
  %14 = phi i32 [ %12, %0 ], [ %22, %.lr.ph ]
  br label %vector.ph

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %15 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %indvars.iv
  %16 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %17 = getelementptr inbounds [100 x i32], ptr @b, i64 0, i64 %indvars.iv
  %18 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
  %19 = load i32, ptr %17, align 4, !tbaa !8
  %20 = load i32, ptr @tB, align 4, !tbaa !8
  %21 = add nsw i32 %20, %19
  store i32 %21, ptr @tB, align 4, !tbaa !8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %22 = load i32, ptr @N, align 4, !tbaa !8
  %23 = sext i32 %22 to i64
  %24 = icmp slt i64 %indvars.iv.next, %23
  br i1 %24, label %.lr.ph, label %.preheader69, !llvm.loop !11

vector.ph:                                        ; preds = %scalar.ph, %.preheader69
  %indvars.iv86 = phi i64 [ 0, %.preheader69 ], [ %indvars.iv.next87, %scalar.ph ]
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next.4, %vector.body ]
  %25 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 0, i64 %indvars.iv86, i64 %index
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %25, align 4, !tbaa !8
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %26, align 4, !tbaa !8
  %index.next = add nuw nsw i64 %index, 8
  %27 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 0, i64 %indvars.iv86, i64 %index.next
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %27, align 4, !tbaa !8
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %28, align 4, !tbaa !8
  %index.next.1 = add nuw nsw i64 %index, 16
  %29 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 0, i64 %indvars.iv86, i64 %index.next.1
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %29, align 4, !tbaa !8
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %30, align 4, !tbaa !8
  %index.next.2 = add nuw nsw i64 %index, 24
  %31 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 0, i64 %indvars.iv86, i64 %index.next.2
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %31, align 4, !tbaa !8
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %32, align 4, !tbaa !8
  %index.next.3 = add nuw nsw i64 %index, 32
  %33 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 0, i64 %indvars.iv86, i64 %index.next.3
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %33, align 4, !tbaa !8
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %34, align 4, !tbaa !8
  %index.next.4 = add nuw nsw i64 %index, 40
  %35 = icmp eq i64 %index.next.4, 10000
  br i1 %35, label %scalar.ph, label %vector.body, !llvm.loop !13

vector.ph127:                                     ; preds = %scalar.ph, %scalar.ph126
  %indvars.iv86.1 = phi i64 [ %indvars.iv.next87.1, %scalar.ph126 ], [ 0, %scalar.ph ]
  br label %vector.body129

vector.body129:                                   ; preds = %vector.body129, %vector.ph127
  %index130 = phi i64 [ 0, %vector.ph127 ], [ %index.next131.4, %vector.body129 ]
  %36 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 1, i64 %indvars.iv86.1, i64 %index130
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %36, align 4, !tbaa !8
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %37, align 4, !tbaa !8
  %index.next131 = add nuw nsw i64 %index130, 8
  %38 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 1, i64 %indvars.iv86.1, i64 %index.next131
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %38, align 4, !tbaa !8
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %39, align 4, !tbaa !8
  %index.next131.1 = add nuw nsw i64 %index130, 16
  %40 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 1, i64 %indvars.iv86.1, i64 %index.next131.1
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %40, align 4, !tbaa !8
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %41, align 4, !tbaa !8
  %index.next131.2 = add nuw nsw i64 %index130, 24
  %42 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 1, i64 %indvars.iv86.1, i64 %index.next131.2
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %42, align 4, !tbaa !8
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %43, align 4, !tbaa !8
  %index.next131.3 = add nuw nsw i64 %index130, 32
  %44 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 1, i64 %indvars.iv86.1, i64 %index.next131.3
  %45 = getelementptr inbounds i8, ptr %44, i64 16
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %44, align 4, !tbaa !8
  store <4 x i32> <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, ptr %45, align 4, !tbaa !8
  %index.next131.4 = add nuw nsw i64 %index130, 40
  %46 = icmp eq i64 %index.next131.4, 10000
  br i1 %46, label %scalar.ph126, label %vector.body129, !llvm.loop !16

scalar.ph126:                                     ; preds = %vector.body129
  %47 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 1, i64 %indvars.iv86.1, i64 10000
  store i32 -1000000000, ptr %47, align 4, !tbaa !8
  %indvars.iv.next87.1 = add nuw nsw i64 %indvars.iv86.1, 1
  %exitcond89.1.not = icmp eq i64 %indvars.iv.next87.1, 100
  br i1 %exitcond89.1.not, label %48, label %vector.ph127, !llvm.loop !17

48:                                               ; preds = %scalar.ph126
  %49 = load i32, ptr @b, align 16, !tbaa !8
  %50 = load i32, ptr @a, align 16, !tbaa !8
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [10001 x i32], ptr @dp, i64 0, i64 %51
  store i32 %49, ptr %52, align 4, !tbaa !8
  %53 = icmp sgt i32 %14, 0
  br i1 %53, label %.lr.ph78, label %._crit_edge79

scalar.ph:                                        ; preds = %vector.body
  %54 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 0, i64 %indvars.iv86, i64 10000
  store i32 -1000000000, ptr %54, align 4, !tbaa !8
  %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1
  %exitcond89.not = icmp eq i64 %indvars.iv.next87, 100
  br i1 %exitcond89.not, label %vector.ph127, label %vector.ph, !llvm.loop !17

._crit_edge79:                                    ; preds = %._crit_edge, %48
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
  ret i32 0

.lr.ph78:                                         ; preds = %48, %._crit_edge
  %56 = phi i32 [ %103, %._crit_edge ], [ %14, %48 ]
  %indvars.iv105 = phi i64 [ %indvars.iv.next106, %._crit_edge ], [ 0, %48 ]
  %indvars110 = trunc i64 %indvars.iv105 to i32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  store double 0.000000e+00, ptr %1, align 8, !tbaa !18
  %57 = icmp sgt i32 %56, %indvars110
  br i1 %57, label %.preheader.lr.ph, label %._crit_edge

.preheader.lr.ph:                                 ; preds = %.lr.ph78
  %58 = and i64 %indvars.iv105, 1
  %59 = and i64 %indvars.iv105, 1
  %60 = icmp ne i32 %indvars110, 0
  %61 = xor i64 %58, 1
  %62 = icmp eq i32 %indvars110, 0
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %.split.us
  %indvars.iv107 = phi i64 [ %indvars.iv105, %.preheader.lr.ph ], [ %indvars.iv.next108, %.split.us ]
  %.not = icmp eq i64 %indvars.iv107, 0
  %63 = add nsw i64 %indvars.iv107, -1
  %64 = getelementptr inbounds [100 x i32], ptr @a, i64 0, i64 %indvars.iv107
  %65 = getelementptr inbounds [100 x i32], ptr @b, i64 0, i64 %indvars.iv107
  br i1 %.not, label %.preheader.split.us, label %.preheader.split

.preheader.split.us:                              ; preds = %.preheader
  br i1 %62, label %.preheader.split.us.split.us, label %.preheader.split.us.split

.preheader.split.us.split.us:                     ; preds = %.preheader.split.us, %73
  %indvars.iv101 = phi i64 [ %indvars.iv.next102, %73 ], [ 0, %.preheader.split.us ]
  %66 = load i32, ptr %64, align 4, !tbaa !8
  %67 = zext i32 %66 to i64
  %68 = icmp eq i64 %indvars.iv101, %67
  br i1 %68, label %69, label %73

69:                                               ; preds = %.preheader.split.us.split.us
  %70 = getelementptr inbounds [100 x [10001 x i32]], ptr @dp, i64 0, i64 0, i64 %indvars.iv101
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %70, ptr noundef nonnull align 4 dereferenceable(4) %65)
  %72 = load i32, ptr %71, align 4, !tbaa !8
  store i32 %72, ptr %70, align 4, !tbaa !8
  br label %73

73:                                               ; preds = %69, %.preheader.split.us.split.us
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %74 = trunc nuw nsw i64 %indvars.iv101 to i32
  %75 = uitofp nneg i32 %74 to double
  store double %75, ptr %3, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %76 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %59, i64 0, i64 %indvars.iv101
  %77 = load i32, ptr %76, align 4, !tbaa !8
  %78 = sitofp i32 %77 to double
  %79 = load i32, ptr @tB, align 4, !tbaa !8
  %80 = sub nsw i32 %79, %77
  %81 = sitofp i32 %80 to double
  %82 = fmul double %81, 5.000000e-01
  %83 = fadd double %82, %78
  store double %83, ptr %4, align 8, !tbaa !18
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %84)
  %86 = load double, ptr %85, align 8, !tbaa !18
  store double %86, ptr %1, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1
  %exitcond104.not = icmp eq i64 %indvars.iv.next102, 10001
  br i1 %exitcond104.not, label %.split.us, label %.preheader.split.us.split.us, !llvm.loop !20

.preheader.split.us.split:                        ; preds = %.preheader.split.us, %.preheader.split.us.split
  %indvars.iv97 = phi i64 [ %indvars.iv.next98, %.preheader.split.us.split ], [ 0, %.preheader.split.us ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %87 = trunc nuw nsw i64 %indvars.iv97 to i32
  %88 = uitofp nneg i32 %87 to double
  store double %88, ptr %3, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %89 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %59, i64 0, i64 %indvars.iv97
  %90 = load i32, ptr %89, align 4, !tbaa !8
  %91 = sitofp i32 %90 to double
  %92 = load i32, ptr @tB, align 4, !tbaa !8
  %93 = sub nsw i32 %92, %90
  %94 = sitofp i32 %93 to double
  %95 = fmul double %94, 5.000000e-01
  %96 = fadd double %95, %91
  store double %96, ptr %4, align 8, !tbaa !18
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %97)
  %99 = load double, ptr %98, align 8, !tbaa !18
  store double %99, ptr %1, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1
  %exitcond100.not = icmp eq i64 %indvars.iv.next98, 10001
  br i1 %exitcond100.not, label %.split.us, label %.preheader.split.us.split, !llvm.loop !20

._crit_edge:                                      ; preds = %.split.us, %.lr.ph78
  %100 = phi double [ 0.000000e+00, %.lr.ph78 ], [ %105, %.split.us ]
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %100)
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %101, ptr noundef nonnull @.str)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %indvars = trunc i64 %indvars.iv.next106 to i32
  %103 = load i32, ptr @N, align 4, !tbaa !8
  %104 = icmp sgt i32 %103, %indvars
  br i1 %104, label %.lr.ph78, label %._crit_edge79, !llvm.loop !21

.split.us:                                        ; preds = %131, %.preheader.split.us.split, %73
  %105 = phi double [ %86, %73 ], [ %99, %.preheader.split.us.split ], [ %143, %131 ]
  %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1
  %106 = load i32, ptr @N, align 4, !tbaa !8
  %107 = trunc nuw i64 %indvars.iv.next108 to i32
  %108 = icmp sgt i32 %106, %107
  br i1 %108, label %.preheader, label %._crit_edge, !llvm.loop !22

.preheader.split:                                 ; preds = %.preheader, %131
  %indvars.iv93 = phi i64 [ %indvars.iv.next94, %131 ], [ 0, %.preheader ]
  %109 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %59, i64 %63, i64 %indvars.iv93
  %110 = load i32, ptr %109, align 4, !tbaa !8
  %111 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %59, i64 %indvars.iv107, i64 %indvars.iv93
  store i32 %110, ptr %111, align 4, !tbaa !8
  %112 = load i32, ptr %64, align 4, !tbaa !8
  %113 = sext i32 %112 to i64
  %114 = icmp sge i64 %indvars.iv93, %113
  %or.cond = and i1 %60, %114
  br i1 %or.cond, label %.thread, label %124

.thread:                                          ; preds = %.preheader.split
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %115 = trunc nuw nsw i64 %indvars.iv93 to i32
  %116 = sub nsw i32 %115, %112
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [2 x [100 x [10001 x i32]]], ptr @dp, i64 0, i64 %61, i64 %63, i64 %117
  %119 = load i32, ptr %118, align 4, !tbaa !8
  %120 = load i32, ptr %65, align 4, !tbaa !8
  %121 = add nsw i32 %120, %119
  store i32 %121, ptr %2, align 4, !tbaa !8
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %111, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %123 = load i32, ptr %122, align 4, !tbaa !8
  store i32 %123, ptr %111, align 4, !tbaa !8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  br label %131

124:                                              ; preds = %.preheader.split
  %125 = zext i32 %112 to i64
  %126 = icmp eq i64 %indvars.iv93, %125
  %or.cond118 = and i1 %62, %126
  br i1 %or.cond118, label %127, label %131

127:                                              ; preds = %124
  %128 = getelementptr inbounds [100 x [10001 x i32]], ptr @dp, i64 0, i64 %indvars.iv107, i64 %indvars.iv93
  %129 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %128, ptr noundef nonnull align 4 dereferenceable(4) %65)
  %130 = load i32, ptr %129, align 4, !tbaa !8
  store i32 %130, ptr %128, align 4, !tbaa !8
  %.pre = load i32, ptr %111, align 4, !tbaa !8
  br label %131

131:                                              ; preds = %.thread, %127, %124
  %132 = phi i32 [ %123, %.thread ], [ %.pre, %127 ], [ %110, %124 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %133 = trunc nuw nsw i64 %indvars.iv93 to i32
  %134 = uitofp nneg i32 %133 to double
  store double %134, ptr %3, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %135 = sitofp i32 %132 to double
  %136 = load i32, ptr @tB, align 4, !tbaa !8
  %137 = sub nsw i32 %136, %132
  %138 = sitofp i32 %137 to double
  %139 = fmul double %138, 5.000000e-01
  %140 = fadd double %139, %135
  store double %140, ptr %4, align 8, !tbaa !18
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %142 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %141)
  %143 = load double, ptr %142, align 8, !tbaa !18
  store double %143, ptr %1, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next94, 10001
  br i1 %exitcond96.not, label %.split.us, label %.preheader.split, !llvm.loop !20
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

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

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

; Function Attrs: 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 #4

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

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

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

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

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


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