; LLVM IR from Stephane-D/SGDK :: src (maths3D)

; 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.Transformation3D = type { i16, ptr, ptr, %struct.Mat3D_f16, %struct.Mat3D_f16, %struct.Vect3D_f16, %struct.Vect3D_f16 }
%struct.Mat3D_f16 = type { %struct.Vect3D_f16, %struct.Vect3D_f16, %struct.Vect3D_f16 }
%struct.Vect3D_f16 = type { i16, i16, i16 }

; 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 uwtable
define dso_local void @M3D_buildMat3DOnly(ptr noundef %0) #1 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i16, align 2
  %5 = alloca i16, align 2
  %6 = alloca i16, align 2
  %7 = alloca i16, align 2
  %8 = alloca i16, align 2
  %9 = alloca i16, align 2
  %10 = alloca i16, align 2
  %11 = alloca i16, align 2
  %12 = alloca i16, align 2
  %13 = alloca i16, align 2
  %14 = alloca i16, align 2
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.Transformation3D, ptr %15, i32 0, i32 2
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  store ptr %17, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %4) #3
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.Vect3D_f16, ptr %18, i32 0, i32 0
  %20 = load i16, ptr %19, align 2, !tbaa !14
  store i16 %20, ptr %4, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 2, ptr %5) #3
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.Vect3D_f16, ptr %21, i32 0, i32 1
  %23 = load i16, ptr %22, align 2, !tbaa !16
  store i16 %23, ptr %5, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #3
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.Vect3D_f16, ptr %24, i32 0, i32 2
  %26 = load i16, ptr %25, align 2, !tbaa !17
  store i16 %26, ptr %6, align 2, !tbaa !15
  %27 = load i16, ptr %4, align 2, !tbaa !15
  %28 = sext i16 %27 to i32
  %29 = icmp sge i32 %28, 23040
  br i1 %29, label %30, label %35

30:                                               ; preds = %1
  %31 = load i16, ptr %4, align 2, !tbaa !15
  %32 = sext i16 %31 to i32
  %33 = sub nsw i32 %32, 23040
  %34 = trunc i32 %33 to i16
  store i16 %34, ptr %4, align 2, !tbaa !15
  br label %45

35:                                               ; preds = %1
  %36 = load i16, ptr %4, align 2, !tbaa !15
  %37 = sext i16 %36 to i32
  %38 = icmp slt i32 %37, 0
  br i1 %38, label %39, label %44

39:                                               ; preds = %35
  %40 = load i16, ptr %4, align 2, !tbaa !15
  %41 = sext i16 %40 to i32
  %42 = add nsw i32 %41, 23040
  %43 = trunc i32 %42 to i16
  store i16 %43, ptr %4, align 2, !tbaa !15
  br label %44

44:                                               ; preds = %39, %35
  br label %45

45:                                               ; preds = %44, %30
  %46 = load i16, ptr %5, align 2, !tbaa !15
  %47 = sext i16 %46 to i32
  %48 = icmp sge i32 %47, 23040
  br i1 %48, label %49, label %54

49:                                               ; preds = %45
  %50 = load i16, ptr %5, align 2, !tbaa !15
  %51 = sext i16 %50 to i32
  %52 = sub nsw i32 %51, 23040
  %53 = trunc i32 %52 to i16
  store i16 %53, ptr %5, align 2, !tbaa !15
  br label %64

54:                                               ; preds = %45
  %55 = load i16, ptr %5, align 2, !tbaa !15
  %56 = sext i16 %55 to i32
  %57 = icmp slt i32 %56, 0
  br i1 %57, label %58, label %63

58:                                               ; preds = %54
  %59 = load i16, ptr %5, align 2, !tbaa !15
  %60 = sext i16 %59 to i32
  %61 = add nsw i32 %60, 23040
  %62 = trunc i32 %61 to i16
  store i16 %62, ptr %5, align 2, !tbaa !15
  br label %63

63:                                               ; preds = %58, %54
  br label %64

64:                                               ; preds = %63, %49
  %65 = load i16, ptr %6, align 2, !tbaa !15
  %66 = sext i16 %65 to i32
  %67 = icmp sge i32 %66, 23040
  br i1 %67, label %68, label %73

68:                                               ; preds = %64
  %69 = load i16, ptr %6, align 2, !tbaa !15
  %70 = sext i16 %69 to i32
  %71 = sub nsw i32 %70, 23040
  %72 = trunc i32 %71 to i16
  store i16 %72, ptr %6, align 2, !tbaa !15
  br label %83

73:                                               ; preds = %64
  %74 = load i16, ptr %6, align 2, !tbaa !15
  %75 = sext i16 %74 to i32
  %76 = icmp slt i32 %75, 0
  br i1 %76, label %77, label %82

77:                                               ; preds = %73
  %78 = load i16, ptr %6, align 2, !tbaa !15
  %79 = sext i16 %78 to i32
  %80 = add nsw i32 %79, 23040
  %81 = trunc i32 %80 to i16
  store i16 %81, ptr %6, align 2, !tbaa !15
  br label %82

82:                                               ; preds = %77, %73
  br label %83

83:                                               ; preds = %82, %68
  %84 = load i16, ptr %4, align 2, !tbaa !15
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.Vect3D_f16, ptr %85, i32 0, i32 0
  store i16 %84, ptr %86, align 2, !tbaa !14
  %87 = load i16, ptr %5, align 2, !tbaa !15
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.Vect3D_f16, ptr %88, i32 0, i32 1
  store i16 %87, ptr %89, align 2, !tbaa !16
  %90 = load i16, ptr %6, align 2, !tbaa !15
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.Vect3D_f16, ptr %91, i32 0, i32 2
  store i16 %90, ptr %92, align 2, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 2, ptr %7) #3
  %93 = load i16, ptr %4, align 2, !tbaa !15
  %94 = call signext i16 @F16_sin(i16 noundef signext %93)
  store i16 %94, ptr %7, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 2, ptr %8) #3
  %95 = load i16, ptr %5, align 2, !tbaa !15
  %96 = call signext i16 @F16_sin(i16 noundef signext %95)
  store i16 %96, ptr %8, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 2, ptr %9) #3
  %97 = load i16, ptr %6, align 2, !tbaa !15
  %98 = call signext i16 @F16_sin(i16 noundef signext %97)
  store i16 %98, ptr %9, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 2, ptr %10) #3
  %99 = load i16, ptr %4, align 2, !tbaa !15
  %100 = call signext i16 @F16_cos(i16 noundef signext %99)
  store i16 %100, ptr %10, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 2, ptr %11) #3
  %101 = load i16, ptr %5, align 2, !tbaa !15
  %102 = call signext i16 @F16_cos(i16 noundef signext %101)
  store i16 %102, ptr %11, align 2, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 2, ptr %12) #3
  %103 = load i16, ptr %6, align 2, !tbaa !15
  %104 = call signext i16 @F16_cos(i16 noundef signext %103)
  store i16 %104, ptr %12, align 2, !tbaa !15
  %105 = load i16, ptr %11, align 2, !tbaa !15
  %106 = load i16, ptr %12, align 2, !tbaa !15
  %107 = call signext i16 @F16_mul(i16 noundef signext %105, i16 noundef signext %106)
  %108 = load ptr, ptr %2, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.Transformation3D, ptr %108, i32 0, i32 3
  %110 = getelementptr inbounds %struct.Mat3D_f16, ptr %109, i32 0, i32 0
  %111 = getelementptr inbounds %struct.Vect3D_f16, ptr %110, i32 0, i32 0
  store i16 %107, ptr %111, align 8, !tbaa !18
  %112 = load i16, ptr %11, align 2, !tbaa !15
  %113 = load i16, ptr %9, align 2, !tbaa !15
  %114 = call signext i16 @F16_mul(i16 noundef signext %112, i16 noundef signext %113)
  %115 = sext i16 %114 to i32
  %116 = sub nsw i32 0, %115
  %117 = trunc i32 %116 to i16
  %118 = load ptr, ptr %2, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.Transformation3D, ptr %118, i32 0, i32 3
  %120 = getelementptr inbounds %struct.Mat3D_f16, ptr %119, i32 0, i32 1
  %121 = getelementptr inbounds %struct.Vect3D_f16, ptr %120, i32 0, i32 0
  store i16 %117, ptr %121, align 2, !tbaa !19
  %122 = load i16, ptr %8, align 2, !tbaa !15
  %123 = load ptr, ptr %2, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.Transformation3D, ptr %123, i32 0, i32 3
  %125 = getelementptr inbounds %struct.Mat3D_f16, ptr %124, i32 0, i32 2
  %126 = getelementptr inbounds %struct.Vect3D_f16, ptr %125, i32 0, i32 0
  store i16 %122, ptr %126, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #3
  %127 = load i16, ptr %7, align 2, !tbaa !15
  %128 = load i16, ptr %8, align 2, !tbaa !15
  %129 = call signext i16 @F16_mul(i16 noundef signext %127, i16 noundef signext %128)
  store i16 %129, ptr %13, align 2, !tbaa !15
  %130 = load i16, ptr %13, align 2, !tbaa !15
  %131 = sext i16 %130 to i32
  %132 = load i16, ptr %12, align 2, !tbaa !15
  %133 = sext i16 %132 to i32
  %134 = mul nsw i32 %131, %133
  %135 = load i16, ptr %10, align 2, !tbaa !15
  %136 = sext i16 %135 to i32
  %137 = load i16, ptr %9, align 2, !tbaa !15
  %138 = sext i16 %137 to i32
  %139 = mul nsw i32 %136, %138
  %140 = add nsw i32 %134, %139
  %141 = ashr i32 %140, 6
  %142 = trunc i32 %141 to i16
  %143 = load ptr, ptr %2, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.Transformation3D, ptr %143, i32 0, i32 3
  %145 = getelementptr inbounds %struct.Mat3D_f16, ptr %144, i32 0, i32 0
  %146 = getelementptr inbounds %struct.Vect3D_f16, ptr %145, i32 0, i32 1
  store i16 %142, ptr %146, align 2, !tbaa !21
  %147 = load i16, ptr %10, align 2, !tbaa !15
  %148 = sext i16 %147 to i32
  %149 = load i16, ptr %12, align 2, !tbaa !15
  %150 = sext i16 %149 to i32
  %151 = mul nsw i32 %148, %150
  %152 = load i16, ptr %13, align 2, !tbaa !15
  %153 = sext i16 %152 to i32
  %154 = load i16, ptr %9, align 2, !tbaa !15
  %155 = sext i16 %154 to i32
  %156 = mul nsw i32 %153, %155
  %157 = sub nsw i32 %151, %156
  %158 = ashr i32 %157, 6
  %159 = trunc i32 %158 to i16
  %160 = load ptr, ptr %2, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.Transformation3D, ptr %160, i32 0, i32 3
  %162 = getelementptr inbounds %struct.Mat3D_f16, ptr %161, i32 0, i32 1
  %163 = getelementptr inbounds %struct.Vect3D_f16, ptr %162, i32 0, i32 1
  store i16 %159, ptr %163, align 2, !tbaa !22
  %164 = load i16, ptr %7, align 2, !tbaa !15
  %165 = load i16, ptr %11, align 2, !tbaa !15
  %166 = call signext i16 @F16_mul(i16 noundef signext %164, i16 noundef signext %165)
  %167 = sext i16 %166 to i32
  %168 = sub nsw i32 0, %167
  %169 = trunc i32 %168 to i16
  %170 = load ptr, ptr %2, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.Transformation3D, ptr %170, i32 0, i32 3
  %172 = getelementptr inbounds %struct.Mat3D_f16, ptr %171, i32 0, i32 2
  %173 = getelementptr inbounds %struct.Vect3D_f16, ptr %172, i32 0, i32 1
  store i16 %169, ptr %173, align 2, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #3
  %174 = load i16, ptr %10, align 2, !tbaa !15
  %175 = load i16, ptr %8, align 2, !tbaa !15
  %176 = call signext i16 @F16_mul(i16 noundef signext %174, i16 noundef signext %175)
  store i16 %176, ptr %14, align 2, !tbaa !15
  %177 = load i16, ptr %7, align 2, !tbaa !15
  %178 = sext i16 %177 to i32
  %179 = load i16, ptr %9, align 2, !tbaa !15
  %180 = sext i16 %179 to i32
  %181 = mul nsw i32 %178, %180
  %182 = load i16, ptr %14, align 2, !tbaa !15
  %183 = sext i16 %182 to i32
  %184 = load i16, ptr %12, align 2, !tbaa !15
  %185 = sext i16 %184 to i32
  %186 = mul nsw i32 %183, %185
  %187 = sub nsw i32 %181, %186
  %188 = ashr i32 %187, 6
  %189 = trunc i32 %188 to i16
  %190 = load ptr, ptr %2, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.Transformation3D, ptr %190, i32 0, i32 3
  %192 = getelementptr inbounds %struct.Mat3D_f16, ptr %191, i32 0, i32 0
  %193 = getelementptr inbounds %struct.Vect3D_f16, ptr %192, i32 0, i32 2
  store i16 %189, ptr %193, align 4, !tbaa !24
  %194 = load i16, ptr %14, align 2, !tbaa !15
  %195 = sext i16 %194 to i32
  %196 = load i16, ptr %9, align 2, !tbaa !15
  %197 = sext i16 %196 to i32
  %198 = mul nsw i32 %195, %197
  %199 = load i16, ptr %7, align 2, !tbaa !15
  %200 = sext i16 %199 to i32
  %201 = load i16, ptr %12, align 2, !tbaa !15
  %202 = sext i16 %201 to i32
  %203 = mul nsw i32 %200, %202
  %204 = add nsw i32 %198, %203
  %205 = ashr i32 %204, 6
  %206 = trunc i32 %205 to i16
  %207 = load ptr, ptr %2, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.Transformation3D, ptr %207, i32 0, i32 3
  %209 = getelementptr inbounds %struct.Mat3D_f16, ptr %208, i32 0, i32 1
  %210 = getelementptr inbounds %struct.Vect3D_f16, ptr %209, i32 0, i32 2
  store i16 %206, ptr %210, align 2, !tbaa !25
  %211 = load i16, ptr %10, align 2, !tbaa !15
  %212 = load i16, ptr %11, align 2, !tbaa !15
  %213 = call signext i16 @F16_mul(i16 noundef signext %211, i16 noundef signext %212)
  %214 = load ptr, ptr %2, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.Transformation3D, ptr %214, i32 0, i32 3
  %216 = getelementptr inbounds %struct.Mat3D_f16, ptr %215, i32 0, i32 2
  %217 = getelementptr inbounds %struct.Vect3D_f16, ptr %216, i32 0, i32 2
  store i16 %213, ptr %217, align 4, !tbaa !26
  %218 = load ptr, ptr %2, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.Transformation3D, ptr %218, i32 0, i32 0
  store i16 0, ptr %219, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret void
}

declare signext i16 @F16_sin(i16 noundef signext) #2

declare signext i16 @F16_cos(i16 noundef signext) #2

declare signext i16 @F16_mul(i16 noundef signext, i16 noundef signext) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !12, i64 42, !13, i64 60, !13, i64 66}
!11 = !{!"short", !7, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 6, !13, i64 12}
!13 = !{!"", !11, i64 0, !11, i64 2, !11, i64 4}
!14 = !{!13, !11, i64 0}
!15 = !{!11, !11, i64 0}
!16 = !{!13, !11, i64 2}
!17 = !{!13, !11, i64 4}
!18 = !{!10, !11, i64 24}
!19 = !{!10, !11, i64 30}
!20 = !{!10, !11, i64 36}
!21 = !{!10, !11, i64 26}
!22 = !{!10, !11, i64 32}
!23 = !{!10, !11, i64 38}
!24 = !{!10, !11, i64 28}
!25 = !{!10, !11, i64 34}
!26 = !{!10, !11, i64 40}
!27 = !{!10, !11, i64 0}


; 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
define dso_local void @M3D_buildMat3DOnly(ptr nocapture noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 16
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %3, i64 4
  %5 = load i16, ptr %4, align 2, !tbaa !13
  %6 = icmp sgt i16 %5, 23039
  %7 = add nsw i16 %5, -23040
  %8 = icmp slt i16 %5, 0
  %9 = add nsw i16 %5, 23040
  %spec.select74 = select i1 %8, i16 %9, i16 %5
  %.067 = select i1 %6, i16 %7, i16 %spec.select74
  %10 = load <2 x i16>, ptr %3, align 2, !tbaa !14
  %11 = icmp sgt <2 x i16> %10, <i16 23039, i16 23039>
  %12 = add nsw <2 x i16> %10, <i16 -23040, i16 -23040>
  %13 = icmp slt <2 x i16> %10, zeroinitializer
  %14 = add nsw <2 x i16> %10, <i16 23040, i16 23040>
  %15 = select <2 x i1> %13, <2 x i16> %14, <2 x i16> %10
  %16 = select <2 x i1> %11, <2 x i16> %12, <2 x i16> %15
  store <2 x i16> %16, ptr %3, align 2, !tbaa !14
  store i16 %.067, ptr %4, align 2, !tbaa !13
  %17 = extractelement <2 x i16> %16, i64 0
  %18 = tail call signext i16 @F16_sin(i16 noundef signext %17) #2
  %19 = extractelement <2 x i16> %16, i64 1
  %20 = tail call signext i16 @F16_sin(i16 noundef signext %19) #2
  %21 = tail call signext i16 @F16_sin(i16 noundef signext %.067) #2
  %22 = tail call signext i16 @F16_cos(i16 noundef signext %17) #2
  %23 = tail call signext i16 @F16_cos(i16 noundef signext %19) #2
  %24 = tail call signext i16 @F16_cos(i16 noundef signext %.067) #2
  %25 = tail call signext i16 @F16_mul(i16 noundef signext %23, i16 noundef signext %24) #2
  %26 = getelementptr inbounds i8, ptr %0, i64 24
  store i16 %25, ptr %26, align 8, !tbaa !15
  %27 = tail call signext i16 @F16_mul(i16 noundef signext %23, i16 noundef signext %21) #2
  %28 = sub i16 0, %27
  %29 = getelementptr inbounds i8, ptr %0, i64 30
  store i16 %28, ptr %29, align 2, !tbaa !16
  %30 = getelementptr inbounds i8, ptr %0, i64 36
  store i16 %20, ptr %30, align 4, !tbaa !17
  %31 = tail call signext i16 @F16_mul(i16 noundef signext %18, i16 noundef signext %20) #2
  %32 = sext i16 %31 to i32
  %33 = sext i16 %24 to i32
  %34 = mul nsw i32 %32, %33
  %35 = sext i16 %22 to i32
  %36 = sext i16 %21 to i32
  %37 = mul nsw i32 %35, %36
  %38 = add nsw i32 %34, %37
  %39 = lshr i32 %38, 6
  %40 = trunc i32 %39 to i16
  %41 = getelementptr inbounds i8, ptr %0, i64 26
  store i16 %40, ptr %41, align 2, !tbaa !18
  %42 = mul nsw i32 %33, %35
  %43 = mul nsw i32 %32, %36
  %44 = sub nsw i32 %42, %43
  %45 = lshr i32 %44, 6
  %46 = trunc i32 %45 to i16
  %47 = getelementptr inbounds i8, ptr %0, i64 32
  store i16 %46, ptr %47, align 2, !tbaa !19
  %48 = tail call signext i16 @F16_mul(i16 noundef signext %18, i16 noundef signext %23) #2
  %49 = sub i16 0, %48
  %50 = getelementptr inbounds i8, ptr %0, i64 38
  store i16 %49, ptr %50, align 2, !tbaa !20
  %51 = tail call signext i16 @F16_mul(i16 noundef signext %22, i16 noundef signext %20) #2
  %52 = sext i16 %18 to i32
  %53 = mul nsw i32 %36, %52
  %54 = sext i16 %51 to i32
  %55 = mul nsw i32 %54, %33
  %56 = sub nsw i32 %53, %55
  %57 = lshr i32 %56, 6
  %58 = trunc i32 %57 to i16
  %59 = getelementptr inbounds i8, ptr %0, i64 28
  store i16 %58, ptr %59, align 4, !tbaa !21
  %60 = mul nsw i32 %54, %36
  %61 = mul nsw i32 %33, %52
  %62 = add nsw i32 %60, %61
  %63 = lshr i32 %62, 6
  %64 = trunc i32 %63 to i16
  %65 = getelementptr inbounds i8, ptr %0, i64 34
  store i16 %64, ptr %65, align 2, !tbaa !22
  %66 = tail call signext i16 @F16_mul(i16 noundef signext %22, i16 noundef signext %23) #2
  %67 = getelementptr inbounds i8, ptr %0, i64 40
  store i16 %66, ptr %67, align 4, !tbaa !23
  store i16 0, ptr %0, align 8, !tbaa !24
  ret void
}

declare signext i16 @F16_sin(i16 noundef signext) local_unnamed_addr #1

declare signext i16 @F16_cos(i16 noundef signext) local_unnamed_addr #1

declare signext i16 @F16_mul(i16 noundef signext, i16 noundef signext) local_unnamed_addr #1

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 = { "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 }

!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, !10, i64 16}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !11, i64 42, !12, i64 60, !12, i64 66}
!7 = !{!"short", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"", !12, i64 0, !12, i64 6, !12, i64 12}
!12 = !{!"", !7, i64 0, !7, i64 2, !7, i64 4}
!13 = !{!12, !7, i64 4}
!14 = !{!7, !7, i64 0}
!15 = !{!6, !7, i64 24}
!16 = !{!6, !7, i64 30}
!17 = !{!6, !7, i64 36}
!18 = !{!6, !7, i64 26}
!19 = !{!6, !7, i64 32}
!20 = !{!6, !7, i64 38}
!21 = !{!6, !7, i64 28}
!22 = !{!6, !7, i64 34}
!23 = !{!6, !7, i64 40}
!24 = !{!6, !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass