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

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

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @TA_S_MA(i32 noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #3 {
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = 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 i32 %3, ptr %13, align 4, !tbaa !5
  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) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %24 = load i32, ptr %10, align 4, !tbaa !5
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %8
  store i32 12, ptr %9, align 4
  store i32 1, ptr %23, align 4
  br label %199

27:                                               ; preds = %8
  %28 = load i32, ptr %11, align 4, !tbaa !5
  %29 = icmp slt i32 %28, 0
  br i1 %29, label %34, label %30

30:                                               ; preds = %27
  %31 = load i32, ptr %11, align 4, !tbaa !5
  %32 = load i32, ptr %10, align 4, !tbaa !5
  %33 = icmp slt i32 %31, %32
  br i1 %33, label %34, label %35

34:                                               ; preds = %30, %27
  store i32 13, ptr %9, align 4
  store i32 1, ptr %23, align 4
  br label %199

35:                                               ; preds = %30
  %36 = load ptr, ptr %12, align 8, !tbaa !9
  %37 = icmp ne ptr %36, null
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  store i32 2, ptr %9, align 4
  store i32 1, ptr %23, align 4
  br label %199

39:                                               ; preds = %35
  %40 = load i32, ptr %13, align 4, !tbaa !5
  %41 = icmp eq i32 %40, -2147483648
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  store i32 30, ptr %13, align 4, !tbaa !5
  br label %51

43:                                               ; preds = %39
  %44 = load i32, ptr %13, align 4, !tbaa !5
  %45 = icmp slt i32 %44, 1
  br i1 %45, label %49, label %46

46:                                               ; preds = %43
  %47 = load i32, ptr %13, align 4, !tbaa !5
  %48 = icmp sgt i32 %47, 100000
  br i1 %48, label %49, label %50

49:                                               ; preds = %46, %43
  store i32 2, ptr %9, align 4
  store i32 1, ptr %23, align 4
  br label %199

50:                                               ; preds = %46
  br label %51

51:                                               ; preds = %50, %42
  %52 = load i32, ptr %14, align 4, !tbaa !5
  %53 = icmp eq i32 %52, -2147483648
  br i1 %53, label %54, label %55

54:                                               ; preds = %51
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %63

55:                                               ; preds = %51
  %56 = load i32, ptr %14, align 4, !tbaa !5
  %57 = icmp slt i32 %56, 0
  br i1 %57, label %61, label %58

58:                                               ; preds = %55
  %59 = load i32, ptr %14, align 4, !tbaa !5
  %60 = icmp sgt i32 %59, 8
  br i1 %60, label %61, label %62

61:                                               ; preds = %58, %55
  store i32 2, ptr %9, align 4
  store i32 1, ptr %23, align 4
  br label %199

62:                                               ; preds = %58
  br label %63

63:                                               ; preds = %62, %54
  %64 = load ptr, ptr %17, align 8, !tbaa !9
  %65 = icmp ne ptr %64, null
  br i1 %65, label %67, label %66

66:                                               ; preds = %63
  store i32 2, ptr %9, align 4
  store i32 1, ptr %23, align 4
  br label %199

67:                                               ; preds = %63
  %68 = load i32, ptr %13, align 4, !tbaa !5
  %69 = icmp eq i32 %68, 1
  br i1 %69, label %70, label %101

70:                                               ; preds = %67
  %71 = load i32, ptr %11, align 4, !tbaa !5
  %72 = load i32, ptr %10, align 4, !tbaa !5
  %73 = sub nsw i32 %71, %72
  %74 = add nsw i32 %73, 1
  store i32 %74, ptr %20, align 4, !tbaa !5
  %75 = load i32, ptr %20, align 4, !tbaa !5
  %76 = load ptr, ptr %16, align 8, !tbaa !9
  store i32 %75, ptr %76, align 4, !tbaa !5
  %77 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %77, ptr %22, align 4, !tbaa !5
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %93, %70
  %79 = load i32, ptr %21, align 4, !tbaa !5
  %80 = load i32, ptr %20, align 4, !tbaa !5
  %81 = icmp slt i32 %79, %80
  br i1 %81, label %82, label %98

82:                                               ; preds = %78
  %83 = load ptr, ptr %12, align 8, !tbaa !9
  %84 = load i32, ptr %22, align 4, !tbaa !5
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds float, ptr %83, i64 %85
  %87 = load float, ptr %86, align 4, !tbaa !11
  %88 = fpext float %87 to double
  %89 = load ptr, ptr %17, align 8, !tbaa !9
  %90 = load i32, ptr %21, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds double, ptr %89, i64 %91
  store double %88, ptr %92, align 8, !tbaa !13
  br label %93

93:                                               ; preds = %82
  %94 = load i32, ptr %21, align 4, !tbaa !5
  %95 = add nsw i32 %94, 1
  store i32 %95, ptr %21, align 4, !tbaa !5
  %96 = load i32, ptr %22, align 4, !tbaa !5
  %97 = add nsw i32 %96, 1
  store i32 %97, ptr %22, align 4, !tbaa !5
  br label %78, !llvm.loop !15

98:                                               ; preds = %78
  %99 = load i32, ptr %10, align 4, !tbaa !5
  %100 = load ptr, ptr %15, align 8, !tbaa !9
  store i32 %99, ptr %100, align 4, !tbaa !5
  store i32 0, ptr %9, align 4
  store i32 1, ptr %23, align 4
  br label %199

101:                                              ; preds = %67
  %102 = load i32, ptr %14, align 4, !tbaa !5
  switch i32 %102, label %196 [
    i32 0, label %103
    i32 1, label %112
    i32 2, label %121
    i32 3, label %130
    i32 4, label %139
    i32 5, label %148
    i32 6, label %157
    i32 7, label %166
    i32 8, label %187
  ]

103:                                              ; preds = %101
  %104 = load i32, ptr %10, align 4, !tbaa !5
  %105 = load i32, ptr %11, align 4, !tbaa !5
  %106 = load ptr, ptr %12, align 8, !tbaa !9
  %107 = load i32, ptr %13, align 4, !tbaa !5
  %108 = load ptr, ptr %15, align 8, !tbaa !9
  %109 = load ptr, ptr %16, align 8, !tbaa !9
  %110 = load ptr, ptr %17, align 8, !tbaa !9
  %111 = call i32 @TA_S_SMA(i32 noundef %104, i32 noundef %105, ptr noundef %106, i32 noundef %107, ptr noundef %108, ptr noundef %109, ptr noundef %110)
  store i32 %111, ptr %19, align 4, !tbaa !5
  br label %197

112:                                              ; preds = %101
  %113 = load i32, ptr %10, align 4, !tbaa !5
  %114 = load i32, ptr %11, align 4, !tbaa !5
  %115 = load ptr, ptr %12, align 8, !tbaa !9
  %116 = load i32, ptr %13, align 4, !tbaa !5
  %117 = load ptr, ptr %15, align 8, !tbaa !9
  %118 = load ptr, ptr %16, align 8, !tbaa !9
  %119 = load ptr, ptr %17, align 8, !tbaa !9
  %120 = call i32 @TA_S_EMA(i32 noundef %113, i32 noundef %114, ptr noundef %115, i32 noundef %116, ptr noundef %117, ptr noundef %118, ptr noundef %119)
  store i32 %120, ptr %19, align 4, !tbaa !5
  br label %197

121:                                              ; preds = %101
  %122 = load i32, ptr %10, align 4, !tbaa !5
  %123 = load i32, ptr %11, align 4, !tbaa !5
  %124 = load ptr, ptr %12, align 8, !tbaa !9
  %125 = load i32, ptr %13, align 4, !tbaa !5
  %126 = load ptr, ptr %15, align 8, !tbaa !9
  %127 = load ptr, ptr %16, align 8, !tbaa !9
  %128 = load ptr, ptr %17, align 8, !tbaa !9
  %129 = call i32 @TA_S_WMA(i32 noundef %122, i32 noundef %123, ptr noundef %124, i32 noundef %125, ptr noundef %126, ptr noundef %127, ptr noundef %128)
  store i32 %129, ptr %19, align 4, !tbaa !5
  br label %197

130:                                              ; preds = %101
  %131 = load i32, ptr %10, align 4, !tbaa !5
  %132 = load i32, ptr %11, align 4, !tbaa !5
  %133 = load ptr, ptr %12, align 8, !tbaa !9
  %134 = load i32, ptr %13, align 4, !tbaa !5
  %135 = load ptr, ptr %15, align 8, !tbaa !9
  %136 = load ptr, ptr %16, align 8, !tbaa !9
  %137 = load ptr, ptr %17, align 8, !tbaa !9
  %138 = call i32 @TA_S_DEMA(i32 noundef %131, i32 noundef %132, ptr noundef %133, i32 noundef %134, ptr noundef %135, ptr noundef %136, ptr noundef %137)
  store i32 %138, ptr %19, align 4, !tbaa !5
  br label %197

139:                                              ; preds = %101
  %140 = load i32, ptr %10, align 4, !tbaa !5
  %141 = load i32, ptr %11, align 4, !tbaa !5
  %142 = load ptr, ptr %12, align 8, !tbaa !9
  %143 = load i32, ptr %13, align 4, !tbaa !5
  %144 = load ptr, ptr %15, align 8, !tbaa !9
  %145 = load ptr, ptr %16, align 8, !tbaa !9
  %146 = load ptr, ptr %17, align 8, !tbaa !9
  %147 = call i32 @TA_S_TEMA(i32 noundef %140, i32 noundef %141, ptr noundef %142, i32 noundef %143, ptr noundef %144, ptr noundef %145, ptr noundef %146)
  store i32 %147, ptr %19, align 4, !tbaa !5
  br label %197

148:                                              ; preds = %101
  %149 = load i32, ptr %10, align 4, !tbaa !5
  %150 = load i32, ptr %11, align 4, !tbaa !5
  %151 = load ptr, ptr %12, align 8, !tbaa !9
  %152 = load i32, ptr %13, align 4, !tbaa !5
  %153 = load ptr, ptr %15, align 8, !tbaa !9
  %154 = load ptr, ptr %16, align 8, !tbaa !9
  %155 = load ptr, ptr %17, align 8, !tbaa !9
  %156 = call i32 @TA_S_TRIMA(i32 noundef %149, i32 noundef %150, ptr noundef %151, i32 noundef %152, ptr noundef %153, ptr noundef %154, ptr noundef %155)
  store i32 %156, ptr %19, align 4, !tbaa !5
  br label %197

157:                                              ; preds = %101
  %158 = load i32, ptr %10, align 4, !tbaa !5
  %159 = load i32, ptr %11, align 4, !tbaa !5
  %160 = load ptr, ptr %12, align 8, !tbaa !9
  %161 = load i32, ptr %13, align 4, !tbaa !5
  %162 = load ptr, ptr %15, align 8, !tbaa !9
  %163 = load ptr, ptr %16, align 8, !tbaa !9
  %164 = load ptr, ptr %17, align 8, !tbaa !9
  %165 = call i32 @TA_S_KAMA(i32 noundef %158, i32 noundef %159, ptr noundef %160, i32 noundef %161, ptr noundef %162, ptr noundef %163, ptr noundef %164)
  store i32 %165, ptr %19, align 4, !tbaa !5
  br label %197

166:                                              ; preds = %101
  %167 = load i32, ptr %11, align 4, !tbaa !5
  %168 = load i32, ptr %10, align 4, !tbaa !5
  %169 = sub nsw i32 %167, %168
  %170 = add nsw i32 %169, 1
  %171 = sext i32 %170 to i64
  %172 = mul i64 8, %171
  %173 = call noalias ptr @malloc(i64 noundef %172) #6
  store ptr %173, ptr %18, align 8, !tbaa !9
  %174 = load ptr, ptr %18, align 8, !tbaa !9
  %175 = icmp ne ptr %174, null
  br i1 %175, label %177, label %176

176:                                              ; preds = %166
  store i32 3, ptr %9, align 4
  store i32 1, ptr %23, align 4
  br label %199

177:                                              ; preds = %166
  %178 = load i32, ptr %10, align 4, !tbaa !5
  %179 = load i32, ptr %11, align 4, !tbaa !5
  %180 = load ptr, ptr %12, align 8, !tbaa !9
  %181 = load ptr, ptr %15, align 8, !tbaa !9
  %182 = load ptr, ptr %16, align 8, !tbaa !9
  %183 = load ptr, ptr %17, align 8, !tbaa !9
  %184 = load ptr, ptr %18, align 8, !tbaa !9
  %185 = call i32 @TA_S_MAMA(i32 noundef %178, i32 noundef %179, ptr noundef %180, double noundef 5.000000e-01, double noundef 5.000000e-02, ptr noundef %181, ptr noundef %182, ptr noundef %183, ptr noundef %184)
  store i32 %185, ptr %19, align 4, !tbaa !5
  %186 = load ptr, ptr %18, align 8, !tbaa !9
  call void @free(ptr noundef %186) #5
  br label %197

187:                                              ; preds = %101
  %188 = load i32, ptr %10, align 4, !tbaa !5
  %189 = load i32, ptr %11, align 4, !tbaa !5
  %190 = load ptr, ptr %12, align 8, !tbaa !9
  %191 = load i32, ptr %13, align 4, !tbaa !5
  %192 = load ptr, ptr %15, align 8, !tbaa !9
  %193 = load ptr, ptr %16, align 8, !tbaa !9
  %194 = load ptr, ptr %17, align 8, !tbaa !9
  %195 = call i32 @TA_S_T3(i32 noundef %188, i32 noundef %189, ptr noundef %190, i32 noundef %191, double noundef 0x3FE6666666666666, ptr noundef %192, ptr noundef %193, ptr noundef %194)
  store i32 %195, ptr %19, align 4, !tbaa !5
  br label %197

196:                                              ; preds = %101
  store i32 2, ptr %19, align 4, !tbaa !5
  br label %197

197:                                              ; preds = %196, %187, %177, %157, %148, %139, %130, %121, %112, %103
  %198 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %198, ptr %9, align 4
  store i32 1, ptr %23, align 4
  br label %199

199:                                              ; preds = %197, %176, %98, %66, %61, %49, %38, %34, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %200 = load i32, ptr %9, align 4
  ret i32 %200
}

declare i32 @TA_S_SMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @TA_S_EMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @TA_S_WMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @TA_S_DEMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @TA_S_TEMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @TA_S_TRIMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @TA_S_KAMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @TA_S_MAMA(i32 noundef, i32 noundef, ptr noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

declare i32 @TA_S_T3(i32 noundef, i32 noundef, ptr noundef, i32 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

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


; 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: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local i32 @TA_S_MA(i32 noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, i32 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #2 {
  %9 = icmp slt i32 %0, 0
  br i1 %9, label %63, label %10

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

12:                                               ; preds = %10
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %63, label %13

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

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

17:                                               ; preds = %13, %15
  %.0103 = phi i32 [ %3, %15 ], [ 30, %13 ]
  %18 = icmp eq i32 %4, -2147483648
  br i1 %18, label %20, label %19

19:                                               ; preds = %17
  %or.cond3 = icmp ugt i32 %4, 8
  br i1 %or.cond3, label %63, label %20

20:                                               ; preds = %17, %19
  %.0104 = phi i32 [ %4, %19 ], [ 0, %17 ]
  %.not112 = icmp eq ptr %7, null
  br i1 %.not112, label %63, label %21

21:                                               ; preds = %20
  %22 = icmp eq i32 %.0103, 1
  br i1 %22, label %23, label %39

23:                                               ; preds = %21
  %24 = sub nsw i32 %1, %0
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %6, align 4, !tbaa !5
  %.not114116 = icmp slt i32 %24, 0
  br i1 %.not114116, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %23
  %26 = zext nneg i32 %0 to i64
  %27 = add nuw i32 %1, 1
  %28 = sub i32 %27, %0
  %wide.trip.count = zext i32 %28 to i64
  %min.iters.check = icmp ult i32 %28, 4
  br i1 %min.iters.check, label %.lr.ph.preheader126, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %wide.trip.count, 4294967292
  %ind.end = add nuw nsw i64 %n.vec, %26
  %invariant.gep = getelementptr float, ptr %2, i64 %26
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %gep = getelementptr float, ptr %invariant.gep, i64 %index
  %29 = getelementptr inbounds i8, ptr %gep, i64 8
  %wide.load = load <2 x float>, ptr %gep, align 4, !tbaa !9
  %wide.load125 = load <2 x float>, ptr %29, align 4, !tbaa !9
  %30 = fpext <2 x float> %wide.load to <2 x double>
  %31 = fpext <2 x float> %wide.load125 to <2 x double>
  %32 = getelementptr inbounds double, ptr %7, i64 %index
  %33 = getelementptr inbounds i8, ptr %32, i64 16
  store <2 x double> %30, ptr %32, align 8, !tbaa !11
  store <2 x double> %31, ptr %33, align 8, !tbaa !11
  %index.next = add nuw i64 %index, 4
  %34 = icmp eq i64 %index.next, %n.vec
  br i1 %34, label %middle.block, label %vector.body, !llvm.loop !13

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader126

.lr.ph.preheader126:                              ; preds = %middle.block, %.lr.ph.preheader
  %indvars.iv119.ph = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %indvars.iv.ph = phi i64 [ %26, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader126, %.lr.ph
  %indvars.iv119 = phi i64 [ %indvars.iv.next120, %.lr.ph ], [ %indvars.iv119.ph, %.lr.ph.preheader126 ]
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader126 ]
  %35 = getelementptr inbounds float, ptr %2, i64 %indvars.iv
  %36 = load float, ptr %35, align 4, !tbaa !9
  %37 = fpext float %36 to double
  %38 = getelementptr inbounds double, ptr %7, i64 %indvars.iv119
  store double %37, ptr %38, align 8, !tbaa !11
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next120, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph, %middle.block, %23
  store i32 %0, ptr %5, align 4, !tbaa !5
  br label %63

39:                                               ; preds = %21
  switch i32 %.0104, label %default.unreachable [
    i32 0, label %40
    i32 1, label %42
    i32 2, label %44
    i32 3, label %46
    i32 4, label %48
    i32 5, label %50
    i32 6, label %52
    i32 7, label %54
    i32 8, label %61
  ]

40:                                               ; preds = %39
  %41 = tail call i32 @TA_S_SMA(i32 noundef %0, i32 noundef %1, ptr noundef nonnull %2, i32 noundef %.0103, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %7) #4
  br label %63

42:                                               ; preds = %39
  %43 = tail call i32 @TA_S_EMA(i32 noundef %0, i32 noundef %1, ptr noundef nonnull %2, i32 noundef %.0103, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %7) #4
  br label %63

44:                                               ; preds = %39
  %45 = tail call i32 @TA_S_WMA(i32 noundef %0, i32 noundef %1, ptr noundef nonnull %2, i32 noundef %.0103, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %7) #4
  br label %63

46:                                               ; preds = %39
  %47 = tail call i32 @TA_S_DEMA(i32 noundef %0, i32 noundef %1, ptr noundef nonnull %2, i32 noundef %.0103, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %7) #4
  br label %63

48:                                               ; preds = %39
  %49 = tail call i32 @TA_S_TEMA(i32 noundef %0, i32 noundef %1, ptr noundef nonnull %2, i32 noundef %.0103, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %7) #4
  br label %63

50:                                               ; preds = %39
  %51 = tail call i32 @TA_S_TRIMA(i32 noundef %0, i32 noundef %1, ptr noundef nonnull %2, i32 noundef %.0103, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %7) #4
  br label %63

52:                                               ; preds = %39
  %53 = tail call i32 @TA_S_KAMA(i32 noundef %0, i32 noundef %1, ptr noundef nonnull %2, i32 noundef %.0103, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %7) #4
  br label %63

54:                                               ; preds = %39
  %reass.sub = sub nsw i32 %1, %0
  %55 = add i32 %reass.sub, 1
  %56 = sext i32 %55 to i64
  %57 = shl nsw i64 %56, 3
  %58 = tail call noalias ptr @malloc(i64 noundef %57) #5
  %.not113 = icmp eq ptr %58, null
  br i1 %.not113, label %63, label %59

59:                                               ; preds = %54
  %60 = tail call i32 @TA_S_MAMA(i32 noundef %0, i32 noundef %1, ptr noundef nonnull %2, double noundef 5.000000e-01, double noundef 5.000000e-02, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %7, ptr noundef nonnull %58) #4
  tail call void @free(ptr noundef nonnull %58) #4
  br label %63

61:                                               ; preds = %39
  %62 = tail call i32 @TA_S_T3(i32 noundef %0, i32 noundef %1, ptr noundef nonnull %2, i32 noundef %.0103, double noundef 0x3FE6666666666666, ptr noundef %5, ptr noundef %6, ptr noundef nonnull %7) #4
  br label %63

default.unreachable:                              ; preds = %39
  unreachable

63:                                               ; preds = %40, %42, %44, %46, %48, %50, %52, %59, %61, %54, %20, %19, %15, %12, %10, %8, %._crit_edge
  %.0101 = phi i32 [ 0, %._crit_edge ], [ 12, %8 ], [ 13, %10 ], [ 2, %12 ], [ 2, %15 ], [ 2, %19 ], [ 2, %20 ], [ 3, %54 ], [ %62, %61 ], [ %60, %59 ], [ %53, %52 ], [ %51, %50 ], [ %49, %48 ], [ %47, %46 ], [ %45, %44 ], [ %43, %42 ], [ %41, %40 ]
  ret i32 %.0101
}

declare i32 @TA_S_SMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @TA_S_EMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @TA_S_WMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @TA_S_DEMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @TA_S_TEMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @TA_S_TRIMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @TA_S_KAMA(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @TA_S_MAMA(i32 noundef, i32 noundef, ptr noundef, double noundef, double noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @TA_S_T3(i32 noundef, i32 noundef, ptr noundef, i32 noundef, double noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind allocsize(0) }

!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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = distinct !{!13, !14, !15, !16}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!"llvm.loop.isvectorized", i32 1}
!16 = !{!"llvm.loop.unroll.runtime.disable"}
!17 = distinct !{!17, !14, !16, !15}


; Effective O3 passes: ConstraintEliminationPass,CorrelatedValuePropagationPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass