; LLVM IR from CactiLab/Sherloc-Cortex-M-CFVD :: Sherloc_runtime/evaluation/src/whetstone (libwhetstone)

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

@T = external dso_local global double, align 8
@T1 = external dso_local global double, align 8
@T2 = external dso_local global double, align 8
@E1 = external dso_local global [5 x double], align 16
@J = external dso_local global i32, align 4
@K = external dso_local global i32, align 4
@L = external dso_local global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local i32 @benchmark_whetstone() #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  store double 4.999750e-01, ptr @T, align 8, !tbaa !5
  store double 5.002500e-01, ptr @T1, align 8, !tbaa !5
  store double 2.000000e+00, ptr @T2, align 8, !tbaa !5
  store i64 1, ptr %19, align 8, !tbaa !9
  store i32 1, ptr %20, align 4, !tbaa !11
  store i32 1, ptr %21, align 4, !tbaa !11
  br label %22

22:                                               ; preds = %331, %0
  store i64 0, ptr %2, align 8, !tbaa !9
  %23 = load i64, ptr %19, align 8, !tbaa !9
  %24 = mul nsw i64 12, %23
  store i64 %24, ptr %3, align 8, !tbaa !9
  %25 = load i64, ptr %19, align 8, !tbaa !9
  %26 = mul nsw i64 14, %25
  store i64 %26, ptr %4, align 8, !tbaa !9
  %27 = load i64, ptr %19, align 8, !tbaa !9
  %28 = mul nsw i64 345, %27
  store i64 %28, ptr %5, align 8, !tbaa !9
  %29 = load i64, ptr %19, align 8, !tbaa !9
  %30 = mul nsw i64 210, %29
  store i64 %30, ptr %6, align 8, !tbaa !9
  %31 = load i64, ptr %19, align 8, !tbaa !9
  %32 = mul nsw i64 32, %31
  store i64 %32, ptr %7, align 8, !tbaa !9
  %33 = load i64, ptr %19, align 8, !tbaa !9
  %34 = mul nsw i64 899, %33
  store i64 %34, ptr %8, align 8, !tbaa !9
  %35 = load i64, ptr %19, align 8, !tbaa !9
  %36 = mul nsw i64 616, %35
  store i64 %36, ptr %9, align 8, !tbaa !9
  store i64 0, ptr %10, align 8, !tbaa !9
  %37 = load i64, ptr %19, align 8, !tbaa !9
  %38 = mul nsw i64 93, %37
  store i64 %38, ptr %11, align 8, !tbaa !9
  store double 1.000000e+00, ptr %12, align 8, !tbaa !5
  store double -1.000000e+00, ptr %13, align 8, !tbaa !5
  store double -1.000000e+00, ptr %14, align 8, !tbaa !5
  store double -1.000000e+00, ptr %15, align 8, !tbaa !5
  store i64 1, ptr %1, align 8, !tbaa !9
  br label %39

39:                                               ; preds = %81, %22
  %40 = load i64, ptr %1, align 8, !tbaa !9
  %41 = load i64, ptr %2, align 8, !tbaa !9
  %42 = icmp sle i64 %40, %41
  br i1 %42, label %43, label %84

43:                                               ; preds = %39
  %44 = load double, ptr %12, align 8, !tbaa !5
  %45 = load double, ptr %13, align 8, !tbaa !5
  %46 = fadd double %44, %45
  %47 = load double, ptr %14, align 8, !tbaa !5
  %48 = fadd double %46, %47
  %49 = load double, ptr %15, align 8, !tbaa !5
  %50 = fsub double %48, %49
  %51 = load double, ptr @T, align 8, !tbaa !5
  %52 = fmul double %50, %51
  store double %52, ptr %12, align 8, !tbaa !5
  %53 = load double, ptr %12, align 8, !tbaa !5
  %54 = load double, ptr %13, align 8, !tbaa !5
  %55 = fadd double %53, %54
  %56 = load double, ptr %14, align 8, !tbaa !5
  %57 = fsub double %55, %56
  %58 = load double, ptr %15, align 8, !tbaa !5
  %59 = fadd double %57, %58
  %60 = load double, ptr @T, align 8, !tbaa !5
  %61 = fmul double %59, %60
  store double %61, ptr %13, align 8, !tbaa !5
  %62 = load double, ptr %12, align 8, !tbaa !5
  %63 = load double, ptr %13, align 8, !tbaa !5
  %64 = fsub double %62, %63
  %65 = load double, ptr %14, align 8, !tbaa !5
  %66 = fadd double %64, %65
  %67 = load double, ptr %15, align 8, !tbaa !5
  %68 = fadd double %66, %67
  %69 = load double, ptr @T, align 8, !tbaa !5
  %70 = fmul double %68, %69
  store double %70, ptr %14, align 8, !tbaa !5
  %71 = load double, ptr %12, align 8, !tbaa !5
  %72 = fneg double %71
  %73 = load double, ptr %13, align 8, !tbaa !5
  %74 = fadd double %72, %73
  %75 = load double, ptr %14, align 8, !tbaa !5
  %76 = fadd double %74, %75
  %77 = load double, ptr %15, align 8, !tbaa !5
  %78 = fadd double %76, %77
  %79 = load double, ptr @T, align 8, !tbaa !5
  %80 = fmul double %78, %79
  store double %80, ptr %15, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %43
  %82 = load i64, ptr %1, align 8, !tbaa !9
  %83 = add nsw i64 %82, 1
  store i64 %83, ptr %1, align 8, !tbaa !9
  br label %39, !llvm.loop !13

84:                                               ; preds = %39
  store double 1.000000e+00, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 1), align 8, !tbaa !5
  store double -1.000000e+00, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 2), align 16, !tbaa !5
  store double -1.000000e+00, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 3), align 8, !tbaa !5
  store double -1.000000e+00, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 4), align 16, !tbaa !5
  store i64 1, ptr %1, align 8, !tbaa !9
  br label %85

85:                                               ; preds = %127, %84
  %86 = load i64, ptr %1, align 8, !tbaa !9
  %87 = load i64, ptr %3, align 8, !tbaa !9
  %88 = icmp sle i64 %86, %87
  br i1 %88, label %89, label %130

89:                                               ; preds = %85
  %90 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 1), align 8, !tbaa !5
  %91 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 2), align 16, !tbaa !5
  %92 = fadd double %90, %91
  %93 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 3), align 8, !tbaa !5
  %94 = fadd double %92, %93
  %95 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 4), align 16, !tbaa !5
  %96 = fsub double %94, %95
  %97 = load double, ptr @T, align 8, !tbaa !5
  %98 = fmul double %96, %97
  store double %98, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 1), align 8, !tbaa !5
  %99 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 1), align 8, !tbaa !5
  %100 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 2), align 16, !tbaa !5
  %101 = fadd double %99, %100
  %102 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 3), align 8, !tbaa !5
  %103 = fsub double %101, %102
  %104 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 4), align 16, !tbaa !5
  %105 = fadd double %103, %104
  %106 = load double, ptr @T, align 8, !tbaa !5
  %107 = fmul double %105, %106
  store double %107, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 2), align 16, !tbaa !5
  %108 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 1), align 8, !tbaa !5
  %109 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 2), align 16, !tbaa !5
  %110 = fsub double %108, %109
  %111 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 3), align 8, !tbaa !5
  %112 = fadd double %110, %111
  %113 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 4), align 16, !tbaa !5
  %114 = fadd double %112, %113
  %115 = load double, ptr @T, align 8, !tbaa !5
  %116 = fmul double %114, %115
  store double %116, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 3), align 8, !tbaa !5
  %117 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 1), align 8, !tbaa !5
  %118 = fneg double %117
  %119 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 2), align 16, !tbaa !5
  %120 = fadd double %118, %119
  %121 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 3), align 8, !tbaa !5
  %122 = fadd double %120, %121
  %123 = load double, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 4), align 16, !tbaa !5
  %124 = fadd double %122, %123
  %125 = load double, ptr @T, align 8, !tbaa !5
  %126 = fmul double %124, %125
  store double %126, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 4), align 16, !tbaa !5
  br label %127

127:                                              ; preds = %89
  %128 = load i64, ptr %1, align 8, !tbaa !9
  %129 = add nsw i64 %128, 1
  store i64 %129, ptr %1, align 8, !tbaa !9
  br label %85, !llvm.loop !15

130:                                              ; preds = %85
  store i64 1, ptr %1, align 8, !tbaa !9
  br label %131

131:                                              ; preds = %136, %130
  %132 = load i64, ptr %1, align 8, !tbaa !9
  %133 = load i64, ptr %4, align 8, !tbaa !9
  %134 = icmp sle i64 %132, %133
  br i1 %134, label %135, label %139

135:                                              ; preds = %131
  call void @PA(ptr noundef @E1)
  br label %136

136:                                              ; preds = %135
  %137 = load i64, ptr %1, align 8, !tbaa !9
  %138 = add nsw i64 %137, 1
  store i64 %138, ptr %1, align 8, !tbaa !9
  br label %131, !llvm.loop !16

139:                                              ; preds = %131
  store i32 1, ptr @J, align 4, !tbaa !11
  store i64 1, ptr %1, align 8, !tbaa !9
  br label %140

140:                                              ; preds = %160, %139
  %141 = load i64, ptr %1, align 8, !tbaa !9
  %142 = load i64, ptr %5, align 8, !tbaa !9
  %143 = icmp sle i64 %141, %142
  br i1 %143, label %144, label %163

144:                                              ; preds = %140
  %145 = load i32, ptr @J, align 4, !tbaa !11
  %146 = icmp eq i32 %145, 1
  br i1 %146, label %147, label %148

147:                                              ; preds = %144
  store i32 2, ptr @J, align 4, !tbaa !11
  br label %149

148:                                              ; preds = %144
  store i32 3, ptr @J, align 4, !tbaa !11
  br label %149

149:                                              ; preds = %148, %147
  %150 = load i32, ptr @J, align 4, !tbaa !11
  %151 = icmp sgt i32 %150, 2
  br i1 %151, label %152, label %153

152:                                              ; preds = %149
  store i32 0, ptr @J, align 4, !tbaa !11
  br label %154

153:                                              ; preds = %149
  store i32 1, ptr @J, align 4, !tbaa !11
  br label %154

154:                                              ; preds = %153, %152
  %155 = load i32, ptr @J, align 4, !tbaa !11
  %156 = icmp slt i32 %155, 1
  br i1 %156, label %157, label %158

157:                                              ; preds = %154
  store i32 1, ptr @J, align 4, !tbaa !11
  br label %159

158:                                              ; preds = %154
  store i32 0, ptr @J, align 4, !tbaa !11
  br label %159

159:                                              ; preds = %158, %157
  br label %160

160:                                              ; preds = %159
  %161 = load i64, ptr %1, align 8, !tbaa !9
  %162 = add nsw i64 %161, 1
  store i64 %162, ptr %1, align 8, !tbaa !9
  br label %140, !llvm.loop !17

163:                                              ; preds = %140
  store i32 1, ptr @J, align 4, !tbaa !11
  store i32 2, ptr @K, align 4, !tbaa !11
  store i32 3, ptr @L, align 4, !tbaa !11
  store i64 1, ptr %1, align 8, !tbaa !9
  br label %164

164:                                              ; preds = %214, %163
  %165 = load i64, ptr %1, align 8, !tbaa !9
  %166 = load i64, ptr %6, align 8, !tbaa !9
  %167 = icmp sle i64 %165, %166
  br i1 %167, label %168, label %217

168:                                              ; preds = %164
  %169 = load i32, ptr @J, align 4, !tbaa !11
  %170 = load i32, ptr @K, align 4, !tbaa !11
  %171 = load i32, ptr @J, align 4, !tbaa !11
  %172 = sub nsw i32 %170, %171
  %173 = mul nsw i32 %169, %172
  %174 = load i32, ptr @L, align 4, !tbaa !11
  %175 = load i32, ptr @K, align 4, !tbaa !11
  %176 = sub nsw i32 %174, %175
  %177 = mul nsw i32 %173, %176
  store i32 %177, ptr @J, align 4, !tbaa !11
  %178 = load i32, ptr @L, align 4, !tbaa !11
  %179 = load i32, ptr @K, align 4, !tbaa !11
  %180 = mul nsw i32 %178, %179
  %181 = load i32, ptr @L, align 4, !tbaa !11
  %182 = load i32, ptr @J, align 4, !tbaa !11
  %183 = sub nsw i32 %181, %182
  %184 = load i32, ptr @K, align 4, !tbaa !11
  %185 = mul nsw i32 %183, %184
  %186 = sub nsw i32 %180, %185
  store i32 %186, ptr @K, align 4, !tbaa !11
  %187 = load i32, ptr @L, align 4, !tbaa !11
  %188 = load i32, ptr @K, align 4, !tbaa !11
  %189 = sub nsw i32 %187, %188
  %190 = load i32, ptr @K, align 4, !tbaa !11
  %191 = load i32, ptr @J, align 4, !tbaa !11
  %192 = add nsw i32 %190, %191
  %193 = mul nsw i32 %189, %192
  store i32 %193, ptr @L, align 4, !tbaa !11
  %194 = load i32, ptr @J, align 4, !tbaa !11
  %195 = load i32, ptr @K, align 4, !tbaa !11
  %196 = add nsw i32 %194, %195
  %197 = load i32, ptr @L, align 4, !tbaa !11
  %198 = add nsw i32 %196, %197
  %199 = sitofp i32 %198 to double
  %200 = load i32, ptr @L, align 4, !tbaa !11
  %201 = sub nsw i32 %200, 1
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [5 x double], ptr @E1, i64 0, i64 %202
  store double %199, ptr %203, align 8, !tbaa !5
  %204 = load i32, ptr @J, align 4, !tbaa !11
  %205 = load i32, ptr @K, align 4, !tbaa !11
  %206 = mul nsw i32 %204, %205
  %207 = load i32, ptr @L, align 4, !tbaa !11
  %208 = mul nsw i32 %206, %207
  %209 = sitofp i32 %208 to double
  %210 = load i32, ptr @K, align 4, !tbaa !11
  %211 = sub nsw i32 %210, 1
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [5 x double], ptr @E1, i64 0, i64 %212
  store double %209, ptr %213, align 8, !tbaa !5
  br label %214

214:                                              ; preds = %168
  %215 = load i64, ptr %1, align 8, !tbaa !9
  %216 = add nsw i64 %215, 1
  store i64 %216, ptr %1, align 8, !tbaa !9
  br label %164, !llvm.loop !18

217:                                              ; preds = %164
  store double 5.000000e-01, ptr %16, align 8, !tbaa !5
  store double 5.000000e-01, ptr %17, align 8, !tbaa !5
  store i64 1, ptr %1, align 8, !tbaa !9
  br label %218

218:                                              ; preds = %265, %217
  %219 = load i64, ptr %1, align 8, !tbaa !9
  %220 = load i64, ptr %7, align 8, !tbaa !9
  %221 = icmp sle i64 %219, %220
  br i1 %221, label %222, label %268

222:                                              ; preds = %218
  %223 = load double, ptr @T, align 8, !tbaa !5
  %224 = load double, ptr @T2, align 8, !tbaa !5
  %225 = load double, ptr %16, align 8, !tbaa !5
  %226 = call double @sin(double noundef %225) #3
  %227 = fmul double %224, %226
  %228 = load double, ptr %16, align 8, !tbaa !5
  %229 = call double @cos(double noundef %228) #3
  %230 = fmul double %227, %229
  %231 = load double, ptr %16, align 8, !tbaa !5
  %232 = load double, ptr %17, align 8, !tbaa !5
  %233 = fadd double %231, %232
  %234 = call double @cos(double noundef %233) #3
  %235 = load double, ptr %16, align 8, !tbaa !5
  %236 = load double, ptr %17, align 8, !tbaa !5
  %237 = fsub double %235, %236
  %238 = call double @cos(double noundef %237) #3
  %239 = fadd double %234, %238
  %240 = fsub double %239, 1.000000e+00
  %241 = fdiv double %230, %240
  %242 = call double @atan(double noundef %241) #3
  %243 = fmul double %223, %242
  store double %243, ptr %16, align 8, !tbaa !5
  %244 = load double, ptr @T, align 8, !tbaa !5
  %245 = load double, ptr @T2, align 8, !tbaa !5
  %246 = load double, ptr %17, align 8, !tbaa !5
  %247 = call double @sin(double noundef %246) #3
  %248 = fmul double %245, %247
  %249 = load double, ptr %17, align 8, !tbaa !5
  %250 = call double @cos(double noundef %249) #3
  %251 = fmul double %248, %250
  %252 = load double, ptr %16, align 8, !tbaa !5
  %253 = load double, ptr %17, align 8, !tbaa !5
  %254 = fadd double %252, %253
  %255 = call double @cos(double noundef %254) #3
  %256 = load double, ptr %16, align 8, !tbaa !5
  %257 = load double, ptr %17, align 8, !tbaa !5
  %258 = fsub double %256, %257
  %259 = call double @cos(double noundef %258) #3
  %260 = fadd double %255, %259
  %261 = fsub double %260, 1.000000e+00
  %262 = fdiv double %251, %261
  %263 = call double @atan(double noundef %262) #3
  %264 = fmul double %244, %263
  store double %264, ptr %17, align 8, !tbaa !5
  br label %265

265:                                              ; preds = %222
  %266 = load i64, ptr %1, align 8, !tbaa !9
  %267 = add nsw i64 %266, 1
  store i64 %267, ptr %1, align 8, !tbaa !9
  br label %218, !llvm.loop !19

268:                                              ; preds = %218
  store double 1.000000e+00, ptr %16, align 8, !tbaa !5
  store double 1.000000e+00, ptr %17, align 8, !tbaa !5
  store double 1.000000e+00, ptr %18, align 8, !tbaa !5
  store i64 1, ptr %1, align 8, !tbaa !9
  br label %269

269:                                              ; preds = %276, %268
  %270 = load i64, ptr %1, align 8, !tbaa !9
  %271 = load i64, ptr %8, align 8, !tbaa !9
  %272 = icmp sle i64 %270, %271
  br i1 %272, label %273, label %279

273:                                              ; preds = %269
  %274 = load double, ptr %16, align 8, !tbaa !5
  %275 = load double, ptr %17, align 8, !tbaa !5
  call void @P3(double noundef %274, double noundef %275, ptr noundef %18)
  br label %276

276:                                              ; preds = %273
  %277 = load i64, ptr %1, align 8, !tbaa !9
  %278 = add nsw i64 %277, 1
  store i64 %278, ptr %1, align 8, !tbaa !9
  br label %269, !llvm.loop !20

279:                                              ; preds = %269
  store i32 1, ptr @J, align 4, !tbaa !11
  store i32 2, ptr @K, align 4, !tbaa !11
  store i32 3, ptr @L, align 4, !tbaa !11
  store double 1.000000e+00, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 1), align 8, !tbaa !5
  store double 2.000000e+00, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 2), align 16, !tbaa !5
  store double 3.000000e+00, ptr getelementptr inbounds ([5 x double], ptr @E1, i64 0, i64 3), align 8, !tbaa !5
  store i64 1, ptr %1, align 8, !tbaa !9
  br label %280

280:                                              ; preds = %285, %279
  %281 = load i64, ptr %1, align 8, !tbaa !9
  %282 = load i64, ptr %9, align 8, !tbaa !9
  %283 = icmp sle i64 %281, %282
  br i1 %283, label %284, label %288

284:                                              ; preds = %280
  call void @P0()
  br label %285

285:                                              ; preds = %284
  %286 = load i64, ptr %1, align 8, !tbaa !9
  %287 = add nsw i64 %286, 1
  store i64 %287, ptr %1, align 8, !tbaa !9
  br label %280, !llvm.loop !21

288:                                              ; preds = %280
  store i32 2, ptr @J, align 4, !tbaa !11
  store i32 3, ptr @K, align 4, !tbaa !11
  store i64 1, ptr %1, align 8, !tbaa !9
  br label %289

289:                                              ; preds = %308, %288
  %290 = load i64, ptr %1, align 8, !tbaa !9
  %291 = load i64, ptr %10, align 8, !tbaa !9
  %292 = icmp sle i64 %290, %291
  br i1 %292, label %293, label %311

293:                                              ; preds = %289
  %294 = load i32, ptr @J, align 4, !tbaa !11
  %295 = load i32, ptr @K, align 4, !tbaa !11
  %296 = add nsw i32 %294, %295
  store i32 %296, ptr @J, align 4, !tbaa !11
  %297 = load i32, ptr @J, align 4, !tbaa !11
  %298 = load i32, ptr @K, align 4, !tbaa !11
  %299 = add nsw i32 %297, %298
  store i32 %299, ptr @K, align 4, !tbaa !11
  %300 = load i32, ptr @K, align 4, !tbaa !11
  %301 = load i32, ptr @J, align 4, !tbaa !11
  %302 = sub nsw i32 %300, %301
  store i32 %302, ptr @J, align 4, !tbaa !11
  %303 = load i32, ptr @K, align 4, !tbaa !11
  %304 = load i32, ptr @J, align 4, !tbaa !11
  %305 = sub nsw i32 %303, %304
  %306 = load i32, ptr @J, align 4, !tbaa !11
  %307 = sub nsw i32 %305, %306
  store i32 %307, ptr @K, align 4, !tbaa !11
  br label %308

308:                                              ; preds = %293
  %309 = load i64, ptr %1, align 8, !tbaa !9
  %310 = add nsw i64 %309, 1
  store i64 %310, ptr %1, align 8, !tbaa !9
  br label %289, !llvm.loop !22

311:                                              ; preds = %289
  store double 7.500000e-01, ptr %16, align 8, !tbaa !5
  store i64 1, ptr %1, align 8, !tbaa !9
  br label %312

312:                                              ; preds = %323, %311
  %313 = load i64, ptr %1, align 8, !tbaa !9
  %314 = load i64, ptr %11, align 8, !tbaa !9
  %315 = icmp sle i64 %313, %314
  br i1 %315, label %316, label %326

316:                                              ; preds = %312
  %317 = load double, ptr %16, align 8, !tbaa !5
  %318 = call double @log(double noundef %317) #3
  %319 = load double, ptr @T1, align 8, !tbaa !5
  %320 = fdiv double %318, %319
  %321 = call double @exp(double noundef %320) #3
  %322 = call double @sqrt(double noundef %321) #3
  store double %322, ptr %16, align 8, !tbaa !5
  br label %323

323:                                              ; preds = %316
  %324 = load i64, ptr %1, align 8, !tbaa !9
  %325 = add nsw i64 %324, 1
  store i64 %325, ptr %1, align 8, !tbaa !9
  br label %312, !llvm.loop !23

326:                                              ; preds = %312
  %327 = load i32, ptr %21, align 4, !tbaa !11
  %328 = add nsw i32 %327, 1
  store i32 %328, ptr %21, align 4, !tbaa !11
  %329 = load i32, ptr %20, align 4, !tbaa !11
  %330 = icmp sle i32 %328, %329
  br i1 %330, label %331, label %332

331:                                              ; preds = %326
  br label %22

332:                                              ; preds = %326
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #3
  ret i32 0
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @PA(ptr noundef) #0

; Function Attrs: nounwind
declare double @atan(double noundef) #2

; Function Attrs: nounwind
declare double @sin(double noundef) #2

; Function Attrs: nounwind
declare double @cos(double noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @P3(double noundef, double noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @P0() #0

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

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

; Function Attrs: nounwind
declare double @log(double noundef) #2

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

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

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !14}
!23 = distinct !{!23, !14}


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

@T = external dso_local local_unnamed_addr global double, align 8
@T1 = external dso_local local_unnamed_addr global double, align 8
@T2 = external dso_local local_unnamed_addr global double, align 8
@E1 = external dso_local global [5 x double], align 16
@J = external dso_local local_unnamed_addr global i32, align 4
@K = external dso_local local_unnamed_addr global i32, align 4
@L = external dso_local local_unnamed_addr global i32, align 4

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @benchmark_whetstone() local_unnamed_addr #0 {
.preheader81:
  %0 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %0) #3
  store double 4.999750e-01, ptr @T, align 8, !tbaa !5
  store double 5.002500e-01, ptr @T1, align 8, !tbaa !5
  store double 2.000000e+00, ptr @T2, align 8, !tbaa !5
  store <2 x double> <double 0xBFB11B2FB7E3285C, double 0xBFDDD763954FDFDF>, ptr getelementptr inbounds (i8, ptr @E1, i64 8), align 8, !tbaa !5
  store <2 x double> <double 0xBFE7748B2CC7586F, double 0xBFF21E46B7DF37C6>, ptr getelementptr inbounds (i8, ptr @E1, i64 24), align 8, !tbaa !5
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  tail call void @PA(ptr noundef nonnull @E1)
  store <2 x double> <double 6.000000e+00, double 6.000000e+00>, ptr getelementptr inbounds (i8, ptr @E1, i64 8), align 8, !tbaa !5
  store i32 1, ptr @J, align 4, !tbaa !9
  store i32 2, ptr @K, align 4, !tbaa !9
  store i32 3, ptr @L, align 4, !tbaa !9
  br label %1

1:                                                ; preds = %.preheader81, %1
  %.5100 = phi i64 [ 1, %.preheader81 ], [ %32, %1 ]
  %.07299 = phi double [ 5.000000e-01, %.preheader81 ], [ %31, %1 ]
  %.07398 = phi double [ 5.000000e-01, %.preheader81 ], [ %16, %1 ]
  %2 = load double, ptr @T, align 8, !tbaa !5
  %3 = load double, ptr @T2, align 8, !tbaa !5
  %4 = tail call double @sin(double noundef %.07398) #3
  %5 = fmul double %3, %4
  %6 = tail call double @cos(double noundef %.07398) #3
  %7 = fmul double %5, %6
  %8 = fadd double %.07398, %.07299
  %9 = tail call double @cos(double noundef %8) #3
  %10 = fsub double %.07398, %.07299
  %11 = tail call double @cos(double noundef %10) #3
  %12 = fadd double %9, %11
  %13 = fadd double %12, -1.000000e+00
  %14 = fdiv double %7, %13
  %15 = tail call double @atan(double noundef %14) #3
  %16 = fmul double %2, %15
  %17 = load double, ptr @T, align 8, !tbaa !5
  %18 = load double, ptr @T2, align 8, !tbaa !5
  %19 = tail call double @sin(double noundef %.07299) #3
  %20 = fmul double %18, %19
  %21 = tail call double @cos(double noundef %.07299) #3
  %22 = fmul double %20, %21
  %23 = fadd double %.07299, %16
  %24 = tail call double @cos(double noundef %23) #3
  %25 = fsub double %16, %.07299
  %26 = tail call double @cos(double noundef %25) #3
  %27 = fadd double %24, %26
  %28 = fadd double %27, -1.000000e+00
  %29 = fdiv double %22, %28
  %30 = tail call double @atan(double noundef %29) #3
  %31 = fmul double %17, %30
  %32 = add nuw nsw i64 %.5100, 1
  %exitcond111.not = icmp eq i64 %32, 33
  br i1 %exitcond111.not, label %33, label %1, !llvm.loop !11

33:                                               ; preds = %1
  store double 1.000000e+00, ptr %0, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %33, %34
  %.6101 = phi i64 [ 1, %33 ], [ %35, %34 ]
  call void @P3(double noundef 1.000000e+00, double noundef 1.000000e+00, ptr noundef nonnull %0)
  %35 = add nuw nsw i64 %.6101, 1
  %exitcond112.not = icmp eq i64 %35, 900
  br i1 %exitcond112.not, label %36, label %34, !llvm.loop !13

36:                                               ; preds = %34
  store i32 1, ptr @J, align 4, !tbaa !9
  store i32 2, ptr @K, align 4, !tbaa !9
  store i32 3, ptr @L, align 4, !tbaa !9
  store <2 x double> <double 1.000000e+00, double 2.000000e+00>, ptr getelementptr inbounds (i8, ptr @E1, i64 8), align 8, !tbaa !5
  store double 3.000000e+00, ptr getelementptr inbounds (i8, ptr @E1, i64 24), align 8, !tbaa !5
  br label %37

37:                                               ; preds = %36, %37
  %.7102 = phi i64 [ 1, %36 ], [ %38, %37 ]
  call void @P0()
  %38 = add nuw nsw i64 %.7102, 1
  %exitcond113.not = icmp eq i64 %38, 617
  br i1 %exitcond113.not, label %39, label %37, !llvm.loop !14

39:                                               ; preds = %37
  store i32 2, ptr @J, align 4, !tbaa !9
  store i32 3, ptr @K, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %39, %40
  %.9104 = phi i64 [ 1, %39 ], [ %46, %40 ]
  %.174103 = phi double [ 7.500000e-01, %39 ], [ %45, %40 ]
  %41 = call double @log(double noundef %.174103) #3
  %42 = load double, ptr @T1, align 8, !tbaa !5
  %43 = fdiv double %41, %42
  %44 = call double @exp(double noundef %43) #3
  %45 = call double @sqrt(double noundef %44) #3
  %46 = add nuw nsw i64 %.9104, 1
  %exitcond114.not = icmp eq i64 %46, 94
  br i1 %exitcond114.not, label %47, label %40, !llvm.loop !15

47:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %0) #3
  ret i32 0
}

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

; Function Attrs: nounwind uwtable
declare dso_local void @PA(ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @P3(double noundef, double noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @P0() local_unnamed_addr #0

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

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass