; LLVM IR from goldest-star/seawave-animation :: src/vcl/interaction/camera/camera.ll (ZN3vcl12camera_scene14apply_rotationEffff)

; 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.0" = type { float, float, float, float, float, float, float, float, float }
%"struct.vcl::buffer_stack" = type { float, float, float }
%"struct.vcl::camera_scene" = type { float, %"struct.vcl::buffer_stack", %"struct.vcl::mat.0", %"struct.vcl::perspective_structure", i32, %"struct.vcl::buffer_stack.1" }
%"struct.vcl::perspective_structure" = type { float, float, float, float }
%"struct.vcl::buffer_stack.1" = type { float, float }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vcl9transposeILm3EEENS_3matIXT_EXT_EEERKS2_(ptr dead_on_unwind noalias writable sret(%"struct.vcl::mat.0") align 4, ptr noundef nonnull align 4 dereferenceable(36)) #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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vcl12camera_scene14apply_rotationEffff(ptr noundef nonnull align 4 dereferenceable(80) %0, float noundef %1, float noundef %2, float noundef %3, float noundef %4) #3 align 2 {
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca float, align 4
  %15 = alloca %"struct.vcl::mat.0", align 4
  %16 = alloca %"struct.vcl::mat.0", align 4
  %17 = alloca %"struct.vcl::mat.0", align 4
  %18 = alloca float, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"struct.vcl::buffer_stack", align 4
  %21 = alloca { <2 x float>, float }, align 8
  %22 = alloca %"struct.vcl::buffer_stack", align 4
  %23 = alloca { <2 x float>, float }, align 8
  %24 = alloca %"struct.vcl::mat.0", align 4
  %25 = alloca %"struct.vcl::mat.0", align 4
  %26 = alloca %"struct.vcl::mat.0", align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store float %1, ptr %7, align 4, !tbaa !9
  store float %2, ptr %8, align 4, !tbaa !9
  store float %3, ptr %9, align 4, !tbaa !9
  store float %4, ptr %10, align 4, !tbaa !9
  %27 = load ptr, ptr %6, align 8
  %28 = getelementptr inbounds %"struct.vcl::camera_scene", ptr %27, i32 0, i32 4
  %29 = load i32, ptr %28, align 4, !tbaa !11
  %30 = icmp eq i32 %29, 1
  br i1 %30, label %31, label %73

31:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %32 = load float, ptr %9, align 4, !tbaa !9
  %33 = load float, ptr %7, align 4, !tbaa !9
  %34 = fsub float %32, %33
  store float %34, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %35 = load float, ptr %10, align 4, !tbaa !9
  %36 = load float, ptr %8, align 4, !tbaa !9
  %37 = fsub float %35, %36
  store float %37, ptr %12, align 4, !tbaa !9
  %38 = load float, ptr %11, align 4, !tbaa !9
  %39 = getelementptr inbounds %"struct.vcl::camera_scene", ptr %27, i32 0, i32 5
  %40 = getelementptr inbounds %"struct.vcl::buffer_stack.1", ptr %39, i32 0, i32 0
  %41 = load float, ptr %40, align 4, !tbaa !18
  %42 = fsub float %41, %38
  store float %42, ptr %40, align 4, !tbaa !18
  %43 = load float, ptr %12, align 4, !tbaa !9
  %44 = getelementptr inbounds %"struct.vcl::camera_scene", ptr %27, i32 0, i32 5
  %45 = getelementptr inbounds %"struct.vcl::buffer_stack.1", ptr %44, i32 0, i32 1
  %46 = load float, ptr %45, align 4, !tbaa !19
  %47 = fadd float %46, %43
  store float %47, ptr %45, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %48 = getelementptr inbounds %"struct.vcl::camera_scene", ptr %27, i32 0, i32 5
  %49 = getelementptr inbounds %"struct.vcl::buffer_stack.1", ptr %48, i32 0, i32 0
  %50 = load float, ptr %49, align 4, !tbaa !18
  store float %50, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  %51 = getelementptr inbounds %"struct.vcl::camera_scene", ptr %27, i32 0, i32 5
  %52 = getelementptr inbounds %"struct.vcl::buffer_stack.1", ptr %51, i32 0, i32 1
  %53 = load float, ptr %52, align 4, !tbaa !19
  store float %53, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 36, ptr %15) #7
  %54 = load float, ptr %14, align 4, !tbaa !9
  %55 = call noundef float @_ZSt3cosf(float noundef %54)
  %56 = load float, ptr %14, align 4, !tbaa !9
  %57 = call noundef float @_ZSt3sinf(float noundef %56)
  %58 = fneg float %57
  %59 = load float, ptr %14, align 4, !tbaa !9
  %60 = call noundef float @_ZSt3sinf(float noundef %59)
  %61 = load float, ptr %14, align 4, !tbaa !9
  %62 = call noundef float @_ZSt3cosf(float noundef %61)
  call void @_ZN3vcl3matILm3ELm3EEC1Efffffffff(ptr noundef nonnull align 4 dereferenceable(36) %15, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef %55, float noundef %58, float noundef 0.000000e+00, float noundef %60, float noundef %62)
  call void @llvm.lifetime.start.p0(i64 36, ptr %16) #7
  %63 = load float, ptr %13, align 4, !tbaa !9
  %64 = call noundef float @_ZSt3cosf(float noundef %63)
  %65 = load float, ptr %13, align 4, !tbaa !9
  %66 = call noundef float @_ZSt3sinf(float noundef %65)
  %67 = fneg float %66
  %68 = load float, ptr %13, align 4, !tbaa !9
  %69 = call noundef float @_ZSt3sinf(float noundef %68)
  %70 = load float, ptr %13, align 4, !tbaa !9
  %71 = call noundef float @_ZSt3cosf(float noundef %70)
  call void @_ZN3vcl3matILm3ELm3EEC1Efffffffff(ptr noundef nonnull align 4 dereferenceable(36) %16, float noundef %64, float noundef %67, float noundef 0.000000e+00, float noundef %69, float noundef %71, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 36, ptr %17) #7
  call void @_ZN3vclmlILm3ELm3ELm3EEENS_3matIXT_EXT1_EEERKNS1_IXT_EXT0_EEERKNS1_IXT0_EXT1_EEE(ptr dead_on_unwind writable sret(%"struct.vcl::mat.0") align 4 %17, ptr noundef nonnull align 4 dereferenceable(36) %16, ptr noundef nonnull align 4 dereferenceable(36) %15)
  %72 = getelementptr inbounds %"struct.vcl::camera_scene", ptr %27, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %72, ptr align 4 %17, i64 36, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 36, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %109

73:                                               ; preds = %5
  %74 = getelementptr inbounds %"struct.vcl::camera_scene", ptr %27, i32 0, i32 4
  %75 = load i32, ptr %74, align 4, !tbaa !11
  %76 = icmp eq i32 %75, 0
  br i1 %76, label %77, label %108

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %78 = load float, ptr %9, align 4, !tbaa !9
  %79 = load float, ptr %7, align 4, !tbaa !9
  %80 = fsub float %78, %79
  %81 = load float, ptr %9, align 4, !tbaa !9
  %82 = load float, ptr %7, align 4, !tbaa !9
  %83 = fsub float %81, %82
  %84 = load float, ptr %10, align 4, !tbaa !9
  %85 = load float, ptr %8, align 4, !tbaa !9
  %86 = fsub float %84, %85
  %87 = load float, ptr %10, align 4, !tbaa !9
  %88 = load float, ptr %8, align 4, !tbaa !9
  %89 = fsub float %87, %88
  %90 = fmul float %86, %89
  %91 = call float @llvm.fmuladd.f32(float %80, float %83, float %90)
  %92 = call noundef float @_ZSt4sqrtf(float noundef %91)
  store float %92, ptr %18, align 4, !tbaa !9
  %93 = load float, ptr %18, align 4, !tbaa !9
  %94 = fcmp olt float %93, 0x3EB0C6F7A0000000
  br i1 %94, label %95, label %96

95:                                               ; preds = %77
  store i32 1, ptr %19, align 4
  br label %105

96:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #7
  %97 = load float, ptr %7, align 4, !tbaa !9
  %98 = load float, ptr %8, align 4, !tbaa !9
  %99 = call { <2 x float>, float } @_ZN3vclL20trackball_projectionEfff(float noundef %97, float noundef %98, float noundef 1.000000e+00)
  store { <2 x float>, float } %99, ptr %21, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 8 %21, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #7
  %100 = load float, ptr %9, align 4, !tbaa !9
  %101 = load float, ptr %10, align 4, !tbaa !9
  %102 = call { <2 x float>, float } @_ZN3vclL20trackball_projectionEfff(float noundef %100, float noundef %101, float noundef 1.000000e+00)
  store { <2 x float>, float } %102, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 8 %23, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 36, ptr %24) #7
  call void @_ZN3vcl28rotation_between_vector_mat3ERKNS_12buffer_stackIfLm3EEES3_(ptr dead_on_unwind writable sret(%"struct.vcl::mat.0") align 4 %24, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.start.p0(i64 36, ptr %25) #7
  %103 = getelementptr inbounds %"struct.vcl::camera_scene", ptr %27, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 36, ptr %26) #7
  call void @_ZN3vcl9transposeILm3EEENS_3matIXT_EXT_EEERKS2_(ptr dead_on_unwind writable sret(%"struct.vcl::mat.0") align 4 %26, ptr noundef nonnull align 4 dereferenceable(36) %24)
  call void @_ZN3vclmlILm3ELm3ELm3EEENS_3matIXT_EXT1_EEERKNS1_IXT_EXT0_EEERKNS1_IXT0_EXT1_EEE(ptr dead_on_unwind writable sret(%"struct.vcl::mat.0") align 4 %25, ptr noundef nonnull align 4 dereferenceable(36) %103, ptr noundef nonnull align 4 dereferenceable(36) %26)
  %104 = getelementptr inbounds %"struct.vcl::camera_scene", ptr %27, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %104, ptr align 4 %25, i64 36, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 36, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #7
  store i32 0, ptr %19, align 4
  br label %105

105:                                              ; preds = %96, %95
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  %106 = load i32, ptr %19, align 4
  switch i32 %106, label %110 [
    i32 0, label %107
    i32 1, label %109
  ]

107:                                              ; preds = %105
  br label %108

108:                                              ; preds = %107, %73
  br label %109

109:                                              ; preds = %108, %105, %31
  ret void

110:                                              ; preds = %105
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) #4

declare void @_ZN3vcl3matILm3ELm3EEC1Efffffffff(ptr noundef nonnull align 4 dereferenceable(36), float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vclmlILm3ELm3ELm3EEENS_3matIXT_EXT1_EEERKNS1_IXT_EXT0_EEERKNS1_IXT0_EXT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.vcl::mat.0") align 4, ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(36)) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

; Function Attrs: mustprogress uwtable
declare hidden { <2 x float>, float } @_ZN3vclL20trackball_projectionEfff(float noundef, float noundef, float noundef) #1

declare void @_ZN3vcl28rotation_between_vector_mat3ERKNS_12buffer_stackIfLm3EEES3_(ptr dead_on_unwind writable sret(%"struct.vcl::mat.0") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 = !{!"float", !7, i64 0}
!11 = !{!12, !16, i64 68}
!12 = !{!"_ZTSN3vcl12camera_sceneE", !10, i64 0, !13, i64 4, !14, i64 16, !15, i64 52, !16, i64 68, !17, i64 72}
!13 = !{!"_ZTSN3vcl12buffer_stackIfLm3EEE", !10, i64 0, !10, i64 4, !10, i64 8}
!14 = !{!"_ZTSN3vcl3matILm3ELm3EEE", !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}
!15 = !{!"_ZTSN3vcl21perspective_structureE", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!16 = !{!"_ZTSN3vcl19camera_control_typeE", !7, i64 0}
!17 = !{!"_ZTSN3vcl12buffer_stackIfLm2EEE", !10, i64 0, !10, i64 4}
!18 = !{!12, !10, i64 72}
!19 = !{!12, !10, i64 76}
!20 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 4, !9, i64 20, i64 4, !9, i64 24, i64 4, !9, i64 28, i64 4, !9, i64 32, i64 4, !9}


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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vcl9transposeILm3EEENS_3matIXT_EXT_EEERKS2_(ptr dead_on_unwind noalias writable sret(%"struct.vcl::mat.0") align 4, ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3vcl12camera_scene14apply_rotationEffff(ptr noundef nonnull align 4 dereferenceable(80) %0, float noundef %1, float noundef %2, float noundef %3, float noundef %4) local_unnamed_addr #3 align 2 {
  %6 = alloca %"struct.vcl::mat.0", align 4
  %7 = alloca %"struct.vcl::mat.0", align 4
  %8 = alloca %"struct.vcl::mat.0", align 4
  %9 = alloca %"struct.vcl::buffer_stack", align 8
  %10 = alloca %"struct.vcl::buffer_stack", align 8
  %11 = alloca %"struct.vcl::mat.0", align 4
  %12 = alloca %"struct.vcl::mat.0", align 4
  %13 = alloca %"struct.vcl::mat.0", align 4
  %14 = getelementptr inbounds i8, ptr %0, i64 68
  %15 = load i32, ptr %14, align 4, !tbaa !5
  switch i32 %15, label %47 [
    i32 1, label %16
    i32 0, label %36
  ]

16:                                               ; preds = %5
  %17 = fsub float %3, %1
  %18 = fsub float %4, %2
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  %20 = load float, ptr %19, align 4, !tbaa !15
  %21 = fsub float %20, %17
  store float %21, ptr %19, align 4, !tbaa !15
  %22 = getelementptr inbounds i8, ptr %0, i64 76
  %23 = load float, ptr %22, align 4, !tbaa !16
  %24 = fadd float %18, %23
  store float %24, ptr %22, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %6) #7
  %25 = tail call noundef float @_ZSt3cosf(float noundef %24)
  %26 = tail call noundef float @_ZSt3sinf(float noundef %24)
  %27 = fneg float %26
  %28 = tail call noundef float @_ZSt3sinf(float noundef %24)
  %29 = tail call noundef float @_ZSt3cosf(float noundef %24)
  call void @_ZN3vcl3matILm3ELm3EEC1Efffffffff(ptr noundef nonnull align 4 dereferenceable(36) %6, float noundef 1.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef %25, float noundef %27, float noundef 0.000000e+00, float noundef %28, float noundef %29)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %7) #7
  %30 = call noundef float @_ZSt3cosf(float noundef %21)
  %31 = call noundef float @_ZSt3sinf(float noundef %21)
  %32 = fneg float %31
  %33 = call noundef float @_ZSt3sinf(float noundef %21)
  %34 = call noundef float @_ZSt3cosf(float noundef %21)
  call void @_ZN3vcl3matILm3ELm3EEC1Efffffffff(ptr noundef nonnull align 4 dereferenceable(36) %7, float noundef %30, float noundef %32, float noundef 0.000000e+00, float noundef %33, float noundef %34, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %8) #7
  call void @_ZN3vclmlILm3ELm3ELm3EEENS_3matIXT_EXT1_EEERKNS1_IXT_EXT0_EEERKNS1_IXT0_EXT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.vcl::mat.0") align 4 %8, ptr noundef nonnull align 4 dereferenceable(36) %7, ptr noundef nonnull align 4 dereferenceable(36) %6)
  %35 = getelementptr inbounds i8, ptr %0, i64 16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %35, ptr noundef nonnull align 4 dereferenceable(36) %8, i64 36, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %6) #7
  br label %47

36:                                               ; preds = %5
  %37 = fsub float %3, %1
  %38 = fsub float %4, %2
  %39 = fmul float %38, %38
  %40 = tail call float @llvm.fmuladd.f32(float %37, float %37, float %39)
  %41 = tail call noundef float @_ZSt4sqrtf(float noundef %40)
  %42 = fcmp olt float %41, 0x3EB0C6F7A0000000
  br i1 %42, label %47, label %43

43:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #7
  %44 = tail call { <2 x float>, float } @_ZN3vclL20trackball_projectionEfff(float noundef %1, float noundef %2, float noundef 1.000000e+00)
  %.fca.0.extract1 = extractvalue { <2 x float>, float } %44, 0
  %.fca.1.extract2 = extractvalue { <2 x float>, float } %44, 1
  store <2 x float> %.fca.0.extract1, ptr %9, align 8
  %.sroa.24.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  store float %.fca.1.extract2, ptr %.sroa.24.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #7
  %45 = tail call { <2 x float>, float } @_ZN3vclL20trackball_projectionEfff(float noundef %3, float noundef %4, float noundef 1.000000e+00)
  %.fca.0.extract = extractvalue { <2 x float>, float } %45, 0
  %.fca.1.extract = extractvalue { <2 x float>, float } %45, 1
  store <2 x float> %.fca.0.extract, ptr %10, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 8
  store float %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %11) #7
  call void @_ZN3vcl28rotation_between_vector_mat3ERKNS_12buffer_stackIfLm3EEES3_(ptr dead_on_unwind nonnull writable sret(%"struct.vcl::mat.0") align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %12) #7
  %46 = getelementptr inbounds i8, ptr %0, i64 16
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %13) #7
  call void @_ZN3vcl9transposeILm3EEENS_3matIXT_EXT_EEERKS2_(ptr dead_on_unwind nonnull writable sret(%"struct.vcl::mat.0") align 4 %13, ptr noundef nonnull align 4 dereferenceable(36) %11)
  call void @_ZN3vclmlILm3ELm3ELm3EEENS_3matIXT_EXT1_EEERKNS1_IXT_EXT0_EEERKNS1_IXT0_EXT1_EEE(ptr dead_on_unwind nonnull writable sret(%"struct.vcl::mat.0") align 4 %12, ptr noundef nonnull align 4 dereferenceable(36) %46, ptr noundef nonnull align 4 dereferenceable(36) %13)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(36) %46, ptr noundef nonnull align 4 dereferenceable(36) %12, i64 36, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #7
  br label %47

47:                                               ; preds = %43, %36, %5, %16
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3cosf(float noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt3sinf(float noundef) local_unnamed_addr #4

declare void @_ZN3vcl3matILm3ELm3EEC1Efffffffff(ptr noundef nonnull align 4 dereferenceable(36), float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef, float noundef) unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3vclmlILm3ELm3ELm3EEENS_3matIXT_EXT1_EEERKNS1_IXT_EXT0_EEERKNS1_IXT0_EXT1_EEE(ptr dead_on_unwind noalias writable sret(%"struct.vcl::mat.0") align 4, ptr noundef nonnull align 4 dereferenceable(36), ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #6

; Function Attrs: mustprogress uwtable
declare hidden { <2 x float>, float } @_ZN3vclL20trackball_projectionEfff(float noundef, float noundef, float noundef) local_unnamed_addr #1

declare void @_ZN3vcl28rotation_between_vector_mat3ERKNS_12buffer_stackIfLm3EEES3_(ptr dead_on_unwind writable sret(%"struct.vcl::mat.0") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { 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 #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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, !13, i64 68}
!6 = !{!"_ZTSN3vcl12camera_sceneE", !7, i64 0, !10, i64 4, !11, i64 16, !12, i64 52, !13, i64 68, !14, i64 72}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3vcl12buffer_stackIfLm3EEE", !7, i64 0, !7, i64 4, !7, i64 8}
!11 = !{!"_ZTSN3vcl3matILm3ELm3EEE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32}
!12 = !{!"_ZTSN3vcl21perspective_structureE", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12}
!13 = !{!"_ZTSN3vcl19camera_control_typeE", !8, i64 0}
!14 = !{!"_ZTSN3vcl12buffer_stackIfLm2EEE", !7, i64 0, !7, i64 4}
!15 = !{!6, !7, i64 72}
!16 = !{!6, !7, i64 76}
!17 = !{i64 0, i64 4, !18, i64 4, i64 4, !18, i64 8, i64 4, !18, i64 12, i64 4, !18, i64 16, i64 4, !18, i64 20, i64 4, !18, i64 24, i64 4, !18, i64 28, i64 4, !18, i64 32, i64 4, !18}
!18 = !{!7, !7, i64 0}


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