; LLVM IR from TheAlgorithms/C-Plus-Plus :: machine_learning/adaline_learning.ll (Z5test3d)

; 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.machine_learning::adaline" = type { double, double, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::array.3" = type { [100 x %"class.std::vector"] }
%"struct.std::array.4" = type { [100 x i32] }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__._Z5test3d = external hidden unnamed_addr constant [19 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16machine_learning7adalineC2Eidd(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, double noundef, double noundef) unnamed_addr #1 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN16machine_learninglsERSoRKNS_7adalineE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN16machine_learning7adaline7predictERKSt6vectorIdSaIdEEPd(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) #1 align 2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN16machine_learning7adalineD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

; 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: nounwind
declare i32 @rand() #8

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5test3d(double noundef %0) #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca double, align 8
  %3 = alloca %"class.machine_learning::adaline", align 8
  %4 = alloca i32, align 4
  %5 = alloca %"struct.std::array.3", align 8
  %6 = alloca %"struct.std::array.4", align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca %"class.std::initializer_list", align 8
  %15 = alloca [6 x double], align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca i32, align 4
  %25 = alloca %"class.std::vector", align 8
  %26 = alloca %"class.std::initializer_list", align 8
  %27 = alloca [6 x double], align 8
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca i32, align 4
  store double %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %3) #10
  %30 = load double, ptr %2, align 8, !tbaa !5
  call void @_ZN16machine_learning7adalineC2Eidd(ptr noundef nonnull align 8 dereferenceable(40) %3, i32 noundef 6, double noundef %30, double noundef 1.000000e-05)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #10
  store i32 100, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2400, ptr %5) #10
  call void @_ZNSt5arrayISt6vectorIdSaIdEELm100EEC2Ev(ptr noundef nonnull align 8 dereferenceable(2400) %5) #10
  call void @llvm.lifetime.start.p0(i64 400, ptr %6) #10
  call void @llvm.memset.p0.i64(ptr align 4 %6, i8 0, i64 400, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #10
  store i32 200, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #10
  %31 = load i32, ptr %7, align 4, !tbaa !9
  %32 = ashr i32 %31, 1
  store i32 %32, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #10
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %105, %1
  %34 = load i32, ptr %9, align 4, !tbaa !9
  %35 = icmp slt i32 %34, 100
  br i1 %35, label %37, label %36

36:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  br label %112

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  %38 = call i32 @rand() #10
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = srem i32 %38, %39
  %41 = sitofp i32 %40 to double
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = sitofp i32 %42 to double
  %44 = fsub double %41, %43
  %45 = fdiv double %44, 1.000000e+02
  store double %45, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  %46 = call i32 @rand() #10
  %47 = load i32, ptr %7, align 4, !tbaa !9
  %48 = srem i32 %46, %47
  %49 = sitofp i32 %48 to double
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = sitofp i32 %50 to double
  %52 = fsub double %49, %51
  %53 = fdiv double %52, 1.000000e+02
  store double %53, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  %54 = call i32 @rand() #10
  %55 = load i32, ptr %7, align 4, !tbaa !9
  %56 = srem i32 %54, %55
  %57 = sitofp i32 %56 to double
  %58 = load i32, ptr %8, align 4, !tbaa !9
  %59 = sitofp i32 %58 to double
  %60 = fsub double %57, %59
  %61 = fdiv double %60, 1.000000e+02
  store double %61, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #10
  %62 = load double, ptr %10, align 8, !tbaa !5
  store double %62, ptr %15, align 8, !tbaa !5
  %63 = getelementptr inbounds double, ptr %15, i64 1
  %64 = load double, ptr %11, align 8, !tbaa !5
  store double %64, ptr %63, align 8, !tbaa !5
  %65 = getelementptr inbounds double, ptr %15, i64 2
  %66 = load double, ptr %12, align 8, !tbaa !5
  store double %66, ptr %65, align 8, !tbaa !5
  %67 = getelementptr inbounds double, ptr %15, i64 3
  %68 = load double, ptr %10, align 8, !tbaa !5
  %69 = load double, ptr %10, align 8, !tbaa !5
  %70 = fmul double %68, %69
  store double %70, ptr %67, align 8, !tbaa !5
  %71 = getelementptr inbounds double, ptr %15, i64 4
  %72 = load double, ptr %11, align 8, !tbaa !5
  %73 = load double, ptr %11, align 8, !tbaa !5
  %74 = fmul double %72, %73
  store double %74, ptr %71, align 8, !tbaa !5
  %75 = getelementptr inbounds double, ptr %15, i64 5
  %76 = load double, ptr %12, align 8, !tbaa !5
  %77 = load double, ptr %12, align 8, !tbaa !5
  %78 = fmul double %76, %77
  store double %78, ptr %75, align 8, !tbaa !5
  %79 = getelementptr inbounds %"class.std::initializer_list", ptr %14, i32 0, i32 0
  store ptr %15, ptr %79, align 8, !tbaa !11
  %80 = getelementptr inbounds %"class.std::initializer_list", ptr %14, i32 0, i32 1
  store i64 6, ptr %80, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #10
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  %81 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8
  %83 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %84 = load i64, ptr %83, align 8
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr %82, i64 %84, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %85 unwind label %108

85:                                               ; preds = %37
  %86 = load i32, ptr %9, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIdSaIdEELm100EEixEm(ptr noundef nonnull align 8 dereferenceable(2400) %5, i64 noundef %87) #10
  %89 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIdSaIdEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %88, ptr noundef nonnull align 8 dereferenceable(24) %13) #10
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #10
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #10
  %90 = load double, ptr %10, align 8, !tbaa !5
  %91 = load double, ptr %10, align 8, !tbaa !5
  %92 = load double, ptr %11, align 8, !tbaa !5
  %93 = load double, ptr %11, align 8, !tbaa !5
  %94 = fmul double %92, %93
  %95 = call double @llvm.fmuladd.f64(double %90, double %91, double %94)
  %96 = load double, ptr %12, align 8, !tbaa !5
  %97 = load double, ptr %12, align 8, !tbaa !5
  %98 = call double @llvm.fmuladd.f64(double %96, double %97, double %95)
  %99 = fcmp ole double %98, 1.000000e+00
  %100 = zext i1 %99 to i64
  %101 = select i1 %99, i32 1, i32 -1
  %102 = load i32, ptr %9, align 4, !tbaa !9
  %103 = sext i32 %102 to i64
  %104 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm100EEixEm(ptr noundef nonnull align 4 dereferenceable(400) %6, i64 noundef %103) #10
  store i32 %101, ptr %104, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  br label %105

