; LLVM IR from HRI-EU/Rcs :: external (EulerAngles)

; 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.ShoemakeQuat = type { double, double, double, double }
%struct.EulerAngles = type { double, double, double, i32 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @Eul_ToQuat(ptr dead_on_unwind noalias writable sret(%struct.ShoemakeQuat) align 8 %0, ptr noundef byval(%struct.EulerAngles) align 8 %1) #0 {
  %3 = alloca [3 x double], align 16
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %26 = load i32, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %27 = getelementptr inbounds %struct.EulerAngles, ptr %1, i32 0, i32 3
  %28 = load i32, ptr %27, align 8, !tbaa !9
  store i32 %28, ptr %24, align 4, !tbaa !5
  %29 = load i32, ptr %24, align 4, !tbaa !5
  %30 = and i32 %29, 1
  store i32 %30, ptr %23, align 4, !tbaa !5
  %31 = load i32, ptr %24, align 4, !tbaa !5
  %32 = lshr i32 %31, 1
  store i32 %32, ptr %24, align 4, !tbaa !5
  %33 = load i32, ptr %24, align 4, !tbaa !5
  %34 = and i32 %33, 1
  store i32 %34, ptr %22, align 4, !tbaa !5
  %35 = load i32, ptr %24, align 4, !tbaa !5
  %36 = lshr i32 %35, 1
  store i32 %36, ptr %24, align 4, !tbaa !5
  %37 = load i32, ptr %24, align 4, !tbaa !5
  %38 = and i32 %37, 1
  store i32 %38, ptr %21, align 4, !tbaa !5
  %39 = load i32, ptr %24, align 4, !tbaa !5
  %40 = lshr i32 %39, 1
  store i32 %40, ptr %24, align 4, !tbaa !5
  %41 = load i32, ptr %24, align 4, !tbaa !5
  %42 = and i32 %41, 3
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %43
  %45 = load i8, ptr %44, align 1, !tbaa !12
  %46 = sext i8 %45 to i32
  store i32 %46, ptr %17, align 4, !tbaa !5
  %47 = load i32, ptr %17, align 4, !tbaa !5
  %48 = load i32, ptr %21, align 4, !tbaa !5
  %49 = add nsw i32 %47, %48
  %50 = sext i32 %49 to i64
  %51 = getelementptr inbounds [5 x i8], ptr @.str.1, i64 0, i64 %50
  %52 = load i8, ptr %51, align 1, !tbaa !12
  %53 = sext i8 %52 to i32
  store i32 %53, ptr %18, align 4, !tbaa !5
  %54 = load i32, ptr %17, align 4, !tbaa !5
  %55 = add nsw i32 %54, 1
  %56 = load i32, ptr %21, align 4, !tbaa !5
  %57 = sub nsw i32 %55, %56
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [5 x i8], ptr @.str.1, i64 0, i64 %58
  %60 = load i8, ptr %59, align 1, !tbaa !12
  %61 = sext i8 %60 to i32
  store i32 %61, ptr %19, align 4, !tbaa !5
  %62 = load i32, ptr %22, align 4, !tbaa !5
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %66

64:                                               ; preds = %2
  %65 = load i32, ptr %19, align 4, !tbaa !5
  br label %68

66:                                               ; preds = %2
  %67 = load i32, ptr %17, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %66, %64
  %69 = phi i32 [ %65, %64 ], [ %67, %66 ]
  store i32 %69, ptr %20, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  %70 = load i32, ptr %23, align 4, !tbaa !5
  %71 = icmp eq i32 %70, 1
  br i1 %71, label %72, label %80

72:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %73 = getelementptr inbounds %struct.EulerAngles, ptr %1, i32 0, i32 0
  %74 = load double, ptr %73, align 8, !tbaa !13
  store double %74, ptr %25, align 8, !tbaa !14
  %75 = getelementptr inbounds %struct.EulerAngles, ptr %1, i32 0, i32 2
  %76 = load double, ptr %75, align 8, !tbaa !15
  %77 = getelementptr inbounds %struct.EulerAngles, ptr %1, i32 0, i32 0
  store double %76, ptr %77, align 8, !tbaa !13
  %78 = load double, ptr %25, align 8, !tbaa !14
  %79 = getelementptr inbounds %struct.EulerAngles, ptr %1, i32 0, i32 2
  store double %78, ptr %79, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %80

80:                                               ; preds = %72, %68
  %81 = load i32, ptr %21, align 4, !tbaa !5
  %82 = icmp eq i32 %81, 1
  br i1 %82, label %83, label %88

83:                                               ; preds = %80
  %84 = getelementptr inbounds %struct.EulerAngles, ptr %1, i32 0, i32 1
  %85 = load double, ptr %84, align 8, !tbaa !16
  %86 = fneg double %85
  %87 = getelementptr inbounds %struct.EulerAngles, ptr %1, i32 0, i32 1
  store double %86, ptr %87, align 8, !tbaa !16
  br label %88

88:                                               ; preds = %83, %80
  %89 = getelementptr inbounds %struct.EulerAngles, ptr %1, i32 0, i32 0
  %90 = load double, ptr %89, align 8, !tbaa !13
  %91 = fmul double %90, 5.000000e-01
  store double %91, ptr %4, align 8, !tbaa !14
  %92 = getelementptr inbounds %struct.EulerAngles, ptr %1, i32 0, i32 1
  %93 = load double, ptr %92, align 8, !tbaa !16
  %94 = fmul double %93, 5.000000e-01
  store double %94, ptr %5, align 8, !tbaa !14
  %95 = getelementptr inbounds %struct.EulerAngles, ptr %1, i32 0, i32 2
  %96 = load double, ptr %95, align 8, !tbaa !15
  %97 = fmul double %96, 5.000000e-01
  store double %97, ptr %6, align 8, !tbaa !14
  %98 = load double, ptr %4, align 8, !tbaa !14
  %99 = call double @cos(double noundef %98) #4
  store double %99, ptr %7, align 8, !tbaa !14
  %100 = load double, ptr %5, align 8, !tbaa !14
  %101 = call double @cos(double noundef %100) #4
  store double %101, ptr %8, align 8, !tbaa !14
  %102 = load double, ptr %6, align 8, !tbaa !14
  %103 = call double @cos(double noundef %102) #4
  store double %103, ptr %9, align 8, !tbaa !14
  %104 = load double, ptr %4, align 8, !tbaa !14
  %105 = call double @sin(double noundef %104) #4
  store double %105, ptr %10, align 8, !tbaa !14
  %106 = load double, ptr %5, align 8, !tbaa !14
  %107 = call double @sin(double noundef %106) #4
  store double %107, ptr %11, align 8, !tbaa !14
  %108 = load double, ptr %6, align 8, !tbaa !14
  %109 = call double @sin(double noundef %108) #4
  store double %109, ptr %12, align 8, !tbaa !14
  %110 = load double, ptr %7, align 8, !tbaa !14
  %111 = load double, ptr %9, align 8, !tbaa !14
  %112 = fmul double %110, %111
  store double %112, ptr %13, align 8, !tbaa !14
  %113 = load double, ptr %7, align 8, !tbaa !14
  %114 = load double, ptr %12, align 8, !tbaa !14
  %115 = fmul double %113, %114
  store double %115, ptr %14, align 8, !tbaa !14
  %116 = load double, ptr %10, align 8, !tbaa !14
  %117 = load double, ptr %9, align 8, !tbaa !14
  %118 = fmul double %116, %117
  store double %118, ptr %15, align 8, !tbaa !14
  %119 = load double, ptr %10, align 8, !tbaa !14
  %120 = load double, ptr %12, align 8, !tbaa !14
  %121 = fmul double %119, %120
  store double %121, ptr %16, align 8, !tbaa !14
  %122 = load i32, ptr %22, align 4, !tbaa !5
  %123 = icmp eq i32 %122, 1
  br i1 %123, label %124, label %155

124:                                              ; preds = %88
  %125 = load double, ptr %8, align 8, !tbaa !14
  %126 = load double, ptr %14, align 8, !tbaa !14
  %127 = load double, ptr %15, align 8, !tbaa !14
  %128 = fadd double %126, %127
  %129 = fmul double %125, %128
  %130 = load i32, ptr %17, align 4, !tbaa !5
  %131 = sext i32 %130 to i64
  %132 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %131
  store double %129, ptr %132, align 8, !tbaa !14
  %133 = load double, ptr %11, align 8, !tbaa !14
  %134 = load double, ptr %13, align 8, !tbaa !14
  %135 = load double, ptr %16, align 8, !tbaa !14
  %136 = fadd double %134, %135
  %137 = fmul double %133, %136
  %138 = load i32, ptr %18, align 4, !tbaa !5
  %139 = sext i32 %138 to i64
  %140 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %139
  store double %137, ptr %140, align 8, !tbaa !14
  %141 = load double, ptr %11, align 8, !tbaa !14
  %142 = load double, ptr %14, align 8, !tbaa !14
  %143 = load double, ptr %15, align 8, !tbaa !14
  %144 = fsub double %142, %143
  %145 = fmul double %141, %144
  %146 = load i32, ptr %19, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %147
  store double %145, ptr %148, align 8, !tbaa !14
  %149 = load double, ptr %8, align 8, !tbaa !14
  %150 = load double, ptr %13, align 8, !tbaa !14
  %151 = load double, ptr %16, align 8, !tbaa !14
  %152 = fsub double %150, %151
  %153 = fmul double %149, %152
  %154 = getelementptr inbounds %struct.ShoemakeQuat, ptr %0, i32 0, i32 3
  store double %153, ptr %154, align 8, !tbaa !17
  br label %192

155:                                              ; preds = %88
  %156 = load double, ptr %8, align 8, !tbaa !14
  %157 = load double, ptr %15, align 8, !tbaa !14
  %158 = load double, ptr %11, align 8, !tbaa !14
  %159 = load double, ptr %14, align 8, !tbaa !14
  %160 = fmul double %158, %159
  %161 = fneg double %160
  %162 = call double @llvm.fmuladd.f64(double %156, double %157, double %161)
  %163 = load i32, ptr %17, align 4, !tbaa !5
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %164
  store double %162, ptr %165, align 8, !tbaa !14
  %166 = load double, ptr %8, align 8, !tbaa !14
  %167 = load double, ptr %16, align 8, !tbaa !14
  %168 = load double, ptr %11, align 8, !tbaa !14
  %169 = load double, ptr %13, align 8, !tbaa !14
  %170 = fmul double %168, %169
  %171 = call double @llvm.fmuladd.f64(double %166, double %167, double %170)
  %172 = load i32, ptr %18, align 4, !tbaa !5
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %173
  store double %171, ptr %174, align 8, !tbaa !14
  %175 = load double, ptr %8, align 8, !tbaa !14
  %176 = load double, ptr %14, align 8, !tbaa !14
  %177 = load double, ptr %11, align 8, !tbaa !14
  %178 = load double, ptr %15, align 8, !tbaa !14
  %179 = fmul double %177, %178
  %180 = fneg double %179
  %181 = call double @llvm.fmuladd.f64(double %175, double %176, double %180)
  %182 = load i32, ptr %19, align 4, !tbaa !5
  %183 = sext i32 %182 to i64
  %184 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %183
  store double %181, ptr %184, align 8, !tbaa !14
  %185 = load double, ptr %8, align 8, !tbaa !14
  %186 = load double, ptr %13, align 8, !tbaa !14
  %187 = load double, ptr %11, align 8, !tbaa !14
  %188 = load double, ptr %16, align 8, !tbaa !14
  %189 = fmul double %187, %188
  %190 = call double @llvm.fmuladd.f64(double %185, double %186, double %189)
  %191 = getelementptr inbounds %struct.ShoemakeQuat, ptr %0, i32 0, i32 3
  store double %190, ptr %191, align 8, !tbaa !17
  br label %192

192:                                              ; preds = %155, %124
  %193 = load i32, ptr %21, align 4, !tbaa !5
  %194 = icmp eq i32 %193, 1
  br i1 %194, label %195, label %204

195:                                              ; preds = %192
  %196 = load i32, ptr %18, align 4, !tbaa !5
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %197
  %199 = load double, ptr %198, align 8, !tbaa !14
  %200 = fneg double %199
  %201 = load i32, ptr %18, align 4, !tbaa !5
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %202
  store double %200, ptr %203, align 8, !tbaa !14
  br label %204

204:                                              ; preds = %195, %192
  %205 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 0
  %206 = load double, ptr %205, align 16, !tbaa !14
  %207 = getelementptr inbounds %struct.ShoemakeQuat, ptr %0, i32 0, i32 0
  store double %206, ptr %207, align 8, !tbaa !19
  %208 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 1
  %209 = load double, ptr %208, align 8, !tbaa !14
  %210 = getelementptr inbounds %struct.ShoemakeQuat, ptr %0, i32 0, i32 1
  store double %209, ptr %210, align 8, !tbaa !20
  %211 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 2
  %212 = load double, ptr %211, align 16, !tbaa !14
  %213 = getelementptr inbounds %struct.ShoemakeQuat, ptr %0, i32 0, i32 2
  store double %212, ptr %213, align 8, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #4
  ret void
}

; 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
declare double @cos(double noundef) #2

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

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

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 "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 24}
!10 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !6, i64 24}
!11 = !{!"double", !7, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!10, !11, i64 0}
!14 = !{!11, !11, i64 0}
!15 = !{!10, !11, i64 16}
!16 = !{!10, !11, i64 8}
!17 = !{!18, !11, i64 24}
!18 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!19 = !{!18, !11, i64 0}
!20 = !{!18, !11, i64 8}
!21 = !{!18, !11, i64 16}


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

%struct.ShoemakeQuat = type { double, double, double, double }
%struct.EulerAngles = type { double, double, double, i32 }

@.str = external hidden unnamed_addr constant [5 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: readwrite) uwtable
define dso_local void @Eul_ToQuat(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.ShoemakeQuat) align 8 %0, ptr nocapture noundef byval(%struct.EulerAngles) align 8 %1) local_unnamed_addr #0 {
  %3 = alloca [3 x double], align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  %4 = getelementptr inbounds i8, ptr %1, i64 24
  %5 = load i32, ptr %4, align 8, !tbaa !5
  %6 = and i32 %5, 1
  %7 = lshr i32 %5, 2
  %8 = and i32 %7, 1
  %9 = lshr i32 %5, 3
  %10 = and i32 %9, 3
  %11 = zext nneg i32 %10 to i64
  %12 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %11
  %13 = load i8, ptr %12, align 1, !tbaa !11
  %14 = sext i8 %13 to i32
  %15 = add nsw i32 %8, %14
  %16 = sext i32 %15 to i64
  %17 = getelementptr inbounds [5 x i8], ptr @.str.1, i64 0, i64 %16
  %18 = load i8, ptr %17, align 1, !tbaa !11
  %19 = add nsw i32 %14, 1
  %20 = sub nsw i32 %19, %8
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [5 x i8], ptr @.str.1, i64 0, i64 %21
  %23 = load i8, ptr %22, align 1, !tbaa !11
  %.not = icmp eq i32 %6, 0
  br i1 %.not, label %._crit_edge, label %24

24:                                               ; preds = %2
  %25 = load double, ptr %1, align 8, !tbaa !12
  %26 = getelementptr inbounds i8, ptr %1, i64 16
  %27 = load double, ptr %26, align 8, !tbaa !13
  store double %27, ptr %1, align 8, !tbaa !12
  store double %25, ptr %26, align 8, !tbaa !13
  br label %._crit_edge

._crit_edge:                                      ; preds = %24, %2
  %.not69 = icmp eq i32 %8, 0
  %.phi.trans.insert = getelementptr inbounds i8, ptr %1, i64 8
  %.pre = load double, ptr %.phi.trans.insert, align 8, !tbaa !14
  %28 = fneg double %.pre
  %29 = select i1 %.not69, double %.pre, double %28
  %30 = load double, ptr %1, align 8, !tbaa !12
  %31 = fmul double %30, 5.000000e-01
  %32 = fmul double %29, 5.000000e-01
  %33 = getelementptr inbounds i8, ptr %1, i64 16
  %34 = load double, ptr %33, align 8, !tbaa !13
  %35 = fmul double %34, 5.000000e-01
  %36 = tail call double @cos(double noundef %31) #4
  %37 = tail call double @cos(double noundef %32) #4
  %38 = tail call double @cos(double noundef %35) #4
  %39 = tail call double @sin(double noundef %31) #4
  %40 = tail call double @sin(double noundef %32) #4
  %41 = tail call double @sin(double noundef %35) #4
  %42 = fmul double %36, %38
  %43 = fmul double %36, %41
  %44 = fmul double %38, %39
  %45 = fmul double %39, %41
  %46 = and i32 %5, 2
  %.not70 = icmp eq i32 %46, 0
  br i1 %.not70, label %62, label %47

47:                                               ; preds = %._crit_edge
  %48 = fadd double %44, %43
  %49 = fmul double %37, %48
  %50 = sext i8 %13 to i64
  %51 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %50
  store double %49, ptr %51, align 8, !tbaa !15
  %52 = fadd double %42, %45
  %53 = fmul double %40, %52
  %54 = sext i8 %18 to i64
  %55 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %54
  store double %53, ptr %55, align 8, !tbaa !15
  %56 = fsub double %43, %44
  %57 = fmul double %40, %56
  %58 = sext i8 %23 to i64
  %59 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %58
  store double %57, ptr %59, align 8, !tbaa !15
  %60 = fsub double %42, %45
  %61 = fmul double %37, %60
  br label %78

62:                                               ; preds = %._crit_edge
  %63 = fneg double %40
  %64 = fmul double %43, %63
  %65 = tail call double @llvm.fmuladd.f64(double %37, double %44, double %64)
  %66 = sext i8 %13 to i64
  %67 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %66
  store double %65, ptr %67, align 8, !tbaa !15
  %68 = fmul double %42, %40
  %69 = tail call double @llvm.fmuladd.f64(double %37, double %45, double %68)
  %70 = sext i8 %18 to i64
  %71 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %70
  store double %69, ptr %71, align 8, !tbaa !15
  %72 = fmul double %44, %63
  %73 = tail call double @llvm.fmuladd.f64(double %37, double %43, double %72)
  %74 = sext i8 %23 to i64
  %75 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %74
  store double %73, ptr %75, align 8, !tbaa !15
  %76 = fmul double %40, %45
  %77 = tail call double @llvm.fmuladd.f64(double %37, double %42, double %76)
  br label %78

78:                                               ; preds = %62, %47
  %.sink = phi double [ %77, %62 ], [ %61, %47 ]
  %79 = getelementptr inbounds i8, ptr %0, i64 24
  store double %.sink, ptr %79, align 8
  br i1 %.not69, label %85, label %80

80:                                               ; preds = %78
  %81 = sext i8 %18 to i64
  %82 = getelementptr inbounds [3 x double], ptr %3, i64 0, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !15
  %84 = fneg double %83
  store double %84, ptr %82, align 8, !tbaa !15
  br label %85

85:                                               ; preds = %80, %78
  %86 = load <2 x double>, ptr %3, align 16, !tbaa !15
  store <2 x double> %86, ptr %0, align 8, !tbaa !15
  %87 = getelementptr inbounds i8, ptr %3, i64 16
  %88 = load double, ptr %87, align 16, !tbaa !15
  %89 = getelementptr inbounds i8, ptr %0, i64 16
  store double %88, ptr %89, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  ret void
}

; 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: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(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

attributes #0 = { mustprogress nofree nounwind willreturn memory(write, argmem: readwrite) 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 = { 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 }

!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 24}
!6 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!8, !8, i64 0}
!12 = !{!6, !7, i64 0}
!13 = !{!6, !7, i64 16}
!14 = !{!6, !7, i64 8}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !7, i64 16}
!17 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}


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