; LLVM IR from eyangch/competitive-programming :: CEOI/2017 (bet)

; 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" }
%"struct.std::greater" = type { i8 }
%"struct.std::_Setprecision" = type { i32 }

@N = external dso_local global i32, align 4
@a = external dso_local global [100000 x double], align 16
@b = external dso_local global [100000 x double], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::greater", align 1
  %4 = alloca %"struct.std::greater", align 1
  %5 = alloca i32, align 4
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca %"struct.std::_Setprecision", align 4
  store i32 0, ptr %1, align 4
  %18 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %19 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %20 = getelementptr i8, ptr %19, i64 -24
  %21 = load i64, ptr %20, align 8
  %22 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %21
  %23 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %22, ptr noundef null)
  %24 = 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 %25

25:                                               ; preds = %39, %0
  %26 = load i32, ptr %2, align 4, !tbaa !8
  %27 = load i32, ptr @N, align 4, !tbaa !8
  %28 = icmp slt i32 %26, %27
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %25
  %31 = load i32, ptr %2, align 4, !tbaa !8
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %32
  %34 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %33)
  %35 = load i32, ptr %2, align 4, !tbaa !8
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %36
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(8) %37)
  br label %39

39:                                               ; preds = %30
  %40 = load i32, ptr %2, align 4, !tbaa !8
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %2, align 4, !tbaa !8
  br label %25, !llvm.loop !11

42:                                               ; preds = %29
  %43 = load i32, ptr @N, align 4, !tbaa !8
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds double, ptr @a, i64 %44
  call void @_ZSt4sortIPdSt7greaterIdEEvT_S3_T0_(ptr noundef @a, ptr noundef %45)
  %46 = load i32, ptr @N, align 4, !tbaa !8
  %47 = sext i32 %46 to i64
  %48 = getelementptr inbounds double, ptr @b, i64 %47
  call void @_ZSt4sortIPdSt7greaterIdEEvT_S3_T0_(ptr noundef @b, ptr noundef %48)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store i32 1, ptr %5, align 4, !tbaa !8
  br label %49

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

53:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %78

54:                                               ; preds = %49
  %55 = load i32, ptr %5, align 4, !tbaa !8
  %56 = sub nsw i32 %55, 1
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !13
  %60 = load i32, ptr %5, align 4, !tbaa !8
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %61
  %63 = load double, ptr %62, align 8, !tbaa !13
  %64 = fadd double %63, %59
  store double %64, ptr %62, align 8, !tbaa !13
  %65 = load i32, ptr %5, align 4, !tbaa !8
  %66 = sub nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !13
  %70 = load i32, ptr %5, align 4, !tbaa !8
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !13
  %74 = fadd double %73, %69
  store double %74, ptr %72, align 8, !tbaa !13
  br label %75

75:                                               ; preds = %54
  %76 = load i32, ptr %5, align 4, !tbaa !8
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %5, align 4, !tbaa !8
  br label %49, !llvm.loop !15

78:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  store double 0.000000e+00, ptr %6, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  store i32 0, ptr %7, align 4, !tbaa !8
  br label %79

79:                                               ; preds = %253, %78
  %80 = load i32, ptr %7, align 4, !tbaa !8
  %81 = load i32, ptr @N, align 4, !tbaa !8
  %82 = icmp slt i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %256

84:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %85 = load i32, ptr @N, align 4, !tbaa !8
  %86 = sub nsw i32 %85, 1
  store i32 %86, ptr %9, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  store i32 0, ptr %10, align 4, !tbaa !8
  br label %87

87:                                               ; preds = %127, %84
  %88 = load i32, ptr %8, align 4, !tbaa !8
  %89 = load i32, ptr %9, align 4, !tbaa !8
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %91, label %128

91:                                               ; preds = %87
  %92 = load i32, ptr %8, align 4, !tbaa !8
  %93 = load i32, ptr %9, align 4, !tbaa !8
  %94 = add nsw i32 %92, %93
  %95 = sdiv i32 %94, 2
  store i32 %95, ptr %10, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %96 = load i32, ptr %7, align 4, !tbaa !8
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %97
  %99 = load double, ptr %98, align 8, !tbaa !13
  %100 = load i32, ptr %10, align 4, !tbaa !8
  %101 = sitofp i32 %100 to double
  %102 = fsub double %99, %101
  %103 = load i32, ptr %7, align 4, !tbaa !8
  %104 = sitofp i32 %103 to double
  %105 = fsub double %102, %104
  %106 = fsub double %105, 2.000000e+00
  store double %106, ptr %11, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %107 = load i32, ptr %10, align 4, !tbaa !8
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !13
  %111 = load i32, ptr %10, align 4, !tbaa !8
  %112 = sitofp i32 %111 to double
  %113 = fsub double %110, %112
  %114 = load i32, ptr %7, align 4, !tbaa !8
  %115 = sitofp i32 %114 to double
  %116 = fsub double %113, %115
  %117 = fsub double %116, 2.000000e+00
  store double %117, ptr %12, align 8, !tbaa !13
  %118 = load double, ptr %12, align 8, !tbaa !13
  %119 = load double, ptr %11, align 8, !tbaa !13
  %120 = fcmp olt double %118, %119
  br i1 %120, label %121, label %124

121:                                              ; preds = %91
  %122 = load i32, ptr %10, align 4, !tbaa !8
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %8, align 4, !tbaa !8
  br label %127

124:                                              ; preds = %91
  %125 = load i32, ptr %10, align 4, !tbaa !8
  %126 = sub nsw i32 %125, 1
  store i32 %126, ptr %9, align 4, !tbaa !8
  br label %127

127:                                              ; preds = %124, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %87, !llvm.loop !16

128:                                              ; preds = %87
  br label %129

129:                                              ; preds = %158, %128
  %130 = load i32, ptr %10, align 4, !tbaa !8
  %131 = icmp sgt i32 %130, 0
  br i1 %131, label %132, label %156

132:                                              ; preds = %129
  %133 = load i32, ptr %10, align 4, !tbaa !8
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %134
  %136 = load double, ptr %135, align 8, !tbaa !13
  %137 = load i32, ptr %10, align 4, !tbaa !8
  %138 = sitofp i32 %137 to double
  %139 = fsub double %136, %138
  %140 = load i32, ptr %7, align 4, !tbaa !8
  %141 = sitofp i32 %140 to double
  %142 = fsub double %139, %141
  %143 = fsub double %142, 2.000000e+00
  %144 = load i32, ptr %7, align 4, !tbaa !8
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !13
  %148 = load i32, ptr %10, align 4, !tbaa !8
  %149 = sitofp i32 %148 to double
  %150 = fsub double %147, %149
  %151 = load i32, ptr %7, align 4, !tbaa !8
  %152 = sitofp i32 %151 to double
  %153 = fsub double %150, %152
  %154 = fsub double %153, 2.000000e+00
  %155 = fcmp ogt double %143, %154
  br label %156

156:                                              ; preds = %132, %129
  %157 = phi i1 [ false, %129 ], [ %155, %132 ]
  br i1 %157, label %158, label %161

158:                                              ; preds = %156
  %159 = load i32, ptr %10, align 4, !tbaa !8
  %160 = add nsw i32 %159, -1
  store i32 %160, ptr %10, align 4, !tbaa !8
  br label %129, !llvm.loop !17

161:                                              ; preds = %156
  br label %162

162:                                              ; preds = %193, %161
  %163 = load i32, ptr %10, align 4, !tbaa !8
  %164 = load i32, ptr @N, align 4, !tbaa !8
  %165 = sub nsw i32 %164, 1
  %166 = icmp slt i32 %163, %165
  br i1 %166, label %167, label %191

167:                                              ; preds = %162
  %168 = load i32, ptr %10, align 4, !tbaa !8
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %169
  %171 = load double, ptr %170, align 8, !tbaa !13
  %172 = load i32, ptr %10, align 4, !tbaa !8
  %173 = sitofp i32 %172 to double
  %174 = fsub double %171, %173
  %175 = load i32, ptr %7, align 4, !tbaa !8
  %176 = sitofp i32 %175 to double
  %177 = fsub double %174, %176
  %178 = fsub double %177, 2.000000e+00
  %179 = load i32, ptr %7, align 4, !tbaa !8
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %180
  %182 = load double, ptr %181, align 8, !tbaa !13
  %183 = load i32, ptr %10, align 4, !tbaa !8
  %184 = sitofp i32 %183 to double
  %185 = fsub double %182, %184
  %186 = load i32, ptr %7, align 4, !tbaa !8
  %187 = sitofp i32 %186 to double
  %188 = fsub double %185, %187
  %189 = fsub double %188, 2.000000e+00
  %190 = fcmp olt double %178, %189
  br label %191

191:                                              ; preds = %167, %162
  %192 = phi i1 [ false, %162 ], [ %190, %167 ]
  br i1 %192, label %193, label %196

193:                                              ; preds = %191
  %194 = load i32, ptr %10, align 4, !tbaa !8
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %10, align 4, !tbaa !8
  br label %162, !llvm.loop !18

196:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %197 = load i32, ptr %7, align 4, !tbaa !8
  %198 = sext i32 %197 to i64
  %199 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %198
  %200 = load double, ptr %199, align 8, !tbaa !13
  %201 = load i32, ptr %10, align 4, !tbaa !8
  %202 = sitofp i32 %201 to double
  %203 = fsub double %200, %202
  %204 = load i32, ptr %7, align 4, !tbaa !8
  %205 = sitofp i32 %204 to double
  %206 = fsub double %203, %205
  %207 = fsub double %206, 2.000000e+00
  store double %207, ptr %13, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %208 = load i32, ptr %10, align 4, !tbaa !8
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %209
  %211 = load double, ptr %210, align 8, !tbaa !13
  %212 = load i32, ptr %10, align 4, !tbaa !8
  %213 = sitofp i32 %212 to double
  %214 = fsub double %211, %213
  %215 = load i32, ptr %7, align 4, !tbaa !8
  %216 = sitofp i32 %215 to double
  %217 = fsub double %214, %216
  %218 = fsub double %217, 2.000000e+00
  store double %218, ptr %14, align 8, !tbaa !13
  %219 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %220 = 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) %219)
  %221 = load double, ptr %220, align 8, !tbaa !13
  store double %221, ptr %6, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  %222 = load i32, ptr %10, align 4, !tbaa !8
  %223 = add nsw i32 %222, -1
  store i32 %223, ptr %10, align 4, !tbaa !8
  %224 = load i32, ptr %10, align 4, !tbaa !8
  %225 = icmp sge i32 %224, 0
  br i1 %225, label %226, label %252

226:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %227 = load i32, ptr %7, align 4, !tbaa !8
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %228
  %230 = load double, ptr %229, align 8, !tbaa !13
  %231 = load i32, ptr %10, align 4, !tbaa !8
  %232 = sitofp i32 %231 to double
  %233 = fsub double %230, %232
  %234 = load i32, ptr %7, align 4, !tbaa !8
  %235 = sitofp i32 %234 to double
  %236 = fsub double %233, %235
  %237 = fsub double %236, 2.000000e+00
  store double %237, ptr %15, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %238 = load i32, ptr %10, align 4, !tbaa !8
  %239 = sext i32 %238 to i64
  %240 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %239
  %241 = load double, ptr %240, align 8, !tbaa !13
  %242 = load i32, ptr %10, align 4, !tbaa !8
  %243 = sitofp i32 %242 to double
  %244 = fsub double %241, %243
  %245 = load i32, ptr %7, align 4, !tbaa !8
  %246 = sitofp i32 %245 to double
  %247 = fsub double %244, %246
  %248 = fsub double %247, 2.000000e+00
  store double %248, ptr %16, align 8, !tbaa !13
  %249 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %250 = 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) %249)
  %251 = load double, ptr %250, align 8, !tbaa !13
  store double %251, ptr %6, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %252

252:                                              ; preds = %226, %196
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %253

253:                                              ; preds = %252
  %254 = load i32, ptr %7, align 4, !tbaa !8
  %255 = add nsw i32 %254, 1
  store i32 %255, ptr %7, align 4, !tbaa !8
  br label %79, !llvm.loop !19

256:                                              ; preds = %83
  %257 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt5fixedRSt8ios_base)
  %258 = call i32 @_ZSt12setprecisioni(i32 noundef 4)
  %259 = getelementptr inbounds %"struct.std::_Setprecision", ptr %17, i32 0, i32 0
  store i32 %258, ptr %259, align 4
  %260 = getelementptr inbounds %"struct.std::_Setprecision", ptr %17, i32 0, i32 0
  %261 = load i32, ptr %260, align 4
  %262 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %257, i32 %261)
  %263 = load double, ptr %6, align 8, !tbaa !13
  %264 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %262, double noundef %263)
  %265 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %264, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  ret i32 0
}

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: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; 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 uwtable
declare dso_local void @_ZSt4sortIPdSt7greaterIdEEvT_S3_T0_(ptr noundef, ptr noundef) #5

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) #6

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4 align 2

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

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 = { 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 #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 = { 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 #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 = !{!14, !14, i64 0}
!14 = !{!"double", !10, i64 0}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !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 [100000 x double], align 16
@b = external dso_local global [100000 x double], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress norecurse 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 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %7 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %8 = getelementptr i8, ptr %7, i64 -24
  %9 = load i64, ptr %8, align 8
  %10 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %9
  %11 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %10, ptr noundef null)
  %12 = 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)
  %13 = load i32, ptr @N, align 4, !tbaa !8
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %0
  %.pre115 = sext i32 %13 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.._crit_edge_crit_edge
  %.pre-phi116 = phi i64 [ %.pre115, %.._crit_edge_crit_edge ], [ %28, %.lr.ph ]
  %15 = getelementptr inbounds double, ptr @a, i64 %.pre-phi116
  tail call void @_ZSt4sortIPdSt7greaterIdEEvT_S3_T0_(ptr noundef nonnull @a, ptr noundef nonnull %15)
  %16 = load i32, ptr @N, align 4, !tbaa !8
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds double, ptr @b, i64 %17
  tail call void @_ZSt4sortIPdSt7greaterIdEEvT_S3_T0_(ptr noundef nonnull @b, ptr noundef nonnull %18)
  %19 = load i32, ptr @N, align 4, !tbaa !8
  %20 = icmp sgt i32 %19, 1
  br i1 %20, label %.lr.ph70.preheader, label %._crit_edge71

.lr.ph70.preheader:                               ; preds = %._crit_edge
  %wide.trip.count = zext nneg i32 %19 to i64
  %.pre = load double, ptr @a, align 16, !tbaa !11
  %.pre110 = load double, ptr @b, align 16, !tbaa !11
  %21 = add nsw i64 %wide.trip.count, -1
  %xtraiter = and i64 %21, 1
  %22 = icmp eq i32 %19, 2
  br i1 %22, label %._crit_edge71.loopexit.unr-lcssa, label %.lr.ph70.preheader.new

.lr.ph70.preheader.new:                           ; preds = %.lr.ph70.preheader
  %unroll_iter = and i64 %21, -2
  br label %.lr.ph70

.lr.ph:                                           ; preds = %0, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %0 ]
  %23 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv
  %24 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %23)
  %25 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %indvars.iv
  %26 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(8) %25)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %27 = load i32, ptr @N, align 4, !tbaa !8
  %28 = sext i32 %27 to i64
  %29 = icmp slt i64 %indvars.iv.next, %28
  br i1 %29, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge71.loopexit.unr-lcssa:                 ; preds = %.lr.ph70, %.lr.ph70.preheader
  %.unr = phi double [ %.pre110, %.lr.ph70.preheader ], [ %50, %.lr.ph70 ]
  %.unr124 = phi double [ %.pre, %.lr.ph70.preheader ], [ %47, %.lr.ph70 ]
  %indvars.iv95.unr = phi i64 [ 1, %.lr.ph70.preheader ], [ %indvars.iv.next96.1, %.lr.ph70 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge71, label %.lr.ph70.epil

.lr.ph70.epil:                                    ; preds = %._crit_edge71.loopexit.unr-lcssa
  %30 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv95.unr
  %31 = load double, ptr %30, align 8, !tbaa !11
  %32 = fadd double %.unr124, %31
  store double %32, ptr %30, align 8, !tbaa !11
  %33 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %indvars.iv95.unr
  %34 = load double, ptr %33, align 8, !tbaa !11
  %35 = fadd double %.unr, %34
  store double %35, ptr %33, align 8, !tbaa !11
  br label %._crit_edge71

._crit_edge71:                                    ; preds = %.lr.ph70.epil, %._crit_edge71.loopexit.unr-lcssa, %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  store double 0.000000e+00, ptr %1, align 8, !tbaa !11
  %36 = icmp sgt i32 %19, 0
  br i1 %36, label %.lr.ph90, label %._crit_edge91

.lr.ph70:                                         ; preds = %.lr.ph70, %.lr.ph70.preheader.new
  %37 = phi double [ %.pre110, %.lr.ph70.preheader.new ], [ %50, %.lr.ph70 ]
  %38 = phi double [ %.pre, %.lr.ph70.preheader.new ], [ %47, %.lr.ph70 ]
  %indvars.iv95 = phi i64 [ 1, %.lr.ph70.preheader.new ], [ %indvars.iv.next96.1, %.lr.ph70 ]
  %niter = phi i64 [ 0, %.lr.ph70.preheader.new ], [ %niter.next.1, %.lr.ph70 ]
  %39 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv95
  %40 = load double, ptr %39, align 8, !tbaa !11
  %41 = fadd double %38, %40
  store double %41, ptr %39, align 8, !tbaa !11
  %42 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %indvars.iv95
  %43 = load double, ptr %42, align 8, !tbaa !11
  %44 = fadd double %37, %43
  store double %44, ptr %42, align 8, !tbaa !11
  %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1
  %45 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv.next96
  %46 = load double, ptr %45, align 8, !tbaa !11
  %47 = fadd double %41, %46
  store double %47, ptr %45, align 8, !tbaa !11
  %48 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %indvars.iv.next96
  %49 = load double, ptr %48, align 8, !tbaa !11
  %50 = fadd double %44, %49
  store double %50, ptr %48, align 8, !tbaa !11
  %indvars.iv.next96.1 = add nuw nsw i64 %indvars.iv95, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge71.loopexit.unr-lcssa, label %.lr.ph70, !llvm.loop !15

._crit_edge91:                                    ; preds = %166, %._crit_edge71
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSt8ios_baseS0_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt5fixedRSt8ios_base)
  %52 = call i32 @_ZSt12setprecisioni(i32 noundef 4)
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St13_Setprecision(ptr noundef nonnull align 8 dereferenceable(8) %51, i32 %52)
  %54 = load double, ptr %1, align 8, !tbaa !11
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %53, double noundef %54)
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %55, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0

.lr.ph90:                                         ; preds = %._crit_edge71, %166
  %indvars.iv106 = phi i64 [ %indvars.iv.next107, %166 ], [ 0, %._crit_edge71 ]
  %57 = phi i32 [ %167, %166 ], [ %19, %._crit_edge71 ]
  %58 = add i32 %57, -1
  %59 = icmp sgt i32 %57, 1
  br i1 %59, label %.lr.ph75, label %.critedge

.lr.ph75:                                         ; preds = %.lr.ph90
  %60 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv106
  %61 = load double, ptr %60, align 8, !tbaa !11
  %62 = trunc nuw nsw i64 %indvars.iv106 to i32
  %63 = uitofp nneg i32 %62 to double
  %64 = insertelement <2 x double> poison, double %63, i64 0
  %65 = shufflevector <2 x double> %64, <2 x double> poison, <2 x i32> zeroinitializer
  br label %73

.preheader:                                       ; preds = %73
  %.not77 = icmp ult i32 %74, 2
  br i1 %.not77, label %.critedge, label %.lr.ph79

.lr.ph79:                                         ; preds = %.preheader
  %66 = trunc nuw nsw i64 %indvars.iv106 to i32
  %67 = uitofp nneg i32 %66 to double
  %68 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv106
  %69 = load double, ptr %68, align 8, !tbaa !11
  %70 = zext nneg i32 %75 to i64
  %71 = insertelement <2 x double> poison, double %67, i64 0
  %72 = shufflevector <2 x double> %71, <2 x double> poison, <2 x i32> zeroinitializer
  br label %93

73:                                               ; preds = %.lr.ph75, %73
  %.06073 = phi i32 [ %58, %.lr.ph75 ], [ %.161, %73 ]
  %.06272 = phi i32 [ 0, %.lr.ph75 ], [ %.163, %73 ]
  %74 = add nuw nsw i32 %.06073, %.06272
  %75 = lshr i32 %74, 1
  %76 = uitofp nneg i32 %75 to double
  %77 = zext nneg i32 %75 to i64
  %78 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %77
  %79 = load double, ptr %78, align 8, !tbaa !11
  %80 = insertelement <2 x double> poison, double %79, i64 0
  %81 = insertelement <2 x double> %80, double %61, i64 1
  %82 = insertelement <2 x double> poison, double %76, i64 0
  %83 = shufflevector <2 x double> %82, <2 x double> poison, <2 x i32> zeroinitializer
  %84 = fsub <2 x double> %81, %83
  %85 = fsub <2 x double> %84, %65
  %86 = fadd <2 x double> %85, <double -2.000000e+00, double -2.000000e+00>
  %87 = extractelement <2 x double> %86, i64 0
  %88 = extractelement <2 x double> %86, i64 1
  %89 = fcmp olt double %87, %88
  %90 = add nuw nsw i32 %75, 1
  %91 = add nsw i32 %75, -1
  %.163 = select i1 %89, i32 %90, i32 %.06272
  %.161 = select i1 %89, i32 %.06073, i32 %91
  %92 = icmp slt i32 %.163, %.161
  br i1 %92, label %73, label %.preheader, !llvm.loop !16

93:                                               ; preds = %.lr.ph79, %108
  %indvars.iv98 = phi i64 [ %70, %.lr.ph79 ], [ %indvars.iv.next99, %108 ]
  %94 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %indvars.iv98
  %95 = load double, ptr %94, align 8, !tbaa !11
  %96 = trunc nuw i64 %indvars.iv98 to i32
  %97 = uitofp nneg i32 %96 to double
  %98 = insertelement <2 x double> poison, double %95, i64 0
  %99 = insertelement <2 x double> %98, double %69, i64 1
  %100 = insertelement <2 x double> poison, double %97, i64 0
  %101 = shufflevector <2 x double> %100, <2 x double> poison, <2 x i32> zeroinitializer
  %102 = fsub <2 x double> %99, %101
  %103 = fsub <2 x double> %102, %72
  %104 = fadd <2 x double> %103, <double -2.000000e+00, double -2.000000e+00>
  %105 = extractelement <2 x double> %104, i64 0
  %106 = extractelement <2 x double> %104, i64 1
  %107 = fcmp ogt double %105, %106
  br i1 %107, label %108, label %.critedge

108:                                              ; preds = %93
  %indvars.iv.next99 = add nsw i64 %indvars.iv98, -1
  %109 = and i64 %indvars.iv.next99, 4294967295
  %.not = icmp eq i64 %109, 0
  br i1 %.not, label %.critedge, label %93, !llvm.loop !17

.critedge:                                        ; preds = %93, %108, %.lr.ph90, %.preheader
  %.1.lcssa = phi i32 [ 0, %.preheader ], [ 0, %.lr.ph90 ], [ 0, %108 ], [ %96, %93 ]
  %110 = icmp slt i32 %.1.lcssa, %58
  br i1 %110, label %.lr.ph84, label %.critedge..critedge2_crit_edge

.critedge..critedge2_crit_edge:                   ; preds = %.critedge
  %.phi.trans.insert = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv106
  %.pre111 = load double, ptr %.phi.trans.insert, align 8, !tbaa !11
  %.pre112 = trunc nuw nsw i64 %indvars.iv106 to i32
  %.pre113 = uitofp nneg i32 %.pre112 to double
  br label %.critedge2

.lr.ph84:                                         ; preds = %.critedge
  %111 = trunc nuw nsw i64 %indvars.iv106 to i32
  %112 = uitofp nneg i32 %111 to double
  %113 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv106
  %114 = load double, ptr %113, align 8, !tbaa !11
  %115 = sext i32 %.1.lcssa to i64
  %116 = insertelement <2 x double> poison, double %112, i64 0
  %117 = shufflevector <2 x double> %116, <2 x double> poison, <2 x i32> zeroinitializer
  br label %118

118:                                              ; preds = %.lr.ph84, %133
  %indvars.iv101 = phi i64 [ %115, %.lr.ph84 ], [ %indvars.iv.next102, %133 ]
  %119 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %indvars.iv101
  %120 = load double, ptr %119, align 8, !tbaa !11
  %121 = trunc nsw i64 %indvars.iv101 to i32
  %122 = sitofp i32 %121 to double
  %123 = insertelement <2 x double> poison, double %120, i64 0
  %124 = insertelement <2 x double> %123, double %114, i64 1
  %125 = insertelement <2 x double> poison, double %122, i64 0
  %126 = shufflevector <2 x double> %125, <2 x double> poison, <2 x i32> zeroinitializer
  %127 = fsub <2 x double> %124, %126
  %128 = fsub <2 x double> %127, %117
  %129 = fadd <2 x double> %128, <double -2.000000e+00, double -2.000000e+00>
  %130 = extractelement <2 x double> %129, i64 0
  %131 = extractelement <2 x double> %129, i64 1
  %132 = fcmp olt double %130, %131
  br i1 %132, label %133, label %.critedge2

133:                                              ; preds = %118
  %indvars.iv.next102 = add nsw i64 %indvars.iv101, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next102 to i32
  %exitcond105.not = icmp eq i32 %58, %lftr.wideiv
  br i1 %exitcond105.not, label %.critedge2, label %118, !llvm.loop !18

.critedge2:                                       ; preds = %118, %133, %.critedge..critedge2_crit_edge
  %.pre-phi114 = phi double [ %.pre113, %.critedge..critedge2_crit_edge ], [ %112, %133 ], [ %112, %118 ]
  %134 = phi double [ %.pre111, %.critedge..critedge2_crit_edge ], [ %114, %133 ], [ %114, %118 ]
  %.2.lcssa = phi i32 [ %.1.lcssa, %.critedge..critedge2_crit_edge ], [ %121, %118 ], [ %58, %133 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %135 = sitofp i32 %.2.lcssa to double
  %136 = fsub double %134, %135
  %137 = fsub double %136, %.pre-phi114
  %138 = fadd double %137, -2.000000e+00
  store double %138, ptr %2, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %139 = sext i32 %.2.lcssa to i64
  %140 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %139
  %141 = load double, ptr %140, align 8, !tbaa !11
  %142 = fsub double %141, %135
  %143 = fsub double %142, %.pre-phi114
  %144 = fadd double %143, -2.000000e+00
  store double %144, ptr %3, align 8, !tbaa !11
  %145 = 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) %3)
  %146 = 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) %145)
  %147 = load double, ptr %146, align 8, !tbaa !11
  store double %147, ptr %1, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  %148 = icmp sgt i32 %.2.lcssa, 0
  br i1 %148, label %149, label %166

149:                                              ; preds = %.critedge2
  %150 = getelementptr inbounds [100000 x double], ptr @a, i64 0, i64 %indvars.iv106
  %151 = add nsw i32 %.2.lcssa, -1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %152 = load double, ptr %150, align 8, !tbaa !11
  %153 = uitofp nneg i32 %151 to double
  %154 = fsub double %152, %153
  %155 = fsub double %154, %.pre-phi114
  %156 = fadd double %155, -2.000000e+00
  store double %156, ptr %4, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %157 = zext nneg i32 %151 to i64
  %158 = getelementptr inbounds [100000 x double], ptr @b, i64 0, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !11
  %160 = fsub double %159, %153
  %161 = fsub double %160, %.pre-phi114
  %162 = fadd double %161, -2.000000e+00
  store double %162, ptr %5, align 8, !tbaa !11
  %163 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %164 = 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) %163)
  %165 = load double, ptr %164, align 8, !tbaa !11
  store double %165, ptr %1, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %166

166:                                              ; preds = %149, %.critedge2
  %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1
  %167 = load i32, ptr @N, align 4, !tbaa !8
  %168 = sext i32 %167 to i64
  %169 = icmp slt i64 %indvars.iv.next107, %168
  br i1 %169, label %.lr.ph90, label %._crit_edge91, !llvm.loop !19
}

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 uwtable
declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERd(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4 align 2

; 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 uwtable
declare dso_local void @_ZSt4sortIPdSt7greaterIdEEvT_S3_T0_(ptr noundef, ptr noundef) local_unnamed_addr #5

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(216) ptr @_ZSt5fixedRSt8ios_base(ptr noundef nonnull align 8 dereferenceable(216)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local i32 @_ZSt12setprecisioni(i32 noundef) local_unnamed_addr #6

; 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 #4 align 2

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

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

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 = { 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 #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 = { 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 #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 = !{!12, !12, i64 0}
!12 = !{!"double", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}


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