; LLVM IR from mkmarek/forex.analytics :: lib/ta-lib/src/ta_func (ta_BETA)

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

; Function Attrs: nounwind uwtable
define dso_local i32 @TA_BETA(i32 noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #0 {
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca double, align 8
  %27 = alloca double, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  store i32 %0, ptr %10, align 4, !tbaa !5
  store i32 %1, ptr %11, align 4, !tbaa !5
  store ptr %2, ptr %12, align 8, !tbaa !9
  store ptr %3, ptr %13, align 8, !tbaa !9
  store i32 %4, ptr %14, align 4, !tbaa !5
  store ptr %5, ptr %15, align 8, !tbaa !9
  store ptr %6, ptr %16, align 8, !tbaa !9
  store ptr %7, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  store double 0.000000e+00, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  store double 0.000000e+00, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  store double 0.000000e+00, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  store double 0.000000e+00, ptr %21, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  store double 0.000000e+00, ptr %22, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  store double 0.000000e+00, ptr %23, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  store double 0.000000e+00, ptr %25, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  store double 0.000000e+00, ptr %26, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  store double 0.000000e+00, ptr %29, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #3
  %35 = load i32, ptr %10, align 4, !tbaa !5
  %36 = icmp slt i32 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %8
  store i32 12, ptr %9, align 4
  store i32 1, ptr %34, align 4
  br label %313

38:                                               ; preds = %8
  %39 = load i32, ptr %11, align 4, !tbaa !5
  %40 = icmp slt i32 %39, 0
  br i1 %40, label %45, label %41

41:                                               ; preds = %38
  %42 = load i32, ptr %11, align 4, !tbaa !5
  %43 = load i32, ptr %10, align 4, !tbaa !5
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %45, label %46

45:                                               ; preds = %41, %38
  store i32 13, ptr %9, align 4
  store i32 1, ptr %34, align 4
  br label %313

46:                                               ; preds = %41
  %47 = load ptr, ptr %12, align 8, !tbaa !9
  %48 = icmp ne ptr %47, null
  br i1 %48, label %50, label %49

49:                                               ; preds = %46
  store i32 2, ptr %9, align 4
  store i32 1, ptr %34, align 4
  br label %313

50:                                               ; preds = %46
  %51 = load ptr, ptr %13, align 8, !tbaa !9
  %52 = icmp ne ptr %51, null
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  store i32 2, ptr %9, align 4
  store i32 1, ptr %34, align 4
  br label %313

54:                                               ; preds = %50
  %55 = load i32, ptr %14, align 4, !tbaa !5
  %56 = icmp eq i32 %55, -2147483648
  br i1 %56, label %57, label %58

57:                                               ; preds = %54
  store i32 5, ptr %14, align 4, !tbaa !5
  br label %66

58:                                               ; preds = %54
  %59 = load i32, ptr %14, align 4, !tbaa !5
  %60 = icmp slt i32 %59, 1
  br i1 %60, label %64, label %61

61:                                               ; preds = %58
  %62 = load i32, ptr %14, align 4, !tbaa !5
  %63 = icmp sgt i32 %62, 100000
  br i1 %63, label %64, label %65

64:                                               ; preds = %61, %58
  store i32 2, ptr %9, align 4
  store i32 1, ptr %34, align 4
  br label %313

65:                                               ; preds = %61
  br label %66

66:                                               ; preds = %65, %57
  %67 = load ptr, ptr %17, align 8, !tbaa !9
  %68 = icmp ne ptr %67, null
  br i1 %68, label %70, label %69

69:                                               ; preds = %66
  store i32 2, ptr %9, align 4
  store i32 1, ptr %34, align 4
  br label %313

70:                                               ; preds = %66
  %71 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %71, ptr %33, align 4, !tbaa !5
  %72 = load i32, ptr %10, align 4, !tbaa !5
  %73 = load i32, ptr %33, align 4, !tbaa !5
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %75, label %77

75:                                               ; preds = %70
  %76 = load i32, ptr %33, align 4, !tbaa !5
  store i32 %76, ptr %10, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %75, %70
  %78 = load i32, ptr %10, align 4, !tbaa !5
  %79 = load i32, ptr %11, align 4, !tbaa !5
  %80 = icmp sgt i32 %78, %79
  br i1 %80, label %81, label %84

81:                                               ; preds = %77
  %82 = load ptr, ptr %15, align 8, !tbaa !9
  store i32 0, ptr %82, align 4, !tbaa !5
  %83 = load ptr, ptr %16, align 8, !tbaa !9
  store i32 0, ptr %83, align 4, !tbaa !5
  store i32 0, ptr %9, align 4
  store i32 1, ptr %34, align 4
  br label %313

84:                                               ; preds = %77
  %85 = load i32, ptr %10, align 4, !tbaa !5
  %86 = load i32, ptr %33, align 4, !tbaa !5
  %87 = sub nsw i32 %85, %86
  store i32 %87, ptr %32, align 4, !tbaa !5
  %88 = load ptr, ptr %12, align 8, !tbaa !9
  %89 = load i32, ptr %32, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds double, ptr %88, i64 %90
  %92 = load double, ptr %91, align 8, !tbaa !11
  store double %92, ptr %24, align 8, !tbaa !11
  store double %92, ptr %22, align 8, !tbaa !11
  %93 = load ptr, ptr %13, align 8, !tbaa !9
  %94 = load i32, ptr %32, align 4, !tbaa !5
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds double, ptr %93, i64 %95
  %97 = load double, ptr %96, align 8, !tbaa !11
  store double %97, ptr %25, align 8, !tbaa !11
  store double %97, ptr %23, align 8, !tbaa !11
  %98 = load i32, ptr %32, align 4, !tbaa !5
  %99 = add nsw i32 %98, 1
  store i32 %99, ptr %32, align 4, !tbaa !5
  store i32 %99, ptr %30, align 4, !tbaa !5
  br label %100

100:                                              ; preds = %142, %84
  %101 = load i32, ptr %30, align 4, !tbaa !5
  %102 = load i32, ptr %10, align 4, !tbaa !5
  %103 = icmp slt i32 %101, %102
  br i1 %103, label %104, label %158

104:                                              ; preds = %100
  %105 = load ptr, ptr %12, align 8, !tbaa !9
  %106 = load i32, ptr %30, align 4, !tbaa !5
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds double, ptr %105, i64 %107
  %109 = load double, ptr %108, align 8, !tbaa !11
  store double %109, ptr %26, align 8, !tbaa !11
  %110 = load double, ptr %22, align 8, !tbaa !11
  %111 = fcmp olt double 0xBD06849B86A12B9B, %110
  br i1 %111, label %112, label %115

112:                                              ; preds = %104
  %113 = load double, ptr %22, align 8, !tbaa !11
  %114 = fcmp olt double %113, 0x3D06849B86A12B9B
  br i1 %114, label %121, label %115

115:                                              ; preds = %112, %104
  %116 = load double, ptr %26, align 8, !tbaa !11
  %117 = load double, ptr %22, align 8, !tbaa !11
  %118 = fsub double %116, %117
  %119 = load double, ptr %22, align 8, !tbaa !11
  %120 = fdiv double %118, %119
  store double %120, ptr %27, align 8, !tbaa !11
  br label %122

121:                                              ; preds = %112
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  br label %122

122:                                              ; preds = %121, %115
  %123 = load double, ptr %26, align 8, !tbaa !11
  store double %123, ptr %22, align 8, !tbaa !11
  %124 = load ptr, ptr %13, align 8, !tbaa !9
  %125 = load i32, ptr %30, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %30, align 4, !tbaa !5
  %127 = sext i32 %125 to i64
  %128 = getelementptr inbounds double, ptr %124, i64 %127
  %129 = load double, ptr %128, align 8, !tbaa !11
  store double %129, ptr %26, align 8, !tbaa !11
  %130 = load double, ptr %23, align 8, !tbaa !11
  %131 = fcmp olt double 0xBD06849B86A12B9B, %130
  br i1 %131, label %132, label %135

132:                                              ; preds = %122
  %133 = load double, ptr %23, align 8, !tbaa !11
  %134 = fcmp olt double %133, 0x3D06849B86A12B9B
  br i1 %134, label %141, label %135

135:                                              ; preds = %132, %122
  %136 = load double, ptr %26, align 8, !tbaa !11
  %137 = load double, ptr %23, align 8, !tbaa !11
  %138 = fsub double %136, %137
  %139 = load double, ptr %23, align 8, !tbaa !11
  %140 = fdiv double %138, %139
  store double %140, ptr %28, align 8, !tbaa !11
  br label %142

141:                                              ; preds = %132
  store double 0.000000e+00, ptr %28, align 8, !tbaa !11
  br label %142

142:                                              ; preds = %141, %135
  %143 = load double, ptr %26, align 8, !tbaa !11
  store double %143, ptr %23, align 8, !tbaa !11
  %144 = load double, ptr %27, align 8, !tbaa !11
  %145 = load double, ptr %27, align 8, !tbaa !11
  %146 = load double, ptr %18, align 8, !tbaa !11
  %147 = call double @llvm.fmuladd.f64(double %144, double %145, double %146)
  store double %147, ptr %18, align 8, !tbaa !11
  %148 = load double, ptr %27, align 8, !tbaa !11
  %149 = load double, ptr %28, align 8, !tbaa !11
  %150 = load double, ptr %19, align 8, !tbaa !11
  %151 = call double @llvm.fmuladd.f64(double %148, double %149, double %150)
  store double %151, ptr %19, align 8, !tbaa !11
  %152 = load double, ptr %27, align 8, !tbaa !11
  %153 = load double, ptr %20, align 8, !tbaa !11
  %154 = fadd double %153, %152
  store double %154, ptr %20, align 8, !tbaa !11
  %155 = load double, ptr %28, align 8, !tbaa !11
  %156 = load double, ptr %21, align 8, !tbaa !11
  %157 = fadd double %156, %155
  store double %157, ptr %21, align 8, !tbaa !11
  br label %100, !llvm.loop !13

158:                                              ; preds = %100
  store i32 0, ptr %31, align 4, !tbaa !5
  %159 = load i32, ptr %14, align 4, !tbaa !5
  %160 = sitofp i32 %159 to double
  store double %160, ptr %29, align 8, !tbaa !11
  br label %161

161:                                              ; preds = %304, %158
  %162 = load ptr, ptr %12, align 8, !tbaa !9
  %163 = load i32, ptr %30, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds double, ptr %162, i64 %164
  %166 = load double, ptr %165, align 8, !tbaa !11
  store double %166, ptr %26, align 8, !tbaa !11
  %167 = load double, ptr %22, align 8, !tbaa !11
  %168 = fcmp olt double 0xBD06849B86A12B9B, %167
  br i1 %168, label %169, label %172

169:                                              ; preds = %161
  %170 = load double, ptr %22, align 8, !tbaa !11
  %171 = fcmp olt double %170, 0x3D06849B86A12B9B
  br i1 %171, label %178, label %172

172:                                              ; preds = %169, %161
  %173 = load double, ptr %26, align 8, !tbaa !11
  %174 = load double, ptr %22, align 8, !tbaa !11
  %175 = fsub double %173, %174
  %176 = load double, ptr %22, align 8, !tbaa !11
  %177 = fdiv double %175, %176
  store double %177, ptr %27, align 8, !tbaa !11
  br label %179

178:                                              ; preds = %169
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  br label %179

179:                                              ; preds = %178, %172
  %180 = load double, ptr %26, align 8, !tbaa !11
  store double %180, ptr %22, align 8, !tbaa !11
  %181 = load ptr, ptr %13, align 8, !tbaa !9
  %182 = load i32, ptr %30, align 4, !tbaa !5
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %30, align 4, !tbaa !5
  %184 = sext i32 %182 to i64
  %185 = getelementptr inbounds double, ptr %181, i64 %184
  %186 = load double, ptr %185, align 8, !tbaa !11
  store double %186, ptr %26, align 8, !tbaa !11
  %187 = load double, ptr %23, align 8, !tbaa !11
  %188 = fcmp olt double 0xBD06849B86A12B9B, %187
  br i1 %188, label %189, label %192

189:                                              ; preds = %179
  %190 = load double, ptr %23, align 8, !tbaa !11
  %191 = fcmp olt double %190, 0x3D06849B86A12B9B
  br i1 %191, label %198, label %192

192:                                              ; preds = %189, %179
  %193 = load double, ptr %26, align 8, !tbaa !11
  %194 = load double, ptr %23, align 8, !tbaa !11
  %195 = fsub double %193, %194
  %196 = load double, ptr %23, align 8, !tbaa !11
  %197 = fdiv double %195, %196
  store double %197, ptr %28, align 8, !tbaa !11
  br label %199

198:                                              ; preds = %189
  store double 0.000000e+00, ptr %28, align 8, !tbaa !11
  br label %199

199:                                              ; preds = %198, %192
  %200 = load double, ptr %26, align 8, !tbaa !11
  store double %200, ptr %23, align 8, !tbaa !11
  %201 = load double, ptr %27, align 8, !tbaa !11
  %202 = load double, ptr %27, align 8, !tbaa !11
  %203 = load double, ptr %18, align 8, !tbaa !11
  %204 = call double @llvm.fmuladd.f64(double %201, double %202, double %203)
  store double %204, ptr %18, align 8, !tbaa !11
  %205 = load double, ptr %27, align 8, !tbaa !11
  %206 = load double, ptr %28, align 8, !tbaa !11
  %207 = load double, ptr %19, align 8, !tbaa !11
  %208 = call double @llvm.fmuladd.f64(double %205, double %206, double %207)
  store double %208, ptr %19, align 8, !tbaa !11
  %209 = load double, ptr %27, align 8, !tbaa !11
  %210 = load double, ptr %20, align 8, !tbaa !11
  %211 = fadd double %210, %209
  store double %211, ptr %20, align 8, !tbaa !11
  %212 = load double, ptr %28, align 8, !tbaa !11
  %213 = load double, ptr %21, align 8, !tbaa !11
  %214 = fadd double %213, %212
  store double %214, ptr %21, align 8, !tbaa !11
  %215 = load ptr, ptr %12, align 8, !tbaa !9
  %216 = load i32, ptr %32, align 4, !tbaa !5
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds double, ptr %215, i64 %217
  %219 = load double, ptr %218, align 8, !tbaa !11
  store double %219, ptr %26, align 8, !tbaa !11
  %220 = load double, ptr %24, align 8, !tbaa !11
  %221 = fcmp olt double 0xBD06849B86A12B9B, %220
  br i1 %221, label %222, label %225

222:                                              ; preds = %199
  %223 = load double, ptr %24, align 8, !tbaa !11
  %224 = fcmp olt double %223, 0x3D06849B86A12B9B
  br i1 %224, label %231, label %225

225:                                              ; preds = %222, %199
  %226 = load double, ptr %26, align 8, !tbaa !11
  %227 = load double, ptr %24, align 8, !tbaa !11
  %228 = fsub double %226, %227
  %229 = load double, ptr %24, align 8, !tbaa !11
  %230 = fdiv double %228, %229
  store double %230, ptr %27, align 8, !tbaa !11
  br label %232

231:                                              ; preds = %222
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  br label %232

232:                                              ; preds = %231, %225
  %233 = load double, ptr %26, align 8, !tbaa !11
  store double %233, ptr %24, align 8, !tbaa !11
  %234 = load ptr, ptr %13, align 8, !tbaa !9
  %235 = load i32, ptr %32, align 4, !tbaa !5
  %236 = add nsw i32 %235, 1
  store i32 %236, ptr %32, align 4, !tbaa !5
  %237 = sext i32 %235 to i64
  %238 = getelementptr inbounds double, ptr %234, i64 %237
  %239 = load double, ptr %238, align 8, !tbaa !11
  store double %239, ptr %26, align 8, !tbaa !11
  %240 = load double, ptr %25, align 8, !tbaa !11
  %241 = fcmp olt double 0xBD06849B86A12B9B, %240
  br i1 %241, label %242, label %245

242:                                              ; preds = %232
  %243 = load double, ptr %25, align 8, !tbaa !11
  %244 = fcmp olt double %243, 0x3D06849B86A12B9B
  br i1 %244, label %251, label %245

245:                                              ; preds = %242, %232
  %246 = load double, ptr %26, align 8, !tbaa !11
  %247 = load double, ptr %25, align 8, !tbaa !11
  %248 = fsub double %246, %247
  %249 = load double, ptr %25, align 8, !tbaa !11
  %250 = fdiv double %248, %249
  store double %250, ptr %28, align 8, !tbaa !11
  br label %252

251:                                              ; preds = %242
  store double 0.000000e+00, ptr %28, align 8, !tbaa !11
  br label %252

252:                                              ; preds = %251, %245
  %253 = load double, ptr %26, align 8, !tbaa !11
  store double %253, ptr %25, align 8, !tbaa !11
  %254 = load double, ptr %29, align 8, !tbaa !11
  %255 = load double, ptr %18, align 8, !tbaa !11
  %256 = load double, ptr %20, align 8, !tbaa !11
  %257 = load double, ptr %20, align 8, !tbaa !11
  %258 = fmul double %256, %257
  %259 = fneg double %258
  %260 = call double @llvm.fmuladd.f64(double %254, double %255, double %259)
  store double %260, ptr %26, align 8, !tbaa !11
  %261 = load double, ptr %26, align 8, !tbaa !11
  %262 = fcmp olt double 0xBD06849B86A12B9B, %261
  br i1 %262, label %263, label %266

263:                                              ; preds = %252
  %264 = load double, ptr %26, align 8, !tbaa !11
  %265 = fcmp olt double %264, 0x3D06849B86A12B9B
  br i1 %265, label %281, label %266

266:                                              ; preds = %263, %252
  %267 = load double, ptr %29, align 8, !tbaa !11
  %268 = load double, ptr %19, align 8, !tbaa !11
  %269 = load double, ptr %20, align 8, !tbaa !11
  %270 = load double, ptr %21, align 8, !tbaa !11
  %271 = fmul double %269, %270
  %272 = fneg double %271
  %273 = call double @llvm.fmuladd.f64(double %267, double %268, double %272)
  %274 = load double, ptr %26, align 8, !tbaa !11
  %275 = fdiv double %273, %274
  %276 = load ptr, ptr %17, align 8, !tbaa !9
  %277 = load i32, ptr %31, align 4, !tbaa !5
  %278 = add nsw i32 %277, 1
  store i32 %278, ptr %31, align 4, !tbaa !5
  %279 = sext i32 %277 to i64
  %280 = getelementptr inbounds double, ptr %276, i64 %279
  store double %275, ptr %280, align 8, !tbaa !11
  br label %287

281:                                              ; preds = %263
  %282 = load ptr, ptr %17, align 8, !tbaa !9
  %283 = load i32, ptr %31, align 4, !tbaa !5
  %284 = add nsw i32 %283, 1
  store i32 %284, ptr %31, align 4, !tbaa !5
  %285 = sext i32 %283 to i64
  %286 = getelementptr inbounds double, ptr %282, i64 %285
  store double 0.000000e+00, ptr %286, align 8, !tbaa !11
  br label %287

287:                                              ; preds = %281, %266
  %288 = load double, ptr %27, align 8, !tbaa !11
  %289 = load double, ptr %27, align 8, !tbaa !11
  %290 = load double, ptr %18, align 8, !tbaa !11
  %291 = fneg double %288
  %292 = call double @llvm.fmuladd.f64(double %291, double %289, double %290)
  store double %292, ptr %18, align 8, !tbaa !11
  %293 = load double, ptr %27, align 8, !tbaa !11
  %294 = load double, ptr %28, align 8, !tbaa !11
  %295 = load double, ptr %19, align 8, !tbaa !11
  %296 = fneg double %293
  %297 = call double @llvm.fmuladd.f64(double %296, double %294, double %295)
  store double %297, ptr %19, align 8, !tbaa !11
  %298 = load double, ptr %27, align 8, !tbaa !11
  %299 = load double, ptr %20, align 8, !tbaa !11
  %300 = fsub double %299, %298
  store double %300, ptr %20, align 8, !tbaa !11
  %301 = load double, ptr %28, align 8, !tbaa !11
  %302 = load double, ptr %21, align 8, !tbaa !11
  %303 = fsub double %302, %301
  store double %303, ptr %21, align 8, !tbaa !11
  br label %304

304:                                              ; preds = %287
  %305 = load i32, ptr %30, align 4, !tbaa !5
  %306 = load i32, ptr %11, align 4, !tbaa !5
  %307 = icmp sle i32 %305, %306
  br i1 %307, label %161, label %308, !llvm.loop !15

308:                                              ; preds = %304
  %309 = load i32, ptr %31, align 4, !tbaa !5
  %310 = load ptr, ptr %16, align 8, !tbaa !9
  store i32 %309, ptr %310, align 4, !tbaa !5
  %311 = load i32, ptr %10, align 4, !tbaa !5
  %312 = load ptr, ptr %15, align 8, !tbaa !9
  store i32 %311, ptr %312, align 4, !tbaa !5
  store i32 0, ptr %9, align 4
  store i32 1, ptr %34, align 4
  br label %313

313:                                              ; preds = %308, %81, %69, %64, %53, %49, %45, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, 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
  %314 = load i32, ptr %9, align 4
  ret i32 %314
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !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"

; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable
define dso_local range(i32 0, 14) i32 @TA_BETA(i32 noundef %0, i32 noundef %1, ptr noundef readonly %2, ptr noundef readonly %3, i32 noundef %4, ptr nocapture noundef writeonly %5, ptr nocapture noundef writeonly %6, ptr noundef writeonly %7) local_unnamed_addr #0 {
  %9 = icmp slt i32 %0, 0
  br i1 %9, label %114, label %10

10:                                               ; preds = %8
  %11 = icmp slt i32 %1, %0
  br i1 %11, label %114, label %12

12:                                               ; preds = %10
  %.not = icmp eq ptr %2, null
  %.not174 = icmp eq ptr %3, null
  %or.cond178 = or i1 %.not, %.not174
  br i1 %or.cond178, label %114, label %13

13:                                               ; preds = %12
  %14 = icmp eq i32 %4, -2147483648
  br i1 %14, label %17, label %15

15:                                               ; preds = %13
  %16 = add i32 %4, -100001
  %or.cond = icmp ult i32 %16, -100000
  br i1 %or.cond, label %114, label %17

17:                                               ; preds = %13, %15
  %.0166 = phi i32 [ %4, %15 ], [ 5, %13 ]
  %.not175 = icmp eq ptr %7, null
  br i1 %.not175, label %114, label %18

18:                                               ; preds = %17
  %spec.select = tail call i32 @llvm.umax.i32(i32 %.0166, i32 %0)
  %19 = icmp ugt i32 %spec.select, %1
  br i1 %19, label %20, label %21

20:                                               ; preds = %18
  store i32 0, ptr %5, align 4, !tbaa !5
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %114

21:                                               ; preds = %18
  %22 = sub nsw i32 %spec.select, %.0166
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds double, ptr %2, i64 %23
  %25 = load double, ptr %24, align 8, !tbaa !9
  %26 = getelementptr inbounds double, ptr %3, i64 %23
  %27 = load double, ptr %26, align 8, !tbaa !9
  %28 = add nsw i32 %22, 1
  %29 = icmp slt i32 %28, %spec.select
  br i1 %29, label %.lr.ph.preheader, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %21
  %.pre = zext nneg i32 %28 to i64
  %30 = insertelement <2 x double> poison, double %25, i64 0
  %31 = insertelement <2 x double> %30, double %27, i64 1
  br label %._crit_edge

.lr.ph.preheader:                                 ; preds = %21
  %32 = sext i32 %28 to i64
  %33 = add nsw i32 %.0166, -2
  %34 = add i32 %28, %33
  %35 = insertelement <2 x double> poison, double %25, i64 0
  %36 = insertelement <2 x double> %35, double %27, i64 1
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %32, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %37 = phi <2 x double> [ zeroinitializer, %.lr.ph.preheader ], [ %53, %.lr.ph ]
  %38 = phi <2 x double> [ %36, %.lr.ph.preheader ], [ %47, %.lr.ph ]
  %39 = phi <2 x double> [ zeroinitializer, %.lr.ph.preheader ], [ %52, %.lr.ph ]
  %40 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  %41 = load double, ptr %40, align 8, !tbaa !9
  %42 = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %38)
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %43 = getelementptr inbounds double, ptr %3, i64 %indvars.iv
  %44 = load double, ptr %43, align 8, !tbaa !9
  %45 = fcmp olt <2 x double> %42, <double 0x3D06849B86A12B9B, double 0x3D06849B86A12B9B>
  %46 = insertelement <2 x double> poison, double %41, i64 0
  %47 = insertelement <2 x double> %46, double %44, i64 1
  %48 = fsub <2 x double> %47, %38
  %49 = fdiv <2 x double> %48, %38
  %50 = select <2 x i1> %45, <2 x double> zeroinitializer, <2 x double> %49
  %51 = shufflevector <2 x double> %50, <2 x double> poison, <2 x i32> zeroinitializer
  %52 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %51, <2 x double> %50, <2 x double> %39)
  %53 = fadd <2 x double> %37, %50
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %spec.select, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !11

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %54 = add i32 %34, 1
  br label %._crit_edge

._crit_edge:                                      ; preds = %.._crit_edge_crit_edge, %._crit_edge.loopexit
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %32, %._crit_edge.loopexit ]
  %.0144.lcssa = phi i32 [ %28, %.._crit_edge_crit_edge ], [ %54, %._crit_edge.loopexit ]
  %55 = phi <2 x double> [ zeroinitializer, %.._crit_edge_crit_edge ], [ %53, %._crit_edge.loopexit ]
  %56 = phi <2 x double> [ %31, %.._crit_edge_crit_edge ], [ %47, %._crit_edge.loopexit ]
  %57 = phi <2 x double> [ zeroinitializer, %.._crit_edge_crit_edge ], [ %52, %._crit_edge.loopexit ]
  %58 = sitofp i32 %.0166 to double
  %59 = zext i32 %.0144.lcssa to i64
  %60 = insertelement <2 x double> poison, double %25, i64 0
  %61 = insertelement <2 x double> %60, double %27, i64 1
  %62 = insertelement <2 x double> poison, double %58, i64 0
  %63 = shufflevector <2 x double> %62, <2 x double> poison, <2 x i32> zeroinitializer
  br label %64

64:                                               ; preds = %64, %._crit_edge
  %indvars.iv203 = phi i64 [ %indvars.iv.next204, %64 ], [ %.pre-phi, %._crit_edge ]
  %indvars.iv201 = phi i64 [ %indvars.iv.next202, %64 ], [ 0, %._crit_edge ]
  %indvars.iv199 = phi i64 [ %indvars.iv.next200, %64 ], [ %59, %._crit_edge ]
  %65 = phi <2 x double> [ %110, %64 ], [ %55, %._crit_edge ]
  %66 = phi <2 x double> [ %81, %64 ], [ %56, %._crit_edge ]
  %67 = phi <2 x double> [ %90, %64 ], [ %61, %._crit_edge ]
  %68 = phi <2 x double> [ %109, %64 ], [ %57, %._crit_edge ]
  %69 = getelementptr inbounds double, ptr %2, i64 %indvars.iv199
  %70 = load double, ptr %69, align 8, !tbaa !9
  %71 = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %66)
  %indvars.iv.next200 = add nuw nsw i64 %indvars.iv199, 1
  %72 = getelementptr inbounds double, ptr %3, i64 %indvars.iv199
  %73 = load double, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds double, ptr %2, i64 %indvars.iv203
  %75 = load double, ptr %74, align 8, !tbaa !9
  %76 = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %67)
  %indvars.iv.next204 = add nsw i64 %indvars.iv203, 1
  %77 = getelementptr inbounds double, ptr %3, i64 %indvars.iv203
  %78 = load double, ptr %77, align 8, !tbaa !9
  %79 = fcmp olt <2 x double> %71, <double 0x3D06849B86A12B9B, double 0x3D06849B86A12B9B>
  %80 = insertelement <2 x double> poison, double %70, i64 0
  %81 = insertelement <2 x double> %80, double %73, i64 1
  %82 = fsub <2 x double> %81, %66
  %83 = fdiv <2 x double> %82, %66
  %84 = select <2 x i1> %79, <2 x double> zeroinitializer, <2 x double> %83
  %85 = shufflevector <2 x double> %84, <2 x double> poison, <2 x i32> zeroinitializer
  %86 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %85, <2 x double> %84, <2 x double> %68)
  %87 = fadd <2 x double> %65, %84
  %88 = fcmp olt <2 x double> %76, <double 0x3D06849B86A12B9B, double 0x3D06849B86A12B9B>
  %89 = insertelement <2 x double> poison, double %75, i64 0
  %90 = insertelement <2 x double> %89, double %78, i64 1
  %91 = fsub <2 x double> %90, %67
  %92 = fdiv <2 x double> %91, %67
  %93 = select <2 x i1> %88, <2 x double> zeroinitializer, <2 x double> %92
  %94 = extractelement <2 x double> %87, i64 0
  %95 = fneg double %94
  %96 = insertelement <2 x double> poison, double %95, i64 0
  %97 = shufflevector <2 x double> %96, <2 x double> poison, <2 x i32> zeroinitializer
  %98 = fmul <2 x double> %87, %97
  %99 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %63, <2 x double> %86, <2 x double> %98)
  %100 = extractelement <2 x double> %99, i64 0
  %101 = tail call double @llvm.fabs.f64(double %100)
  %or.cond15 = fcmp olt double %101, 0x3D06849B86A12B9B
  %102 = extractelement <2 x double> %99, i64 1
  %103 = fdiv double %102, %100
  %.sink = select i1 %or.cond15, double 0.000000e+00, double %103
  %104 = getelementptr inbounds double, ptr %7, i64 %indvars.iv201
  store double %.sink, ptr %104, align 8
  %indvars.iv.next202 = add nuw nsw i64 %indvars.iv201, 1
  %105 = extractelement <2 x double> %93, i64 0
  %106 = fneg double %105
  %107 = insertelement <2 x double> poison, double %106, i64 0
  %108 = shufflevector <2 x double> %107, <2 x double> poison, <2 x i32> zeroinitializer
  %109 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %108, <2 x double> %93, <2 x double> %86)
  %110 = fsub <2 x double> %87, %93
  %111 = trunc nuw i64 %indvars.iv199 to i32
  %.not176.not = icmp slt i32 %111, %1
  br i1 %.not176.not, label %64, label %112, !llvm.loop !13

112:                                              ; preds = %64
  %113 = trunc nuw i64 %indvars.iv.next202 to i32
  store i32 %113, ptr %6, align 4, !tbaa !5
  store i32 %spec.select, ptr %5, align 4, !tbaa !5
  br label %114

114:                                              ; preds = %17, %15, %12, %10, %8, %112, %20
  %.0 = phi i32 [ 0, %20 ], [ 0, %112 ], [ 12, %8 ], [ 13, %10 ], [ 2, %12 ], [ 2, %15 ], [ 2, %17 ]
  ret i32 %.0
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fabs.v2f64(<2 x double>) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #1

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

!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 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass