; LLVM IR from paroj/gltut :: glsdk/glutil/source (MousePoles)

; 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::tvec2" = type { %union.anon.2 }
%union.anon.2 = type { %struct.anon.3 }
%struct.anon.3 = type { i32, i32 }
%"struct.glm::detail::tquat" = type { float, float, float, float }
%"class.glutil::ObjectPole" = type { ptr, %"struct.glutil::ObjectData", %"struct.glutil::ObjectData", float, i32, i32, i8, %"struct.glm::detail::tvec2", %"struct.glm::detail::tvec2", %"struct.glm::detail::tquat" }
%"struct.glutil::ObjectData" = type { %"struct.glm::detail::tvec3", %"struct.glm::detail::tquat" }
%"struct.glm::detail::tvec3" = type { %union.anon }
%union.anon = type { %struct.anon }
%struct.anon = type { float, float, float }
%struct.anon.5 = type { i32, i32 }

; 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 uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZN3glm9normalizeIfEENS_6detail5tquatIT_EERKS4_(ptr noundef nonnull align 4 dereferenceable(16)) #1

; 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)) #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
declare dso_local void @_ZN6glutil10ObjectPole17RotateViewDegreesERKN3glm6detail5tquatIfEEb(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 4 dereferenceable(16), i1 noundef zeroext) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6glutil10ObjectPole9MouseMoveERKN3glm6detail5tvec2IiEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 4 dereferenceable(8) %1) #3 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.glm::detail::tvec2", align 4
  %6 = alloca %"struct.glm::detail::tquat", align 4
  %7 = alloca %"struct.glm::detail::tquat", align 4
  %8 = alloca %"struct.glm::detail::tquat", align 4
  %9 = alloca %"struct.glm::detail::tquat", align 4
  %10 = alloca %"struct.glm::detail::tvec2", align 4
  %11 = alloca i32, align 4
  %12 = alloca float, align 4
  %13 = alloca %"struct.glm::detail::tquat", align 4
  %14 = alloca %"struct.glm::detail::tquat", align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %3, align 8
  %16 = getelementptr inbounds %"class.glutil::ObjectPole", ptr %15, i32 0, i32 6
  %17 = load i8, ptr %16, align 4, !tbaa !9, !range !19, !noundef !20
  %18 = trunc i8 %17 to i1
  br i1 %18, label %19, label %113

19:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %"class.glutil::ObjectPole", ptr %15, i32 0, i32 7
  call void @_ZN3glm6detailmiIiEENS0_5tvec2IT_EERKS4_S6_(ptr dead_on_unwind writable sret(%"struct.glm::detail::tvec2") align 4 %5, ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(8) %21)
  %22 = getelementptr inbounds %"class.glutil::ObjectPole", ptr %15, i32 0, i32 5
  %23 = load i32, ptr %22, align 8, !tbaa !21
  switch i32 %23, label %109 [
    i32 0, label %24
    i32 1, label %59
    i32 2, label %95
  ]

24:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  %25 = getelementptr inbounds %"struct.glm::detail::tvec2", ptr %5, i32 0, i32 0
  %26 = getelementptr inbounds %struct.anon.5, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 4, !tbaa !22
  %28 = sitofp i32 %27 to float
  %29 = getelementptr inbounds %"class.glutil::ObjectPole", ptr %15, i32 0, i32 3
  %30 = load float, ptr %29, align 8, !tbaa !23
  %31 = fmul float %28, %30
  %32 = call { <2 x float>, <2 x float> } @_ZN6glutil12_GLOBAL__N_116CalcRotationQuatEif(i32 noundef 1, float noundef %31)
  %33 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 0
  %34 = extractvalue { <2 x float>, <2 x float> } %32, 0
  store <2 x float> %34, ptr %33, align 4
  %35 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 1
  %36 = extractvalue { <2 x float>, <2 x float> } %32, 1
  store <2 x float> %36, ptr %35, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %37 = getelementptr inbounds %"struct.glm::detail::tvec2", ptr %5, i32 0, i32 0
  %38 = getelementptr inbounds %struct.anon.5, ptr %37, i32 0, i32 1
  %39 = load i32, ptr %38, align 4, !tbaa !22
  %40 = sitofp i32 %39 to float
  %41 = getelementptr inbounds %"class.glutil::ObjectPole", ptr %15, i32 0, i32 3
  %42 = load float, ptr %41, align 8, !tbaa !23
  %43 = fmul float %40, %42
  %44 = call { <2 x float>, <2 x float> } @_ZN6glutil12_GLOBAL__N_116CalcRotationQuatEif(i32 noundef 0, float noundef %43)
  %45 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  %46 = extractvalue { <2 x float>, <2 x float> } %44, 0
  store <2 x float> %46, ptr %45, align 4
  %47 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  %48 = extractvalue { <2 x float>, <2 x float> } %44, 1
  store <2 x float> %48, ptr %47, align 4
  %49 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) %9, ptr noundef nonnull align 4 dereferenceable(16) %6)
  %50 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  %51 = extractvalue { <2 x float>, <2 x float> } %49, 0
  store <2 x float> %51, ptr %50, align 4
  %52 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  %53 = extractvalue { <2 x float>, <2 x float> } %49, 1
  store <2 x float> %53, ptr %52, align 4
  %54 = call { <2 x float>, <2 x float> } @_ZN3glm9normalizeIfEENS_6detail5tquatIT_EERKS4_(ptr noundef nonnull align 4 dereferenceable(16) %8)
  %55 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 0
  %56 = extractvalue { <2 x float>, <2 x float> } %54, 0
  store <2 x float> %56, ptr %55, align 4
  %57 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 1
  %58 = extractvalue { <2 x float>, <2 x float> } %54, 1
  store <2 x float> %58, ptr %57, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 %7, i64 16, i1 false), !tbaa.struct !24
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  call void @_ZN6glutil10ObjectPole17RotateViewDegreesERKN3glm6detail5tquatIfEEb(ptr noundef nonnull align 8 dereferenceable(112) %15, ptr noundef nonnull align 4 dereferenceable(16) %6, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #6
  br label %109

59:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.glutil::ObjectPole", ptr %15, i32 0, i32 8
  call void @_ZN3glm6detailmiIiEENS0_5tvec2IT_EERKS4_S6_(ptr dead_on_unwind writable sret(%"struct.glm::detail::tvec2") align 4 %10, ptr noundef nonnull align 4 dereferenceable(8) %60, ptr noundef nonnull align 4 dereferenceable(8) %61)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %62 = getelementptr inbounds %"struct.glm::detail::tvec2", ptr %10, i32 0, i32 0
  %63 = getelementptr inbounds %struct.anon.5, ptr %62, i32 0, i32 0
  %64 = load i32, ptr %63, align 4, !tbaa !22
  %65 = call i32 @llvm.abs.i32(i32 %64, i1 true)
  %66 = getelementptr inbounds %"struct.glm::detail::tvec2", ptr %10, i32 0, i32 0
  %67 = getelementptr inbounds %struct.anon.5, ptr %66, i32 0, i32 1
  %68 = load i32, ptr %67, align 4, !tbaa !22
  %69 = call i32 @llvm.abs.i32(i32 %68, i1 true)
  %70 = icmp sgt i32 %65, %69
  br i1 %70, label %71, label %79

71:                                               ; preds = %59
  store i32 1, ptr %11, align 4, !tbaa !26
  %72 = getelementptr inbounds %"struct.glm::detail::tvec2", ptr %10, i32 0, i32 0
  %73 = getelementptr inbounds %struct.anon.5, ptr %72, i32 0, i32 0
  %74 = load i32, ptr %73, align 4, !tbaa !22
  %75 = sitofp i32 %74 to float
  %76 = getelementptr inbounds %"class.glutil::ObjectPole", ptr %15, i32 0, i32 3
  %77 = load float, ptr %76, align 8, !tbaa !23
  %78 = fmul float %75, %77
  store float %78, ptr %12, align 4, !tbaa !25
  br label %87

79:                                               ; preds = %59
  store i32 0, ptr %11, align 4, !tbaa !26
  %80 = getelementptr inbounds %"struct.glm::detail::tvec2", ptr %10, i32 0, i32 0
  %81 = getelementptr inbounds %struct.anon.5, ptr %80, i32 0, i32 1
  %82 = load i32, ptr %81, align 4, !tbaa !22
  %83 = sitofp i32 %82 to float
  %84 = getelementptr inbounds %"class.glutil::ObjectPole", ptr %15, i32 0, i32 3
  %85 = load float, ptr %84, align 8, !tbaa !23
  %86 = fmul float %83, %85
  store float %86, ptr %12, align 4, !tbaa !25
  br label %87

87:                                               ; preds = %79, %71
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %88 = load i32, ptr %11, align 4, !tbaa !26
  %89 = load float, ptr %12, align 4, !tbaa !25
  %90 = call { <2 x float>, <2 x float> } @_ZN6glutil12_GLOBAL__N_116CalcRotationQuatEif(i32 noundef %88, float noundef %89)
  %91 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 0
  %92 = extractvalue { <2 x float>, <2 x float> } %90, 0
  store <2 x float> %92, ptr %91, align 4
  %93 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %13, i32 0, i32 1
  %94 = extractvalue { <2 x float>, <2 x float> } %90, 1
  store <2 x float> %94, ptr %93, align 4
  call void @_ZN6glutil10ObjectPole17RotateViewDegreesERKN3glm6detail5tquatIfEEb(ptr noundef nonnull align 8 dereferenceable(112) %15, ptr noundef nonnull align 4 dereferenceable(16) %13, i1 noundef zeroext true)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %109

95:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  %96 = getelementptr inbounds %"struct.glm::detail::tvec2", ptr %5, i32 0, i32 0
  %97 = getelementptr inbounds %struct.anon.5, ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 4, !tbaa !22
  %99 = sub nsw i32 0, %98
  %100 = sitofp i32 %99 to float
  %101 = getelementptr inbounds %"class.glutil::ObjectPole", ptr %15, i32 0, i32 3
  %102 = load float, ptr %101, align 8, !tbaa !23
  %103 = fmul float %100, %102
  %104 = call { <2 x float>, <2 x float> } @_ZN6glutil12_GLOBAL__N_116CalcRotationQuatEif(i32 noundef 2, float noundef %103)
  %105 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %14, i32 0, i32 0
  %106 = extractvalue { <2 x float>, <2 x float> } %104, 0
  store <2 x float> %106, ptr %105, align 4
  %107 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %14, i32 0, i32 1
  %108 = extractvalue { <2 x float>, <2 x float> } %104, 1
  store <2 x float> %108, ptr %107, align 4
  call void @_ZN6glutil10ObjectPole17RotateViewDegreesERKN3glm6detail5tquatIfEEb(ptr noundef nonnull align 8 dereferenceable(112) %15, ptr noundef nonnull align 4 dereferenceable(16) %14, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  br label %109

109:                                              ; preds = %95, %87, %24, %19
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %"class.glutil::ObjectPole", ptr %15, i32 0, i32 7
  %112 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN3glm6detail5tvec2IiEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(8) %111, ptr noundef nonnull align 4 dereferenceable(8) %110)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %113

113:                                              ; preds = %109, %2
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3glm6detailmiIiEENS0_5tvec2IT_EERKS4_S6_(ptr dead_on_unwind noalias writable sret(%"struct.glm::detail::tvec2") align 4, ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN3glm6detail5tvec2IiEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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, !17, i64 76}
!10 = !{!"_ZTSN6glutil10ObjectPoleE", !6, i64 0, !11, i64 8, !11, i64 36, !14, i64 64, !15, i64 68, !16, i64 72, !17, i64 76, !18, i64 80, !18, i64 88, !13, i64 96}
!11 = !{!"_ZTSN6glutil10ObjectDataE", !12, i64 0, !13, i64 12}
!12 = !{!"_ZTSN3glm6detail5tvec3IfEE", !7, i64 0}
!13 = !{!"_ZTSN3glm6detail5tquatIfEE", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTSN6glutil12MouseButtonsE", !7, i64 0}
!16 = !{!"_ZTSN6glutil10ObjectPole10RotateModeE", !7, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSN3glm6detail5tvec2IiEE", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!10, !16, i64 72}
!22 = !{!7, !7, i64 0}
!23 = !{!10, !14, i64 64}
!24 = !{i64 0, i64 4, !25, i64 4, i64 4, !25, i64 8, i64 4, !25, i64 12, i64 4, !25}
!25 = !{!14, !14, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"_ZTSN6glutil10ObjectPole4AxisE", !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"

%"struct.glm::detail::tvec2" = type { %union.anon.2 }
%union.anon.2 = type { %struct.anon.3 }
%struct.anon.3 = type { i32, i32 }
%"struct.glm::detail::tquat" = type { float, 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: 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 #1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6glutil10ObjectPole17RotateViewDegreesERKN3glm6detail5tquatIfEEb(ptr noundef nonnull align 8 dereferenceable(112), ptr noundef nonnull align 4 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6glutil10ObjectPole9MouseMoveERKN3glm6detail5tvec2IiEE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 4 dereferenceable(8) %1) local_unnamed_addr #2 align 2 {
  %3 = alloca %"struct.glm::detail::tvec2", align 4
  %4 = alloca %"struct.glm::detail::tquat", align 8
  %5 = alloca %"struct.glm::detail::tquat", align 8
  %6 = alloca %"struct.glm::detail::tquat", align 8
  %7 = alloca %"struct.glm::detail::tvec2", align 4
  %8 = alloca %"struct.glm::detail::tquat", align 8
  %9 = alloca %"struct.glm::detail::tquat", align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 76
  %11 = load i8, ptr %10, align 4, !tbaa !5, !range !18, !noundef !19
  %12 = trunc nuw i8 %11 to i1
  br i1 %12, label %13, label %72

13:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %14 = getelementptr inbounds i8, ptr %0, i64 80
  call void @_ZN3glm6detailmiIiEENS0_5tvec2IT_EERKS4_S6_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tvec2") align 4 %3, ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %14)
  %15 = getelementptr inbounds i8, ptr %0, i64 72
  %16 = load i32, ptr %15, align 8, !tbaa !20
  switch i32 %16, label %70 [
    i32 0, label %17
    i32 1, label %43
    i32 2, label %59
  ]

17:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %18 = load i32, ptr %3, align 4, !tbaa !21
  %19 = sitofp i32 %18 to float
  %20 = getelementptr inbounds i8, ptr %0, i64 64
  %21 = load float, ptr %20, align 8, !tbaa !22
  %22 = fmul float %21, %19
  %23 = call { <2 x float>, <2 x float> } @_ZN6glutil12_GLOBAL__N_116CalcRotationQuatEif(i32 noundef 1, float noundef %22)
  %24 = extractvalue { <2 x float>, <2 x float> } %23, 0
  store <2 x float> %24, ptr %4, align 8
  %25 = getelementptr inbounds i8, ptr %4, i64 8
  %26 = extractvalue { <2 x float>, <2 x float> } %23, 1
  store <2 x float> %26, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %27 = getelementptr inbounds i8, ptr %3, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !21
  %29 = sitofp i32 %28 to float
  %30 = load float, ptr %20, align 8, !tbaa !22
  %31 = fmul float %30, %29
  %32 = call { <2 x float>, <2 x float> } @_ZN6glutil12_GLOBAL__N_116CalcRotationQuatEif(i32 noundef 0, float noundef %31)
  %33 = extractvalue { <2 x float>, <2 x float> } %32, 0
  store <2 x float> %33, ptr %6, align 8
  %34 = getelementptr inbounds i8, ptr %6, i64 8
  %35 = extractvalue { <2 x float>, <2 x float> } %32, 1
  store <2 x float> %35, ptr %34, align 8
  %36 = call { <2 x float>, <2 x float> } @_ZN3glm6detailmlIfEENS0_5tquatIT_EERKS4_S6_(ptr noundef nonnull align 4 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(16) %4)
  %37 = extractvalue { <2 x float>, <2 x float> } %36, 0
  store <2 x float> %37, ptr %5, align 8
  %38 = getelementptr inbounds i8, ptr %5, i64 8
  %39 = extractvalue { <2 x float>, <2 x float> } %36, 1
  store <2 x float> %39, ptr %38, align 8
  %40 = call { <2 x float>, <2 x float> } @_ZN3glm9normalizeIfEENS_6detail5tquatIT_EERKS4_(ptr noundef nonnull align 4 dereferenceable(16) %5)
  %41 = extractvalue { <2 x float>, <2 x float> } %40, 0
  %42 = extractvalue { <2 x float>, <2 x float> } %40, 1
  store <2 x float> %41, ptr %4, align 8
  store <2 x float> %42, ptr %25, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  call void @_ZN6glutil10ObjectPole17RotateViewDegreesERKN3glm6detail5tquatIfEEb(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 4 dereferenceable(16) %4, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %70

43:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %44 = getelementptr inbounds i8, ptr %0, i64 88
  call void @_ZN3glm6detailmiIiEENS0_5tvec2IT_EERKS4_S6_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tvec2") align 4 %7, ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %44)
  %45 = load i32, ptr %7, align 4, !tbaa !21
  %46 = call i32 @llvm.abs.i32(i32 %45, i1 true)
  %47 = getelementptr inbounds i8, ptr %7, i64 4
  %48 = load i32, ptr %47, align 4, !tbaa !21
  %49 = call i32 @llvm.abs.i32(i32 %48, i1 true)
  %50 = icmp ugt i32 %46, %49
  %51 = getelementptr inbounds i8, ptr %0, i64 64
  %52 = load float, ptr %51, align 8, !tbaa !22
  %. = select i1 %50, i32 %45, i32 %48
  %.7 = zext i1 %50 to i32
  %53 = sitofp i32 %. to float
  %54 = fmul float %52, %53
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %55 = call { <2 x float>, <2 x float> } @_ZN6glutil12_GLOBAL__N_116CalcRotationQuatEif(i32 noundef %.7, float noundef %54)
  %56 = extractvalue { <2 x float>, <2 x float> } %55, 0
  store <2 x float> %56, ptr %8, align 8
  %57 = getelementptr inbounds i8, ptr %8, i64 8
  %58 = extractvalue { <2 x float>, <2 x float> } %55, 1
  store <2 x float> %58, ptr %57, align 8
  call void @_ZN6glutil10ObjectPole17RotateViewDegreesERKN3glm6detail5tquatIfEEb(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 4 dereferenceable(16) %8, i1 noundef zeroext true)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %70

59:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %60 = load i32, ptr %3, align 4, !tbaa !21
  %61 = sub nsw i32 0, %60
  %62 = sitofp i32 %61 to float
  %63 = getelementptr inbounds i8, ptr %0, i64 64
  %64 = load float, ptr %63, align 8, !tbaa !22
  %65 = fmul float %64, %62
  %66 = call { <2 x float>, <2 x float> } @_ZN6glutil12_GLOBAL__N_116CalcRotationQuatEif(i32 noundef 2, float noundef %65)
  %67 = extractvalue { <2 x float>, <2 x float> } %66, 0
  store <2 x float> %67, ptr %9, align 8
  %68 = getelementptr inbounds i8, ptr %9, i64 8
  %69 = extractvalue { <2 x float>, <2 x float> } %66, 1
  store <2 x float> %69, ptr %68, align 8
  call void @_ZN6glutil10ObjectPole17RotateViewDegreesERKN3glm6detail5tquatIfEEb(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 4 dereferenceable(16) %9, i1 noundef zeroext false)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br label %70

70:                                               ; preds = %59, %43, %17, %13
  %71 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN3glm6detail5tvec2IiEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(8) %14, ptr noundef nonnull align 4 dereferenceable(8) %1)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %72

72:                                               ; preds = %70, %2
  ret void
}

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #3

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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, !16, i64 76}
!6 = !{!"_ZTSN6glutil10ObjectPoleE", !7, i64 0, !10, i64 8, !10, i64 36, !13, i64 64, !14, i64 68, !15, i64 72, !16, i64 76, !17, i64 80, !17, i64 88, !12, i64 96}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN6glutil10ObjectDataE", !11, i64 0, !12, i64 12}
!11 = !{!"_ZTSN3glm6detail5tvec3IfEE", !8, i64 0}
!12 = !{!"_ZTSN3glm6detail5tquatIfEE", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!13 = !{!"float", !8, i64 0}
!14 = !{!"_ZTSN6glutil12MouseButtonsE", !8, i64 0}
!15 = !{!"_ZTSN6glutil10ObjectPole10RotateModeE", !8, i64 0}
!16 = !{!"bool", !8, i64 0}
!17 = !{!"_ZTSN3glm6detail5tvec2IiEE", !8, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!6, !15, i64 72}
!21 = !{!8, !8, i64 0}
!22 = !{!6, !13, i64 64}


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