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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @Eul_ToHMatrix(ptr noundef byval(%struct.EulerAngles) align 8 %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %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
  store ptr %1, ptr %3, align 8, !tbaa !5
  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 !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #4
  %27 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 3
  %28 = load i32, ptr %27, align 8, !tbaa !11
  store i32 %28, ptr %24, align 4, !tbaa !9
  %29 = load i32, ptr %24, align 4, !tbaa !9
  %30 = and i32 %29, 1
  store i32 %30, ptr %23, align 4, !tbaa !9
  %31 = load i32, ptr %24, align 4, !tbaa !9
  %32 = lshr i32 %31, 1
  store i32 %32, ptr %24, align 4, !tbaa !9
  %33 = load i32, ptr %24, align 4, !tbaa !9
  %34 = and i32 %33, 1
  store i32 %34, ptr %22, align 4, !tbaa !9
  %35 = load i32, ptr %24, align 4, !tbaa !9
  %36 = lshr i32 %35, 1
  store i32 %36, ptr %24, align 4, !tbaa !9
  %37 = load i32, ptr %24, align 4, !tbaa !9
  %38 = and i32 %37, 1
  store i32 %38, ptr %21, align 4, !tbaa !9
  %39 = load i32, ptr %24, align 4, !tbaa !9
  %40 = lshr i32 %39, 1
  store i32 %40, ptr %24, align 4, !tbaa !9
  %41 = load i32, ptr %24, align 4, !tbaa !9
  %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 !14
  %46 = sext i8 %45 to i32
  store i32 %46, ptr %17, align 4, !tbaa !9
  %47 = load i32, ptr %17, align 4, !tbaa !9
  %48 = load i32, ptr %21, align 4, !tbaa !9
  %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 !14
  %53 = sext i8 %52 to i32
  store i32 %53, ptr %18, align 4, !tbaa !9
  %54 = load i32, ptr %17, align 4, !tbaa !9
  %55 = add nsw i32 %54, 1
  %56 = load i32, ptr %21, align 4, !tbaa !9
  %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 !14
  %61 = sext i8 %60 to i32
  store i32 %61, ptr %19, align 4, !tbaa !9
  %62 = load i32, ptr %22, align 4, !tbaa !9
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %66

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

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

68:                                               ; preds = %66, %64
  %69 = phi i32 [ %65, %64 ], [ %67, %66 ]
  store i32 %69, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #4
  %70 = load i32, ptr %23, align 4, !tbaa !9
  %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 %0, i32 0, i32 0
  %74 = load double, ptr %73, align 8, !tbaa !15
  store double %74, ptr %25, align 8, !tbaa !16
  %75 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 2
  %76 = load double, ptr %75, align 8, !tbaa !17
  %77 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 0
  store double %76, ptr %77, align 8, !tbaa !15
  %78 = load double, ptr %25, align 8, !tbaa !16
  %79 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 2
  store double %78, ptr %79, align 8, !tbaa !17
  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 !9
  %82 = icmp eq i32 %81, 1
  br i1 %82, label %83, label %96

83:                                               ; preds = %80
  %84 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 0
  %85 = load double, ptr %84, align 8, !tbaa !15
  %86 = fneg double %85
  %87 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 0
  store double %86, ptr %87, align 8, !tbaa !15
  %88 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 1
  %89 = load double, ptr %88, align 8, !tbaa !18
  %90 = fneg double %89
  %91 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 1
  store double %90, ptr %91, align 8, !tbaa !18
  %92 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 2
  %93 = load double, ptr %92, align 8, !tbaa !17
  %94 = fneg double %93
  %95 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 2
  store double %94, ptr %95, align 8, !tbaa !17
  br label %96

96:                                               ; preds = %83, %80
  %97 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 0
  %98 = load double, ptr %97, align 8, !tbaa !15
  store double %98, ptr %4, align 8, !tbaa !16
  %99 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 1
  %100 = load double, ptr %99, align 8, !tbaa !18
  store double %100, ptr %5, align 8, !tbaa !16
  %101 = getelementptr inbounds %struct.EulerAngles, ptr %0, i32 0, i32 2
  %102 = load double, ptr %101, align 8, !tbaa !17
  store double %102, ptr %6, align 8, !tbaa !16
  %103 = load double, ptr %4, align 8, !tbaa !16
  %104 = call double @cos(double noundef %103) #4
  store double %104, ptr %7, align 8, !tbaa !16
  %105 = load double, ptr %5, align 8, !tbaa !16
  %106 = call double @cos(double noundef %105) #4
  store double %106, ptr %8, align 8, !tbaa !16
  %107 = load double, ptr %6, align 8, !tbaa !16
  %108 = call double @cos(double noundef %107) #4
  store double %108, ptr %9, align 8, !tbaa !16
  %109 = load double, ptr %4, align 8, !tbaa !16
  %110 = call double @sin(double noundef %109) #4
  store double %110, ptr %10, align 8, !tbaa !16
  %111 = load double, ptr %5, align 8, !tbaa !16
  %112 = call double @sin(double noundef %111) #4
  store double %112, ptr %11, align 8, !tbaa !16
  %113 = load double, ptr %6, align 8, !tbaa !16
  %114 = call double @sin(double noundef %113) #4
  store double %114, ptr %12, align 8, !tbaa !16
  %115 = load double, ptr %7, align 8, !tbaa !16
  %116 = load double, ptr %9, align 8, !tbaa !16
  %117 = fmul double %115, %116
  store double %117, ptr %13, align 8, !tbaa !16
  %118 = load double, ptr %7, align 8, !tbaa !16
  %119 = load double, ptr %12, align 8, !tbaa !16
  %120 = fmul double %118, %119
  store double %120, ptr %14, align 8, !tbaa !16
  %121 = load double, ptr %10, align 8, !tbaa !16
  %122 = load double, ptr %9, align 8, !tbaa !16
  %123 = fmul double %121, %122
  store double %123, ptr %15, align 8, !tbaa !16
  %124 = load double, ptr %10, align 8, !tbaa !16
  %125 = load double, ptr %12, align 8, !tbaa !16
  %126 = fmul double %124, %125
  store double %126, ptr %16, align 8, !tbaa !16
  %127 = load i32, ptr %22, align 4, !tbaa !9
  %128 = icmp eq i32 %127, 1
  br i1 %128, label %129, label %227

129:                                              ; preds = %96
  %130 = load double, ptr %8, align 8, !tbaa !16
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = load i32, ptr %17, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = getelementptr inbounds [4 x double], ptr %131, i64 %133
  %135 = load i32, ptr %17, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds [4 x double], ptr %134, i64 0, i64 %136
  store double %130, ptr %137, align 8, !tbaa !16
  %138 = load double, ptr %11, align 8, !tbaa !16
  %139 = load double, ptr %10, align 8, !tbaa !16
  %140 = fmul double %138, %139
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = load i32, ptr %17, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds [4 x double], ptr %141, i64 %143
  %145 = load i32, ptr %18, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [4 x double], ptr %144, i64 0, i64 %146
  store double %140, ptr %147, align 8, !tbaa !16
  %148 = load double, ptr %11, align 8, !tbaa !16
  %149 = load double, ptr %7, align 8, !tbaa !16
  %150 = fmul double %148, %149
  %151 = load ptr, ptr %3, align 8, !tbaa !5
  %152 = load i32, ptr %17, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds [4 x double], ptr %151, i64 %153
  %155 = load i32, ptr %19, align 4, !tbaa !9
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds [4 x double], ptr %154, i64 0, i64 %156
  store double %150, ptr %157, align 8, !tbaa !16
  %158 = load double, ptr %11, align 8, !tbaa !16
  %159 = load double, ptr %12, align 8, !tbaa !16
  %160 = fmul double %158, %159
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = load i32, ptr %18, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds [4 x double], ptr %161, i64 %163
  %165 = load i32, ptr %17, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds [4 x double], ptr %164, i64 0, i64 %166
  store double %160, ptr %167, align 8, !tbaa !16
  %168 = load double, ptr %8, align 8, !tbaa !16
  %169 = fneg double %168
  %170 = load double, ptr %16, align 8, !tbaa !16
  %171 = load double, ptr %13, align 8, !tbaa !16
  %172 = call double @llvm.fmuladd.f64(double %169, double %170, double %171)
  %173 = load ptr, ptr %3, align 8, !tbaa !5
  %174 = load i32, ptr %18, align 4, !tbaa !9
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds [4 x double], ptr %173, i64 %175
  %177 = load i32, ptr %18, align 4, !tbaa !9
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds [4 x double], ptr %176, i64 0, i64 %178
  store double %172, ptr %179, align 8, !tbaa !16
  %180 = load double, ptr %8, align 8, !tbaa !16
  %181 = fneg double %180
  %182 = load double, ptr %14, align 8, !tbaa !16
  %183 = load double, ptr %15, align 8, !tbaa !16
  %184 = fneg double %183
  %185 = call double @llvm.fmuladd.f64(double %181, double %182, double %184)
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = load i32, ptr %18, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [4 x double], ptr %186, i64 %188
  %190 = load i32, ptr %19, align 4, !tbaa !9
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds [4 x double], ptr %189, i64 0, i64 %191
  store double %185, ptr %192, align 8, !tbaa !16
  %193 = load double, ptr %11, align 8, !tbaa !16
  %194 = fneg double %193
  %195 = load double, ptr %9, align 8, !tbaa !16
  %196 = fmul double %194, %195
  %197 = load ptr, ptr %3, align 8, !tbaa !5
  %198 = load i32, ptr %19, align 4, !tbaa !9
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds [4 x double], ptr %197, i64 %199
  %201 = load i32, ptr %17, align 4, !tbaa !9
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds [4 x double], ptr %200, i64 0, i64 %202
  store double %196, ptr %203, align 8, !tbaa !16
  %204 = load double, ptr %8, align 8, !tbaa !16
  %205 = load double, ptr %15, align 8, !tbaa !16
  %206 = load double, ptr %14, align 8, !tbaa !16
  %207 = call double @llvm.fmuladd.f64(double %204, double %205, double %206)
  %208 = load ptr, ptr %3, align 8, !tbaa !5
  %209 = load i32, ptr %19, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds [4 x double], ptr %208, i64 %210
  %212 = load i32, ptr %18, align 4, !tbaa !9
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [4 x double], ptr %211, i64 0, i64 %213
  store double %207, ptr %214, align 8, !tbaa !16
  %215 = load double, ptr %8, align 8, !tbaa !16
  %216 = load double, ptr %13, align 8, !tbaa !16
  %217 = load double, ptr %16, align 8, !tbaa !16
  %218 = fneg double %217
  %219 = call double @llvm.fmuladd.f64(double %215, double %216, double %218)
  %220 = load ptr, ptr %3, align 8, !tbaa !5
  %221 = load i32, ptr %19, align 4, !tbaa !9
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds [4 x double], ptr %220, i64 %222
  %224 = load i32, ptr %19, align 4, !tbaa !9
  %225 = sext i32 %224 to i64
  %226 = getelementptr inbounds [4 x double], ptr %223, i64 0, i64 %225
  store double %219, ptr %226, align 8, !tbaa !16
  br label %323

227:                                              ; preds = %96
  %228 = load double, ptr %8, align 8, !tbaa !16
  %229 = load double, ptr %9, align 8, !tbaa !16
  %230 = fmul double %228, %229
  %231 = load ptr, ptr %3, align 8, !tbaa !5
  %232 = load i32, ptr %17, align 4, !tbaa !9
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds [4 x double], ptr %231, i64 %233
  %235 = load i32, ptr %17, align 4, !tbaa !9
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds [4 x double], ptr %234, i64 0, i64 %236
  store double %230, ptr %237, align 8, !tbaa !16
  %238 = load double, ptr %11, align 8, !tbaa !16
  %239 = load double, ptr %15, align 8, !tbaa !16
  %240 = load double, ptr %14, align 8, !tbaa !16
  %241 = fneg double %240
  %242 = call double @llvm.fmuladd.f64(double %238, double %239, double %241)
  %243 = load ptr, ptr %3, align 8, !tbaa !5
  %244 = load i32, ptr %17, align 4, !tbaa !9
  %245 = sext i32 %244 to i64
  %246 = getelementptr inbounds [4 x double], ptr %243, i64 %245
  %247 = load i32, ptr %18, align 4, !tbaa !9
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds [4 x double], ptr %246, i64 0, i64 %248
  store double %242, ptr %249, align 8, !tbaa !16
  %250 = load double, ptr %11, align 8, !tbaa !16
  %251 = load double, ptr %13, align 8, !tbaa !16
  %252 = load double, ptr %16, align 8, !tbaa !16
  %253 = call double @llvm.fmuladd.f64(double %250, double %251, double %252)
  %254 = load ptr, ptr %3, align 8, !tbaa !5
  %255 = load i32, ptr %17, align 4, !tbaa !9
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [4 x double], ptr %254, i64 %256
  %258 = load i32, ptr %19, align 4, !tbaa !9
  %259 = sext i32 %258 to i64
  %260 = getelementptr inbounds [4 x double], ptr %257, i64 0, i64 %259
  store double %253, ptr %260, align 8, !tbaa !16
  %261 = load double, ptr %8, align 8, !tbaa !16
  %262 = load double, ptr %12, align 8, !tbaa !16
  %263 = fmul double %261, %262
  %264 = load ptr, ptr %3, align 8, !tbaa !5
  %265 = load i32, ptr %18, align 4, !tbaa !9
  %266 = sext i32 %265 to i64
  %267 = getelementptr inbounds [4 x double], ptr %264, i64 %266
  %268 = load i32, ptr %17, align 4, !tbaa !9
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [4 x double], ptr %267, i64 0, i64 %269
  store double %263, ptr %270, align 8, !tbaa !16
  %271 = load double, ptr %11, align 8, !tbaa !16
  %272 = load double, ptr %16, align 8, !tbaa !16
  %273 = load double, ptr %13, align 8, !tbaa !16
  %274 = call double @llvm.fmuladd.f64(double %271, double %272, double %273)
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = load i32, ptr %18, align 4, !tbaa !9
  %277 = sext i32 %276 to i64
  %278 = getelementptr inbounds [4 x double], ptr %275, i64 %277
  %279 = load i32, ptr %18, align 4, !tbaa !9
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds [4 x double], ptr %278, i64 0, i64 %280
  store double %274, ptr %281, align 8, !tbaa !16
  %282 = load double, ptr %11, align 8, !tbaa !16
  %283 = load double, ptr %14, align 8, !tbaa !16
  %284 = load double, ptr %15, align 8, !tbaa !16
  %285 = fneg double %284
  %286 = call double @llvm.fmuladd.f64(double %282, double %283, double %285)
  %287 = load ptr, ptr %3, align 8, !tbaa !5
  %288 = load i32, ptr %18, align 4, !tbaa !9
  %289 = sext i32 %288 to i64
  %290 = getelementptr inbounds [4 x double], ptr %287, i64 %289
  %291 = load i32, ptr %19, align 4, !tbaa !9
  %292 = sext i32 %291 to i64
  %293 = getelementptr inbounds [4 x double], ptr %290, i64 0, i64 %292
  store double %286, ptr %293, align 8, !tbaa !16
  %294 = load double, ptr %11, align 8, !tbaa !16
  %295 = fneg double %294
  %296 = load ptr, ptr %3, align 8, !tbaa !5
  %297 = load i32, ptr %19, align 4, !tbaa !9
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [4 x double], ptr %296, i64 %298
  %300 = load i32, ptr %17, align 4, !tbaa !9
  %301 = sext i32 %300 to i64
  %302 = getelementptr inbounds [4 x double], ptr %299, i64 0, i64 %301
  store double %295, ptr %302, align 8, !tbaa !16
  %303 = load double, ptr %8, align 8, !tbaa !16
  %304 = load double, ptr %10, align 8, !tbaa !16
  %305 = fmul double %303, %304
  %306 = load ptr, ptr %3, align 8, !tbaa !5
  %307 = load i32, ptr %19, align 4, !tbaa !9
  %308 = sext i32 %307 to i64
  %309 = getelementptr inbounds [4 x double], ptr %306, i64 %308
  %310 = load i32, ptr %18, align 4, !tbaa !9
  %311 = sext i32 %310 to i64
  %312 = getelementptr inbounds [4 x double], ptr %309, i64 0, i64 %311
  store double %305, ptr %312, align 8, !tbaa !16
  %313 = load double, ptr %8, align 8, !tbaa !16
  %314 = load double, ptr %7, align 8, !tbaa !16
  %315 = fmul double %313, %314
  %316 = load ptr, ptr %3, align 8, !tbaa !5
  %317 = load i32, ptr %19, align 4, !tbaa !9
  %318 = sext i32 %317 to i64
  %319 = getelementptr inbounds [4 x double], ptr %316, i64 %318
  %320 = load i32, ptr %19, align 4, !tbaa !9
  %321 = sext i32 %320 to i64
  %322 = getelementptr inbounds [4 x double], ptr %319, i64 0, i64 %321
  store double %315, ptr %322, align 8, !tbaa !16
  br label %323

323:                                              ; preds = %227, %129
  %324 = load ptr, ptr %3, align 8, !tbaa !5
  %325 = getelementptr inbounds [4 x double], ptr %324, i64 3
  %326 = getelementptr inbounds [4 x double], ptr %325, i64 0, i64 0
  store double 0.000000e+00, ptr %326, align 8, !tbaa !16
  %327 = load ptr, ptr %3, align 8, !tbaa !5
  %328 = getelementptr inbounds [4 x double], ptr %327, i64 3
  %329 = getelementptr inbounds [4 x double], ptr %328, i64 0, i64 1
  store double 0.000000e+00, ptr %329, align 8, !tbaa !16
  %330 = load ptr, ptr %3, align 8, !tbaa !5
  %331 = getelementptr inbounds [4 x double], ptr %330, i64 3
  %332 = getelementptr inbounds [4 x double], ptr %331, i64 0, i64 2
  store double 0.000000e+00, ptr %332, align 8, !tbaa !16
  %333 = load ptr, ptr %3, align 8, !tbaa !5
  %334 = getelementptr inbounds [4 x double], ptr %333, i64 0
  %335 = getelementptr inbounds [4 x double], ptr %334, i64 0, i64 3
  store double 0.000000e+00, ptr %335, align 8, !tbaa !16
  %336 = load ptr, ptr %3, align 8, !tbaa !5
  %337 = getelementptr inbounds [4 x double], ptr %336, i64 1
  %338 = getelementptr inbounds [4 x double], ptr %337, i64 0, i64 3
  store double 0.000000e+00, ptr %338, align 8, !tbaa !16
  %339 = load ptr, ptr %3, align 8, !tbaa !5
  %340 = getelementptr inbounds [4 x double], ptr %339, i64 2
  %341 = getelementptr inbounds [4 x double], ptr %340, i64 0, i64 3
  store double 0.000000e+00, ptr %341, align 8, !tbaa !16
  %342 = load ptr, ptr %3, align 8, !tbaa !5
  %343 = getelementptr inbounds [4 x double], ptr %342, i64 3
  %344 = getelementptr inbounds [4 x double], ptr %343, i64 0, i64 3
  store double 1.000000e+00, ptr %344, align 8, !tbaa !16
  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
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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 #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 = !{!"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 = !{!12, !10, i64 24}
!12 = !{!"", !13, i64 0, !13, i64 8, !13, i64 16, !10, i64 24}
!13 = !{!"double", !7, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!12, !13, i64 0}
!16 = !{!13, !13, i64 0}
!17 = !{!12, !13, i64 16}
!18 = !{!12, !13, i64 8}


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

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

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

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

23:                                               ; preds = %2
  %24 = getelementptr inbounds i8, ptr %0, i64 16
  %25 = load double, ptr %24, align 8, !tbaa !13
  store double %.pre.pre, ptr %24, align 8, !tbaa !13
  br label %26

26:                                               ; preds = %23, %2
  %.pre = phi double [ %25, %23 ], [ %.pre.pre, %2 ]
  %.not135 = icmp eq i32 %7, 0
  %27 = fneg double %.pre
  %28 = getelementptr inbounds i8, ptr %0, i64 8
  %29 = load <2 x double>, ptr %28, align 8
  %30 = fneg <2 x double> %29
  %.phi.trans.insert = getelementptr inbounds i8, ptr %0, i64 8
  %31 = load <2 x double>, ptr %.phi.trans.insert, align 8
  %32 = select i1 %.not135, double %.pre, double %27
  %33 = select i1 %.not135, <2 x double> %31, <2 x double> %30
  %34 = tail call double @cos(double noundef %32) #4
  %35 = extractelement <2 x double> %33, i64 0
  %36 = tail call double @cos(double noundef %35) #4
  %37 = extractelement <2 x double> %33, i64 1
  %38 = tail call double @cos(double noundef %37) #4
  %39 = tail call double @sin(double noundef %32) #4
  %40 = tail call double @sin(double noundef %35) #4
  %41 = tail call double @sin(double noundef %37) #4
  %42 = fmul double %34, %38
  %43 = fmul double %34, %41
  %44 = fmul double %38, %39
  %45 = fmul double %39, %41
  %46 = and i32 %4, 2
  %.not136 = icmp eq i32 %46, 0
  br i1 %.not136, label %72, label %47

47:                                               ; preds = %26
  %48 = sext i8 %12 to i64
  %49 = getelementptr inbounds [4 x double], ptr %1, i64 %48, i64 %48
  store double %36, ptr %49, align 8, !tbaa !14
  %50 = fmul double %39, %40
  %51 = sext i8 %17 to i64
  %52 = getelementptr inbounds [4 x double], ptr %1, i64 %48, i64 %51
  store double %50, ptr %52, align 8, !tbaa !14
  %53 = fmul double %34, %40
  %54 = sext i8 %22 to i64
  %55 = getelementptr inbounds [4 x double], ptr %1, i64 %48, i64 %54
  store double %53, ptr %55, align 8, !tbaa !14
  %56 = fmul double %40, %41
  %57 = getelementptr inbounds [4 x double], ptr %1, i64 %51, i64 %48
  store double %56, ptr %57, align 8, !tbaa !14
  %58 = fneg double %36
  %59 = tail call double @llvm.fmuladd.f64(double %58, double %45, double %42)
  %60 = getelementptr inbounds [4 x double], ptr %1, i64 %51, i64 %51
  store double %59, ptr %60, align 8, !tbaa !14
  %61 = fneg double %44
  %62 = tail call double @llvm.fmuladd.f64(double %58, double %43, double %61)
  %63 = getelementptr inbounds [4 x double], ptr %1, i64 %51, i64 %54
  store double %62, ptr %63, align 8, !tbaa !14
  %64 = fneg double %40
  %65 = fmul double %38, %64
  %66 = getelementptr inbounds [4 x double], ptr %1, i64 %54, i64 %48
  store double %65, ptr %66, align 8, !tbaa !14
  %67 = tail call double @llvm.fmuladd.f64(double %36, double %44, double %43)
  %68 = getelementptr inbounds [4 x double], ptr %1, i64 %54, i64 %51
  store double %67, ptr %68, align 8, !tbaa !14
  %69 = fneg double %45
  %70 = tail call double @llvm.fmuladd.f64(double %36, double %42, double %69)
  %71 = getelementptr inbounds [4 x double], ptr %1, i64 %54, i64 %54
  store double %70, ptr %71, align 8, !tbaa !14
  br label %96

72:                                               ; preds = %26
  %73 = fmul double %36, %38
  %74 = sext i8 %12 to i64
  %75 = getelementptr inbounds [4 x double], ptr %1, i64 %74, i64 %74
  store double %73, ptr %75, align 8, !tbaa !14
  %76 = fneg double %43
  %77 = tail call double @llvm.fmuladd.f64(double %40, double %44, double %76)
  %78 = sext i8 %17 to i64
  %79 = getelementptr inbounds [4 x double], ptr %1, i64 %74, i64 %78
  store double %77, ptr %79, align 8, !tbaa !14
  %80 = tail call double @llvm.fmuladd.f64(double %40, double %42, double %45)
  %81 = sext i8 %22 to i64
  %82 = getelementptr inbounds [4 x double], ptr %1, i64 %74, i64 %81
  store double %80, ptr %82, align 8, !tbaa !14
  %83 = fmul double %36, %41
  %84 = getelementptr inbounds [4 x double], ptr %1, i64 %78, i64 %74
  store double %83, ptr %84, align 8, !tbaa !14
  %85 = tail call double @llvm.fmuladd.f64(double %40, double %45, double %42)
  %86 = getelementptr inbounds [4 x double], ptr %1, i64 %78, i64 %78
  store double %85, ptr %86, align 8, !tbaa !14
  %87 = fneg double %44
  %88 = tail call double @llvm.fmuladd.f64(double %40, double %43, double %87)
  %89 = getelementptr inbounds [4 x double], ptr %1, i64 %78, i64 %81
  store double %88, ptr %89, align 8, !tbaa !14
  %90 = fneg double %40
  %91 = getelementptr inbounds [4 x double], ptr %1, i64 %81, i64 %74
  store double %90, ptr %91, align 8, !tbaa !14
  %92 = fmul double %36, %39
  %93 = getelementptr inbounds [4 x double], ptr %1, i64 %81, i64 %78
  store double %92, ptr %93, align 8, !tbaa !14
  %94 = fmul double %34, %36
  %95 = getelementptr inbounds [4 x double], ptr %1, i64 %81, i64 %81
  store double %94, ptr %95, align 8, !tbaa !14
  br label %96

96:                                               ; preds = %72, %47
  %97 = getelementptr inbounds i8, ptr %1, i64 24
  store double 0.000000e+00, ptr %97, align 8, !tbaa !14
  %98 = getelementptr inbounds i8, ptr %1, i64 56
  store double 0.000000e+00, ptr %98, align 8, !tbaa !14
  %99 = getelementptr inbounds i8, ptr %1, i64 88
  %100 = getelementptr inbounds i8, ptr %1, i64 120
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %99, i8 0, i64 32, i1 false)
  store double 1.000000e+00, ptr %100, align 8, !tbaa !14
  ret void
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!7, !7, i64 0}


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