; LLVM IR from oservo/aiFi :: test (trainAndPredictMultiplicationTableV3)

; 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"

%struct.mlpSingleton = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1
@dataOut = external dso_local global [42000 x [1 x double]], align 16
@dataIn = external dso_local global [42000 x [784 x double]], align 16
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [20 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

declare ptr @mlpSingletonNew(...) #1

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

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @trainAndPredictMultiplicationTableV3(i32 noundef %0, i32 noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [10240 x i8], align 16
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca double, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, 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 i64, align 8
  %24 = alloca i32, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %25 = call noalias ptr @fopen(ptr noundef @.str.10, ptr noundef @.str.11)
  store ptr %25, ptr %6, align 8, !tbaa !9
  %26 = load ptr, ptr %6, align 8, !tbaa !9
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %30

28:                                               ; preds = %2
  %29 = call i32 (ptr, ...) @printf(ptr noundef @.str.12)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %238

30:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  store i32 -1, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 10240, ptr %9) #6
  br label %31

31:                                               ; preds = %91, %39, %30
  %32 = getelementptr inbounds [10240 x i8], ptr %9, i64 0, i64 0
  %33 = load ptr, ptr %6, align 8, !tbaa !9
  %34 = call ptr @fgets(ptr noundef %32, i32 noundef 10240, ptr noundef %33)
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %103

36:                                               ; preds = %31
  %37 = load i32, ptr %8, align 4, !tbaa !5
  %38 = icmp slt i32 %37, 0
  br i1 %38, label %39, label %42

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

42:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %43 = getelementptr inbounds [10240 x i8], ptr %9, i64 0, i64 0
  %44 = call noalias ptr @strdup(ptr noundef %43) #6
  store ptr %44, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store double 0.000000e+00, ptr %12, align 8, !tbaa !13
  %45 = load ptr, ptr %10, align 8, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %45, i64 0
  %47 = load i8, ptr %46, align 1, !tbaa !15
  %48 = sext i8 %47 to i32
  %49 = sub nsw i32 %48, 48
  %50 = sitofp i32 %49 to double
  %51 = load i32, ptr %8, align 4, !tbaa !5
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [42000 x [1 x double]], ptr @dataOut, i64 0, i64 %52
  %54 = getelementptr inbounds [1 x double], ptr %53, i64 0, i64 0
  store double %50, ptr %54, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  store i64 2, ptr %13, align 8, !tbaa !16
  br label %55

55:                                               ; preds = %88, %42
  %56 = load i64, ptr %13, align 8, !tbaa !16
  %57 = load ptr, ptr %10, align 8, !tbaa !9
  %58 = call i64 @strlen(ptr noundef %57) #7
  %59 = icmp ult i64 %56, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %55
  store i32 4, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %91

61:                                               ; preds = %55
  %62 = load ptr, ptr %10, align 8, !tbaa !9
  %63 = load i64, ptr %13, align 8, !tbaa !16
  %64 = getelementptr inbounds i8, ptr %62, i64 %63
  %65 = load i8, ptr %64, align 1, !tbaa !15
  %66 = sext i8 %65 to i32
  %67 = icmp eq i32 %66, 44
  br i1 %67, label %68, label %77

68:                                               ; preds = %61
  %69 = load double, ptr %12, align 8, !tbaa !13
  %70 = load i32, ptr %8, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %71
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %11, align 4, !tbaa !5
  %75 = sext i32 %73 to i64
  %76 = getelementptr inbounds [784 x double], ptr %72, i64 0, i64 %75
  store double %69, ptr %76, align 8, !tbaa !13
  store double 0.000000e+00, ptr %12, align 8, !tbaa !13
  br label %87

77:                                               ; preds = %61
  %78 = load double, ptr %12, align 8, !tbaa !13
  %79 = load ptr, ptr %10, align 8, !tbaa !9
  %80 = load i64, ptr %13, align 8, !tbaa !16
  %81 = getelementptr inbounds i8, ptr %79, i64 %80
  %82 = load i8, ptr %81, align 1, !tbaa !15
  %83 = sext i8 %82 to i32
  %84 = sub nsw i32 %83, 48
  %85 = sitofp i32 %84 to double
  %86 = call double @llvm.fmuladd.f64(double %78, double 1.000000e+01, double %85)
  store double %86, ptr %12, align 8, !tbaa !13
  br label %87

87:                                               ; preds = %77, %68
  br label %88

88:                                               ; preds = %87
  %89 = load i64, ptr %13, align 8, !tbaa !16
  %90 = add i64 %89, 1
  store i64 %90, ptr %13, align 8, !tbaa !16
  br label %55, !llvm.loop !18

91:                                               ; preds = %60
  %92 = load double, ptr %12, align 8, !tbaa !13
  %93 = load i32, ptr %8, align 4, !tbaa !5
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %94
  %96 = load i32, ptr %11, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %11, align 4, !tbaa !5
  %98 = sext i32 %96 to i64
  %99 = getelementptr inbounds [784 x double], ptr %95, i64 0, i64 %98
  store double %92, ptr %99, align 8, !tbaa !13
  %100 = load ptr, ptr %10, align 8, !tbaa !9
  call void @free(ptr noundef %100) #6
  %101 = load i32, ptr %8, align 4, !tbaa !5
  %102 = add nsw i32 %101, 1
  store i32 %102, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %31, !llvm.loop !11

103:                                              ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1, ptr %15, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 42000, ptr %18, align 4, !tbaa !5
  %104 = call ptr (...) @mlpSingletonNew()
  store ptr %104, ptr %16, align 8, !tbaa !9
  %105 = load ptr, ptr %16, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.mlpSingleton, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !19
  %108 = call ptr (...) %107()
  store ptr %108, ptr %17, align 8, !tbaa !9
  %109 = load ptr, ptr %16, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.mlpSingleton, ptr %109, i32 0, i32 2
  %111 = load ptr, ptr %110, align 8, !tbaa !21
  %112 = load ptr, ptr %17, align 8, !tbaa !9
  call void %111(ptr noundef %112, i32 noundef 784, i32 noundef 0, i32 noundef 0, i32 noundef 3, i32 noundef 5, i32 noundef 1)
  %113 = load ptr, ptr %16, align 8, !tbaa !9
  %114 = getelementptr inbounds %struct.mlpSingleton, ptr %113, i32 0, i32 2
  %115 = load ptr, ptr %114, align 8, !tbaa !21
  %116 = load ptr, ptr %17, align 8, !tbaa !9
  call void %115(ptr noundef %116, i32 noundef 100, i32 noundef 1, i32 noundef 1, i32 noundef 3, i32 noundef 5, i32 noundef 1)
  %117 = load ptr, ptr %16, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.mlpSingleton, ptr %117, i32 0, i32 2
  %119 = load ptr, ptr %118, align 8, !tbaa !21
  %120 = load ptr, ptr %17, align 8, !tbaa !9
  call void %119(ptr noundef %120, i32 noundef 1, i32 noundef 2, i32 noundef 2, i32 noundef 3, i32 noundef 5, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !5
  br label %121

121:                                              ; preds = %156, %103
  %122 = load i32, ptr %19, align 4, !tbaa !5
  %123 = icmp slt i32 %122, 42000
  br i1 %123, label %125, label %124

124:                                              ; preds = %121
  store i32 7, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %159

125:                                              ; preds = %121
  %126 = load i32, ptr %19, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %127
  %129 = getelementptr inbounds [784 x double], ptr %128, i64 0, i64 0
  %130 = load double, ptr %129, align 16, !tbaa !13
  %131 = fdiv double %130, 2.550000e+02
  %132 = load i32, ptr %19, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %133
  %135 = getelementptr inbounds [784 x double], ptr %134, i64 0, i64 0
  store double %131, ptr %135, align 16, !tbaa !13
  %136 = load i32, ptr %19, align 4, !tbaa !5
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %137
  %139 = getelementptr inbounds [784 x double], ptr %138, i64 0, i64 1
  %140 = load double, ptr %139, align 8, !tbaa !13
  %141 = fdiv double %140, 2.550000e+02
  %142 = load i32, ptr %19, align 4, !tbaa !5
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %143
  %145 = getelementptr inbounds [784 x double], ptr %144, i64 0, i64 1
  store double %141, ptr %145, align 8, !tbaa !13
  %146 = load i32, ptr %19, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [42000 x [1 x double]], ptr @dataOut, i64 0, i64 %147
  %149 = getelementptr inbounds [1 x double], ptr %148, i64 0, i64 0
  %150 = load double, ptr %149, align 8, !tbaa !13
  %151 = fdiv double %150, 1.000000e+01
  %152 = load i32, ptr %19, align 4, !tbaa !5
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [42000 x [1 x double]], ptr @dataOut, i64 0, i64 %153
  %155 = getelementptr inbounds [1 x double], ptr %154, i64 0, i64 0
  store double %151, ptr %155, align 8, !tbaa !13
  br label %156

156:                                              ; preds = %125
  %157 = load i32, ptr %19, align 4, !tbaa !5
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %19, align 4, !tbaa !5
  br label %121, !llvm.loop !22

159:                                              ; preds = %124
  %160 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !5
  br label %161

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

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

166:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 0, ptr %21, align 4, !tbaa !5
  %167 = load i32, ptr %20, align 4, !tbaa !5
  %168 = srem i32 %167, 100
  %169 = icmp eq i32 %168, 0
  br i1 %169, label %170, label %176

170:                                              ; preds = %166
  %171 = load i32, ptr %20, align 4, !tbaa !5
  %172 = add nsw i32 %171, 1
  %173 = call i32 (ptr, ...) @printf(ptr noundef @.str.2, i32 noundef %172)
  %174 = load i32, ptr %21, align 4, !tbaa !5
  %175 = sub nsw i32 1, %174
  store i32 %175, ptr %21, align 4, !tbaa !5
  br label %176

176:                                              ; preds = %170, %166
  store i32 1, ptr %21, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %177 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %177, ptr %22, align 4, !tbaa !5
  br label %178

178:                                              ; preds = %209, %176
  %179 = load i32, ptr %22, align 4, !tbaa !5
  %180 = load i32, ptr %18, align 4, !tbaa !5
  %181 = icmp slt i32 %179, %180
  br i1 %181, label %183, label %182

182:                                              ; preds = %178
  store i32 13, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %212

183:                                              ; preds = %178
  %184 = load i32, ptr %20, align 4, !tbaa !5
  %185 = load i32, ptr %22, align 4, !tbaa !5
  %186 = call i32 (ptr, ...) @printf(ptr noundef @.str.13, i32 noundef %184, i32 noundef %185)
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %187 = call i64 @clock() #6
  store i64 %187, ptr %23, align 8, !tbaa !16
  %188 = load ptr, ptr %16, align 8, !tbaa !9
  %189 = getelementptr inbounds %struct.mlpSingleton, ptr %188, i32 0, i32 4
  %190 = load ptr, ptr %189, align 8, !tbaa !23
  %191 = load ptr, ptr %17, align 8, !tbaa !9
  %192 = load i32, ptr %22, align 4, !tbaa !5
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %193
  %195 = getelementptr inbounds [784 x double], ptr %194, i64 0, i64 0
  %196 = load i32, ptr %22, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [42000 x [1 x double]], ptr @dataOut, i64 0, i64 %197
  %199 = getelementptr inbounds [1 x double], ptr %198, i64 0, i64 0
  call void %190(ptr noundef %191, i32 noundef 1, ptr noundef %195, ptr noundef %199, double noundef 5.000000e-02, double noundef 1.000000e+00)
  %200 = load i32, ptr %22, align 4, !tbaa !5
  %201 = call i64 @clock() #6
  %202 = load i64, ptr %23, align 8, !tbaa !16
  %203 = sub nsw i64 %201, %202
  %204 = call i32 (ptr, ...) @printf(ptr noundef @.str.14, i32 noundef %200, i64 noundef %203)
  %205 = load i32, ptr %21, align 4, !tbaa !5
  %206 = icmp eq i32 %205, 1
  br i1 %206, label %207, label %208

207:                                              ; preds = %183
  br label %208

208:                                              ; preds = %207, %183
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %209

209:                                              ; preds = %208
  %210 = load i32, ptr %22, align 4, !tbaa !5
  %211 = add nsw i32 %210, 1
  store i32 %211, ptr %22, align 4, !tbaa !5
  br label %178, !llvm.loop !24

212:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %213

213:                                              ; preds = %212
  %214 = load i32, ptr %20, align 4, !tbaa !5
  %215 = add nsw i32 %214, 1
  store i32 %215, ptr %20, align 4, !tbaa !5
  br label %161, !llvm.loop !25

216:                                              ; preds = %165
  %217 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %218 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %218, ptr %24, align 4, !tbaa !5
  br label %219

219:                                              ; preds = %233, %216
  %220 = load i32, ptr %24, align 4, !tbaa !5
  %221 = load i32, ptr %5, align 4, !tbaa !5
  %222 = icmp slt i32 %220, %221
  br i1 %222, label %224, label %223

223:                                              ; preds = %219
  store i32 16, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %236

224:                                              ; preds = %219
  %225 = load ptr, ptr %16, align 8, !tbaa !9
  %226 = getelementptr inbounds %struct.mlpSingleton, ptr %225, i32 0, i32 6
  %227 = load ptr, ptr %226, align 8, !tbaa !26
  %228 = load ptr, ptr %17, align 8, !tbaa !9
  %229 = load i32, ptr %24, align 4, !tbaa !5
  %230 = sext i32 %229 to i64
  %231 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %230
  %232 = getelementptr inbounds [784 x double], ptr %231, i64 0, i64 0
  call void %227(ptr noundef %228, ptr noundef %232)
  br label %233

233:                                              ; preds = %224
  %234 = load i32, ptr %24, align 4, !tbaa !5
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %24, align 4, !tbaa !5
  br label %219, !llvm.loop !27

236:                                              ; preds = %223
  %237 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %237, ptr %3, align 4
  store i32 1, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 10240, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br label %238

238:                                              ; preds = %236, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %239 = load i32, ptr %3, align 4
  ret i32 %239
}

declare noalias ptr @fopen(ptr noundef, ptr noundef) #1

declare ptr @fgets(ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind
declare noalias ptr @strdup(ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #4

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

; Function Attrs: nounwind
declare i64 @clock() #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = distinct !{!18, !12}
!19 = !{!20, !10, i64 0}
!20 = !{!"mlpSingleton", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80}
!21 = !{!20, !10, i64 16}
!22 = distinct !{!22, !12}
!23 = !{!20, !10, i64 32}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !12}
!26 = !{!20, !10, i64 48}
!27 = distinct !{!27, !12}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1
@dataOut = external dso_local global [42000 x [1 x double]], align 16
@dataIn = external dso_local global [42000 x [784 x double]], align 16
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [20 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

declare ptr @mlpSingletonNew(...) local_unnamed_addr #1

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

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @trainAndPredictMultiplicationTableV3(i32 noundef %0, i32 noundef %1) local_unnamed_addr #3 {
  %3 = alloca [10240 x i8], align 16
  %4 = tail call noalias ptr @fopen(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.11)
  %5 = icmp eq ptr %4, null
  br i1 %5, label %6, label %8

6:                                                ; preds = %2
  %7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.12)
  br label %89

8:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 10240, ptr nonnull %3) #9
  %9 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 10240, ptr noundef nonnull %4)
  %.not79 = icmp eq ptr %9, null
  br i1 %.not79, label %._crit_edge83, label %.lr.ph82

.lr.ph82:                                         ; preds = %8, %.backedge
  %.06880 = phi i32 [ %.068.be, %.backedge ], [ -1, %8 ]
  %10 = icmp slt i32 %.06880, 0
  br i1 %10, label %.backedge, label %12

.backedge:                                        ; preds = %.lr.ph82, %._crit_edge
  %.068.be = add nsw i32 %.06880, 1
  %11 = call ptr @fgets(ptr noundef nonnull %3, i32 noundef 10240, ptr noundef nonnull %4)
  %.not = icmp eq ptr %11, null
  br i1 %.not, label %._crit_edge83, label %.lr.ph82, !llvm.loop !5

12:                                               ; preds = %.lr.ph82
  %13 = call noalias ptr @strdup(ptr noundef nonnull %3) #9
  %14 = load i8, ptr %13, align 1, !tbaa !7
  %15 = sext i8 %14 to i32
  %16 = add nsw i32 %15, -48
  %17 = sitofp i32 %16 to double
  %18 = zext nneg i32 %.06880 to i64
  %19 = getelementptr inbounds [42000 x [1 x double]], ptr @dataOut, i64 0, i64 %18
  store double %17, ptr %19, align 8, !tbaa !10
  %20 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %13) #10
  %21 = icmp ugt i64 %20, 2
  br i1 %21, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %36, %12
  %.070.lcssa = phi double [ 0.000000e+00, %12 ], [ %.171, %36 ]
  %.069.lcssa = phi i32 [ 0, %12 ], [ %.1, %36 ]
  %22 = sext i32 %.069.lcssa to i64
  %23 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %18, i64 %22
  store double %.070.lcssa, ptr %23, align 8, !tbaa !10
  call void @free(ptr noundef nonnull %13) #9
  br label %.backedge

.lr.ph:                                           ; preds = %12, %36
  %.06977 = phi i32 [ %.1, %36 ], [ 0, %12 ]
  %.07076 = phi double [ %.171, %36 ], [ 0.000000e+00, %12 ]
  %.07275 = phi i64 [ %37, %36 ], [ 2, %12 ]
  %24 = getelementptr inbounds i8, ptr %13, i64 %.07275
  %25 = load i8, ptr %24, align 1, !tbaa !7
  %26 = icmp eq i8 %25, 44
  br i1 %26, label %27, label %31

27:                                               ; preds = %.lr.ph
  %28 = add nsw i32 %.06977, 1
  %29 = sext i32 %.06977 to i64
  %30 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %18, i64 %29
  store double %.07076, ptr %30, align 8, !tbaa !10
  br label %36

31:                                               ; preds = %.lr.ph
  %32 = sext i8 %25 to i32
  %33 = add nsw i32 %32, -48
  %34 = sitofp i32 %33 to double
  %35 = call double @llvm.fmuladd.f64(double %.07076, double 1.000000e+01, double %34)
  br label %36

36:                                               ; preds = %27, %31
  %.171 = phi double [ 0.000000e+00, %27 ], [ %35, %31 ]
  %.1 = phi i32 [ %28, %27 ], [ %.06977, %31 ]
  %37 = add nuw i64 %.07275, 1
  %exitcond.not = icmp eq i64 %37, %20
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !12

._crit_edge83:                                    ; preds = %.backedge, %8
  %38 = call ptr (...) @mlpSingletonNew() #9
  %39 = load ptr, ptr %38, align 8, !tbaa !13
  %40 = call ptr (...) %39() #9
  %41 = getelementptr inbounds i8, ptr %38, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !16
  call void %42(ptr noundef %40, i32 noundef 784, i32 noundef 0, i32 noundef 0, i32 noundef 3, i32 noundef 5, i32 noundef 1) #9
  %43 = load ptr, ptr %41, align 8, !tbaa !16
  call void %43(ptr noundef %40, i32 noundef 100, i32 noundef 1, i32 noundef 1, i32 noundef 3, i32 noundef 5, i32 noundef 1) #9
  %44 = load ptr, ptr %41, align 8, !tbaa !16
  call void %44(ptr noundef %40, i32 noundef 1, i32 noundef 2, i32 noundef 2, i32 noundef 3, i32 noundef 5, i32 noundef 1) #9
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %._crit_edge83
  %index = phi i64 [ 0, %._crit_edge83 ], [ %index.next, %vector.body ]
  %45 = or disjoint i64 %index, 1
  %46 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %index
  %47 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %45
  %48 = load double, ptr %46, align 16, !tbaa !10
  %49 = load double, ptr %47, align 16, !tbaa !10
  %50 = insertelement <2 x double> poison, double %48, i64 0
  %51 = insertelement <2 x double> %50, double %49, i64 1
  %52 = fdiv <2 x double> %51, <double 2.550000e+02, double 2.550000e+02>
  %53 = extractelement <2 x double> %52, i64 0
  store double %53, ptr %46, align 16, !tbaa !10
  %54 = getelementptr inbounds i8, ptr %46, i64 8
  %55 = getelementptr inbounds i8, ptr %47, i64 8
  %56 = load double, ptr %54, align 8, !tbaa !10
  %57 = load double, ptr %55, align 8, !tbaa !10
  %58 = insertelement <2 x double> poison, double %56, i64 0
  %59 = insertelement <2 x double> %58, double %57, i64 1
  %60 = fdiv <2 x double> %59, <double 2.550000e+02, double 2.550000e+02>
  %61 = extractelement <2 x double> %60, i64 0
  store double %61, ptr %54, align 8, !tbaa !10
  %62 = shufflevector <2 x double> %52, <2 x double> %60, <2 x i32> <i32 1, i32 3>
  store <2 x double> %62, ptr %47, align 16, !tbaa !10
  %63 = getelementptr inbounds [42000 x [1 x double]], ptr @dataOut, i64 0, i64 %index
  %wide.load = load <2 x double>, ptr %63, align 16, !tbaa !10
  %64 = fdiv <2 x double> %wide.load, <double 1.000000e+01, double 1.000000e+01>
  store <2 x double> %64, ptr %63, align 16, !tbaa !10
  %index.next = add nuw i64 %index, 2
  %65 = icmp eq i64 %index.next, 42000
  br i1 %65, label %.critedge, label %vector.body, !llvm.loop !17

.critedge:                                        ; preds = %vector.body
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1)
  %68 = icmp slt i32 %0, 42000
  br i1 %68, label %.lr.ph86, label %._crit_edge87

.lr.ph86:                                         ; preds = %.critedge
  %69 = getelementptr inbounds i8, ptr %38, i64 32
  %70 = sext i32 %0 to i64
  br label %75

._crit_edge87:                                    ; preds = %75, %.critedge
  %71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  %72 = icmp slt i32 %0, %1
  br i1 %72, label %.lr.ph90, label %._crit_edge91

.lr.ph90:                                         ; preds = %._crit_edge87
  %73 = getelementptr inbounds i8, ptr %38, i64 48
  %74 = sext i32 %0 to i64
  br label %86

75:                                               ; preds = %.lr.ph86, %75
  %indvars.iv94 = phi i64 [ %70, %.lr.ph86 ], [ %indvars.iv.next95, %75 ]
  %76 = trunc nsw i64 %indvars.iv94 to i32
  %77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13, i32 noundef 0, i32 noundef %76)
  %78 = call i64 @clock() #9
  %79 = load ptr, ptr %69, align 8, !tbaa !20
  %80 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %indvars.iv94
  %81 = getelementptr inbounds [42000 x [1 x double]], ptr @dataOut, i64 0, i64 %indvars.iv94
  call void %79(ptr noundef %40, i32 noundef 1, ptr noundef nonnull %80, ptr noundef nonnull %81, double noundef 5.000000e-02, double noundef 1.000000e+00) #9
  %82 = call i64 @clock() #9
  %83 = sub nsw i64 %82, %78
  %84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14, i32 noundef %76, i64 noundef %83)
  %indvars.iv.next95 = add nsw i64 %indvars.iv94, 1
  %85 = and i64 %indvars.iv.next95, 4294967295
  %exitcond97.not = icmp eq i64 %85, 42000
  br i1 %exitcond97.not, label %._crit_edge87, label %75, !llvm.loop !21

._crit_edge91:                                    ; preds = %86, %._crit_edge87
  call void @llvm.lifetime.end.p0(i64 10240, ptr nonnull %3) #9
  br label %89

86:                                               ; preds = %.lr.ph90, %86
  %indvars.iv98 = phi i64 [ %74, %.lr.ph90 ], [ %indvars.iv.next99, %86 ]
  %87 = load ptr, ptr %73, align 8, !tbaa !22
  %88 = getelementptr inbounds [42000 x [784 x double]], ptr @dataIn, i64 0, i64 %indvars.iv98
  call void %87(ptr noundef %40, ptr noundef nonnull %88) #9
  %indvars.iv.next99 = add nsw i64 %indvars.iv98, 1
  %lftr.wideiv101 = trunc i64 %indvars.iv.next99 to i32
  %exitcond102.not = icmp eq i32 %lftr.wideiv101, %1
  br i1 %exitcond102.not, label %._crit_edge91, label %86, !llvm.loop !23

89:                                               ; preds = %._crit_edge91, %6
  %.064 = phi i32 [ 1, %6 ], [ 0, %._crit_edge91 ]
  ret i32 %.064
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias ptr @strdup(ptr nocapture noundef readonly) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #7

; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #8

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = distinct !{!12, !6}
!13 = !{!14, !15, i64 0}
!14 = !{!"mlpSingleton", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !15, i64 64, !15, i64 72, !15, i64 80}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!14, !15, i64 16}
!17 = distinct !{!17, !6, !18, !19}
!18 = !{!"llvm.loop.isvectorized", i32 1}
!19 = !{!"llvm.loop.unroll.runtime.disable"}
!20 = !{!14, !15, i64 32}
!21 = distinct !{!21, !6}
!22 = !{!14, !15, i64 48}
!23 = distinct !{!23, !6}


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