; LLVM IR from ysyesilyurt/ComputerGraphics :: ForwardRenderingPipeline (Scene)

; 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.Matrix4 = type { [4 x [4 x double]] }
%class.Vec3 = type <{ double, double, double, i32, [4 x i8] }>
%class.Model = type { i32, i32, i32, %"class.std::vector", %"class.std::vector.0", i32, %"class.std::vector.5" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl" = type { %"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char, std::allocator<char>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl" }
%"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl" = type { %"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Triangle, std::allocator<Triangle>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Translation = type { i32, double, double, double }
%class.Scaling = type { i32, double, double, double }
%class.Rotation = type { i32, double, double, double, double }

@constinit = external hidden constant [4 x double], align 8
@constinit.1 = external hidden constant [4 x double], align 8
@constinit.2 = external hidden constant [4 x double], align 8
@constinit.3 = external hidden constant [4 x double], align 8
@constinit.4 = external hidden constant [4 x double], align 8
@constinit.5 = external hidden constant [4 x double], align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23calcModelingTransMatrixP6CameraR5ModelRKSt6vectorIP11TranslationSaIS5_EERKS3_IP8RotationSaISB_EERKS3_IP7ScalingSaISH_EE(ptr dead_on_unwind noalias writable sret(%class.Matrix4) align 8 %0, ptr noundef %1, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca [4 x [4 x double]], align 16
  %16 = alloca %class.Matrix4, align 8
  %17 = alloca %class.Matrix4, align 8
  %18 = alloca %class.Matrix4, align 8
  %19 = alloca ptr, align 8
  %20 = alloca [4 x [4 x double]], align 16
  %21 = alloca %class.Matrix4, align 8
  %22 = alloca %class.Matrix4, align 8
  %23 = alloca %class.Matrix4, align 8
  %24 = alloca ptr, align 8
  %25 = alloca %class.Vec3, align 8
  %26 = alloca %class.Vec3, align 8
  %27 = alloca %class.Vec3, align 8
  %28 = alloca double, align 8
  %29 = alloca double, align 8
  %30 = alloca double, align 8
  %31 = alloca double, align 8
  %32 = alloca %class.Vec3, align 8
  %33 = alloca %class.Vec3, align 8
  %34 = alloca %class.Vec3, align 8
  %35 = alloca %class.Vec3, align 8
  %36 = alloca %class.Vec3, align 8
  %37 = alloca %class.Vec3, align 8
  %38 = alloca %class.Vec3, align 8
  %39 = alloca %class.Vec3, align 8
  %40 = alloca %class.Vec3, align 8
  %41 = alloca %class.Vec3, align 8
  %42 = alloca [4 x [4 x double]], align 16
  %43 = alloca [4 x [4 x double]], align 16
  %44 = alloca [4 x [4 x double]], align 16
  %45 = alloca %class.Matrix4, align 8
  %46 = alloca %class.Matrix4, align 8
  %47 = alloca %class.Matrix4, align 8
  %48 = alloca %class.Matrix4, align 8
  %49 = alloca %class.Matrix4, align 8
  %50 = alloca %class.Matrix4, align 8
  %51 = alloca %class.Matrix4, align 8
  %52 = alloca %class.Matrix4, align 8
  %53 = alloca %class.Matrix4, align 8
  store ptr %0, ptr %7, align 8
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @_Z17getIdentityMatrixv(ptr dead_on_unwind writable sret(%class.Matrix4) align 8 %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %342, %6
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %class.Model, ptr %56, i32 0, i32 2
  %58 = load i32, ptr %57, align 8, !tbaa !11
  %59 = icmp slt i32 %55, %58
  br i1 %59, label %61, label %60

60:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %345

61:                                               ; preds = %54
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %class.Model, ptr %62, i32 0, i32 4
  %64 = load i32, ptr %13, align 4, !tbaa !9
  %65 = sext i32 %64 to i64
  %66 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %65) #8
  %67 = load i8, ptr %66, align 1, !tbaa !25
  %68 = sext i8 %67 to i32
  %69 = icmp eq i32 %68, 116
  br i1 %69, label %70, label %104

70:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %71 = load ptr, ptr %10, align 8, !tbaa !5
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %class.Model, ptr %72, i32 0, i32 3
  %74 = load i32, ptr %13, align 4, !tbaa !9
  %75 = sext i32 %74 to i64
  %76 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %73, i64 noundef %75) #8
  %77 = load i32, ptr %76, align 4, !tbaa !9
  %78 = sub nsw i32 %77, 1
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP11TranslationSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %71, i64 noundef %79) #8
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  store ptr %81, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 128, ptr %15) #8
  store double 1.000000e+00, ptr %15, align 8, !tbaa !26
  %82 = getelementptr inbounds double, ptr %15, i64 1
  store double 0.000000e+00, ptr %82, align 8, !tbaa !26
  %83 = getelementptr inbounds double, ptr %15, i64 2
  store double 0.000000e+00, ptr %83, align 8, !tbaa !26
  %84 = getelementptr inbounds double, ptr %15, i64 3
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  %86 = getelementptr inbounds %class.Translation, ptr %85, i32 0, i32 1
  %87 = load double, ptr %86, align 8, !tbaa !28
  store double %87, ptr %84, align 8, !tbaa !26
  %88 = getelementptr inbounds [4 x double], ptr %15, i64 1
  store double 0.000000e+00, ptr %88, align 8, !tbaa !26
  %89 = getelementptr inbounds double, ptr %88, i64 1
  store double 1.000000e+00, ptr %89, align 8, !tbaa !26
  %90 = getelementptr inbounds double, ptr %88, i64 2
  store double 0.000000e+00, ptr %90, align 8, !tbaa !26
  %91 = getelementptr inbounds double, ptr %88, i64 3
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = getelementptr inbounds %class.Translation, ptr %92, i32 0, i32 2
  %94 = load double, ptr %93, align 8, !tbaa !30
  store double %94, ptr %91, align 8, !tbaa !26
  %95 = getelementptr inbounds [4 x double], ptr %15, i64 2
  store double 0.000000e+00, ptr %95, align 8, !tbaa !26
  %96 = getelementptr inbounds double, ptr %95, i64 1
  store double 0.000000e+00, ptr %96, align 8, !tbaa !26
  %97 = getelementptr inbounds double, ptr %95, i64 2
  store double 1.000000e+00, ptr %97, align 8, !tbaa !26
  %98 = getelementptr inbounds double, ptr %95, i64 3
  %99 = load ptr, ptr %14, align 8, !tbaa !5
  %100 = getelementptr inbounds %class.Translation, ptr %99, i32 0, i32 3
  %101 = load double, ptr %100, align 8, !tbaa !31
  store double %101, ptr %98, align 8, !tbaa !26
  %102 = getelementptr inbounds [4 x double], ptr %15, i64 3
  call void @llvm.memset.p0.i64(ptr align 16 %102, i8 0, i64 32, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %102, ptr align 8 @constinit, i64 32, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.start.p0(i64 128, ptr %16) #8
  %103 = getelementptr inbounds [4 x [4 x double]], ptr %15, i64 0, i64 0
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %17, ptr noundef %103)
  call void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %18, ptr noundef nonnull align 8 dereferenceable(128) %0)
  call void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind writable sret(%class.Matrix4) align 8 %16, ptr noundef %17, ptr noundef %18)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %16, i64 128, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.end.p0(i64 128, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %341

104:                                              ; preds = %61
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = getelementptr inbounds %class.Model, ptr %105, i32 0, i32 4
  %107 = load i32, ptr %13, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %106, i64 noundef %108) #8
  %110 = load i8, ptr %109, align 1, !tbaa !25
  %111 = sext i8 %110 to i32
  %112 = icmp eq i32 %111, 115
  br i1 %112, label %113, label %147

113:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %class.Model, ptr %115, i32 0, i32 3
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %116, i64 noundef %118) #8
  %120 = load i32, ptr %119, align 4, !tbaa !9
  %121 = sub nsw i32 %120, 1
  %122 = sext i32 %121 to i64
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP7ScalingSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %114, i64 noundef %122) #8
  %124 = load ptr, ptr %123, align 8, !tbaa !5
  store ptr %124, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 128, ptr %20) #8
  call void @llvm.memset.p0.i64(ptr align 16 %20, i8 0, i64 128, i1 false)
  %125 = load ptr, ptr %19, align 8, !tbaa !5
  %126 = getelementptr inbounds %class.Scaling, ptr %125, i32 0, i32 1
  %127 = load double, ptr %126, align 8, !tbaa !34
  store double %127, ptr %20, align 8, !tbaa !26
  %128 = getelementptr inbounds double, ptr %20, i64 1
  %129 = getelementptr inbounds double, ptr %20, i64 2
  %130 = getelementptr inbounds double, ptr %20, i64 3
  %131 = getelementptr inbounds [4 x double], ptr %20, i64 1
  %132 = getelementptr inbounds double, ptr %131, i64 1
  %133 = load ptr, ptr %19, align 8, !tbaa !5
  %134 = getelementptr inbounds %class.Scaling, ptr %133, i32 0, i32 2
  %135 = load double, ptr %134, align 8, !tbaa !36
  store double %135, ptr %132, align 8, !tbaa !26
  %136 = getelementptr inbounds double, ptr %131, i64 2
  %137 = getelementptr inbounds double, ptr %131, i64 3
  %138 = getelementptr inbounds [4 x double], ptr %20, i64 2
  %139 = getelementptr inbounds double, ptr %138, i64 1
  %140 = getelementptr inbounds double, ptr %138, i64 2
  %141 = load ptr, ptr %19, align 8, !tbaa !5
  %142 = getelementptr inbounds %class.Scaling, ptr %141, i32 0, i32 3
  %143 = load double, ptr %142, align 8, !tbaa !37
  store double %143, ptr %140, align 8, !tbaa !26
  %144 = getelementptr inbounds double, ptr %138, i64 3
  %145 = getelementptr inbounds [4 x double], ptr %20, i64 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %145, ptr align 8 @constinit.1, i64 32, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.start.p0(i64 128, ptr %21) #8
  %146 = getelementptr inbounds [4 x [4 x double]], ptr %20, i64 0, i64 0
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %22, ptr noundef %146)
  call void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %23, ptr noundef nonnull align 8 dereferenceable(128) %0)
  call void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind writable sret(%class.Matrix4) align 8 %21, ptr noundef %22, ptr noundef %23)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %21, i64 128, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.end.p0(i64 128, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %20) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %340

147:                                              ; preds = %104
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = getelementptr inbounds %class.Model, ptr %148, i32 0, i32 4
  %150 = load i32, ptr %13, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %149, i64 noundef %151) #8
  %153 = load i8, ptr %152, align 1, !tbaa !25
  %154 = sext i8 %153 to i32
  %155 = icmp eq i32 %154, 114
  br i1 %155, label %156, label %336

156:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %157 = load ptr, ptr %11, align 8, !tbaa !5
  %158 = load ptr, ptr %9, align 8, !tbaa !5
  %159 = getelementptr inbounds %class.Model, ptr %158, i32 0, i32 3
  %160 = load i32, ptr %13, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %159, i64 noundef %161) #8
  %163 = load i32, ptr %162, align 4, !tbaa !9
  %164 = sub nsw i32 %163, 1
  %165 = sext i32 %164 to i64
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP8RotationSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %157, i64 noundef %165) #8
  %167 = load ptr, ptr %166, align 8, !tbaa !5
  store ptr %167, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #8
  %168 = load ptr, ptr %24, align 8, !tbaa !5
  %169 = getelementptr inbounds %class.Rotation, ptr %168, i32 0, i32 2
  %170 = load double, ptr %169, align 8, !tbaa !38
  %171 = load ptr, ptr %24, align 8, !tbaa !5
  %172 = getelementptr inbounds %class.Rotation, ptr %171, i32 0, i32 3
  %173 = load double, ptr %172, align 8, !tbaa !40
  %174 = load ptr, ptr %24, align 8, !tbaa !5
  %175 = getelementptr inbounds %class.Rotation, ptr %174, i32 0, i32 4
  %176 = load double, ptr %175, align 8, !tbaa !41
  call void @_ZN4Vec3C1Edddi(ptr noundef nonnull align 8 dereferenceable(28) %25, double noundef %170, double noundef %173, double noundef %176, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #8
  call void @_ZN4Vec3C1Ev(ptr noundef nonnull align 8 dereferenceable(28) %26)
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #8
  call void @_ZN4Vec3C1Ev(ptr noundef nonnull align 8 dereferenceable(28) %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %177 = load ptr, ptr %24, align 8, !tbaa !5
  %178 = getelementptr inbounds %class.Rotation, ptr %177, i32 0, i32 2
  %179 = load double, ptr %178, align 8, !tbaa !38
  %180 = call noundef double @_ZSt3absd(double noundef %179)
  store double %180, ptr %29, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %181 = load ptr, ptr %24, align 8, !tbaa !5
  %182 = getelementptr inbounds %class.Rotation, ptr %181, i32 0, i32 3
  %183 = load double, ptr %182, align 8, !tbaa !40
  %184 = call noundef double @_ZSt3absd(double noundef %183)
  store double %184, ptr %30, align 8, !tbaa !26
  %185 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef nonnull align 8 dereferenceable(8) %30)
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #8
  %186 = load ptr, ptr %24, align 8, !tbaa !5
  %187 = getelementptr inbounds %class.Rotation, ptr %186, i32 0, i32 4
  %188 = load double, ptr %187, align 8, !tbaa !41
  %189 = call noundef double @_ZSt3absd(double noundef %188)
  store double %189, ptr %31, align 8, !tbaa !26
  %190 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %185, ptr noundef nonnull align 8 dereferenceable(8) %31)
  %191 = load double, ptr %190, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  store double %191, ptr %28, align 8, !tbaa !26
  %192 = load double, ptr %28, align 8, !tbaa !26
  %193 = load ptr, ptr %24, align 8, !tbaa !5
  %194 = getelementptr inbounds %class.Rotation, ptr %193, i32 0, i32 2
  %195 = load double, ptr %194, align 8, !tbaa !38
  %196 = call noundef double @_ZSt3absd(double noundef %195)
  %197 = fcmp oeq double %192, %196
  br i1 %197, label %198, label %206

198:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 32, ptr %32) #8
  %199 = load ptr, ptr %24, align 8, !tbaa !5
  %200 = getelementptr inbounds %class.Rotation, ptr %199, i32 0, i32 4
  %201 = load double, ptr %200, align 8, !tbaa !41
  %202 = fmul double -1.000000e+00, %201
  %203 = load ptr, ptr %24, align 8, !tbaa !5
  %204 = getelementptr inbounds %class.Rotation, ptr %203, i32 0, i32 3
  %205 = load double, ptr %204, align 8, !tbaa !40
  call void @_ZN4Vec3C1Edddi(ptr noundef nonnull align 8 dereferenceable(28) %32, double noundef 0.000000e+00, double noundef %202, double noundef %205, i32 noundef -1)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %32, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr %32) #8
  br label %238

206:                                              ; preds = %156
  %207 = load double, ptr %28, align 8, !tbaa !26
  %208 = load ptr, ptr %24, align 8, !tbaa !5
  %209 = getelementptr inbounds %class.Rotation, ptr %208, i32 0, i32 3
  %210 = load double, ptr %209, align 8, !tbaa !40
  %211 = call noundef double @_ZSt3absd(double noundef %210)
  %212 = fcmp oeq double %207, %211
  br i1 %212, label %213, label %221

213:                                              ; preds = %206
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #8
  %214 = load ptr, ptr %24, align 8, !tbaa !5
  %215 = getelementptr inbounds %class.Rotation, ptr %214, i32 0, i32 4
  %216 = load double, ptr %215, align 8, !tbaa !41
  %217 = fmul double -1.000000e+00, %216
  %218 = load ptr, ptr %24, align 8, !tbaa !5
  %219 = getelementptr inbounds %class.Rotation, ptr %218, i32 0, i32 2
  %220 = load double, ptr %219, align 8, !tbaa !38
  call void @_ZN4Vec3C1Edddi(ptr noundef nonnull align 8 dereferenceable(28) %33, double noundef %217, double noundef 0.000000e+00, double noundef %220, i32 noundef -1)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %33, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #8
  br label %237

221:                                              ; preds = %206
  %222 = load double, ptr %28, align 8, !tbaa !26
  %223 = load ptr, ptr %24, align 8, !tbaa !5
  %224 = getelementptr inbounds %class.Rotation, ptr %223, i32 0, i32 4
  %225 = load double, ptr %224, align 8, !tbaa !41
  %226 = call noundef double @_ZSt3absd(double noundef %225)
  %227 = fcmp oeq double %222, %226
  br i1 %227, label %228, label %236

228:                                              ; preds = %221
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #8
  %229 = load ptr, ptr %24, align 8, !tbaa !5
  %230 = getelementptr inbounds %class.Rotation, ptr %229, i32 0, i32 3
  %231 = load double, ptr %230, align 8, !tbaa !40
  %232 = fmul double -1.000000e+00, %231
  %233 = load ptr, ptr %24, align 8, !tbaa !5
  %234 = getelementptr inbounds %class.Rotation, ptr %233, i32 0, i32 2
  %235 = load double, ptr %234, align 8, !tbaa !38
  call void @_ZN4Vec3C1Edddi(ptr noundef nonnull align 8 dereferenceable(28) %34, double noundef %232, double noundef %235, double noundef 0.000000e+00, i32 noundef -1)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %34, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #8
  br label %236

236:                                              ; preds = %228, %221
  br label %237

237:                                              ; preds = %236, %213
  br label %238

238:                                              ; preds = %237, %198
  call void @llvm.lifetime.start.p0(i64 32, ptr %35) #8
  call void @_ZN4Vec3C1ERKS_(ptr noundef nonnull align 8 dereferenceable(28) %36, ptr noundef nonnull align 8 dereferenceable(28) %25)
  call void @_ZN4Vec3C1ERKS_(ptr noundef nonnull align 8 dereferenceable(28) %37, ptr noundef nonnull align 8 dereferenceable(28) %26)
  call void @_Z16crossProductVec34Vec3S_(ptr dead_on_unwind writable sret(%class.Vec3) align 8 %35, ptr noundef %36, ptr noundef %37)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %35, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr %35) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %38) #8
  call void @_ZN4Vec3C1ERKS_(ptr noundef nonnull align 8 dereferenceable(28) %39, ptr noundef nonnull align 8 dereferenceable(28) %26)
  call void @_Z13normalizeVec34Vec3(ptr dead_on_unwind writable sret(%class.Vec3) align 8 %38, ptr noundef %39)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %38, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr %38) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %40) #8
  call void @_ZN4Vec3C1ERKS_(ptr noundef nonnull align 8 dereferenceable(28) %41, ptr noundef nonnull align 8 dereferenceable(28) %27)
  call void @_Z13normalizeVec34Vec3(ptr dead_on_unwind writable sret(%class.Vec3) align 8 %40, ptr noundef %41)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %40, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr %40) #8
  call void @llvm.lifetime.start.p0(i64 128, ptr %42) #8
  %239 = getelementptr inbounds %class.Vec3, ptr %25, i32 0, i32 0
  %240 = load double, ptr %239, align 8, !tbaa !43
  store double %240, ptr %42, align 8, !tbaa !26
  %241 = getelementptr inbounds double, ptr %42, i64 1
  %242 = getelementptr inbounds %class.Vec3, ptr %25, i32 0, i32 1
  %243 = load double, ptr %242, align 8, !tbaa !45
  store double %243, ptr %241, align 8, !tbaa !26
  %244 = getelementptr inbounds double, ptr %42, i64 2
  %245 = getelementptr inbounds %class.Vec3, ptr %25, i32 0, i32 2
  %246 = load double, ptr %245, align 8, !tbaa !46
  store double %246, ptr %244, align 8, !tbaa !26
  %247 = getelementptr inbounds double, ptr %42, i64 3
  store double 0.000000e+00, ptr %247, align 8, !tbaa !26
  %248 = getelementptr inbounds [4 x double], ptr %42, i64 1
  %249 = getelementptr inbounds %class.Vec3, ptr %26, i32 0, i32 0
  %250 = load double, ptr %249, align 8, !tbaa !43
  store double %250, ptr %248, align 8, !tbaa !26
  %251 = getelementptr inbounds double, ptr %248, i64 1
  %252 = getelementptr inbounds %class.Vec3, ptr %26, i32 0, i32 1
  %253 = load double, ptr %252, align 8, !tbaa !45
  store double %253, ptr %251, align 8, !tbaa !26
  %254 = getelementptr inbounds double, ptr %248, i64 2
  %255 = getelementptr inbounds %class.Vec3, ptr %26, i32 0, i32 2
  %256 = load double, ptr %255, align 8, !tbaa !46
  store double %256, ptr %254, align 8, !tbaa !26
  %257 = getelementptr inbounds double, ptr %248, i64 3
  store double 0.000000e+00, ptr %257, align 8, !tbaa !26
  %258 = getelementptr inbounds [4 x double], ptr %42, i64 2
  %259 = getelementptr inbounds %class.Vec3, ptr %27, i32 0, i32 0
  %260 = load double, ptr %259, align 8, !tbaa !43
  store double %260, ptr %258, align 8, !tbaa !26
  %261 = getelementptr inbounds double, ptr %258, i64 1
  %262 = getelementptr inbounds %class.Vec3, ptr %27, i32 0, i32 1
  %263 = load double, ptr %262, align 8, !tbaa !45
  store double %263, ptr %261, align 8, !tbaa !26
  %264 = getelementptr inbounds double, ptr %258, i64 2
  %265 = getelementptr inbounds %class.Vec3, ptr %27, i32 0, i32 2
  %266 = load double, ptr %265, align 8, !tbaa !46
  store double %266, ptr %264, align 8, !tbaa !26
  %267 = getelementptr inbounds double, ptr %258, i64 3
  store double 0.000000e+00, ptr %267, align 8, !tbaa !26
  %268 = getelementptr inbounds [4 x double], ptr %42, i64 3
  call void @llvm.memset.p0.i64(ptr align 16 %268, i8 0, i64 32, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %268, ptr align 8 @constinit.2, i64 32, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.start.p0(i64 128, ptr %43) #8
  %269 = getelementptr inbounds %class.Vec3, ptr %25, i32 0, i32 0
  %270 = load double, ptr %269, align 8, !tbaa !43
  store double %270, ptr %43, align 8, !tbaa !26
  %271 = getelementptr inbounds double, ptr %43, i64 1
  %272 = getelementptr inbounds %class.Vec3, ptr %26, i32 0, i32 0
  %273 = load double, ptr %272, align 8, !tbaa !43
  store double %273, ptr %271, align 8, !tbaa !26
  %274 = getelementptr inbounds double, ptr %43, i64 2
  %275 = getelementptr inbounds %class.Vec3, ptr %27, i32 0, i32 0
  %276 = load double, ptr %275, align 8, !tbaa !43
  store double %276, ptr %274, align 8, !tbaa !26
  %277 = getelementptr inbounds double, ptr %43, i64 3
  store double 0.000000e+00, ptr %277, align 8, !tbaa !26
  %278 = getelementptr inbounds [4 x double], ptr %43, i64 1
  %279 = getelementptr inbounds %class.Vec3, ptr %25, i32 0, i32 1
  %280 = load double, ptr %279, align 8, !tbaa !45
  store double %280, ptr %278, align 8, !tbaa !26
  %281 = getelementptr inbounds double, ptr %278, i64 1
  %282 = getelementptr inbounds %class.Vec3, ptr %26, i32 0, i32 1
  %283 = load double, ptr %282, align 8, !tbaa !45
  store double %283, ptr %281, align 8, !tbaa !26
  %284 = getelementptr inbounds double, ptr %278, i64 2
  %285 = getelementptr inbounds %class.Vec3, ptr %27, i32 0, i32 1
  %286 = load double, ptr %285, align 8, !tbaa !45
  store double %286, ptr %284, align 8, !tbaa !26
  %287 = getelementptr inbounds double, ptr %278, i64 3
  store double 0.000000e+00, ptr %287, align 8, !tbaa !26
  %288 = getelementptr inbounds [4 x double], ptr %43, i64 2
  %289 = getelementptr inbounds %class.Vec3, ptr %25, i32 0, i32 2
  %290 = load double, ptr %289, align 8, !tbaa !46
  store double %290, ptr %288, align 8, !tbaa !26
  %291 = getelementptr inbounds double, ptr %288, i64 1
  %292 = getelementptr inbounds %class.Vec3, ptr %26, i32 0, i32 2
  %293 = load double, ptr %292, align 8, !tbaa !46
  store double %293, ptr %291, align 8, !tbaa !26
  %294 = getelementptr inbounds double, ptr %288, i64 2
  %295 = getelementptr inbounds %class.Vec3, ptr %27, i32 0, i32 2
  %296 = load double, ptr %295, align 8, !tbaa !46
  store double %296, ptr %294, align 8, !tbaa !26
  %297 = getelementptr inbounds double, ptr %288, i64 3
  store double 0.000000e+00, ptr %297, align 8, !tbaa !26
  %298 = getelementptr inbounds [4 x double], ptr %43, i64 3
  call void @llvm.memset.p0.i64(ptr align 16 %298, i8 0, i64 32, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %298, ptr align 8 @constinit.3, i64 32, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.start.p0(i64 128, ptr %44) #8
  call void @llvm.memset.p0.i64(ptr align 16 %44, i8 0, i64 32, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %44, ptr align 8 @constinit.4, i64 32, i1 false), !tbaa.struct !32
  %299 = getelementptr inbounds [4 x double], ptr %44, i64 1
  store double 0.000000e+00, ptr %299, align 8, !tbaa !26
  %300 = getelementptr inbounds double, ptr %299, i64 1
  %301 = load ptr, ptr %24, align 8, !tbaa !5
  %302 = getelementptr inbounds %class.Rotation, ptr %301, i32 0, i32 1
  %303 = load double, ptr %302, align 8, !tbaa !47
  %304 = fmul double %303, 0x400921FB54442D18
  %305 = fdiv double %304, 1.800000e+02
  %306 = call double @cos(double noundef %305) #8
  store double %306, ptr %300, align 8, !tbaa !26
  %307 = getelementptr inbounds double, ptr %299, i64 2
  %308 = load ptr, ptr %24, align 8, !tbaa !5
  %309 = getelementptr inbounds %class.Rotation, ptr %308, i32 0, i32 1
  %310 = load double, ptr %309, align 8, !tbaa !47
  %311 = fmul double %310, 0x400921FB54442D18
  %312 = fdiv double %311, 1.800000e+02
  %313 = call double @sin(double noundef %312) #8
  %314 = fmul double -1.000000e+00, %313
  store double %314, ptr %307, align 8, !tbaa !26
  %315 = getelementptr inbounds double, ptr %299, i64 3
  store double 0.000000e+00, ptr %315, align 8, !tbaa !26
  %316 = getelementptr inbounds [4 x double], ptr %44, i64 2
  store double 0.000000e+00, ptr %316, align 8, !tbaa !26
  %317 = getelementptr inbounds double, ptr %316, i64 1
  %318 = load ptr, ptr %24, align 8, !tbaa !5
  %319 = getelementptr inbounds %class.Rotation, ptr %318, i32 0, i32 1
  %320 = load double, ptr %319, align 8, !tbaa !47
  %321 = fmul double %320, 0x400921FB54442D18
  %322 = fdiv double %321, 1.800000e+02
  %323 = call double @sin(double noundef %322) #8
  store double %323, ptr %317, align 8, !tbaa !26
  %324 = getelementptr inbounds double, ptr %316, i64 2
  %325 = load ptr, ptr %24, align 8, !tbaa !5
  %326 = getelementptr inbounds %class.Rotation, ptr %325, i32 0, i32 1
  %327 = load double, ptr %326, align 8, !tbaa !47
  %328 = fmul double %327, 0x400921FB54442D18
  %329 = fdiv double %328, 1.800000e+02
  %330 = call double @cos(double noundef %329) #8
  store double %330, ptr %324, align 8, !tbaa !26
  %331 = getelementptr inbounds double, ptr %316, i64 3
  store double 0.000000e+00, ptr %331, align 8, !tbaa !26
  %332 = getelementptr inbounds [4 x double], ptr %44, i64 3
  call void @llvm.memset.p0.i64(ptr align 16 %332, i8 0, i64 32, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %332, ptr align 8 @constinit.5, i64 32, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.start.p0(i64 128, ptr %45) #8
  %333 = getelementptr inbounds [4 x [4 x double]], ptr %44, i64 0, i64 0
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %46, ptr noundef %333)
  %334 = getelementptr inbounds [4 x [4 x double]], ptr %42, i64 0, i64 0
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %47, ptr noundef %334)
  call void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind writable sret(%class.Matrix4) align 8 %45, ptr noundef %46, ptr noundef %47)
  call void @llvm.lifetime.start.p0(i64 128, ptr %48) #8
  %335 = getelementptr inbounds [4 x [4 x double]], ptr %43, i64 0, i64 0
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %49, ptr noundef %335)
  call void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %50, ptr noundef nonnull align 8 dereferenceable(128) %45)
  call void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind writable sret(%class.Matrix4) align 8 %48, ptr noundef %49, ptr noundef %50)
  call void @llvm.lifetime.start.p0(i64 128, ptr %51) #8
  call void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %52, ptr noundef nonnull align 8 dereferenceable(128) %48)
  call void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %53, ptr noundef nonnull align 8 dereferenceable(128) %0)
  call void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind writable sret(%class.Matrix4) align 8 %51, ptr noundef %52, ptr noundef %53)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %0, ptr align 8 %51, i64 128, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.end.p0(i64 128, ptr %51) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %48) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %45) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %44) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %43) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %42) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %339

336:                                              ; preds = %147
  %337 = load ptr, ptr @stderr, align 8, !tbaa !5
  %338 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %337, ptr noundef @.str) #8
  br label %339

339:                                              ; preds = %336, %238
  br label %340

340:                                              ; preds = %339, %113
  br label %341

341:                                              ; preds = %340, %70
  br label %342

342:                                              ; preds = %341
  %343 = load i32, ptr %13, align 4, !tbaa !9
  %344 = add nsw i32 %343, 1
  store i32 %344, ptr %13, align 4, !tbaa !9
  br label %54, !llvm.loop !48

345:                                              ; preds = %60
  ret void
}

declare void @_Z17getIdentityMatrixv(ptr dead_on_unwind writable sret(%class.Matrix4) align 8) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP11TranslationSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind writable sret(%class.Matrix4) align 8, ptr noundef, ptr noundef) #1

declare void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) unnamed_addr #1

declare void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP7ScalingSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP8RotationSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

declare void @_ZN4Vec3C1Edddi(ptr noundef nonnull align 8 dereferenceable(28), double noundef, double noundef, double noundef, i32 noundef) unnamed_addr #1

declare void @_ZN4Vec3C1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) #6

declare void @_Z16crossProductVec34Vec3S_(ptr dead_on_unwind writable sret(%class.Vec3) align 8, ptr noundef, ptr noundef) #1

declare void @_ZN4Vec3C1ERKS_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #1

declare void @_Z13normalizeVec34Vec3(ptr dead_on_unwind writable sret(%class.Vec3) align 8, ptr noundef) #1

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #7

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { inlinehint 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 #7 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS5Model", !10, i64 0, !10, i64 4, !10, i64 8, !13, i64 16, !17, i64 40, !10, i64 64, !21, i64 72}
!13 = !{!"_ZTSSt6vectorIiSaIiEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"_ZTSSt6vectorIcSaIcEE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt6vectorI8TriangleSaIS0_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseI8TriangleSaIS0_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseI8TriangleSaIS0_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseI8TriangleSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!7, !7, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"double", !7, i64 0}
!28 = !{!29, !27, i64 8}
!29 = !{!"_ZTS11Translation", !10, i64 0, !27, i64 8, !27, i64 16, !27, i64 24}
!30 = !{!29, !27, i64 16}
!31 = !{!29, !27, i64 24}
!32 = !{i64 0, i64 32, !25}
!33 = !{i64 0, i64 128, !25}
!34 = !{!35, !27, i64 8}
!35 = !{!"_ZTS7Scaling", !10, i64 0, !27, i64 8, !27, i64 16, !27, i64 24}
!36 = !{!35, !27, i64 16}
!37 = !{!35, !27, i64 24}
!38 = !{!39, !27, i64 16}
!39 = !{!"_ZTS8Rotation", !10, i64 0, !27, i64 8, !27, i64 16, !27, i64 24, !27, i64 32}
!40 = !{!39, !27, i64 24}
!41 = !{!39, !27, i64 32}
!42 = !{i64 0, i64 8, !26, i64 8, i64 8, !26, i64 16, i64 8, !26, i64 24, i64 4, !9}
!43 = !{!44, !27, i64 0}
!44 = !{!"_ZTS4Vec3", !27, i64 0, !27, i64 8, !27, i64 16, !10, i64 24}
!45 = !{!44, !27, i64 8}
!46 = !{!44, !27, i64 16}
!47 = !{!39, !27, i64 8}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}


; 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.Matrix4 = type { [4 x [4 x double]] }
%class.Vec3 = type <{ double, double, double, i32, [4 x i8] }>

@constinit = external hidden local_unnamed_addr constant [4 x double], align 8
@constinit.1 = external hidden local_unnamed_addr constant [4 x double], align 8
@constinit.2 = external hidden local_unnamed_addr constant [4 x double], align 8
@constinit.3 = external hidden local_unnamed_addr constant [4 x double], align 8
@constinit.4 = external hidden local_unnamed_addr constant [4 x double], align 8
@constinit.5 = external hidden local_unnamed_addr constant [4 x double], align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [30 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23calcModelingTransMatrixP6CameraR5ModelRKSt6vectorIP11TranslationSaIS5_EERKS3_IP8RotationSaISB_EERKS3_IP7ScalingSaISH_EE(ptr dead_on_unwind noalias writable sret(%class.Matrix4) align 8 %0, ptr nocapture noundef readnone %1, ptr noundef nonnull align 8 dereferenceable(96) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5) local_unnamed_addr #0 {
  %7 = alloca [4 x [4 x double]], align 16
  %8 = alloca %class.Matrix4, align 8
  %9 = alloca %class.Matrix4, align 8
  %10 = alloca %class.Matrix4, align 8
  %11 = alloca [4 x [4 x double]], align 16
  %12 = alloca %class.Matrix4, align 8
  %13 = alloca %class.Matrix4, align 8
  %14 = alloca %class.Matrix4, align 8
  %15 = alloca %class.Vec3, align 16
  %16 = alloca %class.Vec3, align 16
  %17 = alloca %class.Vec3, align 16
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca %class.Vec3, align 8
  %22 = alloca %class.Vec3, align 8
  %23 = alloca %class.Vec3, align 8
  %24 = alloca %class.Vec3, align 8
  %25 = alloca %class.Vec3, align 8
  %26 = alloca %class.Vec3, align 8
  %27 = alloca %class.Vec3, align 8
  %28 = alloca %class.Vec3, align 8
  %29 = alloca %class.Vec3, align 8
  %30 = alloca %class.Vec3, align 8
  %31 = alloca [4 x [4 x double]], align 16
  %32 = alloca [4 x [4 x double]], align 16
  %33 = alloca [4 x [4 x double]], align 16
  %34 = alloca %class.Matrix4, align 8
  %35 = alloca %class.Matrix4, align 8
  %36 = alloca %class.Matrix4, align 8
  %37 = alloca %class.Matrix4, align 8
  %38 = alloca %class.Matrix4, align 8
  %39 = alloca %class.Matrix4, align 8
  %40 = alloca %class.Matrix4, align 8
  %41 = alloca %class.Matrix4, align 8
  %42 = alloca %class.Matrix4, align 8
  tail call void @_Z17getIdentityMatrixv(ptr dead_on_unwind writable sret(%class.Matrix4) align 8 %0)
  %43 = getelementptr inbounds i8, ptr %2, i64 8
  %44 = load i32, ptr %43, align 8, !tbaa !5
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %6
  %46 = getelementptr inbounds i8, ptr %2, i64 40
  %47 = getelementptr inbounds i8, ptr %2, i64 16
  %48 = getelementptr inbounds i8, ptr %31, i64 16
  %49 = getelementptr inbounds i8, ptr %15, i64 16
  %50 = getelementptr inbounds i8, ptr %31, i64 24
  %51 = getelementptr inbounds i8, ptr %31, i64 32
  %52 = getelementptr inbounds i8, ptr %31, i64 48
  %53 = getelementptr inbounds i8, ptr %16, i64 16
  %54 = getelementptr inbounds i8, ptr %31, i64 56
  %55 = getelementptr inbounds i8, ptr %31, i64 64
  %56 = getelementptr inbounds i8, ptr %31, i64 80
  %57 = getelementptr inbounds i8, ptr %17, i64 16
  %58 = getelementptr inbounds i8, ptr %31, i64 88
  %59 = getelementptr inbounds i8, ptr %31, i64 96
  %60 = getelementptr inbounds i8, ptr %32, i64 8
  %61 = getelementptr inbounds i8, ptr %32, i64 16
  %62 = getelementptr inbounds i8, ptr %32, i64 24
  %63 = getelementptr inbounds i8, ptr %32, i64 32
  %64 = getelementptr inbounds i8, ptr %32, i64 48
  %65 = getelementptr inbounds i8, ptr %32, i64 56
  %66 = getelementptr inbounds i8, ptr %32, i64 64
  %67 = getelementptr inbounds i8, ptr %32, i64 72
  %68 = getelementptr inbounds i8, ptr %32, i64 80
  %69 = getelementptr inbounds i8, ptr %32, i64 88
  %70 = getelementptr inbounds i8, ptr %32, i64 96
  %71 = getelementptr inbounds i8, ptr %33, i64 32
  %72 = getelementptr inbounds i8, ptr %33, i64 40
  %73 = getelementptr inbounds i8, ptr %33, i64 48
  %74 = getelementptr inbounds i8, ptr %33, i64 56
  %75 = getelementptr inbounds i8, ptr %33, i64 72
  %76 = getelementptr inbounds i8, ptr %33, i64 80
  %77 = getelementptr inbounds i8, ptr %33, i64 88
  %78 = getelementptr inbounds i8, ptr %33, i64 96
  %79 = getelementptr inbounds i8, ptr %11, i64 40
  %80 = getelementptr inbounds i8, ptr %11, i64 80
  %81 = getelementptr inbounds i8, ptr %11, i64 96
  %82 = getelementptr inbounds i8, ptr %7, i64 8
  %83 = getelementptr inbounds i8, ptr %7, i64 24
  %84 = getelementptr inbounds i8, ptr %7, i64 32
  %85 = getelementptr inbounds i8, ptr %7, i64 48
  %86 = getelementptr inbounds i8, ptr %7, i64 56
  %87 = getelementptr inbounds i8, ptr %7, i64 64
  %88 = getelementptr inbounds i8, ptr %7, i64 80
  %89 = getelementptr inbounds i8, ptr %7, i64 88
  %90 = getelementptr inbounds i8, ptr %7, i64 96
  br label %91

._crit_edge:                                      ; preds = %207, %6
  ret void

91:                                               ; preds = %.lr.ph, %207
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %207 ]
  %92 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %indvars.iv) #9
  %93 = load i8, ptr %92, align 1, !tbaa !23
  %94 = icmp eq i8 %93, 116
  br i1 %94, label %95, label %108

95:                                               ; preds = %91
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %indvars.iv) #9
  %97 = load i32, ptr %96, align 4, !tbaa !24
  %98 = add nsw i32 %97, -1
  %99 = sext i32 %98 to i64
  %100 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP11TranslationSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %99) #9
  %101 = load ptr, ptr %100, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #9
  store double 1.000000e+00, ptr %7, align 16, !tbaa !26
  %102 = getelementptr inbounds i8, ptr %101, i64 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %82, i8 0, i64 16, i1 false)
  %103 = load double, ptr %102, align 8, !tbaa !28
  store double %103, ptr %83, align 8, !tbaa !26
  store <2 x double> <double 0.000000e+00, double 1.000000e+00>, ptr %84, align 16, !tbaa !26
  store double 0.000000e+00, ptr %85, align 16, !tbaa !26
  %104 = getelementptr inbounds i8, ptr %101, i64 16
  %105 = load double, ptr %104, align 8, !tbaa !30
  store double %105, ptr %86, align 8, !tbaa !26
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %87, i8 0, i64 16, i1 false)
  store double 1.000000e+00, ptr %88, align 16, !tbaa !26
  %106 = getelementptr inbounds i8, ptr %101, i64 24
  %107 = load double, ptr %106, align 8, !tbaa !31
  store double %107, ptr %89, align 8, !tbaa !26
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %90, ptr noundef nonnull align 8 dereferenceable(32) @constinit, i64 32, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %8) #9
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %9, ptr noundef nonnull %7)
  call void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %10, ptr noundef nonnull align 8 dereferenceable(128) %0)
  call void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind nonnull writable sret(%class.Matrix4) align 8 %8, ptr noundef nonnull %9, ptr noundef nonnull %10)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(128) %8, i64 128, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #9
  br label %207

108:                                              ; preds = %91
  %109 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %indvars.iv) #9
  %110 = load i8, ptr %109, align 1, !tbaa !23
  %111 = icmp eq i8 %110, 115
  br i1 %111, label %112, label %125

112:                                              ; preds = %108
  %113 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %indvars.iv) #9
  %114 = load i32, ptr %113, align 4, !tbaa !24
  %115 = add nsw i32 %114, -1
  %116 = sext i32 %115 to i64
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP7ScalingSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %116) #9
  %118 = load ptr, ptr %117, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %11) #9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %11, i8 0, i64 128, i1 false)
  %119 = getelementptr inbounds i8, ptr %118, i64 8
  %120 = load double, ptr %119, align 8, !tbaa !34
  store double %120, ptr %11, align 16, !tbaa !26
  %121 = getelementptr inbounds i8, ptr %118, i64 16
  %122 = load double, ptr %121, align 8, !tbaa !36
  store double %122, ptr %79, align 8, !tbaa !26
  %123 = getelementptr inbounds i8, ptr %118, i64 24
  %124 = load double, ptr %123, align 8, !tbaa !37
  store double %124, ptr %80, align 16, !tbaa !26
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %81, ptr noundef nonnull align 8 dereferenceable(32) @constinit.1, i64 32, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %12) #9
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef nonnull %11)
  call void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %14, ptr noundef nonnull align 8 dereferenceable(128) %0)
  call void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind nonnull writable sret(%class.Matrix4) align 8 %12, ptr noundef nonnull %13, ptr noundef nonnull %14)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(128) %12, i64 128, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %12) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %11) #9
  br label %207

125:                                              ; preds = %108
  %126 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %46, i64 noundef %indvars.iv) #9
  %127 = load i8, ptr %126, align 1, !tbaa !23
  %128 = icmp eq i8 %127, 114
  br i1 %128, label %129, label %204

129:                                              ; preds = %125
  %130 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %indvars.iv) #9
  %131 = load i32, ptr %130, align 4, !tbaa !24
  %132 = add nsw i32 %131, -1
  %133 = sext i32 %132 to i64
  %134 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP8RotationSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %133) #9
  %135 = load ptr, ptr %134, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #9
  %136 = getelementptr inbounds i8, ptr %135, i64 16
  %137 = load double, ptr %136, align 8, !tbaa !38
  %138 = getelementptr inbounds i8, ptr %135, i64 24
  %139 = load double, ptr %138, align 8, !tbaa !40
  %140 = getelementptr inbounds i8, ptr %135, i64 32
  %141 = load double, ptr %140, align 8, !tbaa !41
  call void @_ZN4Vec3C1Edddi(ptr noundef nonnull align 8 dereferenceable(28) %15, double noundef %137, double noundef %139, double noundef %141, i32 noundef -1)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #9
  call void @_ZN4Vec3C1Ev(ptr noundef nonnull align 8 dereferenceable(28) %16)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %17) #9
  call void @_ZN4Vec3C1Ev(ptr noundef nonnull align 8 dereferenceable(28) %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #9
  %142 = load double, ptr %136, align 8, !tbaa !38
  %143 = call noundef double @_ZSt3absd(double noundef %142)
  store double %143, ptr %18, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #9
  %144 = load double, ptr %138, align 8, !tbaa !40
  %145 = call noundef double @_ZSt3absd(double noundef %144)
  store double %145, ptr %19, align 8, !tbaa !26
  %146 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #9
  %147 = load double, ptr %140, align 8, !tbaa !41
  %148 = call noundef double @_ZSt3absd(double noundef %147)
  store double %148, ptr %20, align 8, !tbaa !26
  %149 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef nonnull align 8 dereferenceable(8) %20)
  %150 = load double, ptr %149, align 8, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #9
  %151 = load double, ptr %136, align 8, !tbaa !38
  %152 = call noundef double @_ZSt3absd(double noundef %151)
  %153 = fcmp oeq double %150, %152
  br i1 %153, label %154, label %158

154:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %21) #9
  %155 = load double, ptr %140, align 8, !tbaa !41
  %156 = fneg double %155
  %157 = load double, ptr %138, align 8, !tbaa !40
  call void @_ZN4Vec3C1Edddi(ptr noundef nonnull align 8 dereferenceable(28) %21, double noundef 0.000000e+00, double noundef %156, double noundef %157, i32 noundef -1)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(28) %16, ptr noundef nonnull align 8 dereferenceable(28) %21, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %21) #9
  br label %174

158:                                              ; preds = %129
  %159 = load double, ptr %138, align 8, !tbaa !40
  %160 = call noundef double @_ZSt3absd(double noundef %159)
  %161 = fcmp oeq double %150, %160
  br i1 %161, label %162, label %166

162:                                              ; preds = %158
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %22) #9
  %163 = load double, ptr %140, align 8, !tbaa !41
  %164 = fneg double %163
  %165 = load double, ptr %136, align 8, !tbaa !38
  call void @_ZN4Vec3C1Edddi(ptr noundef nonnull align 8 dereferenceable(28) %22, double noundef %164, double noundef 0.000000e+00, double noundef %165, i32 noundef -1)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(28) %16, ptr noundef nonnull align 8 dereferenceable(28) %22, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %22) #9
  br label %174

166:                                              ; preds = %158
  %167 = load double, ptr %140, align 8, !tbaa !41
  %168 = call noundef double @_ZSt3absd(double noundef %167)
  %169 = fcmp oeq double %150, %168
  br i1 %169, label %170, label %174

170:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %23) #9
  %171 = load double, ptr %138, align 8, !tbaa !40
  %172 = fneg double %171
  %173 = load double, ptr %136, align 8, !tbaa !38
  call void @_ZN4Vec3C1Edddi(ptr noundef nonnull align 8 dereferenceable(28) %23, double noundef %172, double noundef %173, double noundef 0.000000e+00, i32 noundef -1)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(28) %16, ptr noundef nonnull align 8 dereferenceable(28) %23, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %23) #9
  br label %174

174:                                              ; preds = %162, %170, %166, %154
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %24) #9
  call void @_ZN4Vec3C1ERKS_(ptr noundef nonnull align 8 dereferenceable(28) %25, ptr noundef nonnull align 8 dereferenceable(28) %15)
  call void @_ZN4Vec3C1ERKS_(ptr noundef nonnull align 8 dereferenceable(28) %26, ptr noundef nonnull align 8 dereferenceable(28) %16)
  call void @_Z16crossProductVec34Vec3S_(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 8 %24, ptr noundef nonnull %25, ptr noundef nonnull %26)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(28) %17, ptr noundef nonnull align 8 dereferenceable(28) %24, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %24) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %27) #9
  call void @_ZN4Vec3C1ERKS_(ptr noundef nonnull align 8 dereferenceable(28) %28, ptr noundef nonnull align 8 dereferenceable(28) %16)
  call void @_Z13normalizeVec34Vec3(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 8 %27, ptr noundef nonnull %28)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(28) %16, ptr noundef nonnull align 8 dereferenceable(28) %27, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %27) #9
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %29) #9
  call void @_ZN4Vec3C1ERKS_(ptr noundef nonnull align 8 dereferenceable(28) %30, ptr noundef nonnull align 8 dereferenceable(28) %17)
  call void @_Z13normalizeVec34Vec3(ptr dead_on_unwind nonnull writable sret(%class.Vec3) align 8 %29, ptr noundef nonnull %30)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(28) %17, ptr noundef nonnull align 8 dereferenceable(28) %29, i64 28, i1 false), !tbaa.struct !42
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %29) #9
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %31) #9
  %175 = load <2 x double>, ptr %15, align 16, !tbaa !26
  store <2 x double> %175, ptr %31, align 16, !tbaa !26
  %176 = load double, ptr %49, align 16, !tbaa !43
  store double %176, ptr %48, align 16, !tbaa !26
  store double 0.000000e+00, ptr %50, align 8, !tbaa !26
  %177 = load <2 x double>, ptr %16, align 16, !tbaa !26
  store <2 x double> %177, ptr %51, align 16, !tbaa !26
  %178 = load double, ptr %53, align 16, !tbaa !43
  store double %178, ptr %52, align 16, !tbaa !26
  store double 0.000000e+00, ptr %54, align 8, !tbaa !26
  %179 = load <2 x double>, ptr %17, align 16, !tbaa !26
  store <2 x double> %179, ptr %55, align 16, !tbaa !26
  %180 = load double, ptr %57, align 16, !tbaa !43
  store double %180, ptr %56, align 16, !tbaa !26
  store i64 0, ptr %58, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %59, ptr noundef nonnull align 8 dereferenceable(32) @constinit.2, i64 32, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %32) #9
  %181 = extractelement <2 x double> %175, i64 0
  store double %181, ptr %32, align 16, !tbaa !26
  %182 = extractelement <2 x double> %177, i64 0
  store double %182, ptr %60, align 8, !tbaa !26
  %183 = extractelement <2 x double> %179, i64 0
  store double %183, ptr %61, align 16, !tbaa !26
  store double 0.000000e+00, ptr %62, align 8, !tbaa !26
  %184 = shufflevector <2 x double> %175, <2 x double> %177, <2 x i32> <i32 1, i32 3>
  store <2 x double> %184, ptr %63, align 16, !tbaa !26
  %185 = extractelement <2 x double> %179, i64 1
  store double %185, ptr %64, align 16, !tbaa !26
  store double 0.000000e+00, ptr %65, align 8, !tbaa !26
  store double %176, ptr %66, align 16, !tbaa !26
  store double %178, ptr %67, align 8, !tbaa !26
  store double %180, ptr %68, align 16, !tbaa !26
  store i64 0, ptr %69, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %70, ptr noundef nonnull align 8 dereferenceable(32) @constinit.3, i64 32, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %33) #9
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(32) @constinit.4, i64 32, i1 false), !tbaa.struct !32
  store double 0.000000e+00, ptr %71, align 16, !tbaa !26
  %186 = getelementptr inbounds i8, ptr %135, i64 8
  %187 = load double, ptr %186, align 8, !tbaa !45
  %188 = fmul double %187, 0x400921FB54442D18
  %189 = fdiv double %188, 1.800000e+02
  %190 = call double @cos(double noundef %189) #9
  store double %190, ptr %72, align 8, !tbaa !26
  %191 = load double, ptr %186, align 8, !tbaa !45
  %192 = fmul double %191, 0x400921FB54442D18
  %193 = fdiv double %192, 1.800000e+02
  %194 = call double @sin(double noundef %193) #9
  %195 = fneg double %194
  store double %195, ptr %73, align 16, !tbaa !26
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %74, i8 0, i64 16, i1 false)
  %196 = load double, ptr %186, align 8, !tbaa !45
  %197 = fmul double %196, 0x400921FB54442D18
  %198 = fdiv double %197, 1.800000e+02
  %199 = call double @sin(double noundef %198) #9
  store double %199, ptr %75, align 8, !tbaa !26
  %200 = load double, ptr %186, align 8, !tbaa !45
  %201 = fmul double %200, 0x400921FB54442D18
  %202 = fdiv double %201, 1.800000e+02
  %203 = call double @cos(double noundef %202) #9
  store double %203, ptr %76, align 16, !tbaa !26
  store i64 0, ptr %77, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %78, ptr noundef nonnull align 8 dereferenceable(32) @constinit.5, i64 32, i1 false), !tbaa.struct !32
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %34) #9
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %35, ptr noundef nonnull %33)
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %36, ptr noundef nonnull %31)
  call void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind nonnull writable sret(%class.Matrix4) align 8 %34, ptr noundef nonnull %35, ptr noundef nonnull %36)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %37) #9
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %38, ptr noundef nonnull %32)
  call void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %39, ptr noundef nonnull align 8 dereferenceable(128) %34)
  call void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind nonnull writable sret(%class.Matrix4) align 8 %37, ptr noundef nonnull %38, ptr noundef nonnull %39)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %40) #9
  call void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %41, ptr noundef nonnull align 8 dereferenceable(128) %37)
  call void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %42, ptr noundef nonnull align 8 dereferenceable(128) %0)
  call void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind nonnull writable sret(%class.Matrix4) align 8 %40, ptr noundef nonnull %41, ptr noundef nonnull %42)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(128) %40, i64 128, i1 false), !tbaa.struct !33
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %40) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %37) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %34) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %33) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %32) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %31) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %17) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #9
  br label %207

204:                                              ; preds = %125
  %205 = load ptr, ptr @stderr, align 8, !tbaa !25
  %206 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %205, ptr noundef nonnull @.str) #10
  br label %207

207:                                              ; preds = %95, %174, %204, %112
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %208 = load i32, ptr %43, align 8, !tbaa !5
  %209 = sext i32 %208 to i64
  %210 = icmp slt i64 %indvars.iv.next, %209
  br i1 %210, label %91, label %._crit_edge, !llvm.loop !46
}

declare void @_Z17getIdentityMatrixv(ptr dead_on_unwind writable sret(%class.Matrix4) align 8) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt6vectorIcSaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP11TranslationSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare void @_Z24multiplyMatrixWithMatrix7Matrix4S_(ptr dead_on_unwind writable sret(%class.Matrix4) align 8, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) unnamed_addr #1

declare void @_ZN7Matrix4C1ERKS_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP7ScalingSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorIP8RotationSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

declare void @_ZN4Vec3C1Edddi(ptr noundef nonnull align 8 dereferenceable(28), double noundef, double noundef, double noundef, i32 noundef) unnamed_addr #1

declare void @_ZN4Vec3C1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIdERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3absd(double noundef) local_unnamed_addr #6

declare void @_Z16crossProductVec34Vec3S_(ptr dead_on_unwind writable sret(%class.Vec3) align 8, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN4Vec3C1ERKS_(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #1

declare void @_Z13normalizeVec34Vec3(ptr dead_on_unwind writable sret(%class.Vec3) align 8, ptr noundef) local_unnamed_addr #1

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 8}
!6 = !{!"_ZTS5Model", !7, i64 0, !7, i64 4, !7, i64 8, !10, i64 16, !15, i64 40, !7, i64 64, !19, i64 72}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIiSaIiEE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIiSaIiEE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIiSaIiEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIcSaIcEE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIcSaIcEE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIcSaIcEE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!19 = !{!"_ZTSSt6vectorI8TriangleSaIS0_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseI8TriangleSaIS0_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseI8TriangleSaIS0_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseI8TriangleSaIS0_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!23 = !{!8, !8, i64 0}
!24 = !{!7, !7, i64 0}
!25 = !{!14, !14, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"double", !8, i64 0}
!28 = !{!29, !27, i64 8}
!29 = !{!"_ZTS11Translation", !7, i64 0, !27, i64 8, !27, i64 16, !27, i64 24}
!30 = !{!29, !27, i64 16}
!31 = !{!29, !27, i64 24}
!32 = !{i64 0, i64 32, !23}
!33 = !{i64 0, i64 128, !23}
!34 = !{!35, !27, i64 8}
!35 = !{!"_ZTS7Scaling", !7, i64 0, !27, i64 8, !27, i64 16, !27, i64 24}
!36 = !{!35, !27, i64 16}
!37 = !{!35, !27, i64 24}
!38 = !{!39, !27, i64 16}
!39 = !{!"_ZTS8Rotation", !7, i64 0, !27, i64 8, !27, i64 16, !27, i64 24, !27, i64 32}
!40 = !{!39, !27, i64 24}
!41 = !{!39, !27, i64 32}
!42 = !{i64 0, i64 8, !26, i64 8, i64 8, !26, i64 16, i64 8, !26, i64 24, i64 4, !24}
!43 = !{!44, !27, i64 16}
!44 = !{!"_ZTS4Vec3", !27, i64 0, !27, i64 8, !27, i64 16, !7, i64 24}
!45 = !{!39, !27, i64 8}
!46 = distinct !{!46, !47}
!47 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass