; LLVM IR from paroj/gltut :: Tut 08 Getting Oriented/CameraRelative.ll (Z17OffsetOrientationRKN3glm6detail5tvec3IfEEf)

; 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.glm::detail::tvec3" = type { %union.anon.6 }
%union.anon.6 = type { %struct.anon.7 }
%struct.anon.7 = type { float, float, float }
%"struct.glm::detail::tquat" = type { float, float, float, float }
%"struct.glm::detail::tmat4x4" = type { [4 x %"struct.glm::detail::tvec4"] }
%"struct.glm::detail::tvec4" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float, float }
%struct.anon.9 = type { float, float, float }

@_ZL11g_camTarget = external hidden global %"struct.glm::detail::tvec3", align 4
@_ZL13g_orientation = external hidden global %"struct.glm::detail::tquat", align 4
@_ZL9g_iOffset = external hidden global i32, align 4

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3glm6detail5tvec3IfEC2ERKfS4_S4_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3glm6detail5tquatIfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z18ResolveCamPositionv(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec3") align 4) #2

declare noundef float @_ZN9Framework8DegToRadEf(float noundef) #3

; Function Attrs: nounwind
declare float @sinf(float noundef) #4

; Function Attrs: nounwind
declare float @cosf(float noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm6detailmlIfEENS0_5tvec3IT_EERKS4_RKS3_(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16CalcLookAtMatrixRKN3glm6detail5tvec3IfEES4_S4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tmat4x4") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm9normalizeIfEENS_6detail5tvec3IT_EERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17OffsetOrientationRKN3glm6detail5tvec3IfEEf(ptr noundef nonnull align 4 dereferenceable(12) %0, float noundef %1) #6 {
  %3 = alloca ptr, align 8
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca %"struct.glm::detail::tvec3", align 4
  %7 = alloca %"struct.glm::detail::tvec3", align 4
  %8 = alloca float, align 4
  %9 = alloca float, align 4
  %10 = alloca %"struct.glm::detail::tquat", align 4
  %11 = alloca %"struct.glm::detail::tquat", align 4
  %12 = alloca %"struct.glm::detail::tquat", align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.glm::detail::tvec3", align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.glm::detail::tmat4x4", align 4
  %17 = alloca %"struct.glm::detail::tvec3", align 4
  %18 = alloca float, align 4
  %19 = alloca float, align 4
  %20 = alloca float, align 4
  %21 = alloca %"struct.glm::detail::tquat", align 4
  %22 = alloca %"struct.glm::detail::tquat", align 4
  %23 = alloca ptr, align 8
  %24 = alloca %"struct.glm::detail::tquat", align 4
  %25 = alloca %"struct.glm::detail::tquat", align 4
  %26 = alloca %"struct.glm::detail::tquat", align 4
  %27 = alloca %"struct.glm::detail::tquat", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store float %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #9
  %28 = load float, ptr %4, align 4, !tbaa !9
  %29 = call noundef float @_ZN9Framework8DegToRadEf(float noundef %28)
  store float %29, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 12, ptr %6) #9
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  call void @_ZN3glm9normalizeIfEENS_6detail5tvec3IT_EERKS4_(ptr dead_on_unwind writable sret(%"struct.glm::detail::tvec3") align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %30)
  call void @llvm.lifetime.start.p0(i64 12, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #9
  %31 = load float, ptr %5, align 4, !tbaa !9
  %32 = fdiv float %31, 2.000000e+00
  %33 = call float @sinf(float noundef %32) #9
  store float %33, ptr %8, align 4, !tbaa !9
  call void @_ZN3glm6detailmlIfEENS0_5tvec3IT_EERKS4_RKS3_(ptr dead_on_unwind writable sret(%"struct.glm::detail::tvec3") align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %34 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3glm6detail5tvec3IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(12) %6, ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %7) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %35 = load float, ptr %5, align 4, !tbaa !9
  %36 = fdiv float %35, 2.000000e+00
  %37 = call float @cosf(float noundef %36) #9
  store float %37, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #9
  %38 = getelementptr inbounds %"struct.glm::detail::tvec3", ptr %6, i32 0, i32 0
  %39 = getelementptr inbounds %struct.anon.9, ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds %"struct.glm::detail::tvec3", ptr %6, i32 0, i32 0
  %41 = getelementptr inbounds %struct.anon.9, ptr %40, i32 0, i32 1
  %42 = getelementptr inbounds %"struct.glm::detail::tvec3", ptr %6, i32 0, i32 0
  %43 = getelementptr inbounds %struct.anon.9, ptr %42, i32 0, i32 2
  call void @_ZN3glm6detail5tquatIfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %39, ptr noundef nonnull align 4 dereferenceable(4) %41, ptr noundef nonnull align 4 dereferenceable(4) %43)
  %44 = load i32, ptr @_ZL9g_iOffset, align 4, !tbaa !11
  switch i32 %44, label %86 [
    i32 0, label %45
    i32 1, label %51
    i32 2, label %57
  ]

45:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #9
  %46 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) @_ZL13g_orientation, ptr noundef nonnull align 4 dereferenceable(16) %10)
  %47 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %11, i32 0, i32 0
  %48 = extractvalue { <2 x float>, <2 x float> } %46, 0
  store <2 x float> %48, ptr %47, align 4
  %49 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %11, i32 0, i32 1
  %50 = extractvalue { <2 x float>, <2 x float> } %46, 1
  store <2 x float> %50, ptr %49, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 @_ZL13g_orientation, ptr align 4 %11, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #9
  br label %86

51:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #9
  %52 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(16) @_ZL13g_orientation)
  %53 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %12, i32 0, i32 0
  %54 = extractvalue { <2 x float>, <2 x float> } %52, 0
  store <2 x float> %54, ptr %53, align 4
  %55 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %12, i32 0, i32 1
  %56 = extractvalue { <2 x float>, <2 x float> } %52, 1
  store <2 x float> %56, ptr %55, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 @_ZL13g_orientation, ptr align 4 %12, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #9
  br label %86

57:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 12, ptr %14) #9
  call void @_Z18ResolveCamPositionv(ptr dead_on_unwind writable sret(%"struct.glm::detail::tvec3") align 4 %14)
  store ptr %14, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 64, ptr %16) #9
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #9
  store float 0.000000e+00, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #9
  store float 1.000000e+00, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #9
  store float 0.000000e+00, ptr %20, align 4, !tbaa !9
  call void @_ZN3glm6detail5tvec3IfEC2ERKfS4_S4_(ptr noundef nonnull align 4 dereferenceable(12) %17, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  call void @_Z16CalcLookAtMatrixRKN3glm6detail5tvec3IfEES4_S4_(ptr dead_on_unwind writable sret(%"struct.glm::detail::tmat4x4") align 4 %16, ptr noundef nonnull align 4 dereferenceable(12) %58, ptr noundef nonnull align 4 dereferenceable(12) @_ZL11g_camTarget, ptr noundef nonnull align 4 dereferenceable(12) %17)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %17) #9
  store ptr %16, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #9
  %59 = load ptr, ptr %15, align 8, !tbaa !5
  %60 = call { <2 x float>, <2 x float> } @_ZN3glm9quat_castIfEENS_6detail5tquatIT_EERKNS1_7tmat4x4IS3_EE(ptr noundef nonnull align 4 dereferenceable(64) %59)
  %61 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %21, i32 0, i32 0
  %62 = extractvalue { <2 x float>, <2 x float> } %60, 0
  store <2 x float> %62, ptr %61, align 4
  %63 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %21, i32 0, i32 1
  %64 = extractvalue { <2 x float>, <2 x float> } %60, 1
  store <2 x float> %64, ptr %63, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #9
  %65 = call { <2 x float>, <2 x float> } @_ZN3glm9conjugateIfEENS_6detail5tquatIT_EERKS4_(ptr noundef nonnull align 4 dereferenceable(16) %21)
  %66 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %22, i32 0, i32 0
  %67 = extractvalue { <2 x float>, <2 x float> } %65, 0
  store <2 x float> %67, ptr %66, align 4
  %68 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %22, i32 0, i32 1
  %69 = extractvalue { <2 x float>, <2 x float> } %65, 1
  store <2 x float> %69, ptr %68, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #9
  %70 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(16) %10)
  %71 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %25, i32 0, i32 0
  %72 = extractvalue { <2 x float>, <2 x float> } %70, 0
  store <2 x float> %72, ptr %71, align 4
  %73 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %25, i32 0, i32 1
  %74 = extractvalue { <2 x float>, <2 x float> } %70, 1
  store <2 x float> %74, ptr %73, align 4
  %75 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) %25, ptr noundef nonnull align 4 dereferenceable(16) %21)
  %76 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %24, i32 0, i32 0
  %77 = extractvalue { <2 x float>, <2 x float> } %75, 0
  store <2 x float> %77, ptr %76, align 4
  %78 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %24, i32 0, i32 1
  %79 = extractvalue { <2 x float>, <2 x float> } %75, 1
  store <2 x float> %79, ptr %78, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #9
  store ptr %24, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #9
  %80 = load ptr, ptr %23, align 8, !tbaa !5
  %81 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) %80, ptr noundef nonnull align 4 dereferenceable(16) @_ZL13g_orientation)
  %82 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %26, i32 0, i32 0
  %83 = extractvalue { <2 x float>, <2 x float> } %81, 0
  store <2 x float> %83, ptr %82, align 4
  %84 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %26, i32 0, i32 1
  %85 = extractvalue { <2 x float>, <2 x float> } %81, 1
  store <2 x float> %85, ptr %84, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 @_ZL13g_orientation, ptr align 4 %26, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %86

86:                                               ; preds = %57, %51, %45, %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #9
  %87 = call { <2 x float>, <2 x float> } @_ZN3glm9normalizeIfEENS_6detail5tquatIT_EERKS4_(ptr noundef nonnull align 4 dereferenceable(16) @_ZL13g_orientation)
  %88 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %27, i32 0, i32 0
  %89 = extractvalue { <2 x float>, <2 x float> } %87, 0
  store <2 x float> %89, ptr %88, align 4
  %90 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %27, i32 0, i32 1
  %91 = extractvalue { <2 x float>, <2 x float> } %87, 1
  store <2 x float> %91, ptr %90, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 @_ZL13g_orientation, ptr align 4 %27, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 12, ptr %6) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #9
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN3glm6detail5tvec3IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #5

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm9quat_castIfEENS_6detail5tquatIT_EERKNS1_7tmat4x4IS3_EE(ptr noundef nonnull align 4 dereferenceable(64)) #8

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm9conjugateIfEENS_6detail5tquatIT_EERKS4_(ptr noundef nonnull align 4 dereferenceable(16)) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm9normalizeIfEENS_6detail5tquatIT_EERKS4_(ptr noundef nonnull align 4 dereferenceable(16)) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { 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 #5 = { inlinehint 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 #6 = { 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 #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { inlinehint 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 #9 = { 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, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, 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.glm::detail::tvec3" = type { %union.anon.6 }
%union.anon.6 = type { %struct.anon.7 }
%struct.anon.7 = type { float, float, float }
%"struct.glm::detail::tquat" = type { float, float, float, float }
%"struct.glm::detail::tmat4x4" = type { [4 x %"struct.glm::detail::tvec4"] }
%"struct.glm::detail::tvec4" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float, float }

@_ZL11g_camTarget = external hidden global %"struct.glm::detail::tvec3", align 4
@_ZL13g_orientation = external hidden global %"struct.glm::detail::tquat", align 4
@_ZL9g_iOffset = external hidden local_unnamed_addr global i32, align 4

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3glm6detail5tvec3IfEC2ERKfS4_S4_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3glm6detail5tquatIfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z18ResolveCamPositionv(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec3") align 4) local_unnamed_addr #2

declare noundef float @_ZN9Framework8DegToRadEf(float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @sinf(float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare float @cosf(float noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm6detailmlIfEENS0_5tvec3IT_EERKS4_RKS3_(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec3") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z16CalcLookAtMatrixRKN3glm6detail5tvec3IfEES4_S4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tmat4x4") align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm9normalizeIfEENS_6detail5tvec3IT_EERKS4_(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec3") align 4, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17OffsetOrientationRKN3glm6detail5tvec3IfEEf(ptr noundef nonnull align 4 dereferenceable(12) %0, float noundef %1) local_unnamed_addr #6 {
  %3 = alloca %"struct.glm::detail::tvec3", align 4
  %4 = alloca %"struct.glm::detail::tvec3", align 4
  %5 = alloca float, align 4
  %6 = alloca float, align 4
  %7 = alloca %"struct.glm::detail::tquat", align 4
  %8 = alloca %"struct.glm::detail::tvec3", align 4
  %9 = alloca %"struct.glm::detail::tmat4x4", align 4
  %10 = alloca %"struct.glm::detail::tvec3", align 4
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca %"struct.glm::detail::tquat", align 8
  %15 = alloca %"struct.glm::detail::tquat", align 8
  %16 = alloca %"struct.glm::detail::tquat", align 8
  %17 = alloca %"struct.glm::detail::tquat", align 8
  %18 = tail call noundef float @_ZN9Framework8DegToRadEf(float noundef %1)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %3) #8
  call void @_ZN3glm9normalizeIfEENS_6detail5tvec3IT_EERKS4_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tvec3") align 4 %3, ptr noundef nonnull align 4 dereferenceable(12) %0)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %19 = fmul float %18, 5.000000e-01
  %20 = call float @sinf(float noundef %19) #8
  store float %20, ptr %5, align 4, !tbaa !5
  call void @_ZN3glm6detailmlIfEENS0_5tvec3IT_EERKS4_RKS3_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tvec3") align 4 %4, ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %21 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN3glm6detail5tvec3IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(12) %3, ptr noundef nonnull align 4 dereferenceable(12) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  %22 = call float @cosf(float noundef %19) #8
  store float %22, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  %23 = getelementptr inbounds i8, ptr %3, i64 4
  %24 = getelementptr inbounds i8, ptr %3, i64 8
  call void @_ZN3glm6detail5tquatIfEC2ERKfS4_S4_S4_(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 4 dereferenceable(4) %24)
  %25 = load i32, ptr @_ZL9g_iOffset, align 4, !tbaa !9
  switch i32 %25, label %54 [
    i32 0, label %26
    i32 1, label %30
    i32 2, label %34
  ]

26:                                               ; preds = %2
  %27 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) @_ZL13g_orientation, ptr noundef nonnull align 4 dereferenceable(16) %7)
  %28 = extractvalue { <2 x float>, <2 x float> } %27, 0
  %29 = extractvalue { <2 x float>, <2 x float> } %27, 1
  store <2 x float> %28, ptr @_ZL13g_orientation, align 4
  store <2 x float> %29, ptr getelementptr inbounds (i8, ptr @_ZL13g_orientation, i64 8), align 4
  br label %54

30:                                               ; preds = %2
  %31 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(16) @_ZL13g_orientation)
  %32 = extractvalue { <2 x float>, <2 x float> } %31, 0
  %33 = extractvalue { <2 x float>, <2 x float> } %31, 1
  store <2 x float> %32, ptr @_ZL13g_orientation, align 4
  store <2 x float> %33, ptr getelementptr inbounds (i8, ptr @_ZL13g_orientation, i64 8), align 4
  br label %54

34:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #8
  call void @_Z18ResolveCamPositionv(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tvec3") align 4 %8)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #8
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #8
  store float 0.000000e+00, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #8
  store float 1.000000e+00, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #8
  store float 0.000000e+00, ptr %13, align 4, !tbaa !5
  call void @_ZN3glm6detail5tvec3IfEC2ERKfS4_S4_(ptr noundef nonnull align 4 dereferenceable(12) %10, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
  call void @_Z16CalcLookAtMatrixRKN3glm6detail5tvec3IfEES4_S4_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tmat4x4") align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) @_ZL11g_camTarget, ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #8
  %35 = call { <2 x float>, <2 x float> } @_ZN3glm9quat_castIfEENS_6detail5tquatIT_EERKNS1_7tmat4x4IS3_EE(ptr noundef nonnull align 4 dereferenceable(64) %9)
  %36 = extractvalue { <2 x float>, <2 x float> } %35, 0
  store <2 x float> %36, ptr %14, align 8
  %37 = getelementptr inbounds i8, ptr %14, i64 8
  %38 = extractvalue { <2 x float>, <2 x float> } %35, 1
  store <2 x float> %38, ptr %37, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #8
  %39 = call { <2 x float>, <2 x float> } @_ZN3glm9conjugateIfEENS_6detail5tquatIT_EERKS4_(ptr noundef nonnull align 4 dereferenceable(16) %14)
  %40 = extractvalue { <2 x float>, <2 x float> } %39, 0
  store <2 x float> %40, ptr %15, align 8
  %41 = getelementptr inbounds i8, ptr %15, i64 8
  %42 = extractvalue { <2 x float>, <2 x float> } %39, 1
  store <2 x float> %42, ptr %41, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #8
  %43 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(16) %7)
  %44 = extractvalue { <2 x float>, <2 x float> } %43, 0
  store <2 x float> %44, ptr %17, align 8
  %45 = getelementptr inbounds i8, ptr %17, i64 8
  %46 = extractvalue { <2 x float>, <2 x float> } %43, 1
  store <2 x float> %46, ptr %45, align 8
  %47 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(16) %14)
  %48 = extractvalue { <2 x float>, <2 x float> } %47, 0
  store <2 x float> %48, ptr %16, align 8
  %49 = getelementptr inbounds i8, ptr %16, i64 8
  %50 = extractvalue { <2 x float>, <2 x float> } %47, 1
  store <2 x float> %50, ptr %49, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  %51 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(16) @_ZL13g_orientation)
  %52 = extractvalue { <2 x float>, <2 x float> } %51, 0
  %53 = extractvalue { <2 x float>, <2 x float> } %51, 1
  store <2 x float> %52, ptr @_ZL13g_orientation, align 4
  store <2 x float> %53, ptr getelementptr inbounds (i8, ptr @_ZL13g_orientation, i64 8), align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #8
  br label %54

54:                                               ; preds = %34, %30, %26, %2
  %55 = call { <2 x float>, <2 x float> } @_ZN3glm9normalizeIfEENS_6detail5tquatIT_EERKS4_(ptr noundef nonnull align 4 dereferenceable(16) @_ZL13g_orientation)
  %56 = extractvalue { <2 x float>, <2 x float> } %55, 0
  %57 = extractvalue { <2 x float>, <2 x float> } %55, 1
  store <2 x float> %56, ptr @_ZL13g_orientation, align 4
  store <2 x float> %57, ptr getelementptr inbounds (i8, ptr @_ZL13g_orientation, i64 8), align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %3) #8
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN3glm6detail5tvec3IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm9quat_castIfEENS_6detail5tquatIT_EERKNS1_7tmat4x4IS3_EE(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm9conjugateIfEENS_6detail5tquatIT_EERKS4_(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm9normalizeIfEENS_6detail5tquatIT_EERKS4_(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 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 #5 = { inlinehint 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 #6 = { 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 #7 = { inlinehint 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 #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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}


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