; LLVM IR from robertklee/C-Optimization-DCT :: src/dct (twostep_slow)

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

@twostep_slow_C = external hidden global [8 x [8 x double]], align 16
@twostep_slow_CT = external hidden global [8 x [8 x double]], align 16

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

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

; Function Attrs: nounwind uwtable
define dso_local void @dct_twostep_slow(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca [8 x [8 x double]], align 16
  %8 = alloca [8 x [8 x double]], align 16
  %9 = alloca double, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #2
  call void @llvm.lifetime.start.p0(i64 512, ptr %7) #2
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %10

10:                                               ; preds = %37, %2
  %11 = load i32, ptr %5, align 4, !tbaa !9
  %12 = icmp slt i32 %11, 8
  br i1 %12, label %13, label %40

13:                                               ; preds = %10
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %14

14:                                               ; preds = %33, %13
  %15 = load i32, ptr %6, align 4, !tbaa !9
  %16 = icmp slt i32 %15, 8
  br i1 %16, label %17, label %36

17:                                               ; preds = %14
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [8 x i8], ptr %18, i64 %20
  %22 = load i32, ptr %6, align 4, !tbaa !9
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [8 x i8], ptr %21, i64 0, i64 %23
  %25 = load i8, ptr %24, align 1, !tbaa !11
  %26 = sitofp i8 %25 to double
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [8 x [8 x double]], ptr %7, i64 0, i64 %28
  %30 = load i32, ptr %6, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [8 x double], ptr %29, i64 0, i64 %31
  store double %26, ptr %32, align 8, !tbaa !12
  br label %33

33:                                               ; preds = %17
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = add nsw i32 %34, 1
  store i32 %35, ptr %6, align 4, !tbaa !9
  br label %14, !llvm.loop !14

36:                                               ; preds = %14
  br label %37

37:                                               ; preds = %36
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = add nsw i32 %38, 1
  store i32 %39, ptr %5, align 4, !tbaa !9
  br label %10, !llvm.loop !16

40:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 512, ptr %8) #2
  %41 = getelementptr inbounds [8 x [8 x double]], ptr %7, i64 0, i64 0
  %42 = getelementptr inbounds [8 x [8 x double]], ptr %8, i64 0, i64 0
  call void @square_matrix_multiply(ptr noundef @twostep_slow_C, ptr noundef %41, ptr noundef %42)
  %43 = getelementptr inbounds [8 x [8 x double]], ptr %8, i64 0, i64 0
  %44 = getelementptr inbounds [8 x [8 x double]], ptr %7, i64 0, i64 0
  call void @square_matrix_multiply(ptr noundef %43, ptr noundef @twostep_slow_CT, ptr noundef %44)
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %45

45:                                               ; preds = %83, %40
  %46 = load i32, ptr %5, align 4, !tbaa !9
  %47 = icmp slt i32 %46, 8
  br i1 %47, label %48, label %86

48:                                               ; preds = %45
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %49

49:                                               ; preds = %79, %48
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = icmp slt i32 %50, 8
  br i1 %51, label %52, label %82

52:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  %53 = load i32, ptr %5, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [8 x [8 x double]], ptr %7, i64 0, i64 %54
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [8 x double], ptr %55, i64 0, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !12
  %60 = fdiv double %59, 4.000000e+00
  store double %60, ptr %9, align 8, !tbaa !12
  %61 = load double, ptr %9, align 8, !tbaa !12
  %62 = fcmp oge double %61, 0.000000e+00
  br i1 %62, label %63, label %66

63:                                               ; preds = %52
  %64 = load double, ptr %9, align 8, !tbaa !12
  %65 = fadd double %64, 5.000000e-01
  br label %69

66:                                               ; preds = %52
  %67 = load double, ptr %9, align 8, !tbaa !12
  %68 = fsub double %67, 5.000000e-01
  br label %69

69:                                               ; preds = %66, %63
  %70 = phi double [ %65, %63 ], [ %68, %66 ]
  %71 = fptosi double %70 to i16
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = load i32, ptr %5, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [8 x i16], ptr %72, i64 %74
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds [8 x i16], ptr %75, i64 0, i64 %77
  store i16 %71, ptr %78, align 2, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  br label %79

79:                                               ; preds = %69
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %6, align 4, !tbaa !9
  br label %49, !llvm.loop !19

82:                                               ; preds = %49
  br label %83

83:                                               ; preds = %82
  %84 = load i32, ptr %5, align 4, !tbaa !9
  %85 = add nsw i32 %84, 1
  store i32 %85, ptr %5, align 4, !tbaa !9
  br label %45, !llvm.loop !20

86:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 512, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 512, ptr %7) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #2
  ret void
}

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

!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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = !{!18, !18, i64 0}
!18 = !{!"short", !7, i64 0}
!19 = distinct !{!19, !15}
!20 = distinct !{!20, !15}


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

@twostep_slow_C = external hidden global [8 x [8 x double]], align 16
@twostep_slow_CT = external hidden global [8 x [8 x double]], align 16

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @dct_twostep_slow(ptr nocapture noundef readonly %0, ptr nocapture noundef writeonly %1) local_unnamed_addr #0 {
.preheader22:
  %2 = alloca [8 x [8 x double]], align 16
  %3 = alloca [8 x [8 x double]], align 16
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #2
  %4 = load <2 x i8>, ptr %0, align 1, !tbaa !5
  %5 = sitofp <2 x i8> %4 to <2 x double>
  store <2 x double> %5, ptr %2, align 16, !tbaa !8
  %6 = getelementptr inbounds i8, ptr %0, i64 2
  %7 = getelementptr inbounds i8, ptr %2, i64 16
  %8 = load <2 x i8>, ptr %6, align 1, !tbaa !5
  %9 = sitofp <2 x i8> %8 to <2 x double>
  store <2 x double> %9, ptr %7, align 16, !tbaa !8
  %10 = getelementptr inbounds i8, ptr %0, i64 4
  %11 = getelementptr inbounds i8, ptr %2, i64 32
  %12 = load <2 x i8>, ptr %10, align 1, !tbaa !5
  %13 = sitofp <2 x i8> %12 to <2 x double>
  store <2 x double> %13, ptr %11, align 16, !tbaa !8
  %14 = getelementptr inbounds i8, ptr %0, i64 6
  %15 = getelementptr inbounds i8, ptr %2, i64 48
  %16 = load <2 x i8>, ptr %14, align 1, !tbaa !5
  %17 = sitofp <2 x i8> %16 to <2 x double>
  store <2 x double> %17, ptr %15, align 16, !tbaa !8
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = getelementptr inbounds i8, ptr %2, i64 64
  %20 = load <2 x i8>, ptr %18, align 1, !tbaa !5
  %21 = sitofp <2 x i8> %20 to <2 x double>
  store <2 x double> %21, ptr %19, align 16, !tbaa !8
  %22 = getelementptr inbounds i8, ptr %0, i64 10
  %23 = getelementptr inbounds i8, ptr %2, i64 80
  %24 = load <2 x i8>, ptr %22, align 1, !tbaa !5
  %25 = sitofp <2 x i8> %24 to <2 x double>
  store <2 x double> %25, ptr %23, align 16, !tbaa !8
  %26 = getelementptr inbounds i8, ptr %0, i64 12
  %27 = getelementptr inbounds i8, ptr %2, i64 96
  %28 = load <2 x i8>, ptr %26, align 1, !tbaa !5
  %29 = sitofp <2 x i8> %28 to <2 x double>
  store <2 x double> %29, ptr %27, align 16, !tbaa !8
  %30 = getelementptr inbounds i8, ptr %0, i64 14
  %31 = getelementptr inbounds i8, ptr %2, i64 112
  %32 = load <2 x i8>, ptr %30, align 1, !tbaa !5
  %33 = sitofp <2 x i8> %32 to <2 x double>
  store <2 x double> %33, ptr %31, align 16, !tbaa !8
  %34 = getelementptr inbounds i8, ptr %0, i64 16
  %35 = getelementptr inbounds i8, ptr %2, i64 128
  %36 = load <2 x i8>, ptr %34, align 1, !tbaa !5
  %37 = sitofp <2 x i8> %36 to <2 x double>
  store <2 x double> %37, ptr %35, align 16, !tbaa !8
  %38 = getelementptr inbounds i8, ptr %0, i64 18
  %39 = getelementptr inbounds i8, ptr %2, i64 144
  %40 = load <2 x i8>, ptr %38, align 1, !tbaa !5
  %41 = sitofp <2 x i8> %40 to <2 x double>
  store <2 x double> %41, ptr %39, align 16, !tbaa !8
  %42 = getelementptr inbounds i8, ptr %0, i64 20
  %43 = getelementptr inbounds i8, ptr %2, i64 160
  %44 = load <2 x i8>, ptr %42, align 1, !tbaa !5
  %45 = sitofp <2 x i8> %44 to <2 x double>
  store <2 x double> %45, ptr %43, align 16, !tbaa !8
  %46 = getelementptr inbounds i8, ptr %0, i64 22
  %47 = getelementptr inbounds i8, ptr %2, i64 176
  %48 = load <2 x i8>, ptr %46, align 1, !tbaa !5
  %49 = sitofp <2 x i8> %48 to <2 x double>
  store <2 x double> %49, ptr %47, align 16, !tbaa !8
  %50 = getelementptr inbounds i8, ptr %0, i64 24
  %51 = getelementptr inbounds i8, ptr %2, i64 192
  %52 = load <2 x i8>, ptr %50, align 1, !tbaa !5
  %53 = sitofp <2 x i8> %52 to <2 x double>
  store <2 x double> %53, ptr %51, align 16, !tbaa !8
  %54 = getelementptr inbounds i8, ptr %0, i64 26
  %55 = getelementptr inbounds i8, ptr %2, i64 208
  %56 = load <2 x i8>, ptr %54, align 1, !tbaa !5
  %57 = sitofp <2 x i8> %56 to <2 x double>
  store <2 x double> %57, ptr %55, align 16, !tbaa !8
  %58 = getelementptr inbounds i8, ptr %0, i64 28
  %59 = getelementptr inbounds i8, ptr %2, i64 224
  %60 = load <2 x i8>, ptr %58, align 1, !tbaa !5
  %61 = sitofp <2 x i8> %60 to <2 x double>
  store <2 x double> %61, ptr %59, align 16, !tbaa !8
  %62 = getelementptr inbounds i8, ptr %0, i64 30
  %63 = getelementptr inbounds i8, ptr %2, i64 240
  %64 = load <2 x i8>, ptr %62, align 1, !tbaa !5
  %65 = sitofp <2 x i8> %64 to <2 x double>
  store <2 x double> %65, ptr %63, align 16, !tbaa !8
  %66 = getelementptr inbounds i8, ptr %0, i64 32
  %67 = getelementptr inbounds i8, ptr %2, i64 256
  %68 = load <2 x i8>, ptr %66, align 1, !tbaa !5
  %69 = sitofp <2 x i8> %68 to <2 x double>
  store <2 x double> %69, ptr %67, align 16, !tbaa !8
  %70 = getelementptr inbounds i8, ptr %0, i64 34
  %71 = getelementptr inbounds i8, ptr %2, i64 272
  %72 = load <2 x i8>, ptr %70, align 1, !tbaa !5
  %73 = sitofp <2 x i8> %72 to <2 x double>
  store <2 x double> %73, ptr %71, align 16, !tbaa !8
  %74 = getelementptr inbounds i8, ptr %0, i64 36
  %75 = getelementptr inbounds i8, ptr %2, i64 288
  %76 = load <2 x i8>, ptr %74, align 1, !tbaa !5
  %77 = sitofp <2 x i8> %76 to <2 x double>
  store <2 x double> %77, ptr %75, align 16, !tbaa !8
  %78 = getelementptr inbounds i8, ptr %0, i64 38
  %79 = getelementptr inbounds i8, ptr %2, i64 304
  %80 = load <2 x i8>, ptr %78, align 1, !tbaa !5
  %81 = sitofp <2 x i8> %80 to <2 x double>
  store <2 x double> %81, ptr %79, align 16, !tbaa !8
  %82 = getelementptr inbounds i8, ptr %0, i64 40
  %83 = getelementptr inbounds i8, ptr %2, i64 320
  %84 = load <2 x i8>, ptr %82, align 1, !tbaa !5
  %85 = sitofp <2 x i8> %84 to <2 x double>
  store <2 x double> %85, ptr %83, align 16, !tbaa !8
  %86 = getelementptr inbounds i8, ptr %0, i64 42
  %87 = getelementptr inbounds i8, ptr %2, i64 336
  %88 = load <2 x i8>, ptr %86, align 1, !tbaa !5
  %89 = sitofp <2 x i8> %88 to <2 x double>
  store <2 x double> %89, ptr %87, align 16, !tbaa !8
  %90 = getelementptr inbounds i8, ptr %0, i64 44
  %91 = getelementptr inbounds i8, ptr %2, i64 352
  %92 = load <2 x i8>, ptr %90, align 1, !tbaa !5
  %93 = sitofp <2 x i8> %92 to <2 x double>
  store <2 x double> %93, ptr %91, align 16, !tbaa !8
  %94 = getelementptr inbounds i8, ptr %0, i64 46
  %95 = getelementptr inbounds i8, ptr %2, i64 368
  %96 = load <2 x i8>, ptr %94, align 1, !tbaa !5
  %97 = sitofp <2 x i8> %96 to <2 x double>
  store <2 x double> %97, ptr %95, align 16, !tbaa !8
  %98 = getelementptr inbounds i8, ptr %0, i64 48
  %99 = getelementptr inbounds i8, ptr %2, i64 384
  %100 = load <2 x i8>, ptr %98, align 1, !tbaa !5
  %101 = sitofp <2 x i8> %100 to <2 x double>
  store <2 x double> %101, ptr %99, align 16, !tbaa !8
  %102 = getelementptr inbounds i8, ptr %0, i64 50
  %103 = getelementptr inbounds i8, ptr %2, i64 400
  %104 = load <2 x i8>, ptr %102, align 1, !tbaa !5
  %105 = sitofp <2 x i8> %104 to <2 x double>
  store <2 x double> %105, ptr %103, align 16, !tbaa !8
  %106 = getelementptr inbounds i8, ptr %0, i64 52
  %107 = getelementptr inbounds i8, ptr %2, i64 416
  %108 = load <2 x i8>, ptr %106, align 1, !tbaa !5
  %109 = sitofp <2 x i8> %108 to <2 x double>
  store <2 x double> %109, ptr %107, align 16, !tbaa !8
  %110 = getelementptr inbounds i8, ptr %0, i64 54
  %111 = getelementptr inbounds i8, ptr %2, i64 432
  %112 = load <2 x i8>, ptr %110, align 1, !tbaa !5
  %113 = sitofp <2 x i8> %112 to <2 x double>
  store <2 x double> %113, ptr %111, align 16, !tbaa !8
  %114 = getelementptr inbounds i8, ptr %0, i64 56
  %115 = getelementptr inbounds i8, ptr %2, i64 448
  %116 = load <2 x i8>, ptr %114, align 1, !tbaa !5
  %117 = sitofp <2 x i8> %116 to <2 x double>
  store <2 x double> %117, ptr %115, align 16, !tbaa !8
  %118 = getelementptr inbounds i8, ptr %0, i64 58
  %119 = getelementptr inbounds i8, ptr %2, i64 464
  %120 = load <2 x i8>, ptr %118, align 1, !tbaa !5
  %121 = sitofp <2 x i8> %120 to <2 x double>
  store <2 x double> %121, ptr %119, align 16, !tbaa !8
  %122 = getelementptr inbounds i8, ptr %0, i64 60
  %123 = getelementptr inbounds i8, ptr %2, i64 480
  %124 = load <2 x i8>, ptr %122, align 1, !tbaa !5
  %125 = sitofp <2 x i8> %124 to <2 x double>
  store <2 x double> %125, ptr %123, align 16, !tbaa !8
  %126 = getelementptr inbounds i8, ptr %0, i64 62
  %127 = getelementptr inbounds i8, ptr %2, i64 496
  %128 = load <2 x i8>, ptr %126, align 1, !tbaa !5
  %129 = sitofp <2 x i8> %128 to <2 x double>
  store <2 x double> %129, ptr %127, align 16, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %3) #2
  call void @square_matrix_multiply(ptr noundef nonnull @twostep_slow_C, ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @square_matrix_multiply(ptr noundef nonnull %3, ptr noundef nonnull @twostep_slow_CT, ptr noundef nonnull %2)
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %.preheader22
  %index = phi i64 [ 0, %.preheader22 ], [ %index.next, %vector.body ]
  %130 = or disjoint i64 %index, 1
  %131 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 0
  %132 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %130, i64 0
  %133 = load double, ptr %131, align 16, !tbaa !8
  %134 = load double, ptr %132, align 16, !tbaa !8
  %135 = insertelement <2 x double> poison, double %133, i64 0
  %136 = insertelement <2 x double> %135, double %134, i64 1
  %137 = fmul <2 x double> %136, <double 2.500000e-01, double 2.500000e-01>
  %138 = fcmp oge <2 x double> %137, zeroinitializer
  %139 = select <2 x i1> %138, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> <double -5.000000e-01, double -5.000000e-01>
  %140 = fadd <2 x double> %137, %139
  %141 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 1
  %142 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %130, i64 1
  %143 = load double, ptr %141, align 8, !tbaa !8
  %144 = load double, ptr %142, align 8, !tbaa !8
  %145 = insertelement <2 x double> poison, double %143, i64 0
  %146 = insertelement <2 x double> %145, double %144, i64 1
  %147 = fmul <2 x double> %146, <double 2.500000e-01, double 2.500000e-01>
  %148 = fcmp oge <2 x double> %147, zeroinitializer
  %149 = select <2 x i1> %148, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> <double -5.000000e-01, double -5.000000e-01>
  %150 = fadd <2 x double> %147, %149
  %151 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 2
  %152 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %130, i64 2
  %153 = load double, ptr %151, align 16, !tbaa !8
  %154 = load double, ptr %152, align 16, !tbaa !8
  %155 = insertelement <2 x double> poison, double %153, i64 0
  %156 = insertelement <2 x double> %155, double %154, i64 1
  %157 = fmul <2 x double> %156, <double 2.500000e-01, double 2.500000e-01>
  %158 = fcmp oge <2 x double> %157, zeroinitializer
  %159 = select <2 x i1> %158, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> <double -5.000000e-01, double -5.000000e-01>
  %160 = fadd <2 x double> %157, %159
  %161 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 3
  %162 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %130, i64 3
  %163 = load double, ptr %161, align 8, !tbaa !8
  %164 = load double, ptr %162, align 8, !tbaa !8
  %165 = insertelement <2 x double> poison, double %163, i64 0
  %166 = insertelement <2 x double> %165, double %164, i64 1
  %167 = fmul <2 x double> %166, <double 2.500000e-01, double 2.500000e-01>
  %168 = fcmp oge <2 x double> %167, zeroinitializer
  %169 = select <2 x i1> %168, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> <double -5.000000e-01, double -5.000000e-01>
  %170 = fadd <2 x double> %167, %169
  %171 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 4
  %172 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %130, i64 4
  %173 = load double, ptr %171, align 16, !tbaa !8
  %174 = load double, ptr %172, align 16, !tbaa !8
  %175 = insertelement <2 x double> poison, double %173, i64 0
  %176 = insertelement <2 x double> %175, double %174, i64 1
  %177 = fmul <2 x double> %176, <double 2.500000e-01, double 2.500000e-01>
  %178 = fcmp oge <2 x double> %177, zeroinitializer
  %179 = select <2 x i1> %178, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> <double -5.000000e-01, double -5.000000e-01>
  %180 = fadd <2 x double> %177, %179
  %181 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 5
  %182 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %130, i64 5
  %183 = load double, ptr %181, align 8, !tbaa !8
  %184 = load double, ptr %182, align 8, !tbaa !8
  %185 = insertelement <2 x double> poison, double %183, i64 0
  %186 = insertelement <2 x double> %185, double %184, i64 1
  %187 = fmul <2 x double> %186, <double 2.500000e-01, double 2.500000e-01>
  %188 = fcmp oge <2 x double> %187, zeroinitializer
  %189 = select <2 x i1> %188, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> <double -5.000000e-01, double -5.000000e-01>
  %190 = fadd <2 x double> %187, %189
  %191 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 6
  %192 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %130, i64 6
  %193 = load double, ptr %191, align 16, !tbaa !8
  %194 = load double, ptr %192, align 16, !tbaa !8
  %195 = insertelement <2 x double> poison, double %193, i64 0
  %196 = insertelement <2 x double> %195, double %194, i64 1
  %197 = fmul <2 x double> %196, <double 2.500000e-01, double 2.500000e-01>
  %198 = fcmp oge <2 x double> %197, zeroinitializer
  %199 = select <2 x i1> %198, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> <double -5.000000e-01, double -5.000000e-01>
  %200 = fadd <2 x double> %197, %199
  %201 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 7
  %202 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %130, i64 7
  %203 = load double, ptr %201, align 8, !tbaa !8
  %204 = load double, ptr %202, align 8, !tbaa !8
  %205 = insertelement <2 x double> poison, double %203, i64 0
  %206 = insertelement <2 x double> %205, double %204, i64 1
  %207 = fmul <2 x double> %206, <double 2.500000e-01, double 2.500000e-01>
  %208 = fcmp oge <2 x double> %207, zeroinitializer
  %209 = select <2 x i1> %208, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> <double -5.000000e-01, double -5.000000e-01>
  %210 = fadd <2 x double> %207, %209
  %211 = getelementptr inbounds [8 x i16], ptr %1, i64 %index
  %212 = shufflevector <2 x double> %140, <2 x double> %150, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %213 = shufflevector <2 x double> %160, <2 x double> %170, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %214 = shufflevector <2 x double> %180, <2 x double> %190, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %215 = shufflevector <2 x double> %200, <2 x double> %210, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %216 = shufflevector <4 x double> %212, <4 x double> %213, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  %217 = fptosi <8 x double> %216 to <8 x i16>
  %218 = shufflevector <4 x double> %214, <4 x double> %215, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  %219 = fptosi <8 x double> %218 to <8 x i16>
  %interleaved.vec = shufflevector <8 x i16> %217, <8 x i16> %219, <16 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14, i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
  store <16 x i16> %interleaved.vec, ptr %211, align 2, !tbaa !10
  %index.next = add nuw i64 %index, 2
  %220 = icmp eq i64 %index.next, 8
  br i1 %220, label %middle.block, label %vector.body, !llvm.loop !12

middle.block:                                     ; preds = %vector.body
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %3) #2
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #2
  ret void
}

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"short", !6, i64 0}
!12 = distinct !{!12, !13, !14, !15}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!"llvm.loop.isvectorized", i32 1}
!15 = !{!"llvm.loop.unroll.runtime.disable"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,VectorCombinePass