; LLVM IR from ljm941004/HYPERCV_PUBLIC :: modules/algorithm/src (dft)

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

%struct.SIMPLE_MAT = type { i32, i32, i32, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1

; 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

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #2

; Function Attrs: nounwind
declare double @cos(double noundef) #3

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

; Function Attrs: nounwind
declare double @sin(double noundef) #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @saturate_cast_float2uchar(float noundef) #5

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @hypercv_idft_ushort(ptr noundef %0, ptr noundef %1, ptr noundef %2) #5 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 8, !tbaa !9
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = icmp eq i32 %21, %24
  br i1 %25, label %26, label %51

26:                                               ; preds = %3
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %27, i32 0, i32 0
  %29 = load i32, ptr %28, align 8, !tbaa !9
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %30, i32 0, i32 0
  %32 = load i32, ptr %31, align 8, !tbaa !9
  %33 = icmp eq i32 %29, %32
  br i1 %33, label %34, label %51

34:                                               ; preds = %26
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %35, i32 0, i32 1
  %37 = load i32, ptr %36, align 4, !tbaa !12
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 4, !tbaa !12
  %41 = icmp eq i32 %37, %40
  br i1 %41, label %42, label %51

42:                                               ; preds = %34
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %43, i32 0, i32 1
  %45 = load i32, ptr %44, align 4, !tbaa !12
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !12
  %49 = icmp eq i32 %45, %48
  br i1 %49, label %50, label %51

50:                                               ; preds = %42
  br label %55

51:                                               ; preds = %42, %34, %26, %3
  %52 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %53 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  %54 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #6
  unreachable

55:                                               ; preds = %50
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %56, i32 0, i32 2
  %58 = load i32, ptr %57, align 8, !tbaa !13
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %59, i32 0, i32 2
  %61 = load i32, ptr %60, align 8, !tbaa !13
  %62 = icmp eq i32 %58, %61
  br i1 %62, label %63, label %69

63:                                               ; preds = %55
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %64, i32 0, i32 2
  %66 = load i32, ptr %65, align 8, !tbaa !13
  %67 = icmp eq i32 %66, 4
  br i1 %67, label %68, label %69

68:                                               ; preds = %63
  br label %73

69:                                               ; preds = %63, %55
  %70 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #6
  unreachable

73:                                               ; preds = %68
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %74, i32 0, i32 2
  %76 = load i32, ptr %75, align 8, !tbaa !13
  %77 = icmp eq i32 %76, 12
  br i1 %77, label %78, label %79

78:                                               ; preds = %73
  br label %83

79:                                               ; preds = %73
  %80 = call i32 (ptr, ...) @printf(ptr noundef @.str)
  %81 = call i32 (ptr, ...) @printf(ptr noundef @.str.11)
  %82 = call i32 (ptr, ...) @printf(ptr noundef @.str.2)
  call void @exit(i32 noundef 1) #6
  unreachable

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %84, i32 0, i32 0
  %86 = load i32, ptr %85, align 8, !tbaa !9
  store i32 %86, ptr %7, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %87, i32 0, i32 1
  %89 = load i32, ptr %88, align 4, !tbaa !12
  store i32 %89, ptr %8, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %90, i32 0, i32 5
  %92 = load ptr, ptr %91, align 8, !tbaa !15
  store ptr %92, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %93, i32 0, i32 5
  %95 = load ptr, ptr %94, align 8, !tbaa !15
  store ptr %95, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.SIMPLE_MAT, ptr %96, i32 0, i32 5
  %98 = load ptr, ptr %97, align 8, !tbaa !15
  store ptr %98, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !14
  br label %99

99:                                               ; preds = %206, %83
  %100 = load i32, ptr %14, align 4, !tbaa !14
  %101 = load i32, ptr %7, align 4, !tbaa !14
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %104, label %103

103:                                              ; preds = %99
  store i32 2, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %209

104:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !14
  br label %105

105:                                              ; preds = %202, %104
  %106 = load i32, ptr %16, align 4, !tbaa !14
  %107 = load i32, ptr %8, align 4, !tbaa !14
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %110, label %109

109:                                              ; preds = %105
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %205

110:                                              ; preds = %105
  store float 0.000000e+00, ptr %12, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !14
  br label %111

111:                                              ; preds = %179, %110
  %112 = load i32, ptr %17, align 4, !tbaa !14
  %113 = load i32, ptr %7, align 4, !tbaa !14
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  store i32 8, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %182

116:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  store i32 0, ptr %18, align 4, !tbaa !14
  br label %117

117:                                              ; preds = %175, %116
  %118 = load i32, ptr %18, align 4, !tbaa !14
  %119 = load i32, ptr %8, align 4, !tbaa !14
  %120 = icmp slt i32 %118, %119
  br i1 %120, label %122, label %121

121:                                              ; preds = %117
  store i32 11, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  br label %178

122:                                              ; preds = %117
  %123 = load i32, ptr %14, align 4, !tbaa !14
  %124 = sitofp i32 %123 to float
  %125 = load i32, ptr %17, align 4, !tbaa !14
  %126 = sitofp i32 %125 to float
  %127 = fmul float %124, %126
  %128 = load i32, ptr %7, align 4, !tbaa !14
  %129 = sitofp i32 %128 to float
  %130 = fdiv float %127, %129
  %131 = load i32, ptr %16, align 4, !tbaa !14
  %132 = sitofp i32 %131 to float
  %133 = load i32, ptr %18, align 4, !tbaa !14
  %134 = sitofp i32 %133 to float
  %135 = fmul float %132, %134
  %136 = load i32, ptr %8, align 4, !tbaa !14
  %137 = sitofp i32 %136 to float
  %138 = fdiv float %135, %137
  %139 = fadd float %130, %138
  store float %139, ptr %13, align 4, !tbaa !16
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  %141 = load i32, ptr %17, align 4, !tbaa !14
  %142 = load i32, ptr %8, align 4, !tbaa !14
  %143 = mul nsw i32 %141, %142
  %144 = load i32, ptr %18, align 4, !tbaa !14
  %145 = add nsw i32 %143, %144
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds float, ptr %140, i64 %146
  %148 = load float, ptr %147, align 4, !tbaa !16
  %149 = fpext float %148 to double
  %150 = load float, ptr %13, align 4, !tbaa !16
  %151 = fpext float %150 to double
  %152 = fmul double 0x401921FB4D12D84A, %151
  %153 = call double @cos(double noundef %152) #7
  %154 = load ptr, ptr %10, align 8, !tbaa !5
  %155 = load i32, ptr %17, align 4, !tbaa !14
  %156 = load i32, ptr %8, align 4, !tbaa !14
  %157 = mul nsw i32 %155, %156
  %158 = load i32, ptr %18, align 4, !tbaa !14
  %159 = add nsw i32 %157, %158
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds float, ptr %154, i64 %160
  %162 = load float, ptr %161, align 4, !tbaa !16
  %163 = fpext float %162 to double
  %164 = load float, ptr %13, align 4, !tbaa !16
  %165 = fpext float %164 to double
  %166 = fmul double 0x401921FB4D12D84A, %165
  %167 = call double @sin(double noundef %166) #7
  %168 = fmul double %163, %167
  %169 = fneg double %168
  %170 = call double @llvm.fmuladd.f64(double %149, double %153, double %169)
  %171 = load float, ptr %12, align 4, !tbaa !16
  %172 = fpext float %171 to double
  %173 = fadd double %172, %170
  %174 = fptrunc double %173 to float
  store float %174, ptr %12, align 4, !tbaa !16
  br label %175

175:                                              ; preds = %122
  %176 = load i32, ptr %18, align 4, !tbaa !14
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %18, align 4, !tbaa !14
  br label %117, !llvm.loop !18

178:                                              ; preds = %121
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %17, align 4, !tbaa !14
  %181 = add nsw i32 %180, 1
  store i32 %181, ptr %17, align 4, !tbaa !14
  br label %111, !llvm.loop !20

182:                                              ; preds = %115
  %183 = load float, ptr %12, align 4, !tbaa !16
  %184 = fpext float %183 to double
  %185 = load i32, ptr %7, align 4, !tbaa !14
  %186 = load i32, ptr %8, align 4, !tbaa !14
  %187 = mul nsw i32 %185, %186
  %188 = sitofp i32 %187 to double
  %189 = call double @sqrt(double noundef %188) #7
  %190 = fdiv double %184, %189
  %191 = fptrunc double %190 to float
  %192 = call zeroext i8 @saturate_cast_float2uchar(float noundef %191)
  %193 = zext i8 %192 to i16
  %194 = load ptr, ptr %11, align 8, !tbaa !5
  %195 = load i32, ptr %14, align 4, !tbaa !14
  %196 = load i32, ptr %8, align 4, !tbaa !14
  %197 = mul nsw i32 %195, %196
  %198 = load i32, ptr %16, align 4, !tbaa !14
  %199 = add nsw i32 %197, %198
  %200 = sext i32 %199 to i64
  %201 = getelementptr inbounds i16, ptr %194, i64 %200
  store i16 %193, ptr %201, align 2, !tbaa !21
  br label %202

202:                                              ; preds = %182
  %203 = load i32, ptr %16, align 4, !tbaa !14
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %16, align 4, !tbaa !14
  br label %105, !llvm.loop !23

205:                                              ; preds = %109
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %14, align 4, !tbaa !14
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %14, align 4, !tbaa !14
  br label %99, !llvm.loop !24

209:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { noreturn 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 "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { noreturn nounwind }
attributes #7 = { 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, !11, i64 0}
!10 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !6, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 4}
!13 = !{!10, !11, i64 8}
!14 = !{!11, !11, i64 0}
!15 = !{!10, !6, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!22, !22, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = distinct !{!23, !19}
!24 = distinct !{!24, !19}


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

@.str = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #0

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @saturate_cast_float2uchar(float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @hypercv_idft_ushort(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2) local_unnamed_addr #4 {
  %4 = load i32, ptr %0, align 8, !tbaa !5
  %5 = load i32, ptr %1, align 8, !tbaa !5
  %6 = icmp eq i32 %4, %5
  br i1 %6, label %7, label %20

7:                                                ; preds = %3
  %8 = load i32, ptr %2, align 8, !tbaa !5
  %9 = icmp eq i32 %4, %8
  br i1 %9, label %10, label %20

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !11
  %13 = getelementptr inbounds i8, ptr %1, i64 4
  %14 = load i32, ptr %13, align 4, !tbaa !11
  %15 = icmp eq i32 %12, %14
  br i1 %15, label %16, label %20

16:                                               ; preds = %10
  %17 = getelementptr inbounds i8, ptr %2, i64 4
  %18 = load i32, ptr %17, align 4, !tbaa !11
  %19 = icmp eq i32 %12, %18
  br i1 %19, label %24, label %20

20:                                               ; preds = %16, %10, %7, %3
  %21 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %22 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

24:                                               ; preds = %16
  %25 = getelementptr inbounds i8, ptr %0, i64 8
  %26 = load i32, ptr %25, align 8, !tbaa !12
  %27 = getelementptr inbounds i8, ptr %1, i64 8
  %28 = load i32, ptr %27, align 8, !tbaa !12
  %29 = icmp eq i32 %26, 4
  %30 = icmp eq i32 %28, 4
  %or.cond = and i1 %29, %30
  br i1 %or.cond, label %35, label %31

31:                                               ; preds = %24
  %32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  %34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

35:                                               ; preds = %24
  %36 = getelementptr inbounds i8, ptr %2, i64 8
  %37 = load i32, ptr %36, align 8, !tbaa !12
  %38 = icmp eq i32 %37, 12
  br i1 %38, label %43, label %39

39:                                               ; preds = %35
  %40 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str)
  %41 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11)
  %42 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2)
  tail call void @exit(i32 noundef 1) #5
  unreachable

43:                                               ; preds = %35
  %44 = getelementptr inbounds i8, ptr %0, i64 24
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = getelementptr inbounds i8, ptr %1, i64 24
  %47 = load ptr, ptr %46, align 8, !tbaa !13
  %48 = getelementptr inbounds i8, ptr %2, i64 24
  %49 = load ptr, ptr %48, align 8, !tbaa !13
  %50 = icmp sgt i32 %4, 0
  br i1 %50, label %.preheader60.lr.ph, label %._crit_edge73

.preheader60.lr.ph:                               ; preds = %43
  %51 = icmp sgt i32 %12, 0
  %52 = uitofp nneg i32 %4 to float
  %53 = sitofp i32 %12 to float
  %54 = mul nsw i32 %12, %4
  %55 = sitofp i32 %54 to double
  br i1 %51, label %.preheader60.us.us.preheader, label %._crit_edge73

.preheader60.us.us.preheader:                     ; preds = %.preheader60.lr.ph
  %56 = zext nneg i32 %12 to i64
  %wide.trip.count91 = zext nneg i32 %4 to i64
  br label %.preheader60.us.us

.preheader60.us.us:                               ; preds = %.preheader60.us.us.preheader, %._crit_edge.split.us.split.us.us.us
  %indvars.iv88 = phi i64 [ 0, %.preheader60.us.us.preheader ], [ %indvars.iv.next89, %._crit_edge.split.us.split.us.us.us ]
  %57 = trunc nuw nsw i64 %indvars.iv88 to i32
  %58 = uitofp nneg i32 %57 to float
  %59 = mul nuw nsw i64 %indvars.iv88, %56
  %invariant.gep = getelementptr inbounds i16, ptr %49, i64 %59
  br label %.preheader59.us.us.us.us

.preheader59.us.us.us.us:                         ; preds = %._crit_edge65.split.us.us.us.us.us, %.preheader60.us.us
  %indvars.iv83 = phi i64 [ %indvars.iv.next84, %._crit_edge65.split.us.us.us.us.us ], [ 0, %.preheader60.us.us ]
  %60 = trunc nuw nsw i64 %indvars.iv83 to i32
  %61 = uitofp nneg i32 %60 to float
  br label %.preheader.us.us.us.us.us

.preheader.us.us.us.us.us:                        ; preds = %._crit_edge.us.us.us.us.us, %.preheader59.us.us.us.us
  %indvars.iv78 = phi i64 [ %indvars.iv.next79, %._crit_edge.us.us.us.us.us ], [ 0, %.preheader59.us.us.us.us ]
  %.05563.us.us.us.us.us = phi float [ %89, %._crit_edge.us.us.us.us.us ], [ 0.000000e+00, %.preheader59.us.us.us.us ]
  %62 = trunc nuw nsw i64 %indvars.iv78 to i32
  %63 = uitofp nneg i32 %62 to float
  %64 = fmul float %58, %63
  %65 = fdiv float %64, %52
  %66 = mul nuw nsw i64 %indvars.iv78, %56
  br label %67

67:                                               ; preds = %67, %.preheader.us.us.us.us.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %67 ], [ 0, %.preheader.us.us.us.us.us ]
  %.161.us.us.us.us.us = phi float [ %89, %67 ], [ %.05563.us.us.us.us.us, %.preheader.us.us.us.us.us ]
  %68 = trunc nuw nsw i64 %indvars.iv to i32
  %69 = uitofp nneg i32 %68 to float
  %70 = fmul float %61, %69
  %71 = fdiv float %70, %53
  %72 = fadd float %65, %71
  %73 = add nuw nsw i64 %indvars.iv, %66
  %74 = getelementptr inbounds float, ptr %45, i64 %73
  %75 = load float, ptr %74, align 4, !tbaa !14
  %76 = fpext float %75 to double
  %77 = fpext float %72 to double
  %78 = fmul double %77, 0x401921FB4D12D84A
  %79 = tail call double @cos(double noundef %78) #6
  %80 = getelementptr inbounds float, ptr %47, i64 %73
  %81 = load float, ptr %80, align 4, !tbaa !14
  %82 = fpext float %81 to double
  %83 = tail call double @sin(double noundef %78) #6
  %84 = fneg double %83
  %85 = fmul double %84, %82
  %86 = tail call double @llvm.fmuladd.f64(double %76, double %79, double %85)
  %87 = fpext float %.161.us.us.us.us.us to double
  %88 = fadd double %86, %87
  %89 = fptrunc double %88 to float
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %56
  br i1 %exitcond.not, label %._crit_edge.us.us.us.us.us, label %67, !llvm.loop !16

._crit_edge.us.us.us.us.us:                       ; preds = %67
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond82.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count91
  br i1 %exitcond82.not, label %._crit_edge65.split.us.us.us.us.us, label %.preheader.us.us.us.us.us, !llvm.loop !18

._crit_edge65.split.us.us.us.us.us:               ; preds = %._crit_edge.us.us.us.us.us
  %90 = fpext float %89 to double
  %91 = tail call double @sqrt(double noundef %55) #6
  %92 = fdiv double %90, %91
  %93 = fptrunc double %92 to float
  %94 = tail call zeroext i8 @saturate_cast_float2uchar(float noundef %93)
  %95 = zext i8 %94 to i16
  %gep = getelementptr inbounds i16, ptr %invariant.gep, i64 %indvars.iv83
  store i16 %95, ptr %gep, align 2, !tbaa !19
  %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1
  %exitcond87.not = icmp eq i64 %indvars.iv.next84, %56
  br i1 %exitcond87.not, label %._crit_edge.split.us.split.us.us.us, label %.preheader59.us.us.us.us, !llvm.loop !21

._crit_edge.split.us.split.us.us.us:              ; preds = %._crit_edge65.split.us.us.us.us.us
  %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1
  %exitcond92.not = icmp eq i64 %indvars.iv.next89, %wide.trip.count91
  br i1 %exitcond92.not, label %._crit_edge73, label %.preheader60.us.us, !llvm.loop !22

._crit_edge73:                                    ; preds = %._crit_edge.split.us.split.us.us.us, %.preheader60.lr.ph, %43
  ret void
}

attributes #0 = { nofree 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 #1 = { noreturn 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 #2 = { mustprogress nofree nounwind willreturn memory(write) "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { noreturn nounwind }
attributes #6 = { 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !10, i64 24}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!6, !7, i64 8}
!13 = !{!6, !10, i64 24}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = !{!20, !20, i64 0}
!20 = !{!"short", !8, i64 0}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass