; LLVM IR from sunkafei/xcpc-algorithm-templates :: 算法/人工智能 (kmeans聚类)

; 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_ostream" = type { ptr, %"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::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::normal_distribution" = type <{ %"struct.std::normal_distribution<>::param_type", double, i8, [7 x i8] }>
%"struct.std::normal_distribution<>::param_type" = type { double, double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::array<double, 1024>, std::allocator<std::array<double, 1024>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<double, 1024>, std::allocator<std::array<double, 1024>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<double, 1024>, std::allocator<std::array<double, 1024>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<double, 1024>, std::allocator<std::array<double, 1024>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@vec = external dso_local global [50000 x [1024 x double]], align 16
@center = external dso_local global [100 x [1024 x double]], align 16
@belong = external dso_local global [50000 x i32], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca %"class.std::mersenne_twister_engine", align 8
  %3 = alloca %"class.std::normal_distribution", align 8
  %4 = alloca %"class.std::normal_distribution", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca double, align 8
  %16 = alloca i32, align 4
  %17 = alloca double, align 8
  %18 = alloca i32, align 4
  %19 = alloca [100 x i32], align 16
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 5000, ptr %2) #9
  call void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #9
  call void @_ZNSt19normal_distributionIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(25) %3, double noundef 0.000000e+00, double noundef 5.000000e-01)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #9
  call void @_ZNSt19normal_distributionIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(25) %4, double noundef 0.000000e+00, double noundef 1.000000e-01)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #9
  call void @_ZNSaISt5arrayIdLm1024EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  invoke void @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 100, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %22 unwind label %27

22:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorISt5arrayIdLm1024EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %23

23:                                               ; preds = %53, %22
  %24 = load i32, ptr %9, align 4, !tbaa !5
  %25 = icmp slt i32 %24, 100
  br i1 %25, label %31, label %26

26:                                               ; preds = %23
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %56

27:                                               ; preds = %0
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %7, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %8, align 4
  call void @_ZNSt15__new_allocatorISt5arrayIdLm1024EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #9
  br label %216

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

32:                                               ; preds = %45, %31
  %33 = load i32, ptr %11, align 4, !tbaa !5
  %34 = icmp slt i32 %33, 1024
  br i1 %34, label %36, label %35

35:                                               ; preds = %32
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %52

36:                                               ; preds = %32
  %37 = invoke noundef double @_ZNSt19normal_distributionIdEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEdRT_(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 8 dereferenceable(5000) %2)
          to label %38 unwind label %48

38:                                               ; preds = %36
  %39 = load i32, ptr %9, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = call noundef nonnull align 8 dereferenceable(8192) ptr @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %40) #9
  %42 = load i32, ptr %11, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm1024EEixEm(ptr noundef nonnull align 8 dereferenceable(8192) %41, i64 noundef %43) #9
  store double %37, ptr %44, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %38
  %46 = load i32, ptr %11, align 4, !tbaa !5
  %47 = add nsw i32 %46, 1
  store i32 %47, ptr %11, align 4, !tbaa !5
  br label %32, !llvm.loop !11

48:                                               ; preds = %36
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %7, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %215

52:                                               ; preds = %35
  br label %53

53:                                               ; preds = %52
  %54 = load i32, ptr %9, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %9, align 4, !tbaa !5
  br label %23, !llvm.loop !13

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

57:                                               ; preds = %93, %56
  %58 = load i32, ptr %12, align 4, !tbaa !5
  %59 = icmp slt i32 %58, 50000
  br i1 %59, label %61, label %60

60:                                               ; preds = %57
  store i32 8, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %96

61:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  %62 = load i32, ptr %12, align 4, !tbaa !5
  %63 = srem i32 %62, 100
  store i32 %63, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %85, %61
  %65 = load i32, ptr %14, align 4, !tbaa !5
  %66 = icmp slt i32 %65, 1024
  br i1 %66, label %68, label %67

67:                                               ; preds = %64
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %92

68:                                               ; preds = %64
  %69 = load i32, ptr %13, align 4, !tbaa !5
  %70 = sext i32 %69 to i64
  %71 = call noundef nonnull align 8 dereferenceable(8192) ptr @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %70) #9
  %72 = load i32, ptr %14, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm1024EEixEm(ptr noundef nonnull align 8 dereferenceable(8192) %71, i64 noundef %73) #9
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = invoke noundef double @_ZNSt19normal_distributionIdEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEdRT_(ptr noundef nonnull align 8 dereferenceable(25) %4, ptr noundef nonnull align 8 dereferenceable(5000) %2)
          to label %77 unwind label %88

77:                                               ; preds = %68
  %78 = fadd double %75, %76
  %79 = load i32, ptr %12, align 4, !tbaa !5
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds [50000 x [1024 x double]], ptr @vec, i64 0, i64 %80
  %82 = load i32, ptr %14, align 4, !tbaa !5
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds [1024 x double], ptr %81, i64 0, i64 %83
  store double %78, ptr %84, align 8, !tbaa !9
  br label %85

85:                                               ; preds = %77
  %86 = load i32, ptr %14, align 4, !tbaa !5
  %87 = add nsw i32 %86, 1
  store i32 %87, ptr %14, align 4, !tbaa !5
  br label %64, !llvm.loop !14

88:                                               ; preds = %68
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %7, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #9
  br label %215

92:                                               ; preds = %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %12, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %12, align 4, !tbaa !5
  br label %57, !llvm.loop !15

96:                                               ; preds = %60
  invoke void @_Z6kmeansIdLi50000ELi100ELi1024EEvRAT0__AT2__KT_iiRAT0__iRAT1__AT2__S0_ii(ptr noundef nonnull align 8 dereferenceable(409600000) @vec, i32 noundef 50000, i32 noundef 1024, ptr noundef nonnull align 4 dereferenceable(200000) @belong, ptr noundef nonnull align 8 dereferenceable(819200) @center, i32 noundef 100, i32 noundef 10)
          to label %97 unwind label %102

97:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  store double 0.000000e+00, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #9
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %158, %97
  %99 = load i32, ptr %16, align 4, !tbaa !5
  %100 = icmp slt i32 %99, 50000
  br i1 %100, label %106, label %101

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

102:                                              ; preds = %96
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %7, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %8, align 4
  br label %215

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

107:                                              ; preds = %150, %106
  %108 = load i32, ptr %18, align 4, !tbaa !5
  %109 = icmp slt i32 %108, 100
  br i1 %109, label %111, label %110

110:                                              ; preds = %107
  store i32 17, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  br label %153

111:                                              ; preds = %107
  %112 = load i32, ptr %16, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds [50000 x [1024 x double]], ptr @vec, i64 0, i64 %113
  %115 = load i32, ptr %18, align 4, !tbaa !5
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds [1024 x double], ptr %114, i64 0, i64 %116
  %118 = load double, ptr %117, align 8, !tbaa !9
  %119 = load i32, ptr %16, align 4, !tbaa !5
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds [50000 x i32], ptr @belong, i64 0, i64 %120
  %122 = load i32, ptr %121, align 4, !tbaa !5
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds [100 x [1024 x double]], ptr @center, i64 0, i64 %123
  %125 = load i32, ptr %18, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1024 x double], ptr %124, i64 0, i64 %126
  %128 = load double, ptr %127, align 8, !tbaa !9
  %129 = fsub double %118, %128
  %130 = load i32, ptr %16, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [50000 x [1024 x double]], ptr @vec, i64 0, i64 %131
  %133 = load i32, ptr %18, align 4, !tbaa !5
  %134 = sext i32 %133 to i64
  %135 = getelementptr inbounds [1024 x double], ptr %132, i64 0, i64 %134
  %136 = load double, ptr %135, align 8, !tbaa !9
  %137 = load i32, ptr %16, align 4, !tbaa !5
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [50000 x i32], ptr @belong, i64 0, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !5
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds [100 x [1024 x double]], ptr @center, i64 0, i64 %141
  %143 = load i32, ptr %18, align 4, !tbaa !5
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds [1024 x double], ptr %142, i64 0, i64 %144
  %146 = load double, ptr %145, align 8, !tbaa !9
  %147 = fsub double %136, %146
  %148 = load double, ptr %17, align 8, !tbaa !9
  %149 = call double @llvm.fmuladd.f64(double %129, double %147, double %148)
  store double %149, ptr %17, align 8, !tbaa !9
  br label %150

150:                                              ; preds = %111
  %151 = load i32, ptr %18, align 4, !tbaa !5
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %18, align 4, !tbaa !5
  br label %107, !llvm.loop !16

153:                                              ; preds = %110
  %154 = load double, ptr %17, align 8, !tbaa !9
  %155 = call double @sqrt(double noundef %154) #9
  %156 = load double, ptr %15, align 8, !tbaa !9
  %157 = fadd double %156, %155
  store double %157, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %158

158:                                              ; preds = %153
  %159 = load i32, ptr %16, align 4, !tbaa !5
  %160 = add nsw i32 %159, 1
  store i32 %160, ptr %16, align 4, !tbaa !5
  br label %98, !llvm.loop !17

161:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 400, ptr %19) #9
  call void @llvm.memset.p0.i64(ptr align 16 %19, i8 0, i64 400, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %162

162:                                              ; preds = %175, %161
  %163 = load i32, ptr %20, align 4, !tbaa !5
  %164 = icmp slt i32 %163, 50000
  br i1 %164, label %166, label %165

165:                                              ; preds = %162
  store i32 20, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  br label %178

166:                                              ; preds = %162
  %167 = load i32, ptr %20, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds [50000 x i32], ptr @belong, i64 0, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !5
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [100 x i32], ptr %19, i64 0, i64 %171
  %173 = load i32, ptr %172, align 4, !tbaa !5
  %174 = add nsw i32 %173, 1
  store i32 %174, ptr %172, align 4, !tbaa !5
  br label %175

175:                                              ; preds = %166
  %176 = load i32, ptr %20, align 4, !tbaa !5
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %20, align 4, !tbaa !5
  br label %162, !llvm.loop !18

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

179:                                              ; preds = %192, %178
  %180 = load i32, ptr %21, align 4, !tbaa !5
  %181 = icmp slt i32 %180, 100
  br i1 %181, label %183, label %182

182:                                              ; preds = %179
  store i32 23, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %199

183:                                              ; preds = %179
  %184 = load i32, ptr %21, align 4, !tbaa !5
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds [100 x i32], ptr %19, i64 0, i64 %185
  %187 = load i32, ptr %186, align 4, !tbaa !5
  %188 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %187)
          to label %189 unwind label %195

189:                                              ; preds = %183
  %190 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %188, ptr noundef @.str)
          to label %191 unwind label %195

191:                                              ; preds = %189
  br label %192

192:                                              ; preds = %191
  %193 = load i32, ptr %21, align 4, !tbaa !5
  %194 = add nsw i32 %193, 1
  store i32 %194, ptr %21, align 4, !tbaa !5
  br label %179, !llvm.loop !19

195:                                              ; preds = %189, %183
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %7, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #9
  br label %214

199:                                              ; preds = %182
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %201 unwind label %210

201:                                              ; preds = %199
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %200, ptr noundef @.str.1)
          to label %203 unwind label %210

203:                                              ; preds = %201
  %204 = load double, ptr %15, align 8, !tbaa !9
  %205 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %202, double noundef %204)
          to label %206 unwind label %210

206:                                              ; preds = %203
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %205, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %208 unwind label %210

208:                                              ; preds = %206
  store i32 0, ptr %1, align 4
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 400, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr %2) #9
  %209 = load i32, ptr %1, align 4
  ret i32 %209

210:                                              ; preds = %206, %203, %201, %199
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %7, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %8, align 4
  br label %214

214:                                              ; preds = %210, %195
  call void @llvm.lifetime.end.p0(i64 400, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %215

215:                                              ; preds = %214, %102, %88, %48
  call void @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  br label %216

216:                                              ; preds = %215, %27
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr %2) #9
  br label %217

217:                                              ; preds = %216
  %218 = load ptr, ptr %7, align 8
  %219 = load i32, ptr %8, align 4
  %220 = insertvalue { ptr, i32 } poison, ptr %218, 0
  %221 = insertvalue { ptr, i32 } %220, i32 %219, 1
  resume { ptr, i32 } %221
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Ev(ptr noundef nonnull align 8 dereferenceable(5000)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt19normal_distributionIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(25), double noundef, double noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaISt5arrayIdLm1024EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZNSt19normal_distributionIdEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEdRT_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(5000)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8192) ptr @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm1024EEixEm(ptr noundef nonnull align 8 dereferenceable(8192), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z6kmeansIdLi50000ELi100ELi1024EEvRAT0__AT2__KT_iiRAT0__iRAT1__AT2__S0_ii(ptr noundef nonnull align 8 dereferenceable(409600000), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(200000), ptr noundef nonnull align 8 dereferenceable(819200), i32 noundef, i32 noundef) #4

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #6

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #8

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt5arrayIdLm1024EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

attributes #0 = { mustprogress norecurse uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { "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 #9 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!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_ostream" = type { ptr, %"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::mersenne_twister_engine" = type { [624 x i64], i64 }
%"class.std::normal_distribution" = type <{ %"struct.std::normal_distribution<>::param_type", double, i8, [7 x i8] }>
%"struct.std::normal_distribution<>::param_type" = type { double, double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::array<double, 1024>, std::allocator<std::array<double, 1024>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::array<double, 1024>, std::allocator<std::array<double, 1024>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::array<double, 1024>, std::allocator<std::array<double, 1024>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::array<double, 1024>, std::allocator<std::array<double, 1024>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@vec = external dso_local global [50000 x [1024 x double]], align 16
@center = external dso_local global [100 x [1024 x double]], align 16
@belong = external dso_local global [50000 x i32], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::mersenne_twister_engine", align 8
  %2 = alloca %"class.std::normal_distribution", align 8
  %3 = alloca %"class.std::normal_distribution", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca [100 x i32], align 16
  call void @llvm.lifetime.start.p0(i64 5000, ptr nonnull %1) #9
  call void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Ev(ptr noundef nonnull align 8 dereferenceable(5000) %1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #9
  call void @_ZNSt19normal_distributionIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(25) %2, double noundef 0.000000e+00, double noundef 5.000000e-01)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #9
  call void @_ZNSt19normal_distributionIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(25) %3, double noundef 0.000000e+00, double noundef 1.000000e-01)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #9
  call void @_ZNSaISt5arrayIdLm1024EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  invoke void @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 100, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %7 unwind label %8

7:                                                ; preds = %0
  call void @_ZNSt15__new_allocatorISt5arrayIdLm1024EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  br label %.preheader59

.preheader59:                                     ; preds = %7, %10
  %indvars.iv72 = phi i64 [ 0, %7 ], [ %indvars.iv.next73, %10 ]
  br label %11

8:                                                ; preds = %0
  %9 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt5arrayIdLm1024EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #9
  br label %100

10:                                               ; preds = %13
  %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next73, 100
  br i1 %exitcond75.not, label %.preheader58, label %.preheader59, !llvm.loop !5

11:                                               ; preds = %.preheader59, %13
  %indvars.iv = phi i64 [ 0, %.preheader59 ], [ %indvars.iv.next, %13 ]
  %12 = invoke noundef double @_ZNSt19normal_distributionIdEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEdRT_(ptr noundef nonnull align 8 dereferenceable(25) %2, ptr noundef nonnull align 8 dereferenceable(5000) %1)
          to label %13 unwind label %16

13:                                               ; preds = %11
  %14 = call noundef nonnull align 8 dereferenceable(8192) ptr @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %indvars.iv72) #9
  %15 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm1024EEixEm(ptr noundef nonnull align 8 dereferenceable(8192) %14, i64 noundef %indvars.iv) #9
  store double %12, ptr %15, align 8, !tbaa !7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1024
  br i1 %exitcond.not, label %10, label %11, !llvm.loop !11

16:                                               ; preds = %11
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %99

18:                                               ; preds = %21
  invoke void @_Z6kmeansIdLi50000ELi100ELi1024EEvRAT0__AT2__KT_iiRAT0__iRAT1__AT2__S0_ii(ptr noundef nonnull align 8 dereferenceable(409600000) @vec, i32 noundef 50000, i32 noundef 1024, ptr noundef nonnull align 4 dereferenceable(200000) @belong, ptr noundef nonnull align 8 dereferenceable(819200) @center, i32 noundef 100, i32 noundef 10)
          to label %.preheader56 unwind label %36

.preheader58:                                     ; preds = %10, %21
  %indvars.iv80 = phi i64 [ %indvars.iv.next81, %21 ], [ 0, %10 ]
  %.lhs.trunc = trunc i64 %indvars.iv80 to i16
  %19 = urem i16 %.lhs.trunc, 100
  %20 = zext nneg i16 %19 to i64
  br label %22

21:                                               ; preds = %27
  %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1
  %exitcond83.not = icmp eq i64 %indvars.iv.next81, 50000
  br i1 %exitcond83.not, label %18, label %.preheader58, !llvm.loop !12

22:                                               ; preds = %.preheader58, %27
  %indvars.iv76 = phi i64 [ 0, %.preheader58 ], [ %indvars.iv.next77, %27 ]
  %23 = call noundef nonnull align 8 dereferenceable(8192) ptr @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %20) #9
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm1024EEixEm(ptr noundef nonnull align 8 dereferenceable(8192) %23, i64 noundef %indvars.iv76) #9
  %25 = load double, ptr %24, align 8, !tbaa !7
  %26 = invoke noundef double @_ZNSt19normal_distributionIdEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEdRT_(ptr noundef nonnull align 8 dereferenceable(25) %3, ptr noundef nonnull align 8 dereferenceable(5000) %1)
          to label %27 unwind label %30

27:                                               ; preds = %22
  %28 = fadd double %25, %26
  %29 = getelementptr inbounds [50000 x [1024 x double]], ptr @vec, i64 0, i64 %indvars.iv80, i64 %indvars.iv76
  store double %28, ptr %29, align 8, !tbaa !7
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond79.not = icmp eq i64 %indvars.iv.next77, 1024
  br i1 %exitcond79.not, label %21, label %22, !llvm.loop !13

30:                                               ; preds = %22
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %99

.preheader56:                                     ; preds = %18, %38
  %indvars.iv88 = phi i64 [ %indvars.iv.next89, %38 ], [ 0, %18 ]
  %.04366 = phi double [ %40, %38 ], [ 0.000000e+00, %18 ]
  %32 = getelementptr inbounds [50000 x i32], ptr @belong, i64 0, i64 %indvars.iv88
  %33 = load i32, ptr %32, align 4, !tbaa !14
  %34 = sext i32 %33 to i64
  br label %41

35:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %6) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %6, i8 0, i64 400, i1 false)
  br label %54

36:                                               ; preds = %18
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %99

38:                                               ; preds = %41
  %39 = call double @sqrt(double noundef %53) #9
  %40 = fadd double %.04366, %39
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond91.not = icmp eq i64 %indvars.iv.next89, 50000
  br i1 %exitcond91.not, label %35, label %.preheader56, !llvm.loop !16

41:                                               ; preds = %41, %.preheader56
  %indvars.iv84 = phi i64 [ 0, %.preheader56 ], [ %indvars.iv.next85.1, %41 ]
  %.04164 = phi double [ 0.000000e+00, %.preheader56 ], [ %53, %41 ]
  %42 = getelementptr inbounds [50000 x [1024 x double]], ptr @vec, i64 0, i64 %indvars.iv88, i64 %indvars.iv84
  %43 = load double, ptr %42, align 16, !tbaa !7
  %44 = getelementptr inbounds [100 x [1024 x double]], ptr @center, i64 0, i64 %34, i64 %indvars.iv84
  %45 = load double, ptr %44, align 16, !tbaa !7
  %46 = fsub double %43, %45
  %47 = call double @llvm.fmuladd.f64(double %46, double %46, double %.04164)
  %indvars.iv.next85 = or disjoint i64 %indvars.iv84, 1
  %48 = getelementptr inbounds [50000 x [1024 x double]], ptr @vec, i64 0, i64 %indvars.iv88, i64 %indvars.iv.next85
  %49 = load double, ptr %48, align 8, !tbaa !7
  %50 = getelementptr inbounds [100 x [1024 x double]], ptr @center, i64 0, i64 %34, i64 %indvars.iv.next85
  %51 = load double, ptr %50, align 8, !tbaa !7
  %52 = fsub double %49, %51
  %53 = call double @llvm.fmuladd.f64(double %52, double %52, double %47)
  %indvars.iv.next85.1 = add nuw nsw i64 %indvars.iv84, 2
  %exitcond87.not.1 = icmp eq i64 %indvars.iv.next85.1, 100
  br i1 %exitcond87.not.1, label %38, label %41, !llvm.loop !17

54:                                               ; preds = %54, %35
  %indvars.iv92 = phi i64 [ 0, %35 ], [ %indvars.iv.next93.3, %54 ]
  %55 = getelementptr inbounds [50000 x i32], ptr @belong, i64 0, i64 %indvars.iv92
  %56 = load i32, ptr %55, align 16, !tbaa !14
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [100 x i32], ptr %6, i64 0, i64 %57
  %59 = load i32, ptr %58, align 4, !tbaa !14
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %58, align 4, !tbaa !14
  %indvars.iv.next93 = or disjoint i64 %indvars.iv92, 1
  %61 = getelementptr inbounds [50000 x i32], ptr @belong, i64 0, i64 %indvars.iv.next93
  %62 = load i32, ptr %61, align 4, !tbaa !14
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [100 x i32], ptr %6, i64 0, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !14
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr %64, align 4, !tbaa !14
  %indvars.iv.next93.1 = or disjoint i64 %indvars.iv92, 2
  %67 = getelementptr inbounds [50000 x i32], ptr @belong, i64 0, i64 %indvars.iv.next93.1
  %68 = load i32, ptr %67, align 8, !tbaa !14
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds [100 x i32], ptr %6, i64 0, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !14
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %70, align 4, !tbaa !14
  %indvars.iv.next93.2 = or disjoint i64 %indvars.iv92, 3
  %73 = getelementptr inbounds [50000 x i32], ptr @belong, i64 0, i64 %indvars.iv.next93.2
  %74 = load i32, ptr %73, align 4, !tbaa !14
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds [100 x i32], ptr %6, i64 0, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !14
  %78 = add nsw i32 %77, 1
  store i32 %78, ptr %76, align 4, !tbaa !14
  %indvars.iv.next93.3 = add nuw nsw i64 %indvars.iv92, 4
  %exitcond95.not.3 = icmp eq i64 %indvars.iv.next93.3, 50000
  br i1 %exitcond95.not.3, label %.preheader, label %54, !llvm.loop !18

79:                                               ; preds = %86
  %80 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %89 unwind label %96

.preheader:                                       ; preds = %54, %86
  %indvars.iv96 = phi i64 [ %indvars.iv.next97, %86 ], [ 0, %54 ]
  %81 = getelementptr inbounds [100 x i32], ptr %6, i64 0, i64 %indvars.iv96
  %82 = load i32, ptr %81, align 4, !tbaa !14
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %82)
          to label %84 unwind label %87

84:                                               ; preds = %.preheader
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull @.str)
          to label %86 unwind label %87

86:                                               ; preds = %84
  %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1
  %exitcond99.not = icmp eq i64 %indvars.iv.next97, 100
  br i1 %exitcond99.not, label %79, label %.preheader, !llvm.loop !19

87:                                               ; preds = %84, %.preheader
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %98

89:                                               ; preds = %79
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %80, ptr noundef nonnull @.str.1)
          to label %91 unwind label %96

91:                                               ; preds = %89
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %90, double noundef %40)
          to label %93 unwind label %96

93:                                               ; preds = %91
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %95 unwind label %96

95:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %6) #9
  call void @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %1) #9
  ret i32 0

96:                                               ; preds = %93, %91, %89, %79
  %97 = landingpad { ptr, i32 }
          cleanup
  br label %98

98:                                               ; preds = %96, %87
  %.pn = phi { ptr, i32 } [ %88, %87 ], [ %97, %96 ]
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %6) #9
  br label %99

99:                                               ; preds = %98, %36, %30, %16
  %.pn53 = phi { ptr, i32 } [ %17, %16 ], [ %31, %30 ], [ %.pn, %98 ], [ %37, %36 ]
  call void @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #9
  br label %100

100:                                              ; preds = %99, %8
  %.pn53.pn = phi { ptr, i32 } [ %.pn53, %99 ], [ %9, %8 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #9
  call void @llvm.lifetime.end.p0(i64 5000, ptr nonnull %1) #9
  resume { ptr, i32 } %.pn53.pn
}

; 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 uwtable
declare dso_local void @_ZNSt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEC2Ev(ptr noundef nonnull align 8 dereferenceable(5000)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt19normal_distributionIdEC2Edd(ptr noundef nonnull align 8 dereferenceable(25), double noundef, double noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaISt5arrayIdLm1024EEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; 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 uwtable
declare dso_local noundef double @_ZNSt19normal_distributionIdEclISt23mersenne_twister_engineImLm32ELm624ELm397ELm31ELm2567483615ELm11ELm4294967295ELm7ELm2636928640ELm15ELm4022730752ELm18ELm1812433253EEEEdRT_(ptr noundef nonnull align 8 dereferenceable(25), ptr noundef nonnull align 8 dereferenceable(5000)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8192) ptr @_ZNSt6vectorISt5arrayIdLm1024EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt5arrayIdLm1024EEixEm(ptr noundef nonnull align 8 dereferenceable(8192), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z6kmeansIdLi50000ELi100ELi1024EEvRAT0__AT2__KT_iiRAT0__iRAT1__AT2__S0_ii(ptr noundef nonnull align 8 dereferenceable(409600000), i32 noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(200000), ptr noundef nonnull align 8 dereferenceable(819200), i32 noundef, i32 noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #6

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #8

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt5arrayIdLm1024EEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass