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

; 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.Camera = type { i32, [4 x i8], %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3, %class.Vec3, double, double, double, double, double, double, i32, i32, %"class.std::__cxx11::basic_string" }
%class.Vec3 = type <{ double, double, double, i32, [4 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@constinit.8 = external hidden constant [4 x double], align 8
@constinit.9 = external hidden constant [4 x double], align 8

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z25calcProjectionTransMatrixP6Camerab(ptr dead_on_unwind noalias writable sret(%class.Matrix4) align 8 %0, ptr noundef %1, i1 noundef zeroext %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca [4 x [4 x double]], align 16
  %8 = alloca [4 x [4 x double]], align 16
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  %9 = zext i1 %2 to i8
  store i8 %9, ptr %6, align 1, !tbaa !9
  %10 = load i8, ptr %6, align 1, !tbaa !9, !range !11, !noundef !12
  %11 = trunc i8 %10 to i1
  br i1 %11, label %12, label %113

12:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 128, ptr %7) #5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %class.Camera, ptr %13, i32 0, i32 11
  %15 = load double, ptr %14, align 8, !tbaa !13
  %16 = fmul double 2.000000e+00, %15
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %class.Camera, ptr %17, i32 0, i32 8
  %19 = load double, ptr %18, align 8, !tbaa !21
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %class.Camera, ptr %20, i32 0, i32 7
  %22 = load double, ptr %21, align 8, !tbaa !22
  %23 = fsub double %19, %22
  %24 = fdiv double %16, %23
  store double %24, ptr %7, align 8, !tbaa !23
  %25 = getelementptr inbounds double, ptr %7, i64 1
  store double 0.000000e+00, ptr %25, align 8, !tbaa !23
  %26 = getelementptr inbounds double, ptr %7, i64 2
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %class.Camera, ptr %27, i32 0, i32 8
  %29 = load double, ptr %28, align 8, !tbaa !21
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %class.Camera, ptr %30, i32 0, i32 7
  %32 = load double, ptr %31, align 8, !tbaa !22
  %33 = fadd double %29, %32
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %class.Camera, ptr %34, i32 0, i32 8
  %36 = load double, ptr %35, align 8, !tbaa !21
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %class.Camera, ptr %37, i32 0, i32 7
  %39 = load double, ptr %38, align 8, !tbaa !22
  %40 = fsub double %36, %39
  %41 = fdiv double %33, %40
  store double %41, ptr %26, align 8, !tbaa !23
  %42 = getelementptr inbounds double, ptr %7, i64 3
  store double 0.000000e+00, ptr %42, align 8, !tbaa !23
  %43 = getelementptr inbounds [4 x double], ptr %7, i64 1
  store double 0.000000e+00, ptr %43, align 8, !tbaa !23
  %44 = getelementptr inbounds double, ptr %43, i64 1
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %class.Camera, ptr %45, i32 0, i32 11
  %47 = load double, ptr %46, align 8, !tbaa !13
  %48 = fmul double 2.000000e+00, %47
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %class.Camera, ptr %49, i32 0, i32 10
  %51 = load double, ptr %50, align 8, !tbaa !24
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %class.Camera, ptr %52, i32 0, i32 9
  %54 = load double, ptr %53, align 8, !tbaa !25
  %55 = fsub double %51, %54
  %56 = fdiv double %48, %55
  store double %56, ptr %44, align 8, !tbaa !23
  %57 = getelementptr inbounds double, ptr %43, i64 2
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %class.Camera, ptr %58, i32 0, i32 10
  %60 = load double, ptr %59, align 8, !tbaa !24
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %class.Camera, ptr %61, i32 0, i32 9
  %63 = load double, ptr %62, align 8, !tbaa !25
  %64 = fadd double %60, %63
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %class.Camera, ptr %65, i32 0, i32 10
  %67 = load double, ptr %66, align 8, !tbaa !24
  %68 = load ptr, ptr %5, align 8, !tbaa !5
  %69 = getelementptr inbounds %class.Camera, ptr %68, i32 0, i32 9
  %70 = load double, ptr %69, align 8, !tbaa !25
  %71 = fsub double %67, %70
  %72 = fdiv double %64, %71
  store double %72, ptr %57, align 8, !tbaa !23
  %73 = getelementptr inbounds double, ptr %43, i64 3
  store double 0.000000e+00, ptr %73, align 8, !tbaa !23
  %74 = getelementptr inbounds [4 x double], ptr %7, i64 2
  store double 0.000000e+00, ptr %74, align 8, !tbaa !23
  %75 = getelementptr inbounds double, ptr %74, i64 1
  store double 0.000000e+00, ptr %75, align 8, !tbaa !23
  %76 = getelementptr inbounds double, ptr %74, i64 2
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %class.Camera, ptr %77, i32 0, i32 12
  %79 = load double, ptr %78, align 8, !tbaa !26
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %class.Camera, ptr %80, i32 0, i32 11
  %82 = load double, ptr %81, align 8, !tbaa !13
  %83 = fadd double %79, %82
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %class.Camera, ptr %84, i32 0, i32 12
  %86 = load double, ptr %85, align 8, !tbaa !26
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %class.Camera, ptr %87, i32 0, i32 11
  %89 = load double, ptr %88, align 8, !tbaa !13
  %90 = fsub double %86, %89
  %91 = fdiv double %83, %90
  %92 = fneg double %91
  store double %92, ptr %76, align 8, !tbaa !23
  %93 = getelementptr inbounds double, ptr %74, i64 3
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %class.Camera, ptr %94, i32 0, i32 12
  %96 = load double, ptr %95, align 8, !tbaa !26
  %97 = fmul double 2.000000e+00, %96
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds %class.Camera, ptr %98, i32 0, i32 11
  %100 = load double, ptr %99, align 8, !tbaa !13
  %101 = fmul double %97, %100
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %class.Camera, ptr %102, i32 0, i32 12
  %104 = load double, ptr %103, align 8, !tbaa !26
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %class.Camera, ptr %105, i32 0, i32 11
  %107 = load double, ptr %106, align 8, !tbaa !13
  %108 = fsub double %104, %107
  %109 = fdiv double %101, %108
  %110 = fneg double %109
  store double %110, ptr %93, align 8, !tbaa !23
  %111 = getelementptr inbounds [4 x double], ptr %7, i64 3
  call void @llvm.memset.p0.i64(ptr align 16 %111, i8 0, i64 32, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %111, ptr align 8 @constinit.8, i64 32, i1 false), !tbaa.struct !27
  %112 = getelementptr inbounds [4 x [4 x double]], ptr %7, i64 0, i64 0
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef %112)
  call void @llvm.lifetime.end.p0(i64 128, ptr %7) #5
  br label %200

113:                                              ; preds = %3
  call void @llvm.lifetime.start.p0(i64 128, ptr %8) #5
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %class.Camera, ptr %114, i32 0, i32 8
  %116 = load double, ptr %115, align 8, !tbaa !21
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %class.Camera, ptr %117, i32 0, i32 7
  %119 = load double, ptr %118, align 8, !tbaa !22
  %120 = fsub double %116, %119
  %121 = fdiv double 2.000000e+00, %120
  store double %121, ptr %8, align 8, !tbaa !23
  %122 = getelementptr inbounds double, ptr %8, i64 1
  store double 0.000000e+00, ptr %122, align 8, !tbaa !23
  %123 = getelementptr inbounds double, ptr %8, i64 2
  store double 0.000000e+00, ptr %123, align 8, !tbaa !23
  %124 = getelementptr inbounds double, ptr %8, i64 3
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %class.Camera, ptr %125, i32 0, i32 8
  %127 = load double, ptr %126, align 8, !tbaa !21
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %class.Camera, ptr %128, i32 0, i32 7
  %130 = load double, ptr %129, align 8, !tbaa !22
  %131 = fadd double %127, %130
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %class.Camera, ptr %132, i32 0, i32 8
  %134 = load double, ptr %133, align 8, !tbaa !21
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %class.Camera, ptr %135, i32 0, i32 7
  %137 = load double, ptr %136, align 8, !tbaa !22
  %138 = fsub double %134, %137
  %139 = fdiv double %131, %138
  %140 = fneg double %139
  store double %140, ptr %124, align 8, !tbaa !23
  %141 = getelementptr inbounds [4 x double], ptr %8, i64 1
  store double 0.000000e+00, ptr %141, align 8, !tbaa !23
  %142 = getelementptr inbounds double, ptr %141, i64 1
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %class.Camera, ptr %143, i32 0, i32 10
  %145 = load double, ptr %144, align 8, !tbaa !24
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %class.Camera, ptr %146, i32 0, i32 9
  %148 = load double, ptr %147, align 8, !tbaa !25
  %149 = fsub double %145, %148
  %150 = fdiv double 2.000000e+00, %149
  store double %150, ptr %142, align 8, !tbaa !23
  %151 = getelementptr inbounds double, ptr %141, i64 2
  store double 0.000000e+00, ptr %151, align 8, !tbaa !23
  %152 = getelementptr inbounds double, ptr %141, i64 3
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = getelementptr inbounds %class.Camera, ptr %153, i32 0, i32 10
  %155 = load double, ptr %154, align 8, !tbaa !24
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %class.Camera, ptr %156, i32 0, i32 9
  %158 = load double, ptr %157, align 8, !tbaa !25
  %159 = fadd double %155, %158
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = getelementptr inbounds %class.Camera, ptr %160, i32 0, i32 10
  %162 = load double, ptr %161, align 8, !tbaa !24
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %class.Camera, ptr %163, i32 0, i32 9
  %165 = load double, ptr %164, align 8, !tbaa !25
  %166 = fsub double %162, %165
  %167 = fdiv double %159, %166
  %168 = fneg double %167
  store double %168, ptr %152, align 8, !tbaa !23
  %169 = getelementptr inbounds [4 x double], ptr %8, i64 2
  store double 0.000000e+00, ptr %169, align 8, !tbaa !23
  %170 = getelementptr inbounds double, ptr %169, i64 1
  store double 0.000000e+00, ptr %170, align 8, !tbaa !23
  %171 = getelementptr inbounds double, ptr %169, i64 2
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = getelementptr inbounds %class.Camera, ptr %172, i32 0, i32 12
  %174 = load double, ptr %173, align 8, !tbaa !26
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = getelementptr inbounds %class.Camera, ptr %175, i32 0, i32 11
  %177 = load double, ptr %176, align 8, !tbaa !13
  %178 = fsub double %174, %177
  %179 = fdiv double 2.000000e+00, %178
  %180 = fneg double %179
  store double %180, ptr %171, align 8, !tbaa !23
  %181 = getelementptr inbounds double, ptr %169, i64 3
  %182 = load ptr, ptr %5, align 8, !tbaa !5
  %183 = getelementptr inbounds %class.Camera, ptr %182, i32 0, i32 12
  %184 = load double, ptr %183, align 8, !tbaa !26
  %185 = load ptr, ptr %5, align 8, !tbaa !5
  %186 = getelementptr inbounds %class.Camera, ptr %185, i32 0, i32 11
  %187 = load double, ptr %186, align 8, !tbaa !13
  %188 = fadd double %184, %187
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %class.Camera, ptr %189, i32 0, i32 12
  %191 = load double, ptr %190, align 8, !tbaa !26
  %192 = load ptr, ptr %5, align 8, !tbaa !5
  %193 = getelementptr inbounds %class.Camera, ptr %192, i32 0, i32 11
  %194 = load double, ptr %193, align 8, !tbaa !13
  %195 = fsub double %191, %194
  %196 = fdiv double %188, %195
  %197 = fneg double %196
  store double %197, ptr %181, align 8, !tbaa !23
  %198 = getelementptr inbounds [4 x double], ptr %8, i64 3
  call void @llvm.memset.p0.i64(ptr align 16 %198, i8 0, i64 32, i1 false)
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %198, ptr align 8 @constinit.9, i64 32, i1 false), !tbaa.struct !27
  %199 = getelementptr inbounds [4 x [4 x double]], ptr %8, i64 0, i64 0
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef %199)
  call void @llvm.lifetime.end.p0(i64 128, ptr %8) #5
  br label %200

200:                                              ; preds = %113, %12
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 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 #5 = { 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 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !17, i64 200}
!14 = !{!"_ZTS6Camera", !15, i64 0, !16, i64 8, !16, i64 40, !16, i64 72, !16, i64 104, !16, i64 136, !17, i64 168, !17, i64 176, !17, i64 184, !17, i64 192, !17, i64 200, !17, i64 208, !15, i64 216, !15, i64 220, !18, i64 224}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTS4Vec3", !17, i64 0, !17, i64 8, !17, i64 16, !15, i64 24}
!17 = !{!"double", !7, i64 0}
!18 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !19, i64 0, !20, i64 8, !7, i64 16}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!14, !17, i64 176}
!22 = !{!14, !17, i64 168}
!23 = !{!17, !17, i64 0}
!24 = !{!14, !17, i64 192}
!25 = !{!14, !17, i64 184}
!26 = !{!14, !17, i64 208}
!27 = !{i64 0, i64 32, !28}
!28 = !{!7, !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%class.Matrix4 = type { [4 x [4 x double]] }

@constinit.8 = external hidden local_unnamed_addr constant [4 x double], align 8
@constinit.9 = external hidden local_unnamed_addr constant [4 x double], align 8

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; 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 uwtable
define dso_local void @_Z25calcProjectionTransMatrixP6Camerab(ptr dead_on_unwind noalias writable sret(%class.Matrix4) align 8 %0, ptr nocapture noundef readonly %1, i1 noundef zeroext %2) local_unnamed_addr #4 {
  %4 = alloca [4 x [4 x double]], align 16
  %5 = alloca [4 x [4 x double]], align 16
  br i1 %2, label %6, label %49

6:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #5
  %7 = getelementptr inbounds i8, ptr %1, i64 176
  %8 = load double, ptr %7, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %1, i64 168
  %10 = load double, ptr %9, align 8, !tbaa !16
  %11 = fsub double %8, %10
  %12 = getelementptr inbounds i8, ptr %4, i64 8
  store double 0.000000e+00, ptr %12, align 8, !tbaa !17
  %13 = getelementptr inbounds i8, ptr %4, i64 16
  %14 = fadd double %8, %10
  %15 = fdiv double %14, %11
  store double %15, ptr %13, align 16, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %4, i64 24
  %17 = getelementptr inbounds i8, ptr %4, i64 40
  %18 = getelementptr inbounds i8, ptr %1, i64 192
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %16, i8 0, i64 16, i1 false)
  %19 = getelementptr inbounds i8, ptr %1, i64 184
  %20 = load double, ptr %19, align 8, !tbaa !18
  %21 = load <2 x double>, ptr %18, align 8, !tbaa !17
  %22 = insertelement <2 x double> <double poison, double 2.000000e+00>, double %20, i64 0
  %23 = fmul <2 x double> %21, %22
  %24 = fadd <2 x double> %21, %22
  %25 = shufflevector <2 x double> %23, <2 x double> %24, <2 x i32> <i32 1, i32 2>
  %26 = extractelement <2 x double> %23, i64 1
  %27 = fdiv double %26, %11
  store double %27, ptr %4, align 16, !tbaa !17
  %28 = extractelement <2 x double> %21, i64 0
  %29 = fsub double %28, %20
  %30 = insertelement <2 x double> poison, double %29, i64 0
  %31 = shufflevector <2 x double> %30, <2 x double> poison, <2 x i32> zeroinitializer
  %32 = fdiv <2 x double> %25, %31
  store <2 x double> %32, ptr %17, align 8, !tbaa !17
  %33 = getelementptr inbounds i8, ptr %4, i64 56
  %34 = getelementptr inbounds i8, ptr %4, i64 80
  %35 = getelementptr inbounds i8, ptr %1, i64 208
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %33, i8 0, i64 24, i1 false)
  %36 = load double, ptr %35, align 8, !tbaa !19
  %37 = extractelement <2 x double> %21, i64 1
  %38 = fadd double %37, %36
  %39 = fsub double %36, %37
  %40 = fneg double %38
  %41 = fmul double %36, -2.000000e+00
  %42 = fmul double %37, %41
  %43 = insertelement <2 x double> poison, double %40, i64 0
  %44 = insertelement <2 x double> %43, double %42, i64 1
  %45 = insertelement <2 x double> poison, double %39, i64 0
  %46 = shufflevector <2 x double> %45, <2 x double> poison, <2 x i32> zeroinitializer
  %47 = fdiv <2 x double> %44, %46
  store <2 x double> %47, ptr %34, align 16, !tbaa !17
  %48 = getelementptr inbounds i8, ptr %4, i64 96
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %48, ptr noundef nonnull align 8 dereferenceable(32) @constinit.8, i64 32, i1 false), !tbaa.struct !20
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull %4)
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #5
  br label %88

49:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %5) #5
  %50 = getelementptr inbounds i8, ptr %1, i64 176
  %51 = load double, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds i8, ptr %1, i64 168
  %53 = load double, ptr %52, align 8, !tbaa !16
  %54 = fsub double %51, %53
  %55 = fdiv double 2.000000e+00, %54
  store double %55, ptr %5, align 16, !tbaa !17
  %56 = getelementptr inbounds i8, ptr %5, i64 8
  %57 = getelementptr inbounds i8, ptr %5, i64 24
  %58 = fadd double %51, %53
  %59 = fneg double %58
  %60 = fdiv double %59, %54
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %56, i8 0, i64 16, i1 false)
  store double %60, ptr %57, align 8, !tbaa !17
  %61 = getelementptr inbounds i8, ptr %5, i64 32
  store double 0.000000e+00, ptr %61, align 16, !tbaa !17
  %62 = getelementptr inbounds i8, ptr %5, i64 40
  %63 = getelementptr inbounds i8, ptr %1, i64 192
  %64 = load double, ptr %63, align 8, !tbaa !22
  %65 = getelementptr inbounds i8, ptr %1, i64 184
  %66 = load double, ptr %65, align 8, !tbaa !18
  %67 = fsub double %64, %66
  %68 = fdiv double 2.000000e+00, %67
  store double %68, ptr %62, align 8, !tbaa !17
  %69 = getelementptr inbounds i8, ptr %5, i64 48
  store double 0.000000e+00, ptr %69, align 16, !tbaa !17
  %70 = getelementptr inbounds i8, ptr %5, i64 56
  %71 = fadd double %64, %66
  %72 = fneg double %71
  %73 = fdiv double %72, %67
  store double %73, ptr %70, align 8, !tbaa !17
  %74 = getelementptr inbounds i8, ptr %5, i64 64
  %75 = getelementptr inbounds i8, ptr %5, i64 80
  %76 = getelementptr inbounds i8, ptr %1, i64 208
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %74, i8 0, i64 16, i1 false)
  %77 = load double, ptr %76, align 8, !tbaa !19
  %78 = getelementptr inbounds i8, ptr %1, i64 200
  %79 = load double, ptr %78, align 8, !tbaa !23
  %80 = fsub double %77, %79
  %81 = fadd double %77, %79
  %82 = fneg double %81
  %83 = insertelement <2 x double> <double -2.000000e+00, double poison>, double %82, i64 1
  %84 = insertelement <2 x double> poison, double %80, i64 0
  %85 = shufflevector <2 x double> %84, <2 x double> poison, <2 x i32> zeroinitializer
  %86 = fdiv <2 x double> %83, %85
  store <2 x double> %86, ptr %75, align 16, !tbaa !17
  %87 = getelementptr inbounds i8, ptr %5, i64 96
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %87, ptr noundef nonnull align 8 dereferenceable(32) @constinit.9, i64 32, i1 false), !tbaa.struct !20
  call void @_ZN7Matrix4C1EPA4_d(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull %5)
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %5) #5
  br label %88

88:                                               ; preds = %49, %6
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 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 #5 = { 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, !11, i64 176}
!6 = !{!"_ZTS6Camera", !7, i64 0, !10, i64 8, !10, i64 40, !10, i64 72, !10, i64 104, !10, i64 136, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !7, i64 216, !7, i64 220, !12, i64 224}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS4Vec3", !11, i64 0, !11, i64 8, !11, i64 16, !7, i64 24}
!11 = !{!"double", !8, i64 0}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !13, i64 0, !15, i64 8, !8, i64 16}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!6, !11, i64 168}
!17 = !{!11, !11, i64 0}
!18 = !{!6, !11, i64 184}
!19 = !{!6, !11, i64 208}
!20 = !{i64 0, i64 32, !21}
!21 = !{!8, !8, i64 0}
!22 = !{!6, !11, i64 192}
!23 = !{!6, !11, i64 200}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass