; LLVM IR from goldest-star/seawave-animation :: src/vcl/math/mat/mat4 (mat4)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.vcl::mat" = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
%"struct.vcl::buffer_stack" = type { float, float, float }

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vcl3matILm4ELm4EEC2ERKNS0_ILm3ELm3EEERKNS_12buffer_stackIfLm3EEE(ptr noundef nonnull align 4 dereferenceable(64) %0, ptr noundef nonnull align 4 dereferenceable(36) %1, ptr noundef nonnull align 4 dereferenceable(12) %2) unnamed_addr #0 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %7 = load ptr, ptr %4, align 8
  %8 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 0
  %9 = load ptr, ptr %5, align 8, !tbaa !5
  %10 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %9, i64 noundef 0, i64 noundef 0)
  %11 = load float, ptr %10, align 4, !tbaa !9
  store float %11, ptr %8, align 4, !tbaa !11
  %12 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 1
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %13, i64 noundef 0, i64 noundef 1)
  %15 = load float, ptr %14, align 4, !tbaa !9
  store float %15, ptr %12, align 4, !tbaa !13
  %16 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 2
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %17, i64 noundef 0, i64 noundef 2)
  %19 = load float, ptr %18, align 4, !tbaa !9
  store float %19, ptr %16, align 4, !tbaa !14
  %20 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 3
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.vcl::buffer_stack", ptr %21, i32 0, i32 0
  %23 = load float, ptr %22, align 4, !tbaa !15
  store float %23, ptr %20, align 4, !tbaa !17
  %24 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 4
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %25, i64 noundef 1, i64 noundef 0)
  %27 = load float, ptr %26, align 4, !tbaa !9
  store float %27, ptr %24, align 4, !tbaa !18
  %28 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 5
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %29, i64 noundef 1, i64 noundef 1)
  %31 = load float, ptr %30, align 4, !tbaa !9
  store float %31, ptr %28, align 4, !tbaa !19
  %32 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 6
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %33, i64 noundef 1, i64 noundef 2)
  %35 = load float, ptr %34, align 4, !tbaa !9
  store float %35, ptr %32, align 4, !tbaa !20
  %36 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 7
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.vcl::buffer_stack", ptr %37, i32 0, i32 1
  %39 = load float, ptr %38, align 4, !tbaa !21
  store float %39, ptr %36, align 4, !tbaa !22
  %40 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 8
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %41, i64 noundef 2, i64 noundef 0)
  %43 = load float, ptr %42, align 4, !tbaa !9
  store float %43, ptr %40, align 4, !tbaa !23
  %44 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 9
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %45, i64 noundef 2, i64 noundef 1)
  %47 = load float, ptr %46, align 4, !tbaa !9
  store float %47, ptr %44, align 4, !tbaa !24
  %48 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 10
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %49, i64 noundef 2, i64 noundef 2)
  %51 = load float, ptr %50, align 4, !tbaa !9
  store float %51, ptr %48, align 4, !tbaa !25
  %52 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 11
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.vcl::buffer_stack", ptr %53, i32 0, i32 2
  %55 = load float, ptr %54, align 4, !tbaa !26
  store float %55, ptr %52, align 4, !tbaa !27
  %56 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 12
  store float 0.000000e+00, ptr %56, align 4, !tbaa !28
  %57 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 13
  store float 0.000000e+00, ptr %57, align 4, !tbaa !29
  %58 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 14
  store float 0.000000e+00, ptr %58, align 4, !tbaa !30
  %59 = getelementptr inbounds %"struct.vcl::mat", ptr %7, i32 0, i32 15
  store float 1.000000e+00, ptr %59, align 4, !tbaa !31
  ret void
}

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36), i64 noundef, i64 noundef) #1

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

!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 = !{!"float", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"_ZTSN3vcl3matILm4ELm4EEE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60}
!13 = !{!12, !10, i64 4}
!14 = !{!12, !10, i64 8}
!15 = !{!16, !10, i64 0}
!16 = !{!"_ZTSN3vcl12buffer_stackIfLm3EEE", !10, i64 0, !10, i64 4, !10, i64 8}
!17 = !{!12, !10, i64 12}
!18 = !{!12, !10, i64 16}
!19 = !{!12, !10, i64 20}
!20 = !{!12, !10, i64 24}
!21 = !{!16, !10, i64 4}
!22 = !{!12, !10, i64 28}
!23 = !{!12, !10, i64 32}
!24 = !{!12, !10, i64 36}
!25 = !{!12, !10, i64 40}
!26 = !{!16, !10, i64 8}
!27 = !{!12, !10, i64 44}
!28 = !{!12, !10, i64 48}
!29 = !{!12, !10, i64 52}
!30 = !{!12, !10, i64 56}
!31 = !{!12, !10, i64 60}


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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vcl3matILm4ELm4EEC2ERKNS0_ILm3ELm3EEERKNS_12buffer_stackIfLm3EEE(ptr nocapture noundef nonnull writeonly align 4 dereferenceable(64) %0, ptr noundef nonnull align 4 dereferenceable(36) %1, ptr nocapture noundef nonnull readonly align 4 dereferenceable(12) %2) unnamed_addr #0 align 2 {
  %4 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %1, i64 noundef 0, i64 noundef 0)
  %5 = load float, ptr %4, align 4, !tbaa !5
  store float %5, ptr %0, align 4, !tbaa !9
  %6 = getelementptr inbounds i8, ptr %0, i64 4
  %7 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %1, i64 noundef 0, i64 noundef 1)
  %8 = load float, ptr %7, align 4, !tbaa !5
  store float %8, ptr %6, align 4, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %1, i64 noundef 0, i64 noundef 2)
  %11 = load float, ptr %10, align 4, !tbaa !5
  store float %11, ptr %9, align 4, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %0, i64 12
  %13 = load float, ptr %2, align 4, !tbaa !13
  store float %13, ptr %12, align 4, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %1, i64 noundef 1, i64 noundef 0)
  %16 = load float, ptr %15, align 4, !tbaa !5
  store float %16, ptr %14, align 4, !tbaa !16
  %17 = getelementptr inbounds i8, ptr %0, i64 20
  %18 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %1, i64 noundef 1, i64 noundef 1)
  %19 = load float, ptr %18, align 4, !tbaa !5
  store float %19, ptr %17, align 4, !tbaa !17
  %20 = getelementptr inbounds i8, ptr %0, i64 24
  %21 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %1, i64 noundef 1, i64 noundef 2)
  %22 = load float, ptr %21, align 4, !tbaa !5
  store float %22, ptr %20, align 4, !tbaa !18
  %23 = getelementptr inbounds i8, ptr %0, i64 28
  %24 = getelementptr inbounds i8, ptr %2, i64 4
  %25 = load float, ptr %24, align 4, !tbaa !19
  store float %25, ptr %23, align 4, !tbaa !20
  %26 = getelementptr inbounds i8, ptr %0, i64 32
  %27 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %1, i64 noundef 2, i64 noundef 0)
  %28 = load float, ptr %27, align 4, !tbaa !5
  store float %28, ptr %26, align 4, !tbaa !21
  %29 = getelementptr inbounds i8, ptr %0, i64 36
  %30 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %1, i64 noundef 2, i64 noundef 1)
  %31 = load float, ptr %30, align 4, !tbaa !5
  store float %31, ptr %29, align 4, !tbaa !22
  %32 = getelementptr inbounds i8, ptr %0, i64 40
  %33 = tail call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36) %1, i64 noundef 2, i64 noundef 2)
  %34 = load float, ptr %33, align 4, !tbaa !5
  store float %34, ptr %32, align 4, !tbaa !23
  %35 = getelementptr inbounds i8, ptr %0, i64 44
  %36 = getelementptr inbounds i8, ptr %2, i64 8
  %37 = load float, ptr %36, align 4, !tbaa !24
  store float %37, ptr %35, align 4, !tbaa !25
  %38 = getelementptr inbounds i8, ptr %0, i64 48
  store <4 x float> <float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00>, ptr %38, align 4, !tbaa !5
  ret void
}

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3vcl3matILm3ELm3EEclEmm(ptr noundef nonnull align 4 dereferenceable(36), i64 noundef, i64 noundef) local_unnamed_addr #1

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

!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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTSN3vcl3matILm4ELm4EEE", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !6, i64 48, !6, i64 52, !6, i64 56, !6, i64 60}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN3vcl12buffer_stackIfLm3EEE", !6, i64 0, !6, i64 4, !6, i64 8}
!15 = !{!10, !6, i64 12}
!16 = !{!10, !6, i64 16}
!17 = !{!10, !6, i64 20}
!18 = !{!10, !6, i64 24}
!19 = !{!14, !6, i64 4}
!20 = !{!10, !6, i64 28}
!21 = !{!10, !6, i64 32}
!22 = !{!10, !6, i64 36}
!23 = !{!10, !6, i64 40}
!24 = !{!14, !6, i64 8}
!25 = !{!10, !6, i64 44}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,TailCallElimPass