105:                                              ; preds = %85
  %106 = load i32, ptr %9, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %9, align 4, !tbaa !9
  br label %33, !llvm.loop !16

108:                                              ; preds = %37
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %17, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %18, align 4
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #10
  br label %255

112:                                              ; preds = %36
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.14)
          to label %114 unwind label %135

114:                                              ; preds = %112
  %115 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %113, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %116 unwind label %135

116:                                              ; preds = %114
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
          to label %118 unwind label %135

118:                                              ; preds = %116
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN16machine_learninglsERSoRKNS_7adalineE(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull align 8 dereferenceable(40) %3)
          to label %120 unwind label %135

120:                                              ; preds = %118
  %121 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %119, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %122 unwind label %135

122:                                              ; preds = %120
  invoke void @_ZN16machine_learning7adaline3fitILm100EEEvRKSt5arrayISt6vectorIdSaIdEEXT_EERKS2_IiXT_EE(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull align 8 dereferenceable(2400) %5, ptr noundef nonnull align 4 dereferenceable(400) %6)
          to label %123 unwind label %135

123:                                              ; preds = %122
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
          to label %125 unwind label %135

125:                                              ; preds = %123
  %126 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN16machine_learninglsERSoRKNS_7adalineE(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef nonnull align 8 dereferenceable(40) %3)
          to label %127 unwind label %135

127:                                              ; preds = %125
  %128 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %129 unwind label %135

129:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #10
  store i32 5, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #10
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %246, %129
  %131 = load i32, ptr %20, align 4, !tbaa !9
  %132 = load i32, ptr %19, align 4, !tbaa !9
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %139, label %134

134:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  br label %254

135:                                              ; preds = %127, %125, %123, %122, %120, %118, %116, %114, %112
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %17, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %18, align 4
  br label %255

139:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  %140 = call i32 @rand() #10
  %141 = load i32, ptr %7, align 4, !tbaa !9
  %142 = srem i32 %140, %141
  %143 = sitofp i32 %142 to double
  %144 = load i32, ptr %8, align 4, !tbaa !9
  %145 = sitofp i32 %144 to double
  %146 = fsub double %143, %145
  %147 = fdiv double %146, 1.000000e+02
  store double %147, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  %148 = call i32 @rand() #10
  %149 = load i32, ptr %7, align 4, !tbaa !9
  %150 = srem i32 %148, %149
  %151 = sitofp i32 %150 to double
  %152 = load i32, ptr %8, align 4, !tbaa !9
  %153 = sitofp i32 %152 to double
  %154 = fsub double %151, %153
  %155 = fdiv double %154, 1.000000e+02
  store double %155, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %156 = call i32 @rand() #10
  %157 = load i32, ptr %7, align 4, !tbaa !9
  %158 = srem i32 %156, %157
  %159 = sitofp i32 %158 to double
  %160 = load i32, ptr %8, align 4, !tbaa !9
  %161 = sitofp i32 %160 to double
  %162 = fsub double %159, %161
  %163 = fdiv double %162, 1.000000e+02
  store double %163, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr %27) #10
  %164 = load double, ptr %21, align 8, !tbaa !5
  store double %164, ptr %27, align 8, !tbaa !5
  %165 = getelementptr inbounds double, ptr %27, i64 1
  %166 = load double, ptr %22, align 8, !tbaa !5
  store double %166, ptr %165, align 8, !tbaa !5
  %167 = getelementptr inbounds double, ptr %27, i64 2
  %168 = load double, ptr %23, align 8, !tbaa !5
  store double %168, ptr %167, align 8, !tbaa !5
  %169 = getelementptr inbounds double, ptr %27, i64 3
  %170 = load double, ptr %21, align 8, !tbaa !5
  %171 = load double, ptr %21, align 8, !tbaa !5
  %172 = fmul double %170, %171
  store double %172, ptr %169, align 8, !tbaa !5
  %173 = getelementptr inbounds double, ptr %27, i64 4
  %174 = load double, ptr %22, align 8, !tbaa !5
  %175 = load double, ptr %22, align 8, !tbaa !5
  %176 = fmul double %174, %175
  store double %176, ptr %173, align 8, !tbaa !5
  %177 = getelementptr inbounds double, ptr %27, i64 5
  %178 = load double, ptr %23, align 8, !tbaa !5
  %179 = load double, ptr %23, align 8, !tbaa !5
  %180 = fmul double %178, %179
  store double %180, ptr %177, align 8, !tbaa !5
  %181 = getelementptr inbounds %"class.std::initializer_list", ptr %26, i32 0, i32 0
  store ptr %27, ptr %181, align 8, !tbaa !11
  %182 = getelementptr inbounds %"class.std::initializer_list", ptr %26, i32 0, i32 1
  store i64 6, ptr %182, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #10
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #10
  %183 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 0
  %184 = load ptr, ptr %183, align 8
  %185 = getelementptr inbounds { ptr, i64 }, ptr %26, i32 0, i32 1
  %186 = load i64, ptr %185, align 8
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr %184, i64 %186, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %187 unwind label %227

187:                                              ; preds = %139
  %188 = invoke noundef i32 @_ZN16machine_learning7adaline7predictERKSt6vectorIdSaIdEEPd(ptr noundef nonnull align 8 dereferenceable(40) %3, ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef null)
          to label %189 unwind label %231

189:                                              ; preds = %187
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #10
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #10
  store i32 %188, ptr %24, align 4, !tbaa !9
  %190 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
          to label %191 unwind label %236

191:                                              ; preds = %189
  %192 = load double, ptr %21, align 8, !tbaa !5
  %193 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %190, double noundef %192)
          to label %194 unwind label %236

194:                                              ; preds = %191
  %195 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %193, ptr noundef @.str.11)
          to label %196 unwind label %236

196:                                              ; preds = %194
  %197 = load double, ptr %22, align 8, !tbaa !5
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %195, double noundef %197)
          to label %199 unwind label %236

199:                                              ; preds = %196
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %198, ptr noundef @.str.11)
          to label %201 unwind label %236

201:                                              ; preds = %199
  %202 = load double, ptr %23, align 8, !tbaa !5
  %203 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %200, double noundef %202)
          to label %204 unwind label %236

204:                                              ; preds = %201
  %205 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %203, ptr noundef @.str.12)
          to label %206 unwind label %236

206:                                              ; preds = %204
  %207 = load i32, ptr %24, align 4, !tbaa !9
  %208 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %205, i32 noundef %207)
          to label %209 unwind label %236

209:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #10
  %210 = load double, ptr %21, align 8, !tbaa !5
  %211 = load double, ptr %21, align 8, !tbaa !5
  %212 = load double, ptr %22, align 8, !tbaa !5
  %213 = load double, ptr %22, align 8, !tbaa !5
  %214 = fmul double %212, %213
  %215 = call double @llvm.fmuladd.f64(double %210, double %211, double %214)
  %216 = load double, ptr %23, align 8, !tbaa !5
  %217 = load double, ptr %23, align 8, !tbaa !5
  %218 = call double @llvm.fmuladd.f64(double %216, double %217, double %215)
  %219 = fcmp ole double %218, 1.000000e+00
  %220 = zext i1 %219 to i64
  %221 = select i1 %219, i32 1, i32 -1
  store i32 %221, ptr %29, align 4, !tbaa !9
  %222 = load i32, ptr %24, align 4, !tbaa !9
  %223 = load i32, ptr %29, align 4, !tbaa !9
  %224 = icmp eq i32 %222, %223
  br i1 %224, label %225, label %226

225:                                              ; preds = %209
  br label %241

226:                                              ; preds = %209
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.5, i32 noundef 351, ptr noundef @__PRETTY_FUNCTION__._Z5test3d) #11
  unreachable

227:                                              ; preds = %139
  %228 = landingpad { ptr, i32 }
          cleanup
  %229 = extractvalue { ptr, i32 } %228, 0
  store ptr %229, ptr %17, align 8
  %230 = extractvalue { ptr, i32 } %228, 1
  store i32 %230, ptr %18, align 4
  br label %235

231:                                              ; preds = %187
  %232 = landingpad { ptr, i32 }
          cleanup
  %233 = extractvalue { ptr, i32 } %232, 0
  store ptr %233, ptr %17, align 8
  %234 = extractvalue { ptr, i32 } %232, 1
  store i32 %234, ptr %18, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #10
  br label %235

235:                                              ; preds = %231, %227
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #10
  br label %253

236:                                              ; preds = %206, %204, %201, %199, %196, %194, %191, %189
  %237 = landingpad { ptr, i32 }
          cleanup
  %238 = extractvalue { ptr, i32 } %237, 0
  store ptr %238, ptr %17, align 8
  %239 = extractvalue { ptr, i32 } %237, 1
  store i32 %239, ptr %18, align 4
  br label %253

240:                                              ; No predecessors!
  br label %241

241:                                              ; preds = %240, %225
  %242 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.6)
          to label %243 unwind label %249

243:                                              ; preds = %241
  %244 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %242, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %245 unwind label %249

245:                                              ; preds = %243
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  br label %246

246:                                              ; preds = %245
  %247 = load i32, ptr %20, align 4, !tbaa !9
  %248 = add nsw i32 %247, 1
  store i32 %248, ptr %20, align 4, !tbaa !9
  br label %130, !llvm.loop !18

249:                                              ; preds = %243, %241
  %250 = landingpad { ptr, i32 }
          cleanup
  %251 = extractvalue { ptr, i32 } %250, 0
  store ptr %251, ptr %17, align 8
  %252 = extractvalue { ptr, i32 } %250, 1
  store i32 %252, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #10
  br label %253

253:                                              ; preds = %249, %236, %235
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  br label %255

254:                                              ; preds = %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 400, ptr %6) #10
  call void @_ZNSt5arrayISt6vectorIdSaIdEELm100EED2Ev(ptr noundef nonnull align 8 dereferenceable(2400) %5) #10
  call void @llvm.lifetime.end.p0(i64 2400, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #10
  call void @_ZN16machine_learning7adalineD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #10
  ret void

255:                                              ; preds = %253, %135, %108
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #10
  call void @llvm.lifetime.end.p0(i64 400, ptr %6) #10
  call void @_ZNSt5arrayISt6vectorIdSaIdEELm100EED2Ev(ptr noundef nonnull align 8 dereferenceable(2400) %5) #10
  call void @llvm.lifetime.end.p0(i64 2400, ptr %5) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #10
  call void @_ZN16machine_learning7adalineD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %3) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %3) #10
  br label %256

256:                                              ; preds = %255
  %257 = load ptr, ptr %17, align 8
  %258 = load i32, ptr %18, align 4
  %259 = insertvalue { ptr, i32 } poison, ptr %257, 0
  %260 = insertvalue { ptr, i32 } %259, i32 %258, 1
  resume { ptr, i32 } %260
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5arrayISt6vectorIdSaIdEELm100EEC2Ev(ptr noundef nonnull align 8 dereferenceable(2400)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm100EEixEm(ptr noundef nonnull align 4 dereferenceable(400), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16machine_learning7adaline3fitILm100EEEvRKSt5arrayISt6vectorIdSaIdEEXT_EERKS2_IiXT_EE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(2400), ptr noundef nonnull align 4 dereferenceable(400)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5arrayISt6vectorIdSaIdEELm100EED2Ev(ptr noundef nonnull align 8 dereferenceable(2400)) unnamed_addr #6 align 2

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


; 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.machine_learning::adaline" = type { double, double, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::array.3" = type { [100 x %"class.std::vector"] }
%"struct.std::array.4" = type { [100 x i32] }
%"class.std::allocator" = type { i8 }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.1 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [97 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [23 x i8], align 1
@__PRETTY_FUNCTION__._Z5test3d = external hidden unnamed_addr constant [19 x i8], align 1

; 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 uwtable
declare dso_local void @_ZN16machine_learning7adalineC2Eidd(ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, double noundef, double noundef) unnamed_addr #1 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN16machine_learninglsERSoRKNS_7adalineE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN16machine_learning7adaline7predictERKSt6vectorIdSaIdEEPd(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN16machine_learning7adalineD2Ev(ptr noundef nonnull align 8 dereferenceable(40)) unnamed_addr #6 align 2

; 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: nounwind
declare i32 @rand() local_unnamed_addr #8

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5test3d(double noundef %0) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.machine_learning::adaline", align 8
  %3 = alloca %"struct.std::array.3", align 8
  %4 = alloca %"struct.std::array.4", align 4
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca [6 x double], align 16
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca [6 x double], align 16
  %10 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %2) #10
  call void @_ZN16machine_learning7adalineC2Eidd(ptr noundef nonnull align 8 dereferenceable(40) %2, i32 noundef 6, double noundef %0, double noundef 1.000000e-05)
  call void @llvm.lifetime.start.p0(i64 2400, ptr nonnull %3) #10
  call void @_ZNSt5arrayISt6vectorIdSaIdEELm100EEC2Ev(ptr noundef nonnull align 8 dereferenceable(2400) %3) #10
  call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %4) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(400) %4, i8 0, i64 400, i1 false)
  %11 = getelementptr inbounds i8, ptr %6, i64 16
  %12 = getelementptr inbounds i8, ptr %6, i64 24
  %13 = getelementptr inbounds i8, ptr %6, i64 40
  br label %16

14:                                               ; preds = %32
  %15 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.14)
          to label %44 unwind label %63

16:                                               ; preds = %1, %32
  %indvars.iv = phi i64 [ 0, %1 ], [ %indvars.iv.next, %32 ]
  %17 = call i32 @rand() #10
  %18 = call i32 @rand() #10
  %19 = call i32 @rand() #10
  %20 = srem i32 %19, 200
  %21 = add nsw i32 %20, -100
  %22 = sitofp i32 %21 to double
  %23 = fdiv double %22, 1.000000e+02
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #10
  %24 = insertelement <2 x i32> poison, i32 %17, i64 0
  %25 = insertelement <2 x i32> %24, i32 %18, i64 1
  %26 = srem <2 x i32> %25, <i32 200, i32 200>
  %27 = add nsw <2 x i32> %26, <i32 -100, i32 -100>
  %28 = sitofp <2 x i32> %27 to <2 x double>
  %29 = fdiv <2 x double> %28, <double 1.000000e+02, double 1.000000e+02>
  store <2 x double> %29, ptr %6, align 16, !tbaa !5
  store double %23, ptr %11, align 16, !tbaa !5
  %30 = fmul <2 x double> %29, %29
  store <2 x double> %30, ptr %12, align 8, !tbaa !5
  %31 = fmul double %23, %23
  store double %31, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #10
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #10
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr nonnull %6, i64 6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %32 unwind label %42

32:                                               ; preds = %16
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorIdSaIdEELm100EEixEm(ptr noundef nonnull align 8 dereferenceable(2400) %3, i64 noundef %indvars.iv) #10
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIdSaIdEEaSEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr noundef nonnull align 8 dereferenceable(24) %5) #10
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #10
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #10
  %35 = extractelement <2 x double> %29, i64 0
  %36 = extractelement <2 x double> %30, i64 1
  %37 = call double @llvm.fmuladd.f64(double %35, double %35, double %36)
  %38 = call double @llvm.fmuladd.f64(double %23, double %23, double %37)
  %39 = fcmp ole double %38, 1.000000e+00
  %40 = select i1 %39, i32 1, i32 -1
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm100EEixEm(ptr noundef nonnull align 4 dereferenceable(400) %4, i64 noundef %indvars.iv) #10
  store i32 %40, ptr %41, align 4, !tbaa !9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 100
  br i1 %exitcond.not, label %14, label %16, !llvm.loop !11

42:                                               ; preds = %16
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #10
  br label %124

44:                                               ; preds = %14
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %46 unwind label %63

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.1)
          to label %48 unwind label %63

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN16machine_learninglsERSoRKNS_7adalineE(ptr noundef nonnull align 8 dereferenceable(8) %47, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %50 unwind label %63

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %52 unwind label %63

52:                                               ; preds = %50
  invoke void @_ZN16machine_learning7adaline3fitILm100EEEvRKSt5arrayISt6vectorIdSaIdEEXT_EERKS2_IiXT_EE(ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull align 8 dereferenceable(2400) %3, ptr noundef nonnull align 4 dereferenceable(400) %4)
          to label %53 unwind label %63

53:                                               ; preds = %52
  %54 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.2)
          to label %55 unwind label %63

55:                                               ; preds = %53
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN16machine_learninglsERSoRKNS_7adalineE(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull align 8 dereferenceable(40) %2)
          to label %57 unwind label %63

57:                                               ; preds = %55
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %.preheader unwind label %63

.preheader:                                       ; preds = %57
  %59 = getelementptr inbounds i8, ptr %9, i64 16
  %60 = getelementptr inbounds i8, ptr %9, i64 24
  %61 = getelementptr inbounds i8, ptr %9, i64 40
  br label %65

62:                                               ; preds = %120
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %4) #10
  call void @_ZNSt5arrayISt6vectorIdSaIdEELm100EED2Ev(ptr noundef nonnull align 8 dereferenceable(2400) %3) #10
  call void @llvm.lifetime.end.p0(i64 2400, ptr nonnull %3) #10
  call void @_ZN16machine_learning7adalineD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #10
  ret void

63:                                               ; preds = %57, %55, %53, %52, %50, %48, %46, %44, %14
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %124

65:                                               ; preds = %.preheader, %120
  %.06471 = phi i32 [ 0, %.preheader ], [ %121, %120 ]
  %66 = call i32 @rand() #10
  %67 = call i32 @rand() #10
  %68 = call i32 @rand() #10
  %69 = srem i32 %68, 200
  %70 = add nsw i32 %69, -100
  %71 = sitofp i32 %70 to double
  %72 = fdiv double %71, 1.000000e+02
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #10
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #10
  %73 = insertelement <2 x i32> poison, i32 %66, i64 0
  %74 = insertelement <2 x i32> %73, i32 %67, i64 1
  %75 = srem <2 x i32> %74, <i32 200, i32 200>
  %76 = add nsw <2 x i32> %75, <i32 -100, i32 -100>
  %77 = sitofp <2 x i32> %76 to <2 x double>
  %78 = fdiv <2 x double> %77, <double 1.000000e+02, double 1.000000e+02>
  store <2 x double> %78, ptr %9, align 16, !tbaa !5
  store double %72, ptr %59, align 16, !tbaa !5
  %79 = fmul <2 x double> %78, %78
  store <2 x double> %79, ptr %60, align 8, !tbaa !5
  %80 = fmul double %72, %72
  store double %80, ptr %61, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #10
  call void @_ZNSaIdEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #10
  invoke void @_ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr nonnull %9, i64 6, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %81 unwind label %109

81:                                               ; preds = %65
  %82 = invoke noundef i32 @_ZN16machine_learning7adaline7predictERKSt6vectorIdSaIdEEPd(ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef null)
          to label %83 unwind label %111

83:                                               ; preds = %81
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #10
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #10
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
          to label %85 unwind label %114

85:                                               ; preds = %83
  %86 = extractelement <2 x double> %78, i64 0
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %84, double noundef %86)
          to label %88 unwind label %114

88:                                               ; preds = %85
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull @.str.11)
          to label %90 unwind label %114

90:                                               ; preds = %88
  %91 = extractelement <2 x double> %78, i64 1
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %89, double noundef %91)
          to label %93 unwind label %114

93:                                               ; preds = %90
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull @.str.11)
          to label %95 unwind label %114

95:                                               ; preds = %93
  %96 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %94, double noundef %72)
          to label %97 unwind label %114

97:                                               ; preds = %95
  %98 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %96, ptr noundef nonnull @.str.12)
          to label %99 unwind label %114

99:                                               ; preds = %97
  %100 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %98, i32 noundef %82)
          to label %101 unwind label %114

101:                                              ; preds = %99
  %102 = extractelement <2 x double> %79, i64 1
  %103 = call double @llvm.fmuladd.f64(double %86, double %86, double %102)
  %104 = call double @llvm.fmuladd.f64(double %72, double %72, double %103)
  %105 = fcmp ole double %104, 1.000000e+00
  %106 = select i1 %105, i32 1, i32 -1
  %107 = icmp eq i32 %82, %106
  br i1 %107, label %116, label %108

108:                                              ; preds = %101
  call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.5, i32 noundef 351, ptr noundef nonnull @__PRETTY_FUNCTION__._Z5test3d) #11
  unreachable

109:                                              ; preds = %65
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %113

111:                                              ; preds = %81
  %112 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #10
  br label %113

113:                                              ; preds = %111, %109
  %.pn = phi { ptr, i32 } [ %112, %111 ], [ %110, %109 ]
  call void @_ZNSt15__new_allocatorIdED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #10
  br label %124

114:                                              ; preds = %99, %97, %95, %93, %90, %88, %85, %83
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %124

116:                                              ; preds = %101
  %117 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.6)
          to label %118 unwind label %122

118:                                              ; preds = %116
  %119 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %117, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %120 unwind label %122

120:                                              ; preds = %118
  %121 = add nuw nsw i32 %.06471, 1
  %exitcond73.not = icmp eq i32 %121, 5
  br i1 %exitcond73.not, label %62, label %65, !llvm.loop !13

122:                                              ; preds = %118, %116
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %124

124:                                              ; preds = %113, %114, %122, %63, %42
  %.pn68 = phi { ptr, i32 } [ %43, %42 ], [ %64, %63 ], [ %123, %122 ], [ %115, %114 ], [ %.pn, %113 ]
  call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %4) #10
  call void @_ZNSt5arrayISt6vectorIdSaIdEELm100EED2Ev(ptr noundef nonnull align 8 dereferenceable(2400) %3) #10
  call void @llvm.lifetime.end.p0(i64 2400, ptr nonnull %3) #10
  call void @_ZN16machine_learning7adalineD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %2) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %2) #10
  resume { ptr, i32 } %.pn68
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5arrayISt6vectorIdSaIdEELm100EEC2Ev(ptr noundef nonnull align 8 dereferenceable(2400)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt5arrayIiLm100EEixEm(ptr noundef nonnull align 4 dereferenceable(400), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16machine_learning7adaline3fitILm100EEEvRKSt5arrayISt6vectorIdSaIdEEXT_EERKS2_IiXT_EE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(2400), ptr noundef nonnull align 4 dereferenceable(400)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5arrayISt6vectorIdSaIdEELm100EED2Ev(ptr noundef nonnull align 8 dereferenceable(2400)) unnamed_addr #6 align 2

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,LoopSimplifyPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass