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

; 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
declare dso_local void @transpose_double(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
declare dso_local void @dct_1d_float(ptr noundef, ptr noundef, i8 noundef zeroext) #0

; Function Attrs: nounwind uwtable
define dso_local void @dct_loeffler_float(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 i32, align 4
  %8 = alloca [8 x [8 x double]], align 16
  %9 = alloca [8 x [8 x double]], align 16
  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 4, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 512, ptr %8) #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 %8, 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 %9) #2
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %53, %40
  %42 = load i32, ptr %7, align 4, !tbaa !9
  %43 = icmp slt i32 %42, 8
  br i1 %43, label %44, label %56

44:                                               ; preds = %41
  %45 = load i32, ptr %7, align 4, !tbaa !9
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [8 x [8 x double]], ptr %8, i64 0, i64 %46
  %48 = getelementptr inbounds [8 x double], ptr %47, i64 0, i64 0
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [8 x [8 x double]], ptr %9, i64 0, i64 %50
  %52 = getelementptr inbounds [8 x double], ptr %51, i64 0, i64 0
  call void @dct_1d_float(ptr noundef %48, ptr noundef %52, i8 noundef zeroext 1)
  br label %53

53:                                               ; preds = %44
  %54 = load i32, ptr %7, align 4, !tbaa !9
  %55 = add nsw i32 %54, 1
  store i32 %55, ptr %7, align 4, !tbaa !9
  br label %41, !llvm.loop !17

56:                                               ; preds = %41
  %57 = getelementptr inbounds [8 x [8 x double]], ptr %9, i64 0, i64 0
  call void @transpose_double(ptr noundef %57)
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %58

58:                                               ; preds = %70, %56
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = icmp slt i32 %59, 8
  br i1 %60, label %61, label %73

61:                                               ; preds = %58
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds [8 x [8 x double]], ptr %9, i64 0, i64 %63
  %65 = getelementptr inbounds [8 x double], ptr %64, i64 0, i64 0
  %66 = load i32, ptr %7, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [8 x [8 x double]], ptr %8, i64 0, i64 %67
  %69 = getelementptr inbounds [8 x double], ptr %68, i64 0, i64 0
  call void @dct_1d_float(ptr noundef %65, ptr noundef %69, i8 noundef zeroext 0)
  br label %70

70:                                               ; preds = %61
  %71 = load i32, ptr %7, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %7, align 4, !tbaa !9
  br label %58, !llvm.loop !18

73:                                               ; preds = %58
  %74 = getelementptr inbounds [8 x [8 x double]], ptr %8, i64 0, i64 0
  call void @transpose_double(ptr noundef %74)
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %123, %73
  %76 = load i32, ptr %5, align 4, !tbaa !9
  %77 = icmp slt i32 %76, 8
  br i1 %77, label %78, label %126

78:                                               ; preds = %75
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %119, %78
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = icmp slt i32 %80, 8
  br i1 %81, label %82, label %122

82:                                               ; preds = %79
  %83 = load i32, ptr %5, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds [8 x [8 x double]], ptr %8, i64 0, i64 %84
  %86 = load i32, ptr %6, align 4, !tbaa !9
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds [8 x double], ptr %85, i64 0, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !12
  %90 = fcmp oge double %89, 0.000000e+00
  br i1 %90, label %91, label %100

91:                                               ; preds = %82
  %92 = load i32, ptr %5, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds [8 x [8 x double]], ptr %8, i64 0, i64 %93
  %95 = load i32, ptr %6, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds [8 x double], ptr %94, i64 0, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !12
  %99 = fadd double %98, 5.000000e-01
  br label %109

100:                                              ; preds = %82
  %101 = load i32, ptr %5, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [8 x [8 x double]], ptr %8, i64 0, i64 %102
  %104 = load i32, ptr %6, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [8 x double], ptr %103, i64 0, i64 %105
  %107 = load double, ptr %106, align 8, !tbaa !12
  %108 = fsub double %107, 5.000000e-01
  br label %109

109:                                              ; preds = %100, %91
  %110 = phi double [ %99, %91 ], [ %108, %100 ]
  %111 = fptosi double %110 to i16
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = load i32, ptr %5, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds [8 x i16], ptr %112, i64 %114
  %116 = load i32, ptr %6, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds [8 x i16], ptr %115, i64 0, i64 %117
  store i16 %111, ptr %118, align 2, !tbaa !19
  br label %119

119:                                              ; preds = %109
  %120 = load i32, ptr %6, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %6, align 4, !tbaa !9
  br label %79, !llvm.loop !21

122:                                              ; preds = %79
  br label %123

123:                                              ; preds = %122
  %124 = load i32, ptr %5, align 4, !tbaa !9
  %125 = add nsw i32 %124, 1
  store i32 %125, ptr %5, align 4, !tbaa !9
  br label %75, !llvm.loop !22

126:                                              ; preds = %75
  call void @llvm.lifetime.end.p0(i64 512, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 512, ptr %8) #2
  call void @llvm.lifetime.end.p0(i64 4, 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 = distinct !{!17, !15}
!18 = distinct !{!18, !15}
!19 = !{!20, !20, i64 0}
!20 = !{!"short", !7, i64 0}
!21 = distinct !{!21, !15}
!22 = distinct !{!22, !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"

; Function Attrs: nounwind uwtable
declare dso_local void @transpose_double(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
declare dso_local void @dct_1d_float(ptr noundef, ptr noundef, i8 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @dct_loeffler_float(ptr nocapture noundef readonly %0, ptr nocapture noundef writeonly %1) local_unnamed_addr #0 {
.preheader35:
  %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 @dct_1d_float(ptr noundef nonnull %2, ptr noundef nonnull %3, i8 noundef zeroext 1)
  %130 = getelementptr inbounds i8, ptr %3, i64 64
  call void @dct_1d_float(ptr noundef nonnull %19, ptr noundef nonnull %130, i8 noundef zeroext 1)
  %131 = getelementptr inbounds i8, ptr %3, i64 128
  call void @dct_1d_float(ptr noundef nonnull %35, ptr noundef nonnull %131, i8 noundef zeroext 1)
  %132 = getelementptr inbounds i8, ptr %3, i64 192
  call void @dct_1d_float(ptr noundef nonnull %51, ptr noundef nonnull %132, i8 noundef zeroext 1)
  %133 = getelementptr inbounds i8, ptr %3, i64 256
  call void @dct_1d_float(ptr noundef nonnull %67, ptr noundef nonnull %133, i8 noundef zeroext 1)
  %134 = getelementptr inbounds i8, ptr %3, i64 320
  call void @dct_1d_float(ptr noundef nonnull %83, ptr noundef nonnull %134, i8 noundef zeroext 1)
  %135 = getelementptr inbounds i8, ptr %3, i64 384
  call void @dct_1d_float(ptr noundef nonnull %99, ptr noundef nonnull %135, i8 noundef zeroext 1)
  %136 = getelementptr inbounds i8, ptr %3, i64 448
  call void @dct_1d_float(ptr noundef nonnull %115, ptr noundef nonnull %136, i8 noundef zeroext 1)
  call void @transpose_double(ptr noundef nonnull %3)
  call void @dct_1d_float(ptr noundef nonnull %3, ptr noundef nonnull %2, i8 noundef zeroext 0)
  call void @dct_1d_float(ptr noundef nonnull %130, ptr noundef nonnull %19, i8 noundef zeroext 0)
  call void @dct_1d_float(ptr noundef nonnull %131, ptr noundef nonnull %35, i8 noundef zeroext 0)
  call void @dct_1d_float(ptr noundef nonnull %132, ptr noundef nonnull %51, i8 noundef zeroext 0)
  call void @dct_1d_float(ptr noundef nonnull %133, ptr noundef nonnull %67, i8 noundef zeroext 0)
  call void @dct_1d_float(ptr noundef nonnull %134, ptr noundef nonnull %83, i8 noundef zeroext 0)
  call void @dct_1d_float(ptr noundef nonnull %135, ptr noundef nonnull %99, i8 noundef zeroext 0)
  call void @dct_1d_float(ptr noundef nonnull %136, ptr noundef nonnull %115, i8 noundef zeroext 0)
  call void @transpose_double(ptr noundef nonnull %2)
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %.preheader35
  %index = phi i64 [ 0, %.preheader35 ], [ %index.next, %vector.body ]
  %137 = or disjoint i64 %index, 1
  %138 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 0
  %139 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %137, i64 0
  %140 = load double, ptr %138, align 16, !tbaa !8
  %141 = load double, ptr %139, align 16, !tbaa !8
  %142 = insertelement <2 x double> poison, double %140, i64 0
  %143 = insertelement <2 x double> %142, double %141, i64 1
  %144 = fcmp ult <2 x double> %143, zeroinitializer
  %145 = select <2 x i1> %144, <2 x double> <double -5.000000e-01, double -5.000000e-01>, <2 x double> <double 5.000000e-01, double 5.000000e-01>
  %146 = fadd <2 x double> %143, %145
  %147 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 1
  %148 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %137, i64 1
  %149 = load double, ptr %147, align 8, !tbaa !8
  %150 = load double, ptr %148, align 8, !tbaa !8
  %151 = insertelement <2 x double> poison, double %149, i64 0
  %152 = insertelement <2 x double> %151, double %150, i64 1
  %153 = fcmp ult <2 x double> %152, zeroinitializer
  %154 = select <2 x i1> %153, <2 x double> <double -5.000000e-01, double -5.000000e-01>, <2 x double> <double 5.000000e-01, double 5.000000e-01>
  %155 = fadd <2 x double> %152, %154
  %156 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 2
  %157 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %137, i64 2
  %158 = load double, ptr %156, align 16, !tbaa !8
  %159 = load double, ptr %157, align 16, !tbaa !8
  %160 = insertelement <2 x double> poison, double %158, i64 0
  %161 = insertelement <2 x double> %160, double %159, i64 1
  %162 = fcmp ult <2 x double> %161, zeroinitializer
  %163 = select <2 x i1> %162, <2 x double> <double -5.000000e-01, double -5.000000e-01>, <2 x double> <double 5.000000e-01, double 5.000000e-01>
  %164 = fadd <2 x double> %161, %163
  %165 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 3
  %166 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %137, i64 3
  %167 = load double, ptr %165, align 8, !tbaa !8
  %168 = load double, ptr %166, align 8, !tbaa !8
  %169 = insertelement <2 x double> poison, double %167, i64 0
  %170 = insertelement <2 x double> %169, double %168, i64 1
  %171 = fcmp ult <2 x double> %170, zeroinitializer
  %172 = select <2 x i1> %171, <2 x double> <double -5.000000e-01, double -5.000000e-01>, <2 x double> <double 5.000000e-01, double 5.000000e-01>
  %173 = fadd <2 x double> %170, %172
  %174 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 4
  %175 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %137, i64 4
  %176 = load double, ptr %174, align 16, !tbaa !8
  %177 = load double, ptr %175, align 16, !tbaa !8
  %178 = insertelement <2 x double> poison, double %176, i64 0
  %179 = insertelement <2 x double> %178, double %177, i64 1
  %180 = fcmp ult <2 x double> %179, zeroinitializer
  %181 = select <2 x i1> %180, <2 x double> <double -5.000000e-01, double -5.000000e-01>, <2 x double> <double 5.000000e-01, double 5.000000e-01>
  %182 = fadd <2 x double> %179, %181
  %183 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 5
  %184 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %137, i64 5
  %185 = load double, ptr %183, align 8, !tbaa !8
  %186 = load double, ptr %184, align 8, !tbaa !8
  %187 = insertelement <2 x double> poison, double %185, i64 0
  %188 = insertelement <2 x double> %187, double %186, i64 1
  %189 = fcmp ult <2 x double> %188, zeroinitializer
  %190 = select <2 x i1> %189, <2 x double> <double -5.000000e-01, double -5.000000e-01>, <2 x double> <double 5.000000e-01, double 5.000000e-01>
  %191 = fadd <2 x double> %188, %190
  %192 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %index, i64 6
  %193 = getelementptr inbounds [8 x [8 x double]], ptr %2, i64 0, i64 %137, i64 6
  %194 = load double, ptr %192, align 16, !tbaa !8
  %195 = load double, ptr %193, align 16, !tbaa !8
  %196 = insertelement <2 x double> poison, double %194, i64 0
  %197 = insertelement <2 x double> %196, double %195, i64 1
  %198 = fcmp ult <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 %137, 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 = fcmp ult <2 x double> %206, zeroinitializer
  %208 = select <2 x i1> %207, <2 x double> <double -5.000000e-01, double -5.000000e-01>, <2 x double> <double 5.000000e-01, double 5.000000e-01>
  %209 = fadd <2 x double> %206, %208
  %210 = getelementptr inbounds [8 x i16], ptr %1, i64 %index
  %211 = shufflevector <2 x double> %146, <2 x double> %155, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %212 = shufflevector <2 x double> %164, <2 x double> %173, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %213 = shufflevector <2 x double> %182, <2 x double> %191, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %214 = shufflevector <2 x double> %200, <2 x double> %209, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  %215 = shufflevector <4 x double> %211, <4 x double> %212, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  %216 = fptosi <8 x double> %215 to <8 x i16>
  %217 = shufflevector <4 x double> %213, <4 x double> %214, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
  %218 = fptosi <8 x double> %217 to <8 x i16>
  %interleaved.vec = shufflevector <8 x i16> %216, <8 x i16> %218, <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 %210, align 2, !tbaa !10
  %index.next = add nuw i64 %index, 2
  %219 = icmp eq i64 %index.next, 8
  br i1 %219, 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