; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @TA_S_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) #2 {
  %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 %321

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 %321

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 %321

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 %321

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 %321

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 %321

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 %321

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 float, ptr %88, i64 %90
  %92 = load float, ptr %91, align 4, !tbaa !13
  %93 = fpext float %92 to double
  store double %93, ptr %24, align 8, !tbaa !11
  store double %93, ptr %22, align 8, !tbaa !11
  %94 = load ptr, ptr %13, align 8, !tbaa !9
  %95 = load i32, ptr %32, align 4, !tbaa !5
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds float, ptr %94, i64 %96
  %98 = load float, ptr %97, align 4, !tbaa !13
  %99 = fpext float %98 to double
  store double %99, ptr %25, align 8, !tbaa !11
  store double %99, ptr %23, align 8, !tbaa !11
  %100 = load i32, ptr %32, align 4, !tbaa !5
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %32, align 4, !tbaa !5
  store i32 %101, ptr %30, align 4, !tbaa !5
  br label %102

102:                                              ; preds = %146, %84
  %103 = load i32, ptr %30, align 4, !tbaa !5
  %104 = load i32, ptr %10, align 4, !tbaa !5
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %106, label %162

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

115:                                              ; preds = %106
  %116 = load double, ptr %22, align 8, !tbaa !11
  %117 = fcmp olt double %116, 0x3D06849B86A12B9B
  br i1 %117, label %124, label %118

118:                                              ; preds = %115, %106
  %119 = load double, ptr %26, align 8, !tbaa !11
  %120 = load double, ptr %22, align 8, !tbaa !11
  %121 = fsub double %119, %120
  %122 = load double, ptr %22, align 8, !tbaa !11
  %123 = fdiv double %121, %122
  store double %123, ptr %27, align 8, !tbaa !11
  br label %125

124:                                              ; preds = %115
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  br label %125

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

136:                                              ; preds = %125
  %137 = load double, ptr %23, align 8, !tbaa !11
  %138 = fcmp olt double %137, 0x3D06849B86A12B9B
  br i1 %138, label %145, label %139

139:                                              ; preds = %136, %125
  %140 = load double, ptr %26, align 8, !tbaa !11
  %141 = load double, ptr %23, align 8, !tbaa !11
  %142 = fsub double %140, %141
  %143 = load double, ptr %23, align 8, !tbaa !11
  %144 = fdiv double %142, %143
  store double %144, ptr %28, align 8, !tbaa !11
  br label %146

145:                                              ; preds = %136
  store double 0.000000e+00, ptr %28, align 8, !tbaa !11
  br label %146

146:                                              ; preds = %145, %139
  %147 = load double, ptr %26, align 8, !tbaa !11
  store double %147, ptr %23, align 8, !tbaa !11
  %148 = load double, ptr %27, align 8, !tbaa !11
  %149 = load double, ptr %27, align 8, !tbaa !11
  %150 = load double, ptr %18, align 8, !tbaa !11
  %151 = call double @llvm.fmuladd.f64(double %148, double %149, double %150)
  store double %151, ptr %18, align 8, !tbaa !11
  %152 = load double, ptr %27, align 8, !tbaa !11
  %153 = load double, ptr %28, align 8, !tbaa !11
  %154 = load double, ptr %19, align 8, !tbaa !11
  %155 = call double @llvm.fmuladd.f64(double %152, double %153, double %154)
  store double %155, ptr %19, align 8, !tbaa !11
  %156 = load double, ptr %27, align 8, !tbaa !11
  %157 = load double, ptr %20, align 8, !tbaa !11
  %158 = fadd double %157, %156
  store double %158, ptr %20, align 8, !tbaa !11
  %159 = load double, ptr %28, align 8, !tbaa !11
  %160 = load double, ptr %21, align 8, !tbaa !11
  %161 = fadd double %160, %159
  store double %161, ptr %21, align 8, !tbaa !11
  br label %102, !llvm.loop !15

162:                                              ; preds = %102
  store i32 0, ptr %31, align 4, !tbaa !5
  %163 = load i32, ptr %14, align 4, !tbaa !5
  %164 = sitofp i32 %163 to double
  store double %164, ptr %29, align 8, !tbaa !11
  br label %165

165:                                              ; preds = %312, %162
  %166 = load ptr, ptr %12, align 8, !tbaa !9
  %167 = load i32, ptr %30, align 4, !tbaa !5
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds float, ptr %166, i64 %168
  %170 = load float, ptr %169, align 4, !tbaa !13
  %171 = fpext float %170 to double
  store double %171, ptr %26, align 8, !tbaa !11
  %172 = load double, ptr %22, align 8, !tbaa !11
  %173 = fcmp olt double 0xBD06849B86A12B9B, %172
  br i1 %173, label %174, label %177

174:                                              ; preds = %165
  %175 = load double, ptr %22, align 8, !tbaa !11
  %176 = fcmp olt double %175, 0x3D06849B86A12B9B
  br i1 %176, label %183, label %177

177:                                              ; preds = %174, %165
  %178 = load double, ptr %26, align 8, !tbaa !11
  %179 = load double, ptr %22, align 8, !tbaa !11
  %180 = fsub double %178, %179
  %181 = load double, ptr %22, align 8, !tbaa !11
  %182 = fdiv double %180, %181
  store double %182, ptr %27, align 8, !tbaa !11
  br label %184

183:                                              ; preds = %174
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  br label %184

184:                                              ; preds = %183, %177
  %185 = load double, ptr %26, align 8, !tbaa !11
  store double %185, ptr %22, align 8, !tbaa !11
  %186 = load ptr, ptr %13, align 8, !tbaa !9
  %187 = load i32, ptr %30, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %30, align 4, !tbaa !5
  %189 = sext i32 %187 to i64
  %190 = getelementptr inbounds float, ptr %186, i64 %189
  %191 = load float, ptr %190, align 4, !tbaa !13
  %192 = fpext float %191 to double
  store double %192, ptr %26, align 8, !tbaa !11
  %193 = load double, ptr %23, align 8, !tbaa !11
  %194 = fcmp olt double 0xBD06849B86A12B9B, %193
  br i1 %194, label %195, label %198

195:                                              ; preds = %184
  %196 = load double, ptr %23, align 8, !tbaa !11
  %197 = fcmp olt double %196, 0x3D06849B86A12B9B
  br i1 %197, label %204, label %198

198:                                              ; preds = %195, %184
  %199 = load double, ptr %26, align 8, !tbaa !11
  %200 = load double, ptr %23, align 8, !tbaa !11
  %201 = fsub double %199, %200
  %202 = load double, ptr %23, align 8, !tbaa !11
  %203 = fdiv double %201, %202
  store double %203, ptr %28, align 8, !tbaa !11
  br label %205

204:                                              ; preds = %195
  store double 0.000000e+00, ptr %28, align 8, !tbaa !11
  br label %205

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

229:                                              ; preds = %205
  %230 = load double, ptr %24, align 8, !tbaa !11
  %231 = fcmp olt double %230, 0x3D06849B86A12B9B
  br i1 %231, label %238, label %232

232:                                              ; preds = %229, %205
  %233 = load double, ptr %26, align 8, !tbaa !11
  %234 = load double, ptr %24, align 8, !tbaa !11
  %235 = fsub double %233, %234
  %236 = load double, ptr %24, align 8, !tbaa !11
  %237 = fdiv double %235, %236
  store double %237, ptr %27, align 8, !tbaa !11
  br label %239

238:                                              ; preds = %229
  store double 0.000000e+00, ptr %27, align 8, !tbaa !11
  br label %239

239:                                              ; preds = %238, %232
  %240 = load double, ptr %26, align 8, !tbaa !11
  store double %240, ptr %24, align 8, !tbaa !11
  %241 = load ptr, ptr %13, align 8, !tbaa !9
  %242 = load i32, ptr %32, align 4, !tbaa !5
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %32, align 4, !tbaa !5
  %244 = sext i32 %242 to i64
  %245 = getelementptr inbounds float, ptr %241, i64 %244
  %246 = load float, ptr %245, align 4, !tbaa !13
  %247 = fpext float %246 to double
  store double %247, ptr %26, align 8, !tbaa !11
  %248 = load double, ptr %25, align 8, !tbaa !11
  %249 = fcmp olt double 0xBD06849B86A12B9B, %248
  br i1 %249, label %250, label %253

250:                                              ; preds = %239
  %251 = load double, ptr %25, align 8, !tbaa !11
  %252 = fcmp olt double %251, 0x3D06849B86A12B9B
  br i1 %252, label %259, label %253

253:                                              ; preds = %250, %239
  %254 = load double, ptr %26, align 8, !tbaa !11
  %255 = load double, ptr %25, align 8, !tbaa !11
  %256 = fsub double %254, %255
  %257 = load double, ptr %25, align 8, !tbaa !11
  %258 = fdiv double %256, %257
  store double %258, ptr %28, align 8, !tbaa !11
  br label %260

259:                                              ; preds = %250
  store double 0.000000e+00, ptr %28, align 8, !tbaa !11
  br label %260

260:                                              ; preds = %259, %253
  %261 = load double, ptr %26, align 8, !tbaa !11
  store double %261, ptr %25, align 8, !tbaa !11
  %262 = load double, ptr %29, align 8, !tbaa !11
  %263 = load double, ptr %18, align 8, !tbaa !11
  %264 = load double, ptr %20, align 8, !tbaa !11
  %265 = load double, ptr %20, align 8, !tbaa !11
  %266 = fmul double %264, %265
  %267 = fneg double %266
  %268 = call double @llvm.fmuladd.f64(double %262, double %263, double %267)
  store double %268, ptr %26, align 8, !tbaa !11
  %269 = load double, ptr %26, align 8, !tbaa !11
  %270 = fcmp olt double 0xBD06849B86A12B9B, %269
  br i1 %270, label %271, label %274

271:                                              ; preds = %260
  %272 = load double, ptr %26, align 8, !tbaa !11
  %273 = fcmp olt double %272, 0x3D06849B86A12B9B
  br i1 %273, label %289, label %274

274:                                              ; preds = %271, %260
  %275 = load double, ptr %29, align 8, !tbaa !11
  %276 = load double, ptr %19, align 8, !tbaa !11
  %277 = load double, ptr %20, align 8, !tbaa !11
  %278 = load double, ptr %21, align 8, !tbaa !11
  %279 = fmul double %277, %278
  %280 = fneg double %279
  %281 = call double @llvm.fmuladd.f64(double %275, double %276, double %280)
  %282 = load double, ptr %26, align 8, !tbaa !11
  %283 = fdiv double %281, %282
  %284 = load ptr, ptr %17, align 8, !tbaa !9
  %285 = load i32, ptr %31, align 4, !tbaa !5
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %31, align 4, !tbaa !5
  %287 = sext i32 %285 to i64
  %288 = getelementptr inbounds double, ptr %284, i64 %287
  store double %283, ptr %288, align 8, !tbaa !11
  br label %295

289:                                              ; preds = %271
  %290 = load ptr, ptr %17, align 8, !tbaa !9
  %291 = load i32, ptr %31, align 4, !tbaa !5
  %292 = add nsw i32 %291, 1
  store i32 %292, ptr %31, align 4, !tbaa !5
  %293 = sext i32 %291 to i64
  %294 = getelementptr inbounds double, ptr %290, i64 %293
  store double 0.000000e+00, ptr %294, align 8, !tbaa !11
  br label %295

295:                                              ; preds = %289, %274
  %296 = load double, ptr %27, align 8, !tbaa !11
  %297 = load double, ptr %27, align 8, !tbaa !11
  %298 = load double, ptr %18, align 8, !tbaa !11
  %299 = fneg double %296
  %300 = call double @llvm.fmuladd.f64(double %299, double %297, double %298)
  store double %300, ptr %18, align 8, !tbaa !11
  %301 = load double, ptr %27, align 8, !tbaa !11
  %302 = load double, ptr %28, align 8, !tbaa !11
  %303 = load double, ptr %19, align 8, !tbaa !11
  %304 = fneg double %301
  %305 = call double @llvm.fmuladd.f64(double %304, double %302, double %303)
  store double %305, ptr %19, align 8, !tbaa !11
  %306 = load double, ptr %27, align 8, !tbaa !11
  %307 = load double, ptr %20, align 8, !tbaa !11
  %308 = fsub double %307, %306
  store double %308, ptr %20, align 8, !tbaa !11
  %309 = load double, ptr %28, align 8, !tbaa !11
  %310 = load double, ptr %21, align 8, !tbaa !11
  %311 = fsub double %310, %309
  store double %311, ptr %21, align 8, !tbaa !11
  br label %312

312:                                              ; preds = %295
  %313 = load i32, ptr %30, align 4, !tbaa !5
  %314 = load i32, ptr %11, align 4, !tbaa !5
  %315 = icmp sle i32 %313, %314
  br i1 %315, label %165, label %316, !llvm.loop !17

316:                                              ; preds = %312
  %317 = load i32, ptr %31, align 4, !tbaa !5
  %318 = load ptr, ptr %16, align 8, !tbaa !9
  store i32 %317, ptr %318, align 4, !tbaa !5
  %319 = load i32, ptr %10, align 4, !tbaa !5
  %320 = load ptr, ptr %15, align 8, !tbaa !9
  store i32 %319, ptr %320, align 4, !tbaa !5
  store i32 0, ptr %9, align 4
  store i32 1, ptr %34, align 4
  br label %321

321:                                              ; preds = %316, %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
  %322 = load i32, ptr %9, align 4
  ret i32 %322
}

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

!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 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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_S_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 float, ptr %2, i64 %23
  %25 = load float, ptr %24, align 4, !tbaa !9
  %26 = getelementptr inbounds float, ptr %3, i64 %23
  %27 = load float, ptr %26, align 4, !tbaa !9
  %28 = insertelement <2 x float> poison, float %25, i64 0
  %29 = insertelement <2 x float> %28, float %27, i64 1
  %30 = fpext <2 x float> %29 to <2 x double>
  %31 = add nsw i32 %22, 1
  %32 = icmp slt i32 %31, %spec.select
  br i1 %32, label %.lr.ph.preheader, label %.._crit_edge_crit_edge

.._crit_edge_crit_edge:                           ; preds = %21
  %.pre = zext nneg i32 %31 to i64
  br label %._crit_edge

.lr.ph.preheader:                                 ; preds = %21
  %33 = sext i32 %31 to i64
  %34 = add nsw i32 %.0166, -2
  %35 = add i32 %31, %34
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ %33, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %36 = phi <2 x double> [ %30, %.lr.ph.preheader ], [ %46, %.lr.ph ]
  %37 = phi <2 x double> [ zeroinitializer, %.lr.ph.preheader ], [ %52, %.lr.ph ]
  %38 = phi <2 x double> [ zeroinitializer, %.lr.ph.preheader ], [ %53, %.lr.ph ]
  %39 = getelementptr inbounds float, ptr %2, i64 %indvars.iv
  %40 = load float, ptr %39, align 4, !tbaa !9
  %41 = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %36)
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %42 = getelementptr inbounds float, ptr %3, i64 %indvars.iv
  %43 = load float, ptr %42, align 4, !tbaa !9
  %44 = insertelement <2 x float> poison, float %40, i64 0
  %45 = insertelement <2 x float> %44, float %43, i64 1
  %46 = fpext <2 x float> %45 to <2 x double>
  %47 = fcmp olt <2 x double> %41, <double 0x3D06849B86A12B9B, double 0x3D06849B86A12B9B>
  %48 = fsub <2 x double> %46, %36
  %49 = fdiv <2 x double> %48, %36
  %50 = select <2 x i1> %47, <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> %37)
  %53 = fadd <2 x double> %38, %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 %35, 1
  br label %._crit_edge

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

62:                                               ; preds = %62, %._crit_edge
  %indvars.iv203 = phi i64 [ %indvars.iv.next204, %62 ], [ %.pre-phi, %._crit_edge ]
  %indvars.iv201 = phi i64 [ %indvars.iv.next202, %62 ], [ 0, %._crit_edge ]
  %indvars.iv199 = phi i64 [ %indvars.iv.next200, %62 ], [ %59, %._crit_edge ]
  %63 = phi <2 x double> [ %109, %62 ], [ %55, %._crit_edge ]
  %64 = phi <2 x double> [ %89, %62 ], [ %30, %._crit_edge ]
  %65 = phi <2 x double> [ %79, %62 ], [ %56, %._crit_edge ]
  %66 = phi <2 x double> [ %110, %62 ], [ %57, %._crit_edge ]
  %67 = getelementptr inbounds float, ptr %2, i64 %indvars.iv199
  %68 = load float, ptr %67, align 4, !tbaa !9
  %69 = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %65)
  %indvars.iv.next200 = add nuw nsw i64 %indvars.iv199, 1
  %70 = getelementptr inbounds float, ptr %3, i64 %indvars.iv199
  %71 = load float, ptr %70, align 4, !tbaa !9
  %72 = getelementptr inbounds float, ptr %2, i64 %indvars.iv203
  %73 = load float, ptr %72, align 4, !tbaa !9
  %74 = tail call <2 x double> @llvm.fabs.v2f64(<2 x double> %64)
  %indvars.iv.next204 = add nsw i64 %indvars.iv203, 1
  %75 = getelementptr inbounds float, ptr %3, i64 %indvars.iv203
  %76 = load float, ptr %75, align 4, !tbaa !9
  %77 = insertelement <2 x float> poison, float %68, i64 0
  %78 = insertelement <2 x float> %77, float %71, i64 1
  %79 = fpext <2 x float> %78 to <2 x double>
  %80 = fcmp olt <2 x double> %69, <double 0x3D06849B86A12B9B, double 0x3D06849B86A12B9B>
  %81 = fsub <2 x double> %79, %65
  %82 = fdiv <2 x double> %81, %65
  %83 = select <2 x i1> %80, <2 x double> zeroinitializer, <2 x double> %82
  %84 = shufflevector <2 x double> %83, <2 x double> poison, <2 x i32> zeroinitializer
  %85 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %84, <2 x double> %83, <2 x double> %63)
  %86 = fadd <2 x double> %66, %83
  %87 = insertelement <2 x float> poison, float %73, i64 0
  %88 = insertelement <2 x float> %87, float %76, i64 1
  %89 = fpext <2 x float> %88 to <2 x double>
  %90 = fcmp olt <2 x double> %74, <double 0x3D06849B86A12B9B, double 0x3D06849B86A12B9B>
  %91 = fsub <2 x double> %89, %64
  %92 = fdiv <2 x double> %91, %64
  %93 = select <2 x i1> %90, <2 x double> zeroinitializer, <2 x double> %92
  %94 = extractelement <2 x double> %86, 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> %86, %97
  %99 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %61, <2 x double> %85, <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> %85)
  %110 = fsub <2 x double> %86, %93
  %111 = trunc nuw i64 %indvars.iv199 to i32
  %.not176.not = icmp slt i32 %111, %1
  br i1 %.not176.not, label %62, label %112, !llvm.loop !13

112:                                              ; preds = %62
  %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 = !{!"float", !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