; LLVM IR from maliput/maliput :: src/maliput/math (roll_pitch_yaw)

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

%"class.maliput::math::Matrix" = type { %"struct.std::array.0" }
%"struct.std::array.0" = type { [3 x %"class.maliput::math::Vector"] }
%"class.maliput::math::Vector" = type { %"class.maliput::math::VectorBase.1" }
%"class.maliput::math::VectorBase.1" = type { %"struct.std::array" }
%"struct.std::array" = type { [3 x double] }
%"class.std::initializer_list.2" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [51 x i8], align 1
@__func__._ZNK7maliput4math12RollPitchYaw24CalcRotationMatrixDrDpDyEPNS0_6MatrixILm3EEES4_S4_ = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [84 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 speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; 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) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7maliput4math12RollPitchYaw24CalcRotationMatrixDrDpDyEPNS0_6MatrixILm3EEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, 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 double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca double, align 8
  %26 = alloca %"class.maliput::math::Matrix", align 8
  %27 = alloca %"class.std::initializer_list.2", align 8
  %28 = alloca [9 x double], align 8
  %29 = alloca %"class.maliput::math::Matrix", align 8
  %30 = alloca %"class.std::initializer_list.2", align 8
  %31 = alloca [9 x double], align 8
  %32 = alloca %"class.maliput::math::Matrix", align 8
  %33 = alloca %"class.std::initializer_list.2", align 8
  %34 = alloca [9 x double], align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %35 = load ptr, ptr %5, align 8
  br label %36

36:                                               ; preds = %4
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %45

39:                                               ; preds = %36
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = icmp ne ptr %40, null
  br i1 %41, label %42, label %45

42:                                               ; preds = %39
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %46, label %45

45:                                               ; preds = %42, %39, %36
  call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef @.str, ptr noundef @__func__._ZNK7maliput4math12RollPitchYaw24CalcRotationMatrixDrDpDyEPNS0_6MatrixILm3EEES4_S4_, ptr noundef @.str.1, i32 noundef 208) #7
  unreachable

46:                                               ; preds = %42
  br label %47

47:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %48 = call noundef double @_ZNK7maliput4math12RollPitchYaw10roll_angleEv(ptr noundef nonnull align 8 dereferenceable(24) %35)
  store double %48, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %49 = call noundef double @_ZNK7maliput4math12RollPitchYaw11pitch_angleEv(ptr noundef nonnull align 8 dereferenceable(24) %35)
  store double %49, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %50 = call noundef double @_ZNK7maliput4math12RollPitchYaw9yaw_angleEv(ptr noundef nonnull align 8 dereferenceable(24) %35)
  store double %50, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %51 = load double, ptr %9, align 8, !tbaa !9
  %52 = call double @cos(double noundef %51) #8
  store double %52, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  %53 = load double, ptr %10, align 8, !tbaa !9
  %54 = call double @cos(double noundef %53) #8
  store double %54, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %55 = load double, ptr %11, align 8, !tbaa !9
  %56 = call double @cos(double noundef %55) #8
  store double %56, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %57 = load double, ptr %9, align 8, !tbaa !9
  %58 = call double @sin(double noundef %57) #8
  store double %58, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %59 = load double, ptr %10, align 8, !tbaa !9
  %60 = call double @sin(double noundef %59) #8
  store double %60, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %61 = load double, ptr %11, align 8, !tbaa !9
  %62 = call double @sin(double noundef %61) #8
  store double %62, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %63 = load double, ptr %14, align 8, !tbaa !9
  %64 = load double, ptr %16, align 8, !tbaa !9
  %65 = fmul double %63, %64
  store double %65, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %66 = load double, ptr %17, align 8, !tbaa !9
  %67 = load double, ptr %16, align 8, !tbaa !9
  %68 = fmul double %66, %67
  store double %68, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  %69 = load double, ptr %17, align 8, !tbaa !9
  %70 = load double, ptr %15, align 8, !tbaa !9
  %71 = fmul double %69, %70
  store double %71, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %72 = load double, ptr %17, align 8, !tbaa !9
  %73 = load double, ptr %12, align 8, !tbaa !9
  %74 = fmul double %72, %73
  store double %74, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %75 = load double, ptr %14, align 8, !tbaa !9
  %76 = load double, ptr %13, align 8, !tbaa !9
  %77 = fmul double %75, %76
  store double %77, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #8
  %78 = load double, ptr %17, align 8, !tbaa !9
  %79 = load double, ptr %13, align 8, !tbaa !9
  %80 = fmul double %78, %79
  store double %80, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %81 = load double, ptr %14, align 8, !tbaa !9
  %82 = load double, ptr %15, align 8, !tbaa !9
  %83 = fmul double %81, %82
  store double %83, ptr %24, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #8
  %84 = load double, ptr %14, align 8, !tbaa !9
  %85 = load double, ptr %12, align 8, !tbaa !9
  %86 = fmul double %84, %85
  store double %86, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 72, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #8
  call void @llvm.lifetime.start.p0(i64 72, ptr %28) #8
  store double 0.000000e+00, ptr %28, align 8, !tbaa !9
  %87 = getelementptr inbounds double, ptr %28, i64 1
  %88 = load double, ptr %18, align 8, !tbaa !9
  %89 = load double, ptr %12, align 8, !tbaa !9
  %90 = load double, ptr %20, align 8, !tbaa !9
  %91 = call double @llvm.fmuladd.f64(double %88, double %89, double %90)
  store double %91, ptr %87, align 8, !tbaa !9
  %92 = getelementptr inbounds double, ptr %28, i64 2
  %93 = load double, ptr %18, align 8, !tbaa !9
  %94 = fneg double %93
  %95 = load double, ptr %15, align 8, !tbaa !9
  %96 = load double, ptr %21, align 8, !tbaa !9
  %97 = call double @llvm.fmuladd.f64(double %94, double %95, double %96)
  store double %97, ptr %92, align 8, !tbaa !9
  %98 = getelementptr inbounds double, ptr %28, i64 3
  store double 0.000000e+00, ptr %98, align 8, !tbaa !9
  %99 = getelementptr inbounds double, ptr %28, i64 4
  %100 = load double, ptr %19, align 8, !tbaa !9
  %101 = load double, ptr %12, align 8, !tbaa !9
  %102 = load double, ptr %24, align 8, !tbaa !9
  %103 = fneg double %102
  %104 = call double @llvm.fmuladd.f64(double %100, double %101, double %103)
  store double %104, ptr %99, align 8, !tbaa !9
  %105 = getelementptr inbounds double, ptr %28, i64 5
  %106 = load double, ptr %19, align 8, !tbaa !9
  %107 = fneg double %106
  %108 = load double, ptr %15, align 8, !tbaa !9
  %109 = load double, ptr %25, align 8, !tbaa !9
  %110 = fneg double %109
  %111 = call double @llvm.fmuladd.f64(double %107, double %108, double %110)
  store double %111, ptr %105, align 8, !tbaa !9
  %112 = getelementptr inbounds double, ptr %28, i64 6
  store double 0.000000e+00, ptr %112, align 8, !tbaa !9
  %113 = getelementptr inbounds double, ptr %28, i64 7
  %114 = load double, ptr %13, align 8, !tbaa !9
  %115 = load double, ptr %12, align 8, !tbaa !9
  %116 = fmul double %114, %115
  store double %116, ptr %113, align 8, !tbaa !9
  %117 = getelementptr inbounds double, ptr %28, i64 8
  %118 = load double, ptr %13, align 8, !tbaa !9
  %119 = fneg double %118
  %120 = load double, ptr %15, align 8, !tbaa !9
  %121 = fmul double %119, %120
  store double %121, ptr %117, align 8, !tbaa !9
  %122 = getelementptr inbounds %"class.std::initializer_list.2", ptr %27, i32 0, i32 0
  store ptr %28, ptr %122, align 8, !tbaa !11
  %123 = getelementptr inbounds %"class.std::initializer_list.2", ptr %27, i32 0, i32 1
  store i64 9, ptr %123, align 8, !tbaa !14
  call void @_ZN7maliput4math6MatrixILm3EEC1ERKSt16initializer_listIdE(ptr noundef nonnull align 8 dereferenceable(72) %26, ptr noundef nonnull align 8 dereferenceable(16) %27)
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZN7maliput4math6MatrixILm3EEaSEOKS2_(ptr noundef nonnull align 8 dereferenceable(72) %124, ptr noundef nonnull align 8 dereferenceable(72) %26)
  call void @llvm.lifetime.end.p0(i64 72, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 72, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.start.p0(i64 72, ptr %31) #8
  %126 = load double, ptr %18, align 8, !tbaa !9
  %127 = fneg double %126
  store double %127, ptr %31, align 8, !tbaa !9
  %128 = getelementptr inbounds double, ptr %31, i64 1
  %129 = load double, ptr %22, align 8, !tbaa !9
  %130 = load double, ptr %15, align 8, !tbaa !9
  %131 = fmul double %129, %130
  store double %131, ptr %128, align 8, !tbaa !9
  %132 = getelementptr inbounds double, ptr %31, i64 2
  %133 = load double, ptr %22, align 8, !tbaa !9
  %134 = load double, ptr %12, align 8, !tbaa !9
  %135 = fmul double %133, %134
  store double %135, ptr %132, align 8, !tbaa !9
  %136 = getelementptr inbounds double, ptr %31, i64 3
  %137 = load double, ptr %19, align 8, !tbaa !9
  %138 = fneg double %137
  store double %138, ptr %136, align 8, !tbaa !9
  %139 = getelementptr inbounds double, ptr %31, i64 4
  %140 = load double, ptr %23, align 8, !tbaa !9
  %141 = load double, ptr %15, align 8, !tbaa !9
  %142 = fmul double %140, %141
  store double %142, ptr %139, align 8, !tbaa !9
  %143 = getelementptr inbounds double, ptr %31, i64 5
  %144 = load double, ptr %23, align 8, !tbaa !9
  %145 = load double, ptr %12, align 8, !tbaa !9
  %146 = fmul double %144, %145
  store double %146, ptr %143, align 8, !tbaa !9
  %147 = getelementptr inbounds double, ptr %31, i64 6
  %148 = load double, ptr %13, align 8, !tbaa !9
  %149 = fneg double %148
  store double %149, ptr %147, align 8, !tbaa !9
  %150 = getelementptr inbounds double, ptr %31, i64 7
  %151 = load double, ptr %16, align 8, !tbaa !9
  %152 = fneg double %151
  %153 = load double, ptr %15, align 8, !tbaa !9
  %154 = fmul double %152, %153
  store double %154, ptr %150, align 8, !tbaa !9
  %155 = getelementptr inbounds double, ptr %31, i64 8
  %156 = load double, ptr %16, align 8, !tbaa !9
  %157 = fneg double %156
  %158 = load double, ptr %12, align 8, !tbaa !9
  %159 = fmul double %157, %158
  store double %159, ptr %155, align 8, !tbaa !9
  %160 = getelementptr inbounds %"class.std::initializer_list.2", ptr %30, i32 0, i32 0
  store ptr %31, ptr %160, align 8, !tbaa !11
  %161 = getelementptr inbounds %"class.std::initializer_list.2", ptr %30, i32 0, i32 1
  store i64 9, ptr %161, align 8, !tbaa !14
  call void @_ZN7maliput4math6MatrixILm3EEC1ERKSt16initializer_listIdE(ptr noundef nonnull align 8 dereferenceable(72) %29, ptr noundef nonnull align 8 dereferenceable(16) %30)
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZN7maliput4math6MatrixILm3EEaSEOKS2_(ptr noundef nonnull align 8 dereferenceable(72) %162, ptr noundef nonnull align 8 dereferenceable(72) %29)
  call void @llvm.lifetime.end.p0(i64 72, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr %29) #8
  call void @llvm.lifetime.start.p0(i64 72, ptr %32) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %33) #8
  call void @llvm.lifetime.start.p0(i64 72, ptr %34) #8
  %164 = load double, ptr %23, align 8, !tbaa !9
  %165 = fneg double %164
  store double %165, ptr %34, align 8, !tbaa !9
  %166 = getelementptr inbounds double, ptr %34, i64 1
  %167 = load double, ptr %19, align 8, !tbaa !9
  %168 = fneg double %167
  %169 = load double, ptr %15, align 8, !tbaa !9
  %170 = load double, ptr %25, align 8, !tbaa !9
  %171 = fneg double %170
  %172 = call double @llvm.fmuladd.f64(double %168, double %169, double %171)
  store double %172, ptr %166, align 8, !tbaa !9
  %173 = getelementptr inbounds double, ptr %34, i64 2
  %174 = load double, ptr %19, align 8, !tbaa !9
  %175 = fneg double %174
  %176 = load double, ptr %12, align 8, !tbaa !9
  %177 = load double, ptr %24, align 8, !tbaa !9
  %178 = call double @llvm.fmuladd.f64(double %175, double %176, double %177)
  store double %178, ptr %173, align 8, !tbaa !9
  %179 = getelementptr inbounds double, ptr %34, i64 3
  %180 = load double, ptr %22, align 8, !tbaa !9
  store double %180, ptr %179, align 8, !tbaa !9
  %181 = getelementptr inbounds double, ptr %34, i64 4
  %182 = load double, ptr %18, align 8, !tbaa !9
  %183 = load double, ptr %15, align 8, !tbaa !9
  %184 = load double, ptr %21, align 8, !tbaa !9
  %185 = fneg double %184
  %186 = call double @llvm.fmuladd.f64(double %182, double %183, double %185)
  store double %186, ptr %181, align 8, !tbaa !9
  %187 = getelementptr inbounds double, ptr %34, i64 5
  %188 = load double, ptr %18, align 8, !tbaa !9
  %189 = load double, ptr %12, align 8, !tbaa !9
  %190 = load double, ptr %20, align 8, !tbaa !9
  %191 = call double @llvm.fmuladd.f64(double %188, double %189, double %190)
  store double %191, ptr %187, align 8, !tbaa !9
  %192 = getelementptr inbounds double, ptr %34, i64 6
  store double 0.000000e+00, ptr %192, align 8, !tbaa !9
  %193 = getelementptr inbounds double, ptr %34, i64 7
  store double 0.000000e+00, ptr %193, align 8, !tbaa !9
  %194 = getelementptr inbounds double, ptr %34, i64 8
  store double 0.000000e+00, ptr %194, align 8, !tbaa !9
  %195 = getelementptr inbounds %"class.std::initializer_list.2", ptr %33, i32 0, i32 0
  store ptr %34, ptr %195, align 8, !tbaa !11
  %196 = getelementptr inbounds %"class.std::initializer_list.2", ptr %33, i32 0, i32 1
  store i64 9, ptr %196, align 8, !tbaa !14
  call void @_ZN7maliput4math6MatrixILm3EEC1ERKSt16initializer_listIdE(ptr noundef nonnull align 8 dereferenceable(72) %32, ptr noundef nonnull align 8 dereferenceable(16) %33)
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  %198 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZN7maliput4math6MatrixILm3EEaSEOKS2_(ptr noundef nonnull align 8 dereferenceable(72) %197, ptr noundef nonnull align 8 dereferenceable(72) %32)
  call void @llvm.lifetime.end.p0(i64 72, ptr %34) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %33) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr %32) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  ret void
}

; Function Attrs: noreturn
declare void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7maliput4math12RollPitchYaw10roll_angleEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7maliput4math12RollPitchYaw11pitch_angleEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7maliput4math12RollPitchYaw9yaw_angleEv(ptr noundef nonnull align 8 dereferenceable(24)) #5 align 2

declare void @_ZN7maliput4math6MatrixILm3EEC1ERKSt16initializer_listIdE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #6

declare noundef nonnull align 8 dereferenceable(72) ptr @_ZN7maliput4math6MatrixILm3EEaSEOKS2_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72)) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { mustprogress 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 = { noreturn "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 = { mustprogress 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 = { "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 #7 = { noreturn }
attributes #8 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSSt16initializer_listIdE", !6, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!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"

%"class.maliput::math::Matrix" = type { %"struct.std::array.0" }
%"struct.std::array.0" = type { [3 x %"class.maliput::math::Vector"] }
%"class.maliput::math::Vector" = type { %"class.maliput::math::VectorBase.1" }
%"class.maliput::math::VectorBase.1" = type { %"struct.std::array" }
%"struct.std::array" = type { [3 x double] }
%"class.std::initializer_list.2" = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [51 x i8], align 1
@__func__._ZNK7maliput4math12RollPitchYaw24CalcRotationMatrixDrDpDyEPNS0_6MatrixILm3EEES4_S4_ = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [84 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; 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 uwtable
define dso_local void @_ZNK7maliput4math12RollPitchYaw24CalcRotationMatrixDrDpDyEPNS0_6MatrixILm3EEES4_S4_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #3 align 2 {
  %5 = alloca %"class.maliput::math::Matrix", align 8
  %6 = alloca %"class.std::initializer_list.2", align 8
  %7 = alloca [9 x double], align 8
  %8 = alloca %"class.maliput::math::Matrix", align 8
  %9 = alloca %"class.std::initializer_list.2", align 8
  %10 = alloca [9 x double], align 8
  %11 = alloca %"class.maliput::math::Matrix", align 8
  %12 = alloca %"class.std::initializer_list.2", align 8
  %13 = alloca [9 x double], align 8
  %14 = icmp ne ptr %1, null
  %15 = icmp ne ptr %2, null
  %or.cond = and i1 %14, %15
  %16 = icmp ne ptr %3, null
  %or.cond3 = and i1 %or.cond, %16
  br i1 %or.cond3, label %18, label %17

17:                                               ; preds = %4
  tail call void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef nonnull @.str, ptr noundef nonnull @__func__._ZNK7maliput4math12RollPitchYaw24CalcRotationMatrixDrDpDyEPNS0_6MatrixILm3EEES4_S4_, ptr noundef nonnull @.str.1, i32 noundef 208) #9
  unreachable

18:                                               ; preds = %4
  %19 = tail call noundef double @_ZNK7maliput4math12RollPitchYaw10roll_angleEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %20 = tail call noundef double @_ZNK7maliput4math12RollPitchYaw11pitch_angleEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %21 = tail call noundef double @_ZNK7maliput4math12RollPitchYaw9yaw_angleEv(ptr noundef nonnull align 8 dereferenceable(24) %0)
  %22 = tail call double @cos(double noundef %19) #10
  %23 = tail call double @cos(double noundef %20) #10
  %24 = tail call double @cos(double noundef %21) #10
  %25 = tail call double @sin(double noundef %19) #10
  %26 = tail call double @sin(double noundef %20) #10
  %27 = tail call double @sin(double noundef %21) #10
  %28 = fmul double %24, %26
  %29 = fmul double %26, %27
  %30 = fmul double %23, %24
  %31 = fmul double %23, %27
  %32 = fmul double %24, %25
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #10
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7) #10
  store double 0.000000e+00, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %7, i64 8
  %34 = fneg double %28
  %35 = insertelement <2 x double> poison, double %25, i64 0
  %36 = insertelement <2 x double> %35, double %22, i64 1
  %37 = insertelement <2 x double> poison, double %27, i64 0
  %38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
  %39 = fmul <2 x double> %36, %38
  %40 = insertelement <2 x double> poison, double %28, i64 0
  %41 = insertelement <2 x double> %40, double %34, i64 1
  %42 = shufflevector <2 x double> %36, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  %43 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %41, <2 x double> %42, <2 x double> %39)
  store <2 x double> %43, ptr %33, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %7, i64 24
  store double 0.000000e+00, ptr %44, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %7, i64 32
  %46 = fneg double %32
  %47 = fneg double %29
  %48 = fneg double %24
  %49 = fmul double %22, %48
  %50 = insertelement <2 x double> poison, double %29, i64 0
  %51 = insertelement <2 x double> %50, double %47, i64 1
  %52 = insertelement <2 x double> poison, double %22, i64 0
  %53 = insertelement <2 x double> %52, double %25, i64 1
  %54 = insertelement <2 x double> poison, double %46, i64 0
  %55 = insertelement <2 x double> %54, double %49, i64 1
  %56 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %51, <2 x double> %53, <2 x double> %55)
  store <2 x double> %56, ptr %45, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %7, i64 48
  store double 0.000000e+00, ptr %57, align 8, !tbaa !5
  %58 = getelementptr inbounds i8, ptr %7, i64 56
  %59 = fneg double %23
  %60 = insertelement <2 x double> poison, double %23, i64 0
  %61 = insertelement <2 x double> %60, double %59, i64 1
  %62 = fmul <2 x double> %53, %61
  store <2 x double> %62, ptr %58, align 8, !tbaa !5
  store ptr %7, ptr %6, align 8, !tbaa !9
  %63 = getelementptr inbounds i8, ptr %6, i64 8
  store i64 9, ptr %63, align 8, !tbaa !13
  call void @_ZN7maliput4math6MatrixILm3EEC1ERKSt16initializer_listIdE(ptr noundef nonnull align 8 dereferenceable(72) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
  %64 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZN7maliput4math6MatrixILm3EEaSEOKS2_(ptr noundef nonnull align 8 dereferenceable(72) %1, ptr noundef nonnull align 8 dereferenceable(72) %5)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %8) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #10
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %10) #10
  store double %34, ptr %10, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %10, i64 8
  %66 = insertelement <2 x double> poison, double %30, i64 0
  %67 = shufflevector <2 x double> %66, <2 x double> poison, <2 x i32> zeroinitializer
  %68 = fmul <2 x double> %67, %36
  store <2 x double> %68, ptr %65, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %10, i64 24
  store double %47, ptr %69, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %10, i64 32
  %71 = insertelement <2 x double> poison, double %31, i64 0
  %72 = shufflevector <2 x double> %71, <2 x double> poison, <2 x i32> zeroinitializer
  %73 = fmul <2 x double> %36, %72
  store <2 x double> %73, ptr %70, align 8, !tbaa !5
  %74 = getelementptr inbounds i8, ptr %10, i64 48
  store double %59, ptr %74, align 8, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %10, i64 56
  %76 = fneg double %26
  %77 = insertelement <2 x double> poison, double %76, i64 0
  %78 = shufflevector <2 x double> %77, <2 x double> poison, <2 x i32> zeroinitializer
  %79 = fmul <2 x double> %36, %78
  store <2 x double> %79, ptr %75, align 8, !tbaa !5
  store ptr %10, ptr %9, align 8, !tbaa !9
  %80 = getelementptr inbounds i8, ptr %9, i64 8
  store i64 9, ptr %80, align 8, !tbaa !13
  call void @_ZN7maliput4math6MatrixILm3EEC1ERKSt16initializer_listIdE(ptr noundef nonnull align 8 dereferenceable(72) %8, ptr noundef nonnull align 8 dereferenceable(16) %9)
  %81 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZN7maliput4math6MatrixILm3EEaSEOKS2_(ptr noundef nonnull align 8 dereferenceable(72) %2, ptr noundef nonnull align 8 dereferenceable(72) %8)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %8) #10
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %11) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #10
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %13) #10
  %82 = fneg double %31
  store double %82, ptr %13, align 8, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %13, i64 8
  %84 = extractelement <2 x double> %56, i64 1
  store double %84, ptr %83, align 8, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %13, i64 16
  %86 = call double @llvm.fmuladd.f64(double %47, double %22, double %32)
  store double %86, ptr %85, align 8, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %13, i64 24
  store double %30, ptr %87, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %13, i64 32
  %89 = extractelement <2 x double> %39, i64 1
  %90 = fneg double %89
  %91 = call double @llvm.fmuladd.f64(double %28, double %25, double %90)
  store double %91, ptr %88, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %13, i64 40
  %93 = extractelement <2 x double> %43, i64 0
  store double %93, ptr %92, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %13, i64 48
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %94, i8 0, i64 24, i1 false)
  store ptr %13, ptr %12, align 8, !tbaa !9
  %95 = getelementptr inbounds i8, ptr %12, i64 8
  store i64 9, ptr %95, align 8, !tbaa !13
  call void @_ZN7maliput4math6MatrixILm3EEC1ERKSt16initializer_listIdE(ptr noundef nonnull align 8 dereferenceable(72) %11, ptr noundef nonnull align 8 dereferenceable(16) %12)
  %96 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZN7maliput4math6MatrixILm3EEaSEOKS2_(ptr noundef nonnull align 8 dereferenceable(72) %3, ptr noundef nonnull align 8 dereferenceable(72) %11)
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #10
  ret void
}

; Function Attrs: noreturn
declare void @_ZN7maliput6common8internal5ThrowEPKcS3_S3_i(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7maliput4math12RollPitchYaw10roll_angleEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7maliput4math12RollPitchYaw11pitch_angleEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK7maliput4math12RollPitchYaw9yaw_angleEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 align 2

declare void @_ZN7maliput4math6MatrixILm3EEC1ERKSt16initializer_listIdE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #6

declare noundef nonnull align 8 dereferenceable(72) ptr @_ZN7maliput4math6MatrixILm3EEaSEOKS2_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #6

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #8

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 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 = { noreturn "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 = { mustprogress 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 = { "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 #7 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #9 = { noreturn }
attributes #10 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSSt16initializer_listIdE", !11, i64 0, !12, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !12, i64 8}


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