; LLVM IR from tangjz/acm-icpc :: codeforces/complete (1059D)

; 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
@x = external dso_local global [100001 x i32], align 16
@y = external dso_local global [100001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 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 double, align 8
  %3 = alloca double, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  %19 = alloca double, align 8
  store i32 0, ptr %1, align 4
  %20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef @n)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #5
  store double 1.000000e+07, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store double -1.000000e+07, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #5
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %21

21:                                               ; preds = %61, %0
  %22 = load i32, ptr %4, align 4, !tbaa !9
  %23 = load i32, ptr @n, align 4, !tbaa !9
  %24 = icmp slt i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  store i32 2, ptr %5, align 4
  br label %64

26:                                               ; preds = %21
  %27 = load i32, ptr %4, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds i32, ptr @x, i64 %28
  %30 = load i32, ptr %4, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds i32, ptr @y, i64 %31
  %33 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str.1, ptr noundef %29, ptr noundef %32)
  %34 = load i32, ptr %4, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %35
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = icmp sgt i32 %37, 0
  %39 = zext i1 %38 to i32
  %40 = load i32, ptr @y, align 16, !tbaa !9
  %41 = icmp sgt i32 %40, 0
  %42 = zext i1 %41 to i32
  %43 = icmp ne i32 %39, %42
  br i1 %43, label %44, label %46

44:                                               ; preds = %26
  %45 = call i32 @puts(ptr noundef @.str.2)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  br label %64

46:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %47 = load i32, ptr %4, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %48
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = sitofp i32 %50 to double
  store double %51, ptr %6, align 8, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %53 = load double, ptr %52, align 8, !tbaa !5
  store double %53, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %54 = load i32, ptr %4, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %55
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = sitofp i32 %57 to double
  store double %58, ptr %7, align 8, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %60 = load double, ptr %59, align 8, !tbaa !5
  store double %60, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %61

61:                                               ; preds = %46
  %62 = load i32, ptr %4, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %4, align 4, !tbaa !9
  br label %21, !llvm.loop !11

64:                                               ; preds = %44, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #5
  %65 = load i32, ptr %5, align 4
  switch i32 %65, label %230 [
    i32 2, label %66
  ]

66:                                               ; preds = %64
  %67 = load i32, ptr @y, align 16, !tbaa !9
  %68 = icmp slt i32 %67, 0
  br i1 %68, label %69, label %88

69:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %70

70:                                               ; preds = %84, %69
  %71 = load i32, ptr %8, align 4, !tbaa !9
  %72 = load i32, ptr @n, align 4, !tbaa !9
  %73 = icmp slt i32 %71, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %70
  store i32 5, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %87

75:                                               ; preds = %70
  %76 = load i32, ptr %8, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %77
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = sub nsw i32 0, %79
  %81 = load i32, ptr %8, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %82
  store i32 %80, ptr %83, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %75
  %85 = load i32, ptr %8, align 4, !tbaa !9
  %86 = add nsw i32 %85, 1
  store i32 %86, ptr %8, align 4, !tbaa !9
  br label %70, !llvm.loop !13

87:                                               ; preds = %74
  br label %88

88:                                               ; preds = %87, %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %184, %88
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = icmp slt i32 %90, 100
  br i1 %91, label %93, label %92

92:                                               ; preds = %89
  store i32 8, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %187

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %94 = load double, ptr %2, align 8, !tbaa !5
  %95 = load double, ptr %3, align 8, !tbaa !5
  %96 = load double, ptr %2, align 8, !tbaa !5
  %97 = fsub double %95, %96
  %98 = fdiv double %97, 3.000000e+00
  %99 = fadd double %94, %98
  store double %99, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %100 = load double, ptr %3, align 8, !tbaa !5
  %101 = load double, ptr %3, align 8, !tbaa !5
  %102 = load double, ptr %2, align 8, !tbaa !5
  %103 = fsub double %101, %102
  %104 = fdiv double %103, 3.000000e+00
  %105 = fsub double %100, %104
  store double %105, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store double 0.000000e+00, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store double 0.000000e+00, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %106

106:                                              ; preds = %172, %93
  %107 = load i32, ptr %14, align 4, !tbaa !9
  %108 = load i32, ptr @n, align 4, !tbaa !9
  %109 = icmp slt i32 %107, %108
  br i1 %109, label %111, label %110

110:                                              ; preds = %106
  store i32 11, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %175

111:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %112 = load double, ptr %10, align 8, !tbaa !5
  %113 = load i32, ptr %14, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !9
  %117 = sitofp i32 %116 to double
  %118 = fsub double %112, %117
  %119 = load double, ptr %10, align 8, !tbaa !5
  %120 = load i32, ptr %14, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = sitofp i32 %123 to double
  %125 = fsub double %119, %124
  %126 = fmul double %118, %125
  %127 = load i32, ptr %14, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %128
  %130 = load i32, ptr %129, align 4, !tbaa !9
  %131 = sitofp i32 %130 to double
  %132 = fdiv double %126, %131
  %133 = fdiv double %132, 2.000000e+00
  %134 = load i32, ptr %14, align 4, !tbaa !9
  %135 = sext i32 %134 to i64
  %136 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !9
  %138 = sitofp i32 %137 to double
  %139 = call double @llvm.fmuladd.f64(double %138, double 5.000000e-01, double %133)
  store double %139, ptr %15, align 8, !tbaa !5
  %140 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %141 = load double, ptr %140, align 8, !tbaa !5
  store double %141, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %142 = load double, ptr %11, align 8, !tbaa !5
  %143 = load i32, ptr %14, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %144
  %146 = load i32, ptr %145, align 4, !tbaa !9
  %147 = sitofp i32 %146 to double
  %148 = fsub double %142, %147
  %149 = load double, ptr %11, align 8, !tbaa !5
  %150 = load i32, ptr %14, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !9
  %154 = sitofp i32 %153 to double
  %155 = fsub double %149, %154
  %156 = fmul double %148, %155
  %157 = load i32, ptr %14, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %158
  %160 = load i32, ptr %159, align 4, !tbaa !9
  %161 = sitofp i32 %160 to double
  %162 = fdiv double %156, %161
  %163 = fdiv double %162, 2.000000e+00
  %164 = load i32, ptr %14, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %165
  %167 = load i32, ptr %166, align 4, !tbaa !9
  %168 = sitofp i32 %167 to double
  %169 = call double @llvm.fmuladd.f64(double %168, double 5.000000e-01, double %163)
  store double %169, ptr %16, align 8, !tbaa !5
  %170 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %171 = load double, ptr %170, align 8, !tbaa !5
  store double %171, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %172

172:                                              ; preds = %111
  %173 = load i32, ptr %14, align 4, !tbaa !9
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %14, align 4, !tbaa !9
  br label %106, !llvm.loop !14

175:                                              ; preds = %110
  %176 = load double, ptr %12, align 8, !tbaa !5
  %177 = load double, ptr %13, align 8, !tbaa !5
  %178 = fcmp olt double %176, %177
  br i1 %178, label %179, label %181

179:                                              ; preds = %175
  %180 = load double, ptr %11, align 8, !tbaa !5
  store double %180, ptr %3, align 8, !tbaa !5
  br label %183

181:                                              ; preds = %175
  %182 = load double, ptr %10, align 8, !tbaa !5
  store double %182, ptr %2, align 8, !tbaa !5
  br label %183

183:                                              ; preds = %181, %179
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %184

184:                                              ; preds = %183
  %185 = load i32, ptr %9, align 4, !tbaa !9
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %9, align 4, !tbaa !9
  br label %89, !llvm.loop !15

187:                                              ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store double 0.000000e+00, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %188

188:                                              ; preds = %224, %187
  %189 = load i32, ptr %18, align 4, !tbaa !9
  %190 = load i32, ptr @n, align 4, !tbaa !9
  %191 = icmp slt i32 %189, %190
  br i1 %191, label %193, label %192

192:                                              ; preds = %188
  store i32 14, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %227

193:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %194 = load double, ptr %2, align 8, !tbaa !5
  %195 = load i32, ptr %18, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %196
  %198 = load i32, ptr %197, align 4, !tbaa !9
  %199 = sitofp i32 %198 to double
  %200 = fsub double %194, %199
  %201 = load double, ptr %2, align 8, !tbaa !5
  %202 = load i32, ptr %18, align 4, !tbaa !9
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %203
  %205 = load i32, ptr %204, align 4, !tbaa !9
  %206 = sitofp i32 %205 to double
  %207 = fsub double %201, %206
  %208 = fmul double %200, %207
  %209 = load i32, ptr %18, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !9
  %213 = sitofp i32 %212 to double
  %214 = fdiv double %208, %213
  %215 = fdiv double %214, 2.000000e+00
  %216 = load i32, ptr %18, align 4, !tbaa !9
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %217
  %219 = load i32, ptr %218, align 4, !tbaa !9
  %220 = sitofp i32 %219 to double
  %221 = call double @llvm.fmuladd.f64(double %220, double 5.000000e-01, double %215)
  store double %221, ptr %19, align 8, !tbaa !5
  %222 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %223 = load double, ptr %222, align 8, !tbaa !5
  store double %223, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %224

224:                                              ; preds = %193
  %225 = load i32, ptr %18, align 4, !tbaa !9
  %226 = add nsw i32 %225, 1
  store i32 %226, ptr %18, align 4, !tbaa !9
  br label %188, !llvm.loop !16

227:                                              ; preds = %192
  %228 = load double, ptr %17, align 8, !tbaa !5
  %229 = call i32 (ptr, ...) @printf(ptr noundef @.str.3, double noundef %228)
  store i32 0, ptr %1, align 4
  store i32 1, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %230

230:                                              ; preds = %227, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #5
  %231 = load i32, ptr %1, align 4
  ret i32 %231
}

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

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

declare i32 @puts(ptr noundef) #1

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

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

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

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"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 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !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
@x = external dso_local global [100001 x i32], align 16
@y = external dso_local global [100001 x i32], align 16
@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 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 double, align 8
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #5
  store double 1.000000e+07, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  store double -1.000000e+07, ptr %2, align 8, !tbaa !5
  %12 = load i32, ptr @n, align 4, !tbaa !9
  %.not4243 = icmp sgt i32 %12, 0
  br i1 %.not4243, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %0, %22
  %indvars.iv = phi i64 [ %indvars.iv.next, %22 ], [ 0, %0 ]
  %13 = getelementptr inbounds i32, ptr @x, i64 %indvars.iv
  %14 = getelementptr inbounds i32, ptr @y, i64 %indvars.iv
  %15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %13, ptr noundef nonnull %14)
  %16 = load i32, ptr %14, align 4, !tbaa !9
  %17 = icmp sgt i32 %16, 0
  %18 = load i32, ptr @y, align 16, !tbaa !9
  %19 = icmp slt i32 %18, 1
  %.not = xor i1 %17, %19
  br i1 %.not, label %22, label %20

20:                                               ; preds = %.lr.ph
  %21 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  br label %126

22:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %23 = load i32, ptr %13, align 4, !tbaa !9
  %24 = sitofp i32 %23 to double
  store double %24, ptr %3, align 8, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %26 = load double, ptr %25, align 8, !tbaa !5
  store double %26, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %27 = load i32, ptr %13, align 4, !tbaa !9
  %28 = sitofp i32 %27 to double
  store double %28, ptr %4, align 8, !tbaa !5
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %30 = load double, ptr %29, align 8, !tbaa !5
  store double %30, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %31 = load i32, ptr @n, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %.not42 = icmp slt i64 %indvars.iv.next, %32
  br i1 %.not42, label %.lr.ph, label %.critedge, !llvm.loop !11

.critedge:                                        ; preds = %22, %0
  %.promoted52 = phi double [ -1.000000e+07, %0 ], [ %30, %22 ]
  %33 = phi i32 [ %12, %0 ], [ %31, %22 ]
  %34 = load i32, ptr @y, align 16, !tbaa !9
  %35 = icmp slt i32 %34, 0
  br i1 %35, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.critedge
  %36 = icmp sgt i32 %33, 0
  br i1 %36, label %.lr.ph46.preheader, label %.split.us

.lr.ph46.preheader:                               ; preds = %.preheader
  %wide.trip.count = zext nneg i32 %33 to i64
  %min.iters.check = icmp ult i32 %33, 8
  br i1 %min.iters.check, label %.lr.ph46.preheader89, label %vector.ph

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

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %37 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %index
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %wide.load = load <4 x i32>, ptr %37, align 16, !tbaa !9
  %wide.load84 = load <4 x i32>, ptr %38, align 16, !tbaa !9
  %39 = sub nsw <4 x i32> zeroinitializer, %wide.load
  %40 = sub nsw <4 x i32> zeroinitializer, %wide.load84
  store <4 x i32> %39, ptr %37, align 16, !tbaa !9
  store <4 x i32> %40, ptr %38, align 16, !tbaa !9
  %index.next = add nuw i64 %index, 8
  %41 = icmp eq i64 %index.next, %n.vec
  br i1 %41, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.loopexit, label %.lr.ph46.preheader89

.lr.ph46.preheader89:                             ; preds = %middle.block, %.lr.ph46.preheader
  %indvars.iv59.ph = phi i64 [ 0, %.lr.ph46.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph46

.lr.ph46:                                         ; preds = %.lr.ph46.preheader89, %.lr.ph46
  %indvars.iv59 = phi i64 [ %indvars.iv.next60, %.lr.ph46 ], [ %indvars.iv59.ph, %.lr.ph46.preheader89 ]
  %42 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %indvars.iv59
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = sub nsw i32 0, %43
  store i32 %44, ptr %42, align 4, !tbaa !9
  %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next60, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph46, !llvm.loop !16

.loopexit:                                        ; preds = %.lr.ph46, %middle.block, %.critedge
  %45 = icmp sgt i32 %33, 0
  br i1 %45, label %.split, label %.split.us

.split.us:                                        ; preds = %.preheader, %.loopexit
  %.promoted = load double, ptr %1, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %46, %.split.us
  %47 = phi double [ %.promoted, %.split.us ], [ %62, %46 ]
  %.03949.us = phi i32 [ 0, %.split.us ], [ %63, %46 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %48 = fsub double %.promoted52, %47
  %49 = fdiv double %48, 3.000000e+00
  %50 = fadd double %47, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %51 = fsub double %.promoted52, %50
  %52 = fdiv double %51, 3.000000e+00
  %53 = fadd double %50, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %54 = fsub double %.promoted52, %53
  %55 = fdiv double %54, 3.000000e+00
  %56 = fadd double %53, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %57 = fsub double %.promoted52, %56
  %58 = fdiv double %57, 3.000000e+00
  %59 = fadd double %56, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %60 = fsub double %.promoted52, %59
  %61 = fdiv double %60, 3.000000e+00
  %62 = fadd double %59, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %63 = add nuw nsw i32 %.03949.us, 5
  %exitcond62.not.4 = icmp eq i32 %63, 100
  br i1 %exitcond62.not.4, label %.split51.us.loopexit71, label %46, !llvm.loop !17

.split51.us.loopexit71:                           ; preds = %46
  store double %62, ptr %1, align 8, !tbaa !5
  br label %.split51.us

.split51.us:                                      ; preds = %104, %.split51.us.loopexit71
  %64 = phi i32 [ %33, %.split51.us.loopexit71 ], [ %105, %104 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  store double 0.000000e+00, ptr %9, align 8, !tbaa !5
  %65 = icmp sgt i32 %64, 0
  br i1 %65, label %.lr.ph55, label %._crit_edge56

.split:                                           ; preds = %.loopexit, %104
  %66 = phi i32 [ %105, %104 ], [ %33, %.loopexit ]
  %.03949 = phi i32 [ %106, %104 ], [ 0, %.loopexit ]
  %67 = load double, ptr %1, align 8, !tbaa !5
  %68 = load double, ptr %2, align 8, !tbaa !5
  %69 = fsub double %68, %67
  %70 = fdiv double %69, 3.000000e+00
  %71 = fadd double %67, %70
  %72 = fsub double %68, %70
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  store double 0.000000e+00, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  store double 0.000000e+00, ptr %6, align 8, !tbaa !5
  %73 = icmp sgt i32 %66, 0
  br i1 %73, label %.lr.ph48, label %._crit_edge.thread

._crit_edge:                                      ; preds = %.lr.ph48
  %.pre = load double, ptr %5, align 8, !tbaa !5
  %74 = fcmp olt double %.pre, %98
  br i1 %74, label %102, label %._crit_edge.thread

.lr.ph48:                                         ; preds = %.split, %.lr.ph48
  %indvars.iv63 = phi i64 [ %indvars.iv.next64, %.lr.ph48 ], [ 0, %.split ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %75 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %indvars.iv63
  %76 = load i32, ptr %75, align 4, !tbaa !9
  %77 = sitofp i32 %76 to double
  %78 = fsub double %71, %77
  %79 = fmul double %78, %78
  %80 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %indvars.iv63
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = sitofp i32 %81 to double
  %83 = fdiv double %79, %82
  %84 = fmul double %83, 5.000000e-01
  %85 = call double @llvm.fmuladd.f64(double %82, double 5.000000e-01, double %84)
  store double %85, ptr %7, align 8, !tbaa !5
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %87 = load double, ptr %86, align 8, !tbaa !5
  store double %87, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %88 = load i32, ptr %75, align 4, !tbaa !9
  %89 = sitofp i32 %88 to double
  %90 = fsub double %72, %89
  %91 = fmul double %90, %90
  %92 = load i32, ptr %80, align 4, !tbaa !9
  %93 = sitofp i32 %92 to double
  %94 = fdiv double %91, %93
  %95 = fmul double %94, 5.000000e-01
  %96 = call double @llvm.fmuladd.f64(double %93, double 5.000000e-01, double %95)
  store double %96, ptr %8, align 8, !tbaa !5
  %97 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %98 = load double, ptr %97, align 8, !tbaa !5
  store double %98, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1
  %99 = load i32, ptr @n, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = icmp slt i64 %indvars.iv.next64, %100
  br i1 %101, label %.lr.ph48, label %._crit_edge, !llvm.loop !18

102:                                              ; preds = %._crit_edge
  store double %72, ptr %2, align 8, !tbaa !5
  br label %104

._crit_edge.thread:                               ; preds = %.split, %._crit_edge
  %103 = phi i32 [ %99, %._crit_edge ], [ %66, %.split ]
  store double %71, ptr %1, align 8, !tbaa !5
  br label %104

104:                                              ; preds = %._crit_edge.thread, %102
  %105 = phi i32 [ %103, %._crit_edge.thread ], [ %99, %102 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %106 = add nuw nsw i32 %.03949, 1
  %exitcond66.not = icmp eq i32 %106, 100
  br i1 %exitcond66.not, label %.split51.us, label %.split, !llvm.loop !19

._crit_edge56:                                    ; preds = %.lr.ph55, %.split51.us
  %107 = phi double [ 0.000000e+00, %.split51.us ], [ %122, %.lr.ph55 ]
  %108 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %107)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %126

.lr.ph55:                                         ; preds = %.split51.us, %.lr.ph55
  %indvars.iv67 = phi i64 [ %indvars.iv.next68, %.lr.ph55 ], [ 0, %.split51.us ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  %109 = load double, ptr %1, align 8, !tbaa !5
  %110 = getelementptr inbounds [100001 x i32], ptr @x, i64 0, i64 %indvars.iv67
  %111 = load i32, ptr %110, align 4, !tbaa !9
  %112 = sitofp i32 %111 to double
  %113 = fsub double %109, %112
  %114 = fmul double %113, %113
  %115 = getelementptr inbounds [100001 x i32], ptr @y, i64 0, i64 %indvars.iv67
  %116 = load i32, ptr %115, align 4, !tbaa !9
  %117 = sitofp i32 %116 to double
  %118 = fdiv double %114, %117
  %119 = fmul double %118, 5.000000e-01
  %120 = call double @llvm.fmuladd.f64(double %117, double 5.000000e-01, double %119)
  store double %120, ptr %10, align 8, !tbaa !5
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10)
  %122 = load double, ptr %121, align 8, !tbaa !5
  store double %122, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1
  %123 = load i32, ptr @n, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = icmp slt i64 %indvars.iv.next68, %124
  br i1 %125, label %.lr.ph55, label %._crit_edge56, !llvm.loop !21

126:                                              ; preds = %20, %._crit_edge56
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #5
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) 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) #2

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #1

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

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

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

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

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

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!"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 = distinct !{!13, !12, !14, !15}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}
!16 = distinct !{!16, !12, !15, !14}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12, !20}
!20 = !{!"llvm.loop.unswitch.partial.disable"}
!21 = distinct !{!21, !12}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass