; LLVM IR from TheAlgorithms/C-Plus-Plus :: machine_learning (kohonen_som_topology)

; 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::_Expr" = type { %"struct.std::__detail::_BinClos" }
%"struct.std::__detail::_BinClos" = type { %"class.std::__detail::_BinBase" }
%"class.std::__detail::_BinBase" = type { ptr, ptr }
%"class.std::_Expr.7" = type { %"struct.std::__detail::_BinClos.8" }
%"struct.std::__detail::_BinClos.8" = type { %"class.std::__detail::_BinBase.9" }
%"class.std::__detail::_BinBase.9" = type { %"struct.std::__detail::_BinClos", %"struct.std::__detail::_BinClos" }
%"class.std::_Expr.10" = type { %"struct.std::__detail::_BinClos.11" }
%"struct.std::__detail::_BinClos.11" = type { %"class.std::__detail::_BinBase2.12" }
%"class.std::__detail::_BinBase2.12" = type { %"struct.std::__detail::_BinClos.13", double }
%"struct.std::__detail::_BinClos.13" = type { %"class.std::__detail::_BinBase2.14" }
%"class.std::__detail::_BinBase2.14" = type { %"struct.std::__detail::_BinClos", double }
%"class.std::_Expr.15" = type { %"struct.std::__detail::_BinClos.13" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<std::valarray<double>>, std::allocator<std::vector<std::valarray<double>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::valarray<double>>, std::allocator<std::vector<std::valarray<double>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::valarray<double>>, std::allocator<std::vector<std::valarray<double>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::valarray<double>>, std::allocator<std::vector<std::valarray<double>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, ptr } @_ZStmiIdESt5_ExprINSt8__detail8_BinClosISt7__minusSt9_ValArrayS4_T_S5_EENSt5__funIS3_S5_E11result_typeEERKSt8valarrayIS5_ESE_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN16machine_learning14update_weightsERKSt8valarrayIdEPSt6vectorIS4_IS1_SaIS1_EESaIS6_EEPS6_di(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1, ptr noundef %2, double noundef %3, i32 noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca double, align 8
  %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 %"class.std::_Expr", align 8
  %17 = alloca %"class.std::_Expr.7", align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca %"class.std::_Expr.10", align 8
  %33 = alloca %"class.std::_Expr.15", align 8
  %34 = alloca %"class.std::_Expr", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store double %3, ptr %9, align 8, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = call noundef i64 @_ZNKSt6vectorIS_ISt8valarrayIdESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #6
  %37 = trunc i64 %36 to i32
  store i32 %37, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.std::vector.0", ptr %38, i64 0
  %40 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt8valarrayIdESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %39, i64 noundef 0) #6
  %41 = call noundef i64 @_ZNKSt6vectorISt8valarrayIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #6
  %42 = trunc i64 %41 to i32
  store i32 %42, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store double 0.000000e+00, ptr %15, align 8, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !11
  br label %43

43:                                               ; preds = %103, %5
  %44 = load i32, ptr %11, align 4, !tbaa !11
  %45 = load i32, ptr %13, align 4, !tbaa !11
  %46 = icmp slt i32 %44, %45
  br i1 %46, label %47, label %106

47:                                               ; preds = %43
  store i32 0, ptr %12, align 4, !tbaa !11
  br label %48

48:                                               ; preds = %99, %47
  %49 = load i32, ptr %12, align 4, !tbaa !11
  %50 = load i32, ptr %14, align 4, !tbaa !11
  %51 = icmp slt i32 %49, %50
  br i1 %51, label %52, label %102

52:                                               ; preds = %48
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = load i32, ptr %11, align 4, !tbaa !11
  %55 = sext i32 %54 to i64
  %56 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %55) #6
  %57 = load i32, ptr %12, align 4, !tbaa !11
  %58 = sext i32 %57 to i64
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %56, i64 noundef %58) #6
  store double 0.000000e+00, ptr %59, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %60 = load ptr, ptr %7, align 8, !tbaa !5
  %61 = load i32, ptr %11, align 4, !tbaa !11
  %62 = sext i32 %61 to i64
  %63 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt8valarrayIdESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %60, i64 noundef %62) #6
  %64 = load i32, ptr %12, align 4, !tbaa !11
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %65) #6
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = call { ptr, ptr } @_ZStmiIdESt5_ExprINSt8__detail8_BinClosISt7__minusSt9_ValArrayS4_T_S5_EENSt5__funIS3_S5_E11result_typeEERKSt8valarrayIS5_ESE_(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 8 dereferenceable(16) %67)
  %69 = getelementptr inbounds %"class.std::_Expr", ptr %16, i32 0, i32 0
  %70 = getelementptr inbounds %"struct.std::__detail::_BinClos", ptr %69, i32 0, i32 0
  %71 = getelementptr inbounds { ptr, ptr }, ptr %70, i32 0, i32 0
  %72 = extractvalue { ptr, ptr } %68, 0
  store ptr %72, ptr %71, align 8
  %73 = getelementptr inbounds { ptr, ptr }, ptr %70, i32 0, i32 1
  %74 = extractvalue { ptr, ptr } %68, 1
  store ptr %74, ptr %73, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #6
  call void @_ZStmlINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEES4_ESt5_ExprINS1_ISt12__multipliesS5_S5_T_T0_EENSt5__funIS6_NS7_10value_typeEE11result_typeEERKS5_IS7_SB_ERKS5_IS8_NS8_10value_typeEE(ptr dead_on_unwind writable sret(%"class.std::_Expr.7") align 8 %17, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %16)
  %75 = call noundef double @_ZNKSt5_ExprINSt8__detail8_BinClosISt12__multipliesS_S_NS1_ISt7__minusSt9_ValArrayS4_ddEES5_EEdE3sumEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = load i32, ptr %11, align 4, !tbaa !11
  %78 = sext i32 %77 to i64
  %79 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %78) #6
  %80 = load i32, ptr %12, align 4, !tbaa !11
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %79, i64 noundef %81) #6
  store double %75, ptr %82, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #6
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = load i32, ptr %11, align 4, !tbaa !11
  %85 = sext i32 %84 to i64
  %86 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %85) #6
  %87 = load i32, ptr %12, align 4, !tbaa !11
  %88 = sext i32 %87 to i64
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %86, i64 noundef %88) #6
  %90 = load double, ptr %89, align 8, !tbaa !9
  %91 = call double @sqrt(double noundef %90) #6
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = load i32, ptr %11, align 4, !tbaa !11
  %94 = sext i32 %93 to i64
  %95 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %94) #6
  %96 = load i32, ptr %12, align 4, !tbaa !11
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %95, i64 noundef %97) #6
  store double %91, ptr %98, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  br label %99

99:                                               ; preds = %52
  %100 = load i32, ptr %12, align 4, !tbaa !11
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %12, align 4, !tbaa !11
  br label %48, !llvm.loop !13

102:                                              ; preds = %48
  br label %103

103:                                              ; preds = %102
  %104 = load i32, ptr %11, align 4, !tbaa !11
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %11, align 4, !tbaa !11
  br label %43, !llvm.loop !15

106:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !11
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_Z10get_min_2dRKSt6vectorISt8valarrayIdESaIS1_EEPdPiS7_(ptr noundef nonnull align 8 dereferenceable(24) %107, ptr noundef %15, ptr noundef %18, ptr noundef %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %108 = load i32, ptr %18, align 4, !tbaa !11
  %109 = load i32, ptr %10, align 4, !tbaa !11
  %110 = sub nsw i32 %108, %109
  store i32 %110, ptr %22, align 4, !tbaa !11
  %111 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %21, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %112 = load i32, ptr %111, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  store i32 %112, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %113 = load i32, ptr %18, align 4, !tbaa !11
  %114 = load i32, ptr %10, align 4, !tbaa !11
  %115 = add nsw i32 %113, %114
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %24, align 4, !tbaa !11
  %117 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %118 = load i32, ptr %117, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  store i32 %118, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  store i32 0, ptr %26, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %119 = load i32, ptr %19, align 4, !tbaa !11
  %120 = load i32, ptr %10, align 4, !tbaa !11
  %121 = sub nsw i32 %119, %120
  store i32 %121, ptr %27, align 4, !tbaa !11
  %122 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %26, ptr noundef nonnull align 4 dereferenceable(4) %27)
  %123 = load i32, ptr %122, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  store i32 %123, ptr %25, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  %124 = load i32, ptr %19, align 4, !tbaa !11
  %125 = load i32, ptr %10, align 4, !tbaa !11
  %126 = add nsw i32 %124, %125
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %29, align 4, !tbaa !11
  %128 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %29)
  %129 = load i32, ptr %128, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  store i32 %129, ptr %28, align 4, !tbaa !11
  %130 = load i32, ptr %20, align 4, !tbaa !11
  store i32 %130, ptr %11, align 4, !tbaa !11
  br label %131

131:                                              ; preds = %193, %106
  %132 = load i32, ptr %11, align 4, !tbaa !11
  %133 = load i32, ptr %23, align 4, !tbaa !11
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %135, label %196

135:                                              ; preds = %131
  %136 = load i32, ptr %25, align 4, !tbaa !11
  store i32 %136, ptr %12, align 4, !tbaa !11
  br label %137

137:                                              ; preds = %189, %135
  %138 = load i32, ptr %12, align 4, !tbaa !11
  %139 = load i32, ptr %28, align 4, !tbaa !11
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %141, label %192

141:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #6
  %142 = load i32, ptr %18, align 4, !tbaa !11
  %143 = load i32, ptr %11, align 4, !tbaa !11
  %144 = sub nsw i32 %142, %143
  %145 = load i32, ptr %18, align 4, !tbaa !11
  %146 = load i32, ptr %11, align 4, !tbaa !11
  %147 = sub nsw i32 %145, %146
  %148 = mul nsw i32 %144, %147
  %149 = load i32, ptr %19, align 4, !tbaa !11
  %150 = load i32, ptr %12, align 4, !tbaa !11
  %151 = sub nsw i32 %149, %150
  %152 = load i32, ptr %19, align 4, !tbaa !11
  %153 = load i32, ptr %12, align 4, !tbaa !11
  %154 = sub nsw i32 %152, %153
  %155 = mul nsw i32 %151, %154
  %156 = add nsw i32 %148, %155
  %157 = sitofp i32 %156 to double
  store double %157, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #6
  %158 = load double, ptr %30, align 8, !tbaa !9
  %159 = fneg double %158
  %160 = load double, ptr %9, align 8, !tbaa !9
  %161 = fmul double 2.000000e+00, %160
  %162 = load double, ptr %9, align 8, !tbaa !9
  %163 = fmul double %161, %162
  %164 = fdiv double %159, %163
  %165 = call double @exp(double noundef %164) #6
  store double %165, ptr %31, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %33) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #6
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = load ptr, ptr %7, align 8, !tbaa !5
  %168 = load i32, ptr %11, align 4, !tbaa !11
  %169 = sext i32 %168 to i64
  %170 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt8valarrayIdESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef %169) #6
  %171 = load i32, ptr %12, align 4, !tbaa !11
  %172 = sext i32 %171 to i64
  %173 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %170, i64 noundef %172) #6
  %174 = call { ptr, ptr } @_ZStmiIdESt5_ExprINSt8__detail8_BinClosISt7__minusSt9_ValArrayS4_T_S5_EENSt5__funIS3_S5_E11result_typeEERKSt8valarrayIS5_ESE_(ptr noundef nonnull align 8 dereferenceable(16) %166, ptr noundef nonnull align 8 dereferenceable(16) %173)
  %175 = getelementptr inbounds %"class.std::_Expr", ptr %34, i32 0, i32 0
  %176 = getelementptr inbounds %"struct.std::__detail::_BinClos", ptr %175, i32 0, i32 0
  %177 = getelementptr inbounds { ptr, ptr }, ptr %176, i32 0, i32 0
  %178 = extractvalue { ptr, ptr } %174, 0
  store ptr %178, ptr %177, align 8
  %179 = getelementptr inbounds { ptr, ptr }, ptr %176, i32 0, i32 1
  %180 = extractvalue { ptr, ptr } %174, 1
  store ptr %180, ptr %179, align 8
  call void @_ZStmlINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEEESt5_ExprINS1_ISt12__multipliesS5_St9_ConstantT_NS8_10value_typeEEENSt5__funIS6_S9_E11result_typeEERKS5_IS8_S9_ERKS9_(ptr dead_on_unwind writable sret(%"class.std::_Expr.15") align 8 %33, ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @_ZStmlINSt8__detail8_BinClosISt12__multipliesSt5_ExprSt9_ConstantNS1_ISt7__minusSt9_ValArrayS6_ddEEdEEES3_INS1_IS2_S3_S4_T_NS9_10value_typeEEENSt5__funIS2_SA_E11result_typeEERKS3_IS9_SA_ERKSA_(ptr dead_on_unwind writable sret(%"class.std::_Expr.10") align 8 %32, ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 8 dereferenceable(8) %31)
  %181 = load ptr, ptr %7, align 8, !tbaa !5
  %182 = load i32, ptr %11, align 4, !tbaa !11
  %183 = sext i32 %182 to i64
  %184 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt8valarrayIdESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef %183) #6
  %185 = load i32, ptr %12, align 4, !tbaa !11
  %186 = sext i32 %185 to i64
  %187 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %184, i64 noundef %186) #6
  %188 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEpLINSt8__detail8_BinClosISt12__multipliesSt5_ExprSt9_ConstantNS3_IS4_S5_S6_NS3_ISt7__minusSt9_ValArrayS8_ddEEdEEdEEEERS0_RKS5_IT_dE(ptr noundef nonnull align 8 dereferenceable(16) %187, ptr noundef nonnull align 8 dereferenceable(32) %32)
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #6
  br label %189

189:                                              ; preds = %141
  %190 = load i32, ptr %12, align 4, !tbaa !11
  %191 = add nsw i32 %190, 1
  store i32 %191, ptr %12, align 4, !tbaa !11
  br label %137, !llvm.loop !16

192:                                              ; preds = %137
  br label %193

193:                                              ; preds = %192
  %194 = load i32, ptr %11, align 4, !tbaa !11
  %195 = add nsw i32 %194, 1
  store i32 %195, ptr %11, align 4, !tbaa !11
  br label %131, !llvm.loop !17

196:                                              ; preds = %131
  %197 = load double, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  ret double %197
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStmlINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEES4_ESt5_ExprINS1_ISt12__multipliesS5_S5_T_T0_EENSt5__funIS6_NS7_10value_typeEE11result_typeEERKS5_IS7_SB_ERKS5_IS8_NS8_10value_typeEE(ptr dead_on_unwind noalias writable sret(%"class.std::_Expr.7") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNKSt5_ExprINSt8__detail8_BinClosISt12__multipliesS_S_NS1_ISt7__minusSt9_ValArrayS4_ddEES5_EEdE3sumEv(ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

; Function Attrs: nounwind
declare double @exp(double noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStmlINSt8__detail8_BinClosISt12__multipliesSt5_ExprSt9_ConstantNS1_ISt7__minusSt9_ValArrayS6_ddEEdEEES3_INS1_IS2_S3_S4_T_NS9_10value_typeEEENSt5__funIS2_SA_E11result_typeEERKS3_IS9_SA_ERKSA_(ptr dead_on_unwind noalias writable sret(%"class.std::_Expr.10") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStmlINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEEESt5_ExprINS1_ISt12__multipliesS5_St9_ConstantT_NS8_10value_typeEEENSt5__funIS6_S9_E11result_typeEERKS5_IS8_S9_ERKS9_(ptr dead_on_unwind noalias writable sret(%"class.std::_Expr.15") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEpLINSt8__detail8_BinClosISt12__multipliesSt5_ExprSt9_ConstantNS3_IS4_S5_S6_NS3_ISt7__minusSt9_ValArrayS8_ddEEdEEdEEEERS0_RKS5_IT_dE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { 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 = { 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 #6 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


; 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::_Expr" = type { %"struct.std::__detail::_BinClos" }
%"struct.std::__detail::_BinClos" = type { %"class.std::__detail::_BinBase" }
%"class.std::__detail::_BinBase" = type { ptr, ptr }
%"class.std::_Expr.7" = type { %"struct.std::__detail::_BinClos.8" }
%"struct.std::__detail::_BinClos.8" = type { %"class.std::__detail::_BinBase.9" }
%"class.std::__detail::_BinBase.9" = type { %"struct.std::__detail::_BinClos", %"struct.std::__detail::_BinClos" }
%"class.std::_Expr.10" = type { %"struct.std::__detail::_BinClos.11" }
%"struct.std::__detail::_BinClos.11" = type { %"class.std::__detail::_BinBase2.12" }
%"class.std::__detail::_BinBase2.12" = type { %"struct.std::__detail::_BinClos.13", double }
%"struct.std::__detail::_BinClos.13" = type { %"class.std::__detail::_BinBase2.14" }
%"class.std::__detail::_BinBase2.14" = type { %"struct.std::__detail::_BinClos", double }
%"class.std::_Expr.15" = type { %"struct.std::__detail::_BinClos.13" }

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { ptr, ptr } @_ZStmiIdESt5_ExprINSt8__detail8_BinClosISt7__minusSt9_ValArrayS4_T_S5_EENSt5__funIS3_S5_E11result_typeEERKSt8valarrayIS5_ESE_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN16machine_learning14update_weightsERKSt8valarrayIdEPSt6vectorIS4_IS1_SaIS1_EESaIS6_EEPS6_di(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull %1, ptr noundef %2, double noundef %3, i32 noundef %4) local_unnamed_addr #2 {
  %6 = alloca double, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca double, align 8
  %10 = alloca %"class.std::_Expr", align 8
  %11 = alloca %"class.std::_Expr.7", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca double, align 8
  %21 = alloca %"class.std::_Expr.10", align 8
  %22 = alloca %"class.std::_Expr.15", align 8
  %23 = alloca %"class.std::_Expr", align 8
  store double %3, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %24 = tail call noundef i64 @_ZNKSt6vectorIS_ISt8valarrayIdESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  %25 = trunc i64 %24 to i32
  store i32 %25, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %26 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt8valarrayIdESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %27 = tail call noundef i64 @_ZNKSt6vectorISt8valarrayIdESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  store double 0.000000e+00, ptr %9, align 8, !tbaa !5
  %29 = icmp sgt i32 %25, 0
  br i1 %29, label %.preheader48.lr.ph, label %._crit_edge51

.preheader48.lr.ph:                               ; preds = %5
  %30 = getelementptr inbounds i8, ptr %10, i64 8
  %31 = icmp sgt i32 %28, 0
  br i1 %31, label %.preheader48.preheader, label %._crit_edge51

.preheader48.preheader:                           ; preds = %.preheader48.lr.ph
  %32 = and i64 %27, 2147483647
  %33 = and i64 %24, 2147483647
  br label %.lr.ph

.lr.ph:                                           ; preds = %._crit_edge, %.preheader48.preheader
  %indvars.iv60 = phi i64 [ 0, %.preheader48.preheader ], [ %indvars.iv.next61, %._crit_edge ]
  br label %34

34:                                               ; preds = %.lr.ph, %34
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %34 ]
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv60) #6
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %35, i64 noundef %indvars.iv) #6
  store double 0.000000e+00, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt8valarrayIdESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv60) #6
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %indvars.iv) #6
  %39 = call { ptr, ptr } @_ZStmiIdESt5_ExprINSt8__detail8_BinClosISt7__minusSt9_ValArrayS4_T_S5_EENSt5__funIS3_S5_E11result_typeEERKSt8valarrayIS5_ESE_(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(16) %0)
  %40 = extractvalue { ptr, ptr } %39, 0
  store ptr %40, ptr %10, align 8
  %41 = extractvalue { ptr, ptr } %39, 1
  store ptr %41, ptr %30, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #6
  call void @_ZStmlINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEES4_ESt5_ExprINS1_ISt12__multipliesS5_S5_T_T0_EENSt5__funIS6_NS7_10value_typeEE11result_typeEERKS5_IS7_SB_ERKS5_IS8_NS8_10value_typeEE(ptr dead_on_unwind nonnull writable sret(%"class.std::_Expr.7") align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %10)
  %42 = call noundef double @_ZNKSt5_ExprINSt8__detail8_BinClosISt12__multipliesS_S_NS1_ISt7__minusSt9_ValArrayS4_ddEES5_EEdE3sumEv(ptr noundef nonnull align 8 dereferenceable(32) %11)
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv60) #6
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %43, i64 noundef %indvars.iv) #6
  store double %42, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #6
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv60) #6
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %45, i64 noundef %indvars.iv) #6
  %47 = load double, ptr %46, align 8, !tbaa !5
  %48 = call double @sqrt(double noundef %47) #6
  %49 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv60) #6
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8valarrayIdEixEm(ptr noundef nonnull align 8 dereferenceable(16) %49, i64 noundef %indvars.iv) #6
  store double %48, ptr %50, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %51 = icmp ult i64 %indvars.iv.next, %32
  br i1 %51, label %34, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %34
  %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1
  %52 = icmp ult i64 %indvars.iv.next61, %33
  br i1 %52, label %.lr.ph, label %._crit_edge51, !llvm.loop !13

._crit_edge51:                                    ; preds = %._crit_edge, %.preheader48.lr.ph, %5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @_Z10get_min_2dRKSt6vectorISt8valarrayIdESaIS1_EEPdPiS7_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull %9, ptr noundef nonnull %12, ptr noundef nonnull %13)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  %53 = load i32, ptr %12, align 4, !tbaa !9
  %54 = sub nsw i32 %53, %4
  store i32 %54, ptr %15, align 4, !tbaa !9
  %55 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %56 = load i32, ptr %55, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %57 = load i32, ptr %12, align 4, !tbaa !9
  %58 = add i32 %4, 1
  %59 = add i32 %58, %57
  store i32 %59, ptr %16, align 4, !tbaa !9
  %60 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %61 = load i32, ptr %60, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %18) #6
  %62 = load i32, ptr %13, align 4, !tbaa !9
  %63 = sub nsw i32 %62, %4
  store i32 %63, ptr %18, align 4, !tbaa !9
  %64 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %65 = load i32, ptr %64, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #6
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = add i32 %58, %66
  store i32 %67, ptr %19, align 4, !tbaa !9
  %68 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %19)
  %69 = load i32, ptr %68, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #6
  %70 = icmp slt i32 %56, %61
  br i1 %70, label %.preheader.lr.ph, label %._crit_edge56

.preheader.lr.ph:                                 ; preds = %._crit_edge51
  %71 = icmp slt i32 %65, %69
  %72 = getelementptr inbounds i8, ptr %23, i64 8
  br i1 %71, label %.preheader.us.preheader, label %._crit_edge56

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %73 = sext i32 %65 to i64
  %74 = sext i32 %56 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge54.us
  %indvars.iv66 = phi i64 [ %74, %.preheader.us.preheader ], [ %indvars.iv.next67, %._crit_edge54.us ]
  %75 = trunc nsw i64 %indvars.iv66 to i32
  br label %76

76:                                               ; preds = %.preheader.us, %76
  %indvars.iv63 = phi i64 [ %73, %.preheader.us ], [ %indvars.iv.next64, %76 ]
  %77 = load i32, ptr %12, align 4, !tbaa !9
  %78 = sub nsw i32 %77, %75
  %79 = mul nsw i32 %78, %78
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = trunc nsw i64 %indvars.iv63 to i32
  %82 = sub nsw i32 %80, %81
  %83 = mul nsw i32 %82, %82
  %84 = add nuw nsw i32 %83, %79
  %85 = uitofp nneg i32 %84 to double
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %86 = fneg double %85
  %87 = load double, ptr %6, align 8, !tbaa !5
  %88 = fmul double %87, 2.000000e+00
  %89 = fmul double %87, %88
  %90 = fdiv double %86, %89
  %91 = call double @exp(double noundef %90) #6
  store double %91, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %21) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #6
  %92 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt8valarrayIdESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv66) #6
  %93 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %indvars.iv63) #6
  %94 = call { ptr, ptr } @_ZStmiIdESt5_ExprINSt8__detail8_BinClosISt7__minusSt9_ValArrayS4_T_S5_EENSt5__funIS3_S5_E11result_typeEERKSt8valarrayIS5_ESE_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %93)
  %95 = extractvalue { ptr, ptr } %94, 0
  store ptr %95, ptr %23, align 8
  %96 = extractvalue { ptr, ptr } %94, 1
  store ptr %96, ptr %72, align 8
  call void @_ZStmlINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEEESt5_ExprINS1_ISt12__multipliesS5_St9_ConstantT_NS8_10value_typeEEENSt5__funIS6_S9_E11result_typeEERKS5_IS8_S9_ERKS9_(ptr dead_on_unwind nonnull writable sret(%"class.std::_Expr.15") align 8 %22, ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @_ZStmlINSt8__detail8_BinClosISt12__multipliesSt5_ExprSt9_ConstantNS1_ISt7__minusSt9_ValArrayS6_ddEEdEEES3_INS1_IS2_S3_S4_T_NS9_10value_typeEEENSt5__funIS2_SA_E11result_typeEERKS3_IS9_SA_ERKSA_(ptr dead_on_unwind nonnull writable sret(%"class.std::_Expr.10") align 8 %21, ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %97 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_ISt8valarrayIdESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv66) #6
  %98 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt8valarrayIdESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %97, i64 noundef %indvars.iv63) #6
  %99 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEpLINSt8__detail8_BinClosISt12__multipliesSt5_ExprSt9_ConstantNS3_IS4_S5_S6_NS3_ISt7__minusSt9_ValArrayS8_ddEEdEEdEEEERS0_RKS5_IT_dE(ptr noundef nonnull align 8 dereferenceable(16) %98, ptr noundef nonnull align 8 dereferenceable(32) %21)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  %indvars.iv.next64 = add nsw i64 %indvars.iv63, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next64 to i32
  %exitcond.not = icmp eq i32 %69, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge54.us, label %76, !llvm.loop !15

._crit_edge54.us:                                 ; preds = %76
  %indvars.iv.next67 = add nsw i64 %indvars.iv66, 1
  %lftr.wideiv69 = trunc i64 %indvars.iv.next67 to i32
  %exitcond70.not = icmp eq i32 %61, %lftr.wideiv69
  br i1 %exitcond70.not, label %._crit_edge56, label %.preheader.us, !llvm.loop !16

._crit_edge56:                                    ; preds = %._crit_edge54.us, %.preheader.lr.ph, %._crit_edge51
  %100 = load double, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  ret double %100
}

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStmlINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEES4_ESt5_ExprINS1_ISt12__multipliesS5_S5_T_T0_EENSt5__funIS6_NS7_10value_typeEE11result_typeEERKS5_IS7_SB_ERKS5_IS8_NS8_10value_typeEE(ptr dead_on_unwind noalias writable sret(%"class.std::_Expr.7") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZNKSt5_ExprINSt8__detail8_BinClosISt12__multipliesS_S_NS1_ISt7__minusSt9_ValArrayS4_ddEES5_EEdE3sumEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStmlINSt8__detail8_BinClosISt12__multipliesSt5_ExprSt9_ConstantNS1_ISt7__minusSt9_ValArrayS6_ddEEdEEES3_INS1_IS2_S3_S4_T_NS9_10value_typeEEENSt5__funIS2_SA_E11result_typeEERKS3_IS9_SA_ERKSA_(ptr dead_on_unwind noalias writable sret(%"class.std::_Expr.10") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStmlINSt8__detail8_BinClosISt7__minusSt9_ValArrayS3_ddEEESt5_ExprINS1_ISt12__multipliesS5_St9_ConstantT_NS8_10value_typeEEENSt5__funIS6_S9_E11result_typeEERKS5_IS8_S9_ERKS9_(ptr dead_on_unwind noalias writable sret(%"class.std::_Expr.15") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt8valarrayIdEpLINSt8__detail8_BinClosISt12__multipliesSt5_ExprSt9_ConstantNS3_IS4_S5_S6_NS3_ISt7__minusSt9_ValArrayS8_ddEEdEEdEEEERS0_RKS5_IT_dE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { 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 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 #6 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass