; LLVM IR from tangjz/acm-icpc :: codeforces/gym/103957G.ll (Z5solvei)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@w = external dso_local global [201 x i32], align 16
@p = external dso_local global [201 x i32], align 16
@sz = external dso_local global [201 x i32], align 16
@size = external dso_local global i32, align 4
@ff = external dso_local global [201 x i32], align 16
@rt = external dso_local global i32, align 4
@tot = external dso_local global i32, align 4
@sum = external dso_local global i32, align 4
@seq = external dso_local global [201 x i32], align 16
@nxt = external dso_local global [201 x i32], align 16
@f = external dso_local global [201 x [50001 x double]], align 16
@s = external dso_local global [50001 x double], align 16
@e = external dso_local global [201 x %"class.std::vector"], align 16
@vis = external dso_local global [201 x i8], align 16

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvei(i32 noundef %0) #0 {
  %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 double, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  store i32 0, ptr @rt, align 4, !tbaa !5
  %13 = load i32, ptr @size, align 4, !tbaa !5
  store i32 %13, ptr @ff, align 16, !tbaa !5
  %14 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z11find_centerii(i32 noundef %14, i32 noundef -1)
  %15 = load i32, ptr @rt, align 4, !tbaa !5
  store i32 %15, ptr %2, align 4, !tbaa !5
  store i32 0, ptr @sum, align 4, !tbaa !5
  store i32 0, ptr @tot, align 4, !tbaa !5
  %16 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z9get_orderii(i32 noundef %16, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %17

17:                                               ; preds = %39, %1
  %18 = load i32, ptr %3, align 4, !tbaa !5
  %19 = load i32, ptr @tot, align 4, !tbaa !5
  %20 = icmp sle i32 %18, %19
  br i1 %20, label %22, label %21

21:                                               ; preds = %17
  store i32 2, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  br label %42

22:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %35, %22
  %24 = load i32, ptr %5, align 4, !tbaa !5
  %25 = load i32, ptr @sum, align 4, !tbaa !5
  %26 = icmp sle i32 %24, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %23
  store i32 5, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %38

28:                                               ; preds = %23
  %29 = load i32, ptr %3, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %30
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [50001 x double], ptr %31, i64 0, i64 %33
  store double 0.000000e+00, ptr %34, align 8, !tbaa !9
  br label %35

35:                                               ; preds = %28
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr %5, align 4, !tbaa !5
  br label %23, !llvm.loop !11

38:                                               ; preds = %27
  br label %39

39:                                               ; preds = %38
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = add nsw i32 %40, 1
  store i32 %41, ptr %3, align 4, !tbaa !5
  br label %17, !llvm.loop !13

42:                                               ; preds = %21
  store double 1.000000e+00, ptr @f, align 16, !tbaa !9
  store i32 0, ptr @sum, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %142, %42
  %44 = load i32, ptr %6, align 4, !tbaa !5
  %45 = load i32, ptr @tot, align 4, !tbaa !5
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 8, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %145

48:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [201 x i32], ptr @seq, i64 0, i64 %50
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds [201 x i32], ptr @p, i64 0, i64 %53
  %55 = load i32, ptr %54, align 4, !tbaa !5
  %56 = sitofp i32 %55 to double
  %57 = fdiv double %56, 1.000000e+02
  store double %57, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %58

58:                                               ; preds = %129, %48
  %59 = load i32, ptr %8, align 4, !tbaa !5
  %60 = load i32, ptr @sum, align 4, !tbaa !5
  %61 = icmp sle i32 %59, %60
  br i1 %61, label %63, label %62

62:                                               ; preds = %58
  store i32 11, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  br label %132

63:                                               ; preds = %58
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %85

66:                                               ; preds = %63
  %67 = load i32, ptr %6, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %68
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [50001 x double], ptr %69, i64 0, i64 %71
  %73 = load double, ptr %72, align 8, !tbaa !9
  %74 = load i32, ptr %6, align 4, !tbaa !5
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [201 x i32], ptr @nxt, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %78
  %80 = load i32, ptr %8, align 4, !tbaa !5
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [50001 x double], ptr %79, i64 0, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !9
  %84 = fadd double %83, %73
  store double %84, ptr %82, align 8, !tbaa !9
  br label %85

85:                                               ; preds = %66, %63
  %86 = load i32, ptr %6, align 4, !tbaa !5
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %87
  %89 = load i32, ptr %8, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [50001 x double], ptr %88, i64 0, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !9
  %93 = load double, ptr %7, align 8, !tbaa !9
  %94 = fsub double 1.000000e+00, %93
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %97
  %99 = load i32, ptr %8, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds [50001 x double], ptr %98, i64 0, i64 %100
  %102 = load double, ptr %101, align 8, !tbaa !9
  %103 = call double @llvm.fmuladd.f64(double %92, double %94, double %102)
  store double %103, ptr %101, align 8, !tbaa !9
  %104 = load i32, ptr %6, align 4, !tbaa !5
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %105
  %107 = load i32, ptr %8, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [50001 x double], ptr %106, i64 0, i64 %108
  %110 = load double, ptr %109, align 8, !tbaa !9
  %111 = load double, ptr %7, align 8, !tbaa !9
  %112 = load i32, ptr %6, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %114
  %116 = load i32, ptr %8, align 4, !tbaa !5
  %117 = load i32, ptr %6, align 4, !tbaa !5
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [201 x i32], ptr @seq, i64 0, i64 %118
  %120 = load i32, ptr %119, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [201 x i32], ptr @w, i64 0, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !5
  %124 = add nsw i32 %116, %123
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds [50001 x double], ptr %115, i64 0, i64 %125
  %127 = load double, ptr %126, align 8, !tbaa !9
  %128 = call double @llvm.fmuladd.f64(double %110, double %111, double %127)
  store double %128, ptr %126, align 8, !tbaa !9
  br label %129

129:                                              ; preds = %85
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %8, align 4, !tbaa !5
  br label %58, !llvm.loop !14

132:                                              ; preds = %62
  %133 = load i32, ptr %6, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [201 x i32], ptr @seq, i64 0, i64 %134
  %136 = load i32, ptr %135, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [201 x i32], ptr @w, i64 0, i64 %137
  %139 = load i32, ptr %138, align 4, !tbaa !5
  %140 = load i32, ptr @sum, align 4, !tbaa !5
  %141 = add nsw i32 %140, %139
  store i32 %141, ptr @sum, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %142

142:                                              ; preds = %132
  %143 = load i32, ptr %6, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %6, align 4, !tbaa !5
  br label %43, !llvm.loop !15

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

146:                                              ; preds = %164, %145
  %147 = load i32, ptr %9, align 4, !tbaa !5
  %148 = load i32, ptr @sum, align 4, !tbaa !5
  %149 = icmp sle i32 %147, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %146
  store i32 14, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %167

151:                                              ; preds = %146
  %152 = load i32, ptr @tot, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %153
  %155 = load i32, ptr %9, align 4, !tbaa !5
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [50001 x double], ptr %154, i64 0, i64 %156
  %158 = load double, ptr %157, align 8, !tbaa !9
  %159 = load i32, ptr %9, align 4, !tbaa !5
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds [50001 x double], ptr @s, i64 0, i64 %160
  %162 = load double, ptr %161, align 8, !tbaa !9
  %163 = fadd double %162, %158
  store double %163, ptr %161, align 8, !tbaa !9
  br label %164

164:                                              ; preds = %151
  %165 = load i32, ptr %9, align 4, !tbaa !5
  %166 = add nsw i32 %165, 1
  store i32 %166, ptr %9, align 4, !tbaa !5
  br label %146, !llvm.loop !16

167:                                              ; preds = %150
  %168 = load i32, ptr %2, align 4, !tbaa !5
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds [201 x i8], ptr @vis, i64 0, i64 %169
  store i8 1, ptr %170, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %171 = load i32, ptr %2, align 4, !tbaa !5
  %172 = sext i32 %171 to i64
  %173 = getelementptr inbounds [201 x %"class.std::vector"], ptr @e, i64 0, i64 %172
  %174 = call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %173) #5
  %175 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %10, i32 0, i32 0
  store ptr %174, ptr %175, align 8
  br label %176

176:                                              ; preds = %199, %167
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %177 = load i32, ptr %2, align 4, !tbaa !5
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [201 x %"class.std::vector"], ptr @e, i64 0, i64 %178
  %180 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %179) #5
  %181 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %180, ptr %181, align 8
  %182 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br i1 %182, label %184, label %183

183:                                              ; preds = %176
  store i32 17, ptr %4, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %201

184:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %185 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  %186 = load i32, ptr %185, align 4, !tbaa !5
  store i32 %186, ptr %12, align 4, !tbaa !5
  %187 = load i32, ptr %12, align 4, !tbaa !5
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [201 x i8], ptr @vis, i64 0, i64 %188
  %190 = load i8, ptr %189, align 1, !tbaa !17, !range !19, !noundef !20
  %191 = trunc i8 %190 to i1
  br i1 %191, label %198, label %192

192:                                              ; preds = %184
  %193 = load i32, ptr %12, align 4, !tbaa !5
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [201 x i32], ptr @sz, i64 0, i64 %194
  %196 = load i32, ptr %195, align 4, !tbaa !5
  store i32 %196, ptr @size, align 4, !tbaa !5
  %197 = load i32, ptr %12, align 4, !tbaa !5
  call void @_Z5solvei(i32 noundef %197)
  br label %198

198:                                              ; preds = %192, %184
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %199

199:                                              ; preds = %198
  %200 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br label %176, !llvm.loop !21

201:                                              ; preds = %183
  ret void
}

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!18, !18, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@w = external dso_local local_unnamed_addr global [201 x i32], align 16
@p = external dso_local local_unnamed_addr global [201 x i32], align 16
@sz = external dso_local local_unnamed_addr global [201 x i32], align 16
@size = external dso_local local_unnamed_addr global i32, align 4
@ff = external dso_local local_unnamed_addr global [201 x i32], align 16
@rt = external dso_local local_unnamed_addr global i32, align 4
@tot = external dso_local local_unnamed_addr global i32, align 4
@sum = external dso_local local_unnamed_addr global i32, align 4
@seq = external dso_local local_unnamed_addr global [201 x i32], align 16
@nxt = external dso_local local_unnamed_addr global [201 x i32], align 16
@f = external dso_local local_unnamed_addr global [201 x [50001 x double]], align 16
@s = external dso_local local_unnamed_addr global [50001 x double], align 16
@e = external dso_local global [201 x %"class.std::vector"], align 16
@vis = external dso_local local_unnamed_addr global [201 x i8], align 16

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvei(i32 noundef %0) local_unnamed_addr #0 {
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store i32 0, ptr @rt, align 4, !tbaa !5
  %4 = load i32, ptr @size, align 4, !tbaa !5
  store i32 %4, ptr @ff, align 16, !tbaa !5
  tail call void @_Z11find_centerii(i32 noundef %0, i32 noundef -1)
  %5 = load i32, ptr @rt, align 4, !tbaa !5
  store i32 0, ptr @sum, align 4, !tbaa !5
  store i32 0, ptr @tot, align 4, !tbaa !5
  tail call void @_Z9get_orderii(i32 noundef %5, i32 noundef -1)
  %6 = load i32, ptr @tot, align 4, !tbaa !5
  %.not52 = icmp slt i32 %6, 0
  br i1 %.not52, label %._crit_edge54.thread, label %.preheader48.lr.ph

._crit_edge54.thread:                             ; preds = %1
  store double 1.000000e+00, ptr @f, align 16, !tbaa !9
  store i32 0, ptr @sum, align 4, !tbaa !5
  br label %.lr.ph66

.preheader48.lr.ph:                               ; preds = %1
  %7 = load i32, ptr @sum, align 4, !tbaa !5
  %.not4750 = icmp slt i32 %7, 0
  br i1 %.not4750, label %._crit_edge54, label %.preheader48.preheader

.preheader48.preheader:                           ; preds = %.preheader48.lr.ph
  %8 = add nuw i32 %7, 1
  %9 = zext i32 %8 to i64
  %10 = shl nuw nsw i64 %9, 3
  %11 = add nuw i32 %6, 1
  %wide.trip.count = zext i32 %11 to i64
  %xtraiter = and i64 %wide.trip.count, 7
  %12 = icmp ult i32 %6, 7
  br i1 %12, label %._crit_edge54.loopexit.unr-lcssa, label %.preheader48.preheader.new

.preheader48.preheader.new:                       ; preds = %.preheader48.preheader
  %unroll_iter = and i64 %wide.trip.count, 4294967288
  br label %.preheader48

.preheader48:                                     ; preds = %.preheader48, %.preheader48.preheader.new
  %indvar = phi i64 [ 0, %.preheader48.preheader.new ], [ %indvar.next.7, %.preheader48 ]
  %niter = phi i64 [ 0, %.preheader48.preheader.new ], [ %niter.next.7, %.preheader48 ]
  %13 = mul nuw nsw i64 %indvar, 400008
  %scevgep = getelementptr i8, ptr @f, i64 %13
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %scevgep, i8 0, i64 %10, i1 false), !tbaa !9
  %14 = mul nuw i64 %indvar, 400008
  %gep = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 400008), i64 %14
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %gep, i8 0, i64 %10, i1 false), !tbaa !9
  %15 = mul nuw i64 %indvar, 400008
  %gep182 = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 800016), i64 %15
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %gep182, i8 0, i64 %10, i1 false), !tbaa !9
  %16 = mul nuw i64 %indvar, 400008
  %gep183 = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 1200024), i64 %16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %gep183, i8 0, i64 %10, i1 false), !tbaa !9
  %17 = mul nuw i64 %indvar, 400008
  %gep184 = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 1600032), i64 %17
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %gep184, i8 0, i64 %10, i1 false), !tbaa !9
  %18 = mul nuw i64 %indvar, 400008
  %gep185 = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 2000040), i64 %18
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %gep185, i8 0, i64 %10, i1 false), !tbaa !9
  %19 = mul nuw i64 %indvar, 400008
  %gep186 = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 2400048), i64 %19
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %gep186, i8 0, i64 %10, i1 false), !tbaa !9
  %20 = mul nuw i64 %indvar, 400008
  %gep187 = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 2800056), i64 %20
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %gep187, i8 0, i64 %10, i1 false), !tbaa !9
  %indvar.next.7 = add nuw nsw i64 %indvar, 8
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge54.loopexit.unr-lcssa, label %.preheader48, !llvm.loop !11

._crit_edge54.loopexit.unr-lcssa:                 ; preds = %.preheader48, %.preheader48.preheader
  %indvar.unr = phi i64 [ 0, %.preheader48.preheader ], [ %indvar.next.7, %.preheader48 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge54, label %.preheader48.epil

.preheader48.epil:                                ; preds = %._crit_edge54.loopexit.unr-lcssa, %.preheader48.epil
  %indvar.epil = phi i64 [ %indvar.next.epil, %.preheader48.epil ], [ %indvar.unr, %._crit_edge54.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.preheader48.epil ], [ 0, %._crit_edge54.loopexit.unr-lcssa ]
  %21 = mul nuw nsw i64 %indvar.epil, 400008
  %scevgep.epil = getelementptr i8, ptr @f, i64 %21
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep.epil, i8 0, i64 %10, i1 false), !tbaa !9
  %indvar.next.epil = add nuw nsw i64 %indvar.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_edge54, label %.preheader48.epil, !llvm.loop !13

._crit_edge54:                                    ; preds = %._crit_edge54.loopexit.unr-lcssa, %.preheader48.epil, %.preheader48.lr.ph
  store double 1.000000e+00, ptr @f, align 16, !tbaa !9
  store i32 0, ptr @sum, align 4, !tbaa !5
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %.lr.ph66, label %.lr.ph63.preheader

.lr.ph63.preheader:                               ; preds = %._crit_edge54
  %wide.trip.count86 = zext nneg i32 %6 to i64
  br label %.lr.ph63

.preheader:                                       ; preds = %._crit_edge58
  store i32 %86, ptr @sum, align 4, !tbaa !5
  %.not4464 = icmp slt i32 %86, 0
  br i1 %.not4464, label %._crit_edge67, label %.lr.ph66

.lr.ph66:                                         ; preds = %._crit_edge54.thread, %._crit_edge54, %.preheader
  %22 = phi i32 [ %86, %.preheader ], [ 0, %._crit_edge54 ], [ 0, %._crit_edge54.thread ]
  %23 = sext i32 %6 to i64
  %24 = add nuw i32 %22, 1
  %wide.trip.count91 = zext i32 %24 to i64
  %min.iters.check167 = icmp ult i32 %22, 3
  br i1 %min.iters.check167, label %scalar.ph166.preheader, label %vector.ph168

scalar.ph166.preheader:                           ; preds = %middle.block165, %.lr.ph66
  %indvars.iv88.ph = phi i64 [ 0, %.lr.ph66 ], [ %n.vec170, %middle.block165 ]
  br label %scalar.ph166

vector.ph168:                                     ; preds = %.lr.ph66
  %n.vec170 = and i64 %wide.trip.count91, 4294967292
  br label %vector.body172

vector.body172:                                   ; preds = %vector.body172, %vector.ph168
  %index173 = phi i64 [ 0, %vector.ph168 ], [ %index.next178, %vector.body172 ]
  %25 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %23, i64 %index173
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %wide.load174 = load <2 x double>, ptr %25, align 8, !tbaa !9
  %wide.load175 = load <2 x double>, ptr %26, align 8, !tbaa !9
  %27 = getelementptr inbounds [50001 x double], ptr @s, i64 0, i64 %index173
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %wide.load176 = load <2 x double>, ptr %27, align 16, !tbaa !9
  %wide.load177 = load <2 x double>, ptr %28, align 16, !tbaa !9
  %29 = fadd <2 x double> %wide.load174, %wide.load176
  %30 = fadd <2 x double> %wide.load175, %wide.load177
  store <2 x double> %29, ptr %27, align 16, !tbaa !9
  store <2 x double> %30, ptr %28, align 16, !tbaa !9
  %index.next178 = add nuw i64 %index173, 4
  %31 = icmp eq i64 %index.next178, %n.vec170
  br i1 %31, label %middle.block165, label %vector.body172, !llvm.loop !15

middle.block165:                                  ; preds = %vector.body172
  %cmp.n179 = icmp eq i64 %n.vec170, %wide.trip.count91
  br i1 %cmp.n179, label %._crit_edge67, label %scalar.ph166.preheader

.lr.ph63:                                         ; preds = %.lr.ph63.preheader, %._crit_edge58
  %indvars.iv83 = phi i64 [ 0, %.lr.ph63.preheader ], [ %.pre93, %._crit_edge58 ]
  %32 = phi i32 [ 0, %.lr.ph63.preheader ], [ %86, %._crit_edge58 ]
  %33 = mul nuw nsw i64 %indvars.iv83, 400008
  %gep188 = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 400008), i64 %33
  %scevgep120 = getelementptr i8, ptr @f, i64 %33
  %34 = mul nuw nsw i64 %indvars.iv83, 400008
  %gep189 = getelementptr i8, ptr getelementptr (i8, ptr @f, i64 400008), i64 %34
  %35 = getelementptr inbounds [201 x i32], ptr @seq, i64 0, i64 %indvars.iv83
  %36 = load i32, ptr %35, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [201 x i32], ptr @p, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = sitofp i32 %39 to double
  %41 = fdiv double %40, 1.000000e+02
  %.not4555 = icmp slt i32 %32, 0
  %.pre93 = add nuw nsw i64 %indvars.iv83, 1
  br i1 %.not4555, label %.lr.ph63.._crit_edge58_crit_edge, label %.lr.ph

.lr.ph63.._crit_edge58_crit_edge:                 ; preds = %.lr.ph63
  %.phi.trans.insert = getelementptr inbounds [201 x i32], ptr @w, i64 0, i64 %37
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !5
  br label %._crit_edge58

.lr.ph:                                           ; preds = %.lr.ph63
  %.not46 = icmp eq i64 %indvars.iv83, 0
  %42 = fsub double 1.000000e+00, %41
  %43 = getelementptr inbounds [201 x i32], ptr @w, i64 0, i64 %37
  %44 = load i32, ptr %43, align 4, !tbaa !5
  br i1 %.not46, label %.lr.ph.split.us.preheader, label %.lr.ph.split

.lr.ph.split.us.preheader:                        ; preds = %.lr.ph
  %45 = sext i32 %44 to i64
  %46 = add nuw i32 %32, 1
  %wide.trip.count81 = zext i32 %46 to i64
  %min.iters.check = icmp ult i32 %32, 5
  br i1 %min.iters.check, label %.lr.ph.split.us.preheader180, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph.split.us.preheader
  %47 = shl nuw nsw i64 %wide.trip.count81, 3
  %scevgep98 = getelementptr i8, ptr %gep189, i64 %47
  %48 = shl nsw i64 %45, 3
  %scevgep99 = getelementptr i8, ptr %gep189, i64 %48
  %49 = getelementptr i8, ptr %gep189, i64 %48
  %scevgep100 = getelementptr i8, ptr %49, i64 %47
  %scevgep101 = getelementptr i8, ptr @f, i64 %47
  %bound0 = icmp ult ptr %gep189, %scevgep100
  %bound1 = icmp ult ptr %scevgep99, %scevgep98
  %found.conflict = and i1 %bound0, %bound1
  %bound0102 = icmp ult ptr %gep189, %scevgep101
  %bound1103 = icmp ugt ptr %scevgep98, @f
  %found.conflict104 = and i1 %bound0102, %bound1103
  %conflict.rdx = or i1 %found.conflict, %found.conflict104
  %bound0105 = icmp ult ptr %scevgep99, %scevgep101
  %bound1106 = icmp ugt ptr %scevgep100, @f
  %found.conflict107 = and i1 %bound0105, %bound1106
  %conflict.rdx108 = or i1 %conflict.rdx, %found.conflict107
  br i1 %conflict.rdx108, label %.lr.ph.split.us.preheader180, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count81, 4294967294
  %broadcast.splatinsert = insertelement <2 x double> poison, double %42, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert111 = insertelement <2 x double> poison, double %41, i64 0
  %broadcast.splat112 = shufflevector <2 x double> %broadcast.splatinsert111, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %50 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 0, i64 %index
  %wide.load = load <2 x double>, ptr %50, align 16, !tbaa !9, !alias.scope !18
  %51 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %.pre93, i64 %index
  %wide.load109 = load <2 x double>, ptr %51, align 8, !tbaa !9, !alias.scope !21, !noalias !23
  %52 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> %broadcast.splat, <2 x double> %wide.load109)
  store <2 x double> %52, ptr %51, align 8, !tbaa !9, !alias.scope !21, !noalias !23
  %53 = add nsw i64 %index, %45
  %54 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %.pre93, i64 %53
  %wide.load110 = load <2 x double>, ptr %54, align 8, !tbaa !9, !alias.scope !25, !noalias !18
  %55 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load, <2 x double> %broadcast.splat112, <2 x double> %wide.load110)
  store <2 x double> %55, ptr %54, align 8, !tbaa !9, !alias.scope !25, !noalias !18
  %index.next = add nuw i64 %index, 2
  %56 = icmp eq i64 %index.next, %n.vec
  br i1 %56, label %middle.block, label %vector.body, !llvm.loop !26

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count81
  br i1 %cmp.n, label %._crit_edge58, label %.lr.ph.split.us.preheader180

.lr.ph.split.us.preheader180:                     ; preds = %middle.block, %vector.memcheck, %.lr.ph.split.us.preheader
  %indvars.iv78.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph.split.us.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph.split.us

.lr.ph.split.us:                                  ; preds = %.lr.ph.split.us.preheader180, %.lr.ph.split.us
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %.lr.ph.split.us ], [ %indvars.iv78.ph, %.lr.ph.split.us.preheader180 ]
  %57 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 0, i64 %indvars.iv78
  %58 = load double, ptr %57, align 8, !tbaa !9
  %59 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %.pre93, i64 %indvars.iv78
  %60 = load double, ptr %59, align 8, !tbaa !9
  %61 = tail call double @llvm.fmuladd.f64(double %58, double %42, double %60)
  store double %61, ptr %59, align 8, !tbaa !9
  %62 = add nsw i64 %indvars.iv78, %45
  %63 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %.pre93, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !9
  %65 = tail call double @llvm.fmuladd.f64(double %58, double %41, double %64)
  store double %65, ptr %63, align 8, !tbaa !9
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count81
  br i1 %exitcond82.not, label %._crit_edge58, label %.lr.ph.split.us, !llvm.loop !27

.lr.ph.split:                                     ; preds = %.lr.ph
  %66 = getelementptr inbounds [201 x i32], ptr @nxt, i64 0, i64 %indvars.iv83
  %67 = load i32, ptr %66, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = sext i32 %44 to i64
  %70 = add nuw i32 %32, 1
  %wide.trip.count76 = zext i32 %70 to i64
  %min.iters.check147 = icmp ult i32 %32, 7
  br i1 %min.iters.check147, label %scalar.ph146.preheader, label %vector.memcheck113

scalar.ph146.preheader:                           ; preds = %middle.block145, %vector.memcheck113, %.lr.ph.split
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck113 ], [ 0, %.lr.ph.split ], [ %n.vec150, %middle.block145 ]
  br label %scalar.ph146

vector.memcheck113:                               ; preds = %.lr.ph.split
  %71 = mul nsw i64 %68, 400008
  %scevgep114 = getelementptr i8, ptr @f, i64 %71
  %72 = shl nuw nsw i64 %wide.trip.count76, 3
  %73 = getelementptr i8, ptr @f, i64 %71
  %scevgep115 = getelementptr i8, ptr %73, i64 %72
  %scevgep117 = getelementptr i8, ptr %gep188, i64 %72
  %74 = shl nsw i64 %69, 3
  %scevgep118 = getelementptr i8, ptr %gep188, i64 %74
  %75 = getelementptr i8, ptr %gep188, i64 %74
  %scevgep119 = getelementptr i8, ptr %75, i64 %72
  %scevgep121 = getelementptr i8, ptr %scevgep120, i64 %72
  %bound0122 = icmp ult ptr %scevgep114, %scevgep117
  %bound1123 = icmp ult ptr %gep188, %scevgep115
  %found.conflict124 = and i1 %bound0122, %bound1123
  %bound0125 = icmp ult ptr %scevgep114, %scevgep119
  %bound1126 = icmp ult ptr %scevgep118, %scevgep115
  %found.conflict127 = and i1 %bound0125, %bound1126
  %conflict.rdx128 = or i1 %found.conflict124, %found.conflict127
  %bound0129 = icmp ult ptr %scevgep114, %scevgep121
  %bound1130 = icmp ult ptr %scevgep120, %scevgep115
  %found.conflict131 = and i1 %bound0129, %bound1130
  %conflict.rdx132 = or i1 %conflict.rdx128, %found.conflict131
  %bound0133 = icmp ult ptr %gep188, %scevgep119
  %bound1134 = icmp ult ptr %scevgep118, %scevgep117
  %found.conflict135 = and i1 %bound0133, %bound1134
  %conflict.rdx136 = or i1 %conflict.rdx132, %found.conflict135
  %bound0137 = icmp ult ptr %gep188, %scevgep121
  %bound1138 = icmp ult ptr %scevgep120, %scevgep117
  %found.conflict139 = and i1 %bound0137, %bound1138
  %conflict.rdx140 = or i1 %conflict.rdx136, %found.conflict139
  %bound0141 = icmp ult ptr %scevgep118, %scevgep121
  %bound1142 = icmp ult ptr %scevgep120, %scevgep119
  %found.conflict143 = and i1 %bound0141, %bound1142
  %conflict.rdx144 = or i1 %conflict.rdx140, %found.conflict143
  br i1 %conflict.rdx144, label %scalar.ph146.preheader, label %vector.ph148

vector.ph148:                                     ; preds = %vector.memcheck113
  %n.vec150 = and i64 %wide.trip.count76, 4294967294
  %broadcast.splatinsert158 = insertelement <2 x double> poison, double %42, i64 0
  %broadcast.splat159 = shufflevector <2 x double> %broadcast.splatinsert158, <2 x double> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert161 = insertelement <2 x double> poison, double %41, i64 0
  %broadcast.splat162 = shufflevector <2 x double> %broadcast.splatinsert161, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body152

vector.body152:                                   ; preds = %vector.body152, %vector.ph148
  %index153 = phi i64 [ 0, %vector.ph148 ], [ %index.next163, %vector.body152 ]
  %76 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %indvars.iv83, i64 %index153
  %wide.load154 = load <2 x double>, ptr %76, align 8, !tbaa !9, !alias.scope !28
  %77 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %68, i64 %index153
  %wide.load155 = load <2 x double>, ptr %77, align 8, !tbaa !9, !alias.scope !31, !noalias !33
  %78 = fadd <2 x double> %wide.load154, %wide.load155
  store <2 x double> %78, ptr %77, align 8, !tbaa !9, !alias.scope !31, !noalias !33
  %79 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %.pre93, i64 %index153
  %wide.load157 = load <2 x double>, ptr %79, align 8, !tbaa !9, !alias.scope !36, !noalias !37
  %80 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load154, <2 x double> %broadcast.splat159, <2 x double> %wide.load157)
  store <2 x double> %80, ptr %79, align 8, !tbaa !9, !alias.scope !36, !noalias !37
  %81 = add nsw i64 %index153, %69
  %82 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %.pre93, i64 %81
  %wide.load160 = load <2 x double>, ptr %82, align 8, !tbaa !9, !alias.scope !38, !noalias !28
  %83 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %wide.load154, <2 x double> %broadcast.splat162, <2 x double> %wide.load160)
  store <2 x double> %83, ptr %82, align 8, !tbaa !9, !alias.scope !38, !noalias !28
  %index.next163 = add nuw i64 %index153, 2
  %84 = icmp eq i64 %index.next163, %n.vec150
  br i1 %84, label %middle.block145, label %vector.body152, !llvm.loop !39

middle.block145:                                  ; preds = %vector.body152
  %cmp.n164 = icmp eq i64 %n.vec150, %wide.trip.count76
  br i1 %cmp.n164, label %._crit_edge58, label %scalar.ph146.preheader

._crit_edge58:                                    ; preds = %scalar.ph146, %.lr.ph.split.us, %middle.block145, %middle.block, %.lr.ph63.._crit_edge58_crit_edge
  %85 = phi i32 [ %.pre, %.lr.ph63.._crit_edge58_crit_edge ], [ %44, %middle.block ], [ %44, %middle.block145 ], [ %44, %.lr.ph.split.us ], [ %44, %scalar.ph146 ]
  %86 = add nsw i32 %85, %32
  %exitcond87.not = icmp eq i64 %.pre93, %wide.trip.count86
  br i1 %exitcond87.not, label %.preheader, label %.lr.ph63, !llvm.loop !40

scalar.ph146:                                     ; preds = %scalar.ph146.preheader, %scalar.ph146
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph146 ], [ %indvars.iv.ph, %scalar.ph146.preheader ]
  %87 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %indvars.iv83, i64 %indvars.iv
  %88 = load double, ptr %87, align 8, !tbaa !9
  %89 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %68, i64 %indvars.iv
  %90 = load double, ptr %89, align 8, !tbaa !9
  %91 = fadd double %88, %90
  store double %91, ptr %89, align 8, !tbaa !9
  %92 = load double, ptr %87, align 8, !tbaa !9
  %93 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %.pre93, i64 %indvars.iv
  %94 = load double, ptr %93, align 8, !tbaa !9
  %95 = tail call double @llvm.fmuladd.f64(double %92, double %42, double %94)
  store double %95, ptr %93, align 8, !tbaa !9
  %96 = add nsw i64 %indvars.iv, %69
  %97 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %.pre93, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !9
  %99 = tail call double @llvm.fmuladd.f64(double %92, double %41, double %98)
  store double %99, ptr %97, align 8, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond77.not = icmp eq i64 %indvars.iv.next, %wide.trip.count76
  br i1 %exitcond77.not, label %._crit_edge58, label %scalar.ph146, !llvm.loop !41

._crit_edge67:                                    ; preds = %scalar.ph166, %middle.block165, %.preheader
  %100 = sext i32 %5 to i64
  %101 = getelementptr inbounds [201 x i8], ptr @vis, i64 0, i64 %100
  store i8 1, ptr %101, align 1, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #7
  %102 = getelementptr inbounds [201 x %"class.std::vector"], ptr @e, i64 0, i64 %100
  %103 = tail call ptr @_ZNSt6vectorIiSaIiEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #7
  store ptr %103, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %104 = tail call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #7
  store ptr %104, ptr %3, align 8
  %105 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br i1 %105, label %.lr.ph69, label %._crit_edge70

scalar.ph166:                                     ; preds = %scalar.ph166.preheader, %scalar.ph166
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %scalar.ph166 ], [ %indvars.iv88.ph, %scalar.ph166.preheader ]
  %106 = getelementptr inbounds [201 x [50001 x double]], ptr @f, i64 0, i64 %23, i64 %indvars.iv88
  %107 = load double, ptr %106, align 8, !tbaa !9
  %108 = getelementptr inbounds [50001 x double], ptr @s, i64 0, i64 %indvars.iv88
  %109 = load double, ptr %108, align 8, !tbaa !9
  %110 = fadd double %107, %109
  store double %110, ptr %108, align 8, !tbaa !9
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count91
  br i1 %exitcond92.not, label %._crit_edge67, label %scalar.ph166, !llvm.loop !44

._crit_edge70:                                    ; preds = %120, %._crit_edge67
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #7
  ret void

.lr.ph69:                                         ; preds = %._crit_edge67, %120
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [201 x i8], ptr @vis, i64 0, i64 %113
  %115 = load i8, ptr %114, align 1, !tbaa !42, !range !45, !noundef !46
  %116 = trunc nuw i8 %115 to i1
  br i1 %116, label %120, label %117

117:                                              ; preds = %.lr.ph69
  %118 = getelementptr inbounds [201 x i32], ptr @sz, i64 0, i64 %113
  %119 = load i32, ptr %118, align 4, !tbaa !5
  store i32 %119, ptr @size, align 4, !tbaa !5
  call void @_Z5solvei(i32 noundef %112)
  br label %120

120:                                              ; preds = %117, %.lr.ph69
  %121 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPiSt6vectorIiSaIiEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %122 = call ptr @_ZNSt6vectorIiSaIiEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %102) #7
  store ptr %122, ptr %3, align 8
  %123 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br i1 %123, label %.lr.ph69, label %._crit_edge70, !llvm.loop !47
}

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #6

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"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, !14}
!14 = !{!"llvm.loop.unroll.disable"}
!15 = distinct !{!15, !12, !16, !17}
!16 = !{!"llvm.loop.isvectorized", i32 1}
!17 = !{!"llvm.loop.unroll.runtime.disable"}
!18 = !{!19}
!19 = distinct !{!19, !20}
!20 = distinct !{!20, !"LVerDomain"}
!21 = !{!22}
!22 = distinct !{!22, !20}
!23 = !{!24, !19}
!24 = distinct !{!24, !20}
!25 = !{!24}
!26 = distinct !{!26, !12, !16, !17}
!27 = distinct !{!27, !12, !16}
!28 = !{!29}
!29 = distinct !{!29, !30}
!30 = distinct !{!30, !"LVerDomain"}
!31 = !{!32}
!32 = distinct !{!32, !30}
!33 = !{!34, !35, !29}
!34 = distinct !{!34, !30}
!35 = distinct !{!35, !30}
!36 = !{!34}
!37 = !{!35, !29}
!38 = !{!35}
!39 = distinct !{!39, !12, !16, !17}
!40 = distinct !{!40, !12}
!41 = distinct !{!41, !12, !16}
!42 = !{!43, !43, i64 0}
!43 = !{!"bool", !7, i64 0}
!44 = distinct !{!44, !12, !17, !16}
!45 = !{i8 0, i8 2}
!46 = !{}
!47 = distinct !{!47, !12}


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