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

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

@n = external dso_local global i32, align 4
@l = external dso_local global i32, align 4
@p = external dso_local global [201 x double], align 16
@f = external dso_local global [201 x [201 x [401 x double]]], align 16
@ans = external dso_local global double, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 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 i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n, ptr noundef @l, ptr noundef %4)
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %24, %0
  %11 = load i32, ptr %2, align 4, !tbaa !5
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = icmp sle i32 %11, %12
  br i1 %13, label %14, label %27

14:                                               ; preds = %10
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %16
  %18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %17)
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %20
  %22 = load double, ptr %21, align 8, !tbaa !9
  %23 = fdiv double %22, 1.000000e+02
  store double %23, ptr %21, align 8, !tbaa !9
  br label %24

24:                                               ; preds = %14
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %2, align 4, !tbaa !5
  br label %10, !llvm.loop !11

27:                                               ; preds = %10
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %29 = load i32, ptr %28, align 4, !tbaa !5
  %30 = add nsw i32 %29, 200
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [401 x double], ptr @f, i64 0, i64 %31
  store double 1.000000e+00, ptr %32, align 8, !tbaa !9
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %189, %27
  %34 = load i32, ptr %2, align 4, !tbaa !5
  %35 = load i32, ptr @n, align 4, !tbaa !5
  %36 = icmp sle i32 %34, %35
  br i1 %36, label %37, label %192

37:                                               ; preds = %33
  %38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.2, ptr noundef %5)
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %39

39:                                               ; preds = %185, %37
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = load i32, ptr @n, align 4, !tbaa !5
  %42 = icmp sle i32 %40, %41
  br i1 %42, label %43, label %188

43:                                               ; preds = %39
  %44 = load i32, ptr @n, align 4, !tbaa !5
  %45 = sub nsw i32 0, %44
  store i32 %45, ptr %4, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %181, %43
  %47 = load i32, ptr %4, align 4, !tbaa !5
  %48 = load i32, ptr @n, align 4, !tbaa !5
  %49 = icmp sle i32 %47, %48
  br i1 %49, label %50, label %184

50:                                               ; preds = %46
  %51 = load i32, ptr %5, align 4, !tbaa !5
  %52 = icmp eq i32 %51, -1
  br i1 %52, label %53, label %117

53:                                               ; preds = %50
  %54 = load i32, ptr %2, align 4, !tbaa !5
  %55 = sub nsw i32 %54, 1
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %56
  %58 = load i32, ptr %3, align 4, !tbaa !5
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [201 x [401 x double]], ptr %57, i64 0, i64 %59
  %61 = load i32, ptr %4, align 4, !tbaa !5
  %62 = add nsw i32 %61, 200
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [401 x double], ptr %60, i64 0, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !9
  %66 = load i32, ptr %2, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !9
  %70 = fsub double 1.000000e+00, %69
  %71 = load i32, ptr %2, align 4, !tbaa !5
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %72
  %74 = load i32, ptr %3, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [201 x [401 x double]], ptr %73, i64 0, i64 %75
  %77 = load i32, ptr %4, align 4, !tbaa !5
  %78 = add nsw i32 %77, 200
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [401 x double], ptr %76, i64 0, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !9
  %82 = call double @llvm.fmuladd.f64(double %65, double %70, double %81)
  store double %82, ptr %80, align 8, !tbaa !9
  %83 = load i32, ptr %2, align 4, !tbaa !5
  %84 = sub nsw i32 %83, 1
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %85
  %87 = load i32, ptr %3, align 4, !tbaa !5
  %88 = sext i32 %87 to i64
  %89 = getelementptr inbounds [201 x [401 x double]], ptr %86, i64 0, i64 %88
  %90 = load i32, ptr %4, align 4, !tbaa !5
  %91 = add nsw i32 %90, 200
  %92 = sext i32 %91 to i64
  %93 = getelementptr inbounds [401 x double], ptr %89, i64 0, i64 %92
  %94 = load double, ptr %93, align 8, !tbaa !9
  %95 = load i32, ptr %2, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !9
  %99 = load i32, ptr %2, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %100
  %102 = load i32, ptr %3, align 4, !tbaa !5
  %103 = add nsw i32 %102, 1
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds [201 x [401 x double]], ptr %101, i64 0, i64 %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %106 = load i32, ptr %4, align 4, !tbaa !5
  %107 = sub nsw i32 %106, 1
  store i32 %107, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %108 = load i32, ptr @n, align 4, !tbaa !5
  %109 = sub nsw i32 0, %108
  store i32 %109, ptr %7, align 4, !tbaa !5
  %110 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %111 = load i32, ptr %110, align 4, !tbaa !5
  %112 = add nsw i32 %111, 200
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [401 x double], ptr %105, i64 0, i64 %113
  %115 = load double, ptr %114, align 8, !tbaa !9
  %116 = call double @llvm.fmuladd.f64(double %94, double %98, double %115)
  store double %116, ptr %114, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %180

117:                                              ; preds = %50
  %118 = load i32, ptr %2, align 4, !tbaa !5
  %119 = sub nsw i32 %118, 1
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %120
  %122 = load i32, ptr %3, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [201 x [401 x double]], ptr %121, i64 0, i64 %123
  %125 = load i32, ptr %4, align 4, !tbaa !5
  %126 = add nsw i32 %125, 200
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [401 x double], ptr %124, i64 0, i64 %127
  %129 = load double, ptr %128, align 8, !tbaa !9
  %130 = load i32, ptr %2, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %131
  %133 = load double, ptr %132, align 8, !tbaa !9
  %134 = fsub double 1.000000e+00, %133
  %135 = load i32, ptr %2, align 4, !tbaa !5
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %136
  %138 = load i32, ptr %3, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [201 x [401 x double]], ptr %137, i64 0, i64 %139
  %141 = load i32, ptr %4, align 4, !tbaa !5
  %142 = add nsw i32 %141, 200
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [401 x double], ptr %140, i64 0, i64 %143
  %145 = load double, ptr %144, align 8, !tbaa !9
  %146 = call double @llvm.fmuladd.f64(double %129, double %134, double %145)
  store double %146, ptr %144, align 8, !tbaa !9
  %147 = load i32, ptr %2, align 4, !tbaa !5
  %148 = sub nsw i32 %147, 1
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %149
  %151 = load i32, ptr %3, align 4, !tbaa !5
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds [201 x [401 x double]], ptr %150, i64 0, i64 %152
  %154 = load i32, ptr %4, align 4, !tbaa !5
  %155 = add nsw i32 %154, 200
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [401 x double], ptr %153, i64 0, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !9
  %159 = load i32, ptr %2, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !9
  %163 = load i32, ptr %2, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %164
  %166 = load i32, ptr %3, align 4, !tbaa !5
  %167 = add nsw i32 %166, 1
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [201 x [401 x double]], ptr %165, i64 0, i64 %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %170 = load i32, ptr %4, align 4, !tbaa !5
  %171 = load i32, ptr %5, align 4, !tbaa !5
  %172 = add nsw i32 %170, %171
  store i32 %172, ptr %8, align 4, !tbaa !5
  %173 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %174 = load i32, ptr %173, align 4, !tbaa !5
  %175 = add nsw i32 %174, 200
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [401 x double], ptr %169, i64 0, i64 %176
  %178 = load double, ptr %177, align 8, !tbaa !9
  %179 = call double @llvm.fmuladd.f64(double %158, double %162, double %178)
  store double %179, ptr %177, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %180

180:                                              ; preds = %117, %53
  br label %181

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

184:                                              ; preds = %46
  br label %185

185:                                              ; preds = %184
  %186 = load i32, ptr %3, align 4, !tbaa !5
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %3, align 4, !tbaa !5
  br label %39, !llvm.loop !14

188:                                              ; preds = %39
  br label %189

189:                                              ; preds = %188
  %190 = load i32, ptr %2, align 4, !tbaa !5
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %2, align 4, !tbaa !5
  br label %33, !llvm.loop !15

192:                                              ; preds = %33
  %193 = load i32, ptr @l, align 4, !tbaa !5
  store i32 %193, ptr %2, align 4, !tbaa !5
  br label %194

194:                                              ; preds = %221, %192
  %195 = load i32, ptr %2, align 4, !tbaa !5
  %196 = load i32, ptr @n, align 4, !tbaa !5
  %197 = icmp sle i32 %195, %196
  br i1 %197, label %198, label %224

198:                                              ; preds = %194
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %217, %198
  %200 = load i32, ptr %3, align 4, !tbaa !5
  %201 = load i32, ptr @n, align 4, !tbaa !5
  %202 = icmp sle i32 %200, %201
  br i1 %202, label %203, label %220

203:                                              ; preds = %199
  %204 = load i32, ptr @n, align 4, !tbaa !5
  %205 = sext i32 %204 to i64
  %206 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %205
  %207 = load i32, ptr %2, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds [201 x [401 x double]], ptr %206, i64 0, i64 %208
  %210 = load i32, ptr %3, align 4, !tbaa !5
  %211 = add nsw i32 %210, 200
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [401 x double], ptr %209, i64 0, i64 %212
  %214 = load double, ptr %213, align 8, !tbaa !9
  %215 = load double, ptr @ans, align 8, !tbaa !9
  %216 = fadd double %215, %214
  store double %216, ptr @ans, align 8, !tbaa !9
  br label %217

217:                                              ; preds = %203
  %218 = load i32, ptr %3, align 4, !tbaa !5
  %219 = add nsw i32 %218, 1
  store i32 %219, ptr %3, align 4, !tbaa !5
  br label %199, !llvm.loop !16

220:                                              ; preds = %199
  br label %221

221:                                              ; preds = %220
  %222 = load i32, ptr %2, align 4, !tbaa !5
  %223 = add nsw i32 %222, 1
  store i32 %223, ptr %2, align 4, !tbaa !5
  br label %194, !llvm.loop !17

224:                                              ; preds = %194
  %225 = load double, ptr @ans, align 8, !tbaa !9
  %226 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, double noundef %225)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #5
  ret i32 0
}

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

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

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

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

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

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

declare i32 @printf(ptr noundef, ...) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !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"

@n = external dso_local global i32, align 4
@l = external dso_local global i32, align 4
@p = external dso_local global [201 x double], align 16
@f = external dso_local local_unnamed_addr global [201 x [201 x [401 x double]]], align 16
@ans = external dso_local local_unnamed_addr global double, align 8
@.str = external hidden unnamed_addr constant [7 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: mustprogress norecurse nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #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
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @l, ptr noundef nonnull %1)
  %7 = load i32, ptr @n, align 4, !tbaa !5
  %.not44 = icmp slt i32 %7, 1
  br i1 %.not44, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 1, %0 ]
  %8 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %indvars.iv
  %9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %8)
  %10 = load double, ptr %8, align 8, !tbaa !9
  %11 = fdiv double %10, 1.000000e+02
  store double %11, ptr %8, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %12 = load i32, ptr @n, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %.not.not = icmp slt i64 %indvars.iv, %13
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %.lr.ph, %0
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) @n, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %15 = load i32, ptr %14, align 4, !tbaa !5
  %16 = add nsw i32 %15, 200
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds [401 x double], ptr @f, i64 0, i64 %17
  store double 1.000000e+00, ptr %18, align 8, !tbaa !9
  %19 = load i32, ptr @n, align 4, !tbaa !5
  %.not3956 = icmp slt i32 %19, 1
  br i1 %.not3956, label %._crit_edge60, label %.lr.ph59

.lr.ph59:                                         ; preds = %._crit_edge, %._crit_edge55
  %indvars.iv79 = phi i64 [ %indvars.iv.next80, %._crit_edge55 ], [ 1, %._crit_edge ]
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %2)
  %21 = load i32, ptr @n, align 4, !tbaa !5
  %.not4251 = icmp slt i32 %21, 0
  br i1 %.not4251, label %.lr.ph59.._crit_edge55_crit_edge, label %.lr.ph54

.lr.ph59.._crit_edge55_crit_edge:                 ; preds = %.lr.ph59
  %.pre89 = sext i32 %21 to i64
  br label %._crit_edge55

.lr.ph54:                                         ; preds = %.lr.ph59
  %22 = add nsw i64 %indvars.iv79, -1
  %23 = getelementptr inbounds [201 x double], ptr @p, i64 0, i64 %indvars.iv79
  br label %24

24:                                               ; preds = %.lr.ph54, %._crit_edge50
  %25 = phi i32 [ %21, %.lr.ph54 ], [ %62, %._crit_edge50 ]
  %indvars.iv76 = phi i64 [ 0, %.lr.ph54 ], [ %.pre90, %._crit_edge50 ]
  %26 = sub nsw i32 0, %25
  store i32 %26, ptr %1, align 4, !tbaa !5
  %.not4346 = icmp slt i32 %25, 0
  %.pre90 = add nuw nsw i64 %indvars.iv76, 1
  br i1 %.not4346, label %._crit_edge50, label %.lr.ph49

.lr.ph49:                                         ; preds = %24, %58
  %27 = phi i32 [ %61, %58 ], [ %25, %24 ]
  %storemerge47 = phi i32 [ %60, %58 ], [ %26, %24 ]
  %28 = load i32, ptr %2, align 4, !tbaa !5
  %29 = icmp eq i32 %28, -1
  %30 = add nsw i32 %storemerge47, 200
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %22, i64 %indvars.iv76, i64 %31
  %33 = load double, ptr %32, align 8, !tbaa !9
  %34 = load double, ptr %23, align 8, !tbaa !9
  %35 = fsub double 1.000000e+00, %34
  %36 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %indvars.iv79, i64 %indvars.iv76, i64 %31
  %37 = load double, ptr %36, align 8, !tbaa !9
  %38 = call double @llvm.fmuladd.f64(double %33, double %35, double %37)
  store double %38, ptr %36, align 8, !tbaa !9
  br i1 %29, label %39, label %49

39:                                               ; preds = %.lr.ph49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %40 = add nsw i32 %storemerge47, -1
  store i32 %40, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %41 = sub nsw i32 0, %27
  store i32 %41, ptr %4, align 4, !tbaa !5
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %43 = load i32, ptr %42, align 4, !tbaa !5
  %44 = add nsw i32 %43, 200
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %indvars.iv79, i64 %.pre90, i64 %45
  %47 = load double, ptr %46, align 8, !tbaa !9
  %48 = call double @llvm.fmuladd.f64(double %33, double %34, double %47)
  store double %48, ptr %46, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  br label %58

49:                                               ; preds = %.lr.ph49
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  %50 = add nsw i32 %28, %storemerge47
  store i32 %50, ptr %5, align 4, !tbaa !5
  %51 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = add nsw i32 %52, 200
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %indvars.iv79, i64 %.pre90, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !9
  %57 = call double @llvm.fmuladd.f64(double %33, double %34, double %56)
  store double %57, ptr %55, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %58

58:                                               ; preds = %39, %49
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %1, align 4, !tbaa !5
  %61 = load i32, ptr @n, align 4, !tbaa !5
  %.not43.not = icmp slt i32 %59, %61
  br i1 %.not43.not, label %.lr.ph49, label %._crit_edge50, !llvm.loop !13

._crit_edge50:                                    ; preds = %58, %24
  %62 = phi i32 [ %25, %24 ], [ %61, %58 ]
  %63 = sext i32 %62 to i64
  %.not42.not = icmp slt i64 %indvars.iv76, %63
  br i1 %.not42.not, label %24, label %._crit_edge55, !llvm.loop !14

._crit_edge55:                                    ; preds = %._crit_edge50, %.lr.ph59.._crit_edge55_crit_edge
  %.pre-phi = phi i64 [ %.pre89, %.lr.ph59.._crit_edge55_crit_edge ], [ %63, %._crit_edge50 ]
  %64 = phi i32 [ %21, %.lr.ph59.._crit_edge55_crit_edge ], [ %62, %._crit_edge50 ]
  %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1
  %.not39.not = icmp slt i64 %indvars.iv79, %.pre-phi
  br i1 %.not39.not, label %.lr.ph59, label %._crit_edge60, !llvm.loop !15

._crit_edge60:                                    ; preds = %._crit_edge55, %._crit_edge
  %.lcssa = phi i32 [ %19, %._crit_edge ], [ %64, %._crit_edge55 ]
  %65 = load i32, ptr @l, align 4, !tbaa !5
  %.not4069 = icmp sgt i32 %65, %.lcssa
  %.pre = load double, ptr @ans, align 8, !tbaa !9
  br i1 %.not4069, label %._crit_edge72, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %._crit_edge60
  %.not4161 = icmp slt i32 %.lcssa, 0
  %66 = sext i32 %.lcssa to i64
  br i1 %.not4161, label %._crit_edge72, label %.preheader.preheader

.preheader.preheader:                             ; preds = %.preheader.lr.ph
  %67 = add nuw i32 %.lcssa, 1
  %68 = sext i32 %65 to i64
  %wide.trip.count = zext i32 %67 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %69 = icmp ult i32 %.lcssa, 3
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge64
  %indvars.iv85 = phi i64 [ %68, %.preheader.preheader ], [ %indvars.iv.next86, %._crit_edge64 ]
  %.lcssa656870 = phi double [ %.pre, %.preheader.preheader ], [ %.lcssa101, %._crit_edge64 ]
  br i1 %69, label %._crit_edge64.unr-lcssa, label %.preheader.new

.preheader.new:                                   ; preds = %.preheader, %.preheader.new
  %indvars.iv82 = phi i64 [ %indvars.iv.next83.3, %.preheader.new ], [ 0, %.preheader ]
  %70 = phi double [ %86, %.preheader.new ], [ %.lcssa656870, %.preheader ]
  %niter = phi i64 [ %niter.next.3, %.preheader.new ], [ 0, %.preheader ]
  %71 = add nuw nsw i64 %indvars.iv82, 200
  %72 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %66, i64 %indvars.iv85, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !9
  %74 = fadd double %73, %70
  %75 = add nuw nsw i64 %indvars.iv82, 201
  %76 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %66, i64 %indvars.iv85, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !9
  %78 = fadd double %77, %74
  %79 = add nuw nsw i64 %indvars.iv82, 202
  %80 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %66, i64 %indvars.iv85, i64 %79
  %81 = load double, ptr %80, align 8, !tbaa !9
  %82 = fadd double %81, %78
  %83 = add nuw nsw i64 %indvars.iv82, 203
  %84 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %66, i64 %indvars.iv85, i64 %83
  %85 = load double, ptr %84, align 8, !tbaa !9
  %86 = fadd double %85, %82
  %indvars.iv.next83.3 = add nuw nsw i64 %indvars.iv82, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge64.unr-lcssa, label %.preheader.new, !llvm.loop !16

._crit_edge64.unr-lcssa:                          ; preds = %.preheader.new, %.preheader
  %.lcssa101.ph = phi double [ poison, %.preheader ], [ %86, %.preheader.new ]
  %indvars.iv82.unr = phi i64 [ 0, %.preheader ], [ %indvars.iv.next83.3, %.preheader.new ]
  %.unr = phi double [ %.lcssa656870, %.preheader ], [ %86, %.preheader.new ]
  br i1 %lcmp.mod.not, label %._crit_edge64, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge64.unr-lcssa, %.epil.preheader
  %indvars.iv82.epil = phi i64 [ %indvars.iv.next83.epil, %.epil.preheader ], [ %indvars.iv82.unr, %._crit_edge64.unr-lcssa ]
  %87 = phi double [ %91, %.epil.preheader ], [ %.unr, %._crit_edge64.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge64.unr-lcssa ]
  %88 = add nuw nsw i64 %indvars.iv82.epil, 200
  %89 = getelementptr inbounds [201 x [201 x [401 x double]]], ptr @f, i64 0, i64 %66, i64 %indvars.iv85, i64 %88
  %90 = load double, ptr %89, align 8, !tbaa !9
  %91 = fadd double %90, %87
  %indvars.iv.next83.epil = add nuw nsw i64 %indvars.iv82.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge64, label %.epil.preheader, !llvm.loop !17

._crit_edge64:                                    ; preds = %.epil.preheader, %._crit_edge64.unr-lcssa
  %.lcssa101 = phi double [ %.lcssa101.ph, %._crit_edge64.unr-lcssa ], [ %91, %.epil.preheader ]
  %indvars.iv.next86 = add nsw i64 %indvars.iv85, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next86 to i32
  %exitcond88.not = icmp eq i32 %67, %lftr.wideiv
  br i1 %exitcond88.not, label %._crit_edge72.split, label %.preheader, !llvm.loop !19

._crit_edge72.split:                              ; preds = %._crit_edge64
  store double %.lcssa101, ptr @ans, align 8, !tbaa !9
  br label %._crit_edge72

._crit_edge72:                                    ; preds = %._crit_edge60, %.preheader.lr.ph, %._crit_edge72.split
  %92 = phi double [ %.lcssa101, %._crit_edge72.split ], [ %.pre, %.preheader.lr.ph ], [ %.pre, %._crit_edge60 ]
  %93 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %92)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  ret i32 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: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

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

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

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

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

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

attributes #0 = { mustprogress norecurse 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 = { 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 #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.unroll.disable"}
!19 = distinct !{!19, !12}


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