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

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

%class.Orientation = type { i8, i32, i8, %"class.Orientation::Animation" }
%"class.Orientation::Animation" = type { i32, %"class.Framework::Timer" }
%"class.Framework::Timer" = type { i32, float, i8, i8, float, float }
%"class.glutil::MatrixStack" = type { %"class.std::stack", %"struct.glm::detail::tmat4x4" }
%"class.std::stack" = type { %"class.std::vector.6" }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<glm::detail::tmat4x4<float>, std::allocator<glm::detail::tmat4x4<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<glm::detail::tmat4x4<float>, std::allocator<glm::detail::tmat4x4<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<glm::detail::tmat4x4<float>, std::allocator<glm::detail::tmat4x4<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glm::detail::tmat4x4<float>, std::allocator<glm::detail::tmat4x4<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.glm::detail::tvec3" = type { %union.anon.11 }
%union.anon.11 = type { %struct.anon.12 }
%struct.anon.12 = type { float, float, float }
%"struct.glm::detail::tquat" = type { float, float, float, float }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.5 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.5 = type { i64, [8 x i8] }
%"class.std::allocator.2" = type { i8 }

@theProgram = external dso_local global i32, align 4
@modelToCameraMatrixUnif = external dso_local global i32, align 4
@baseColorUnif = external dso_local global i32, align 4
@_funcptr_glUseProgram = external global ptr, align 8
@_funcptr_glUniformMatrix4fv = external global ptr, align 8
@g_pShip = external dso_local global ptr, align 8
@g_orient = external dso_local global %class.Orientation, align 4
@_funcptr_glClearColor = external global ptr, align 8
@_funcptr_glClearDepth = external global ptr, align 8
@_funcptr_glClear = external global ptr, align 8
@_funcptr_glUniform4f = external global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1

; 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7displayv() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.glutil::MatrixStack", align 8
  %2 = alloca %"struct.glm::detail::tvec3", align 4
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"struct.glm::detail::tmat4x4", align 4
  %9 = alloca %"struct.glm::detail::tquat", align 4
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.2", align 1
  call void @_ZN11Orientation10UpdateTimeEv(ptr noundef nonnull align 4 dereferenceable(36) @g_orient)
  %12 = load ptr, ptr @_funcptr_glClearColor, align 8, !tbaa !5
  call void %12(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %13 = load ptr, ptr @_funcptr_glClearDepth, align 8, !tbaa !5
  call void %13(double noundef 1.000000e+00)
  %14 = load ptr, ptr @_funcptr_glClear, align 8, !tbaa !5
  call void %14(i32 noundef 16640)
  call void @llvm.lifetime.start.p0(i64 88, ptr %1) #7
  call void @_ZN6glutil11MatrixStackC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %1)
  call void @llvm.lifetime.start.p0(i64 12, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store float 0.000000e+00, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store float 0.000000e+00, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  store float -2.000000e+02, ptr %5, align 4, !tbaa !9
  invoke void @_ZN3glm6detail5tvec3IfEC2ERKfS4_S4_(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %15 unwind label %47

15:                                               ; preds = %0
  invoke void @_ZN6glutil11MatrixStack9TranslateERKN3glm6detail5tvec3IfEE(ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef nonnull align 4 dereferenceable(12) %2)
          to label %16 unwind label %47

16:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %17 = invoke { <2 x float>, <2 x float> } @_ZNK11Orientation9GetOrientEv(ptr noundef nonnull align 4 dereferenceable(36) @g_orient)
          to label %18 unwind label %51

18:                                               ; preds = %16
  %19 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  %20 = extractvalue { <2 x float>, <2 x float> } %17, 0
  store <2 x float> %20, ptr %19, align 4
  %21 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  %22 = extractvalue { <2 x float>, <2 x float> } %17, 1
  store <2 x float> %22, ptr %21, align 4
  invoke void @_ZN3glm9mat4_castIfEENS_6detail7tmat4x4IT_EERKNS1_5tquatIS3_EE(ptr dead_on_unwind writable sret(%"struct.glm::detail::tmat4x4") align 4 %8, ptr noundef nonnull align 4 dereferenceable(16) %9)
          to label %23 unwind label %51

23:                                               ; preds = %18
  invoke void @_ZN6glutil11MatrixStack11ApplyMatrixERKN3glm6detail7tmat4x4IfEE(ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef nonnull align 4 dereferenceable(64) %8)
          to label %24 unwind label %51

24:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #7
  %25 = load ptr, ptr @_funcptr_glUseProgram, align 8, !tbaa !5
  %26 = load i32, ptr @theProgram, align 4, !tbaa !11
  invoke void %25(i32 noundef %26)
          to label %27 unwind label %55

27:                                               ; preds = %24
  invoke void @_ZN6glutil11MatrixStack5ScaleEfff(ptr noundef nonnull align 8 dereferenceable(88) %1, float noundef 3.000000e+00, float noundef 3.000000e+00, float noundef 3.000000e+00)
          to label %28 unwind label %55

28:                                               ; preds = %27
  invoke void @_ZN6glutil11MatrixStack7RotateXEf(ptr noundef nonnull align 8 dereferenceable(88) %1, float noundef -9.000000e+01)
          to label %29 unwind label %55

29:                                               ; preds = %28
  %30 = load ptr, ptr @_funcptr_glUniform4f, align 8, !tbaa !5
  %31 = load i32, ptr @baseColorUnif, align 4, !tbaa !11
  invoke void %30(i32 noundef %31, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %32 unwind label %55

32:                                               ; preds = %29
  %33 = load ptr, ptr @_funcptr_glUniformMatrix4fv, align 8, !tbaa !5
  %34 = load i32, ptr @modelToCameraMatrixUnif, align 4, !tbaa !11
  %35 = invoke noundef nonnull align 4 dereferenceable(64) ptr @_ZNK6glutil11MatrixStack3TopEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
          to label %36 unwind label %55

36:                                               ; preds = %32
  %37 = invoke noundef ptr @_ZN3glm9value_ptrIfEEPKT_RKNS_6detail7tmat4x4IS1_EE(ptr noundef nonnull align 4 dereferenceable(64) %35)
          to label %38 unwind label %55

38:                                               ; preds = %36
  invoke void %33(i32 noundef %34, i32 noundef 1, i8 noundef zeroext 0, ptr noundef %37)
          to label %39 unwind label %55

39:                                               ; preds = %38
  %40 = load ptr, ptr @g_pShip, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %41 unwind label %59

41:                                               ; preds = %39
  invoke void @_ZNK9Framework4Mesh6RenderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %40, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %42 unwind label %63

42:                                               ; preds = %41
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  %43 = load ptr, ptr @_funcptr_glUseProgram, align 8, !tbaa !5
  invoke void %43(i32 noundef 0)
          to label %44 unwind label %55

44:                                               ; preds = %42
  invoke void @glutSwapBuffers()
          to label %45 unwind label %55

45:                                               ; preds = %44
  invoke void @glutPostRedisplay()
          to label %46 unwind label %55

46:                                               ; preds = %45
  call void @_ZN6glutil11MatrixStackD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %1) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr %1) #7
  ret void

47:                                               ; preds = %15, %0
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %6, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr %2) #7
  br label %68

51:                                               ; preds = %23, %18, %16
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %6, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #7
  br label %68

55:                                               ; preds = %45, %44, %42, %38, %36, %32, %29, %28, %27, %24
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %6, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %7, align 4
  br label %68

59:                                               ; preds = %39
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %6, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %7, align 4
  br label %67

63:                                               ; preds = %41
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %6, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %67

67:                                               ; preds = %63, %59
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  br label %68

68:                                               ; preds = %67, %55, %51, %47
  call void @_ZN6glutil11MatrixStackD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %1) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr %1) #7
  br label %69

69:                                               ; preds = %68
  %70 = load ptr, ptr %6, align 8
  %71 = load i32, ptr %7, align 4
  %72 = insertvalue { ptr, i32 } poison, ptr %70, 0
  %73 = insertvalue { ptr, i32 } %72, i32 %71, 1
  resume { ptr, i32 } %73
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11Orientation10UpdateTimeEv(ptr noundef nonnull align 4 dereferenceable(36)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6glutil11MatrixStackC2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2 align 2

declare void @_ZN6glutil11MatrixStack9TranslateERKN3glm6detail5tvec3IfEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 4 dereferenceable(12)) #4

; 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 #5 align 2

declare void @_ZN6glutil11MatrixStack11ApplyMatrixERKN3glm6detail7tmat4x4IfEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 4 dereferenceable(64)) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZNK11Orientation9GetOrientEv(ptr noundef nonnull align 4 dereferenceable(36)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6glutil11MatrixStack5ScaleEfff(ptr noundef nonnull align 8 dereferenceable(88), float noundef, float noundef, float noundef) #2 align 2

declare void @_ZN6glutil11MatrixStack7RotateXEf(ptr noundef nonnull align 8 dereferenceable(88), float noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN3glm9value_ptrIfEEPKT_RKNS_6detail7tmat4x4IS1_EE(ptr noundef nonnull align 4 dereferenceable(64)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(64) ptr @_ZNK6glutil11MatrixStack3TopEv(ptr noundef nonnull align 8 dereferenceable(88)) #1 align 2

declare void @_ZNK9Framework4Mesh6RenderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #4

declare void @glutSwapBuffers() #4

declare void @glutPostRedisplay() #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6glutil11MatrixStackD2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 = { "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 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 = { 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 #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, !12, i64 0}
!12 = !{!"int", !7, i64 0}


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

%class.Orientation = type { i8, i32, i8, %"class.Orientation::Animation" }
%"class.Orientation::Animation" = type { i32, %"class.Framework::Timer" }
%"class.Framework::Timer" = type { i32, float, i8, i8, float, float }
%"class.glutil::MatrixStack" = type { %"class.std::stack", %"struct.glm::detail::tmat4x4" }
%"class.std::stack" = type { %"class.std::vector.6" }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<glm::detail::tmat4x4<float>, std::allocator<glm::detail::tmat4x4<float>>>::_Vector_impl" }
%"struct.std::_Vector_base<glm::detail::tmat4x4<float>, std::allocator<glm::detail::tmat4x4<float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<glm::detail::tmat4x4<float>, std::allocator<glm::detail::tmat4x4<float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<glm::detail::tmat4x4<float>, std::allocator<glm::detail::tmat4x4<float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.glm::detail::tvec3" = type { %union.anon.11 }
%union.anon.11 = type { %struct.anon.12 }
%struct.anon.12 = type { float, float, float }
%"struct.glm::detail::tquat" = type { float, float, float, float }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.5 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.5 = type { i64, [8 x i8] }
%"class.std::allocator.2" = type { i8 }

@theProgram = external dso_local local_unnamed_addr global i32, align 4
@modelToCameraMatrixUnif = external dso_local local_unnamed_addr global i32, align 4
@baseColorUnif = external dso_local local_unnamed_addr global i32, align 4
@_funcptr_glUseProgram = external local_unnamed_addr global ptr, align 8
@_funcptr_glUniformMatrix4fv = external local_unnamed_addr global ptr, align 8
@g_pShip = external dso_local local_unnamed_addr global ptr, align 8
@g_orient = external dso_local global %class.Orientation, align 4
@_funcptr_glClearColor = external local_unnamed_addr global ptr, align 8
@_funcptr_glClearDepth = external local_unnamed_addr global ptr, align 8
@_funcptr_glClear = external local_unnamed_addr global ptr, align 8
@_funcptr_glUniform4f = external local_unnamed_addr global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [5 x i8], align 1

; 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7displayv() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.glutil::MatrixStack", align 8
  %2 = alloca %"struct.glm::detail::tvec3", align 4
  %3 = alloca float, align 4
  %4 = alloca float, align 4
  %5 = alloca float, align 4
  %6 = alloca %"struct.glm::detail::tmat4x4", align 4
  %7 = alloca %"struct.glm::detail::tquat", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.2", align 1
  tail call void @_ZN11Orientation10UpdateTimeEv(ptr noundef nonnull align 4 dereferenceable(36) @g_orient)
  %10 = load ptr, ptr @_funcptr_glClearColor, align 8, !tbaa !5
  tail call void %10(float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %11 = load ptr, ptr @_funcptr_glClearDepth, align 8, !tbaa !5
  tail call void %11(double noundef 1.000000e+00)
  %12 = load ptr, ptr @_funcptr_glClear, align 8, !tbaa !5
  tail call void %12(i32 noundef 16640)
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %1) #7
  call void @_ZN6glutil11MatrixStackC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %1)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  store float 0.000000e+00, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #7
  store float 0.000000e+00, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  store float -2.000000e+02, ptr %5, align 4, !tbaa !9
  call void @_ZN3glm6detail5tvec3IfEC2ERKfS4_S4_(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  invoke void @_ZN6glutil11MatrixStack9TranslateERKN3glm6detail5tvec3IfEE(ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef nonnull align 4 dereferenceable(12) %2)
          to label %13 unwind label %42

13:                                               ; preds = %0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  %14 = invoke { <2 x float>, <2 x float> } @_ZNK11Orientation9GetOrientEv(ptr noundef nonnull align 4 dereferenceable(36) @g_orient)
          to label %15 unwind label %44

15:                                               ; preds = %13
  %16 = extractvalue { <2 x float>, <2 x float> } %14, 0
  store <2 x float> %16, ptr %7, align 8
  %17 = getelementptr inbounds i8, ptr %7, i64 8
  %18 = extractvalue { <2 x float>, <2 x float> } %14, 1
  store <2 x float> %18, ptr %17, align 8
  invoke void @_ZN3glm9mat4_castIfEENS_6detail7tmat4x4IT_EERKNS1_5tquatIS3_EE(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tmat4x4") align 4 %6, ptr noundef nonnull align 4 dereferenceable(16) %7)
          to label %19 unwind label %44

19:                                               ; preds = %15
  invoke void @_ZN6glutil11MatrixStack11ApplyMatrixERKN3glm6detail7tmat4x4IfEE(ptr noundef nonnull align 8 dereferenceable(88) %1, ptr noundef nonnull align 4 dereferenceable(64) %6)
          to label %20 unwind label %44

20:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #7
  %21 = load ptr, ptr @_funcptr_glUseProgram, align 8, !tbaa !5
  %22 = load i32, ptr @theProgram, align 4, !tbaa !11
  invoke void %21(i32 noundef %22)
          to label %23 unwind label %46

23:                                               ; preds = %20
  invoke void @_ZN6glutil11MatrixStack5ScaleEfff(ptr noundef nonnull align 8 dereferenceable(88) %1, float noundef 3.000000e+00, float noundef 3.000000e+00, float noundef 3.000000e+00)
          to label %24 unwind label %46

24:                                               ; preds = %23
  invoke void @_ZN6glutil11MatrixStack7RotateXEf(ptr noundef nonnull align 8 dereferenceable(88) %1, float noundef -9.000000e+01)
          to label %25 unwind label %46

25:                                               ; preds = %24
  %26 = load ptr, ptr @_funcptr_glUniform4f, align 8, !tbaa !5
  %27 = load i32, ptr @baseColorUnif, align 4, !tbaa !11
  invoke void %26(i32 noundef %27, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00, float noundef 1.000000e+00)
          to label %28 unwind label %46

28:                                               ; preds = %25
  %29 = load ptr, ptr @_funcptr_glUniformMatrix4fv, align 8, !tbaa !5
  %30 = load i32, ptr @modelToCameraMatrixUnif, align 4, !tbaa !11
  %31 = call noundef nonnull align 4 dereferenceable(64) ptr @_ZNK6glutil11MatrixStack3TopEv(ptr noundef nonnull align 8 dereferenceable(88) %1)
  %32 = invoke noundef ptr @_ZN3glm9value_ptrIfEEPKT_RKNS_6detail7tmat4x4IS1_EE(ptr noundef nonnull align 4 dereferenceable(64) %31)
          to label %33 unwind label %46

33:                                               ; preds = %28
  invoke void %29(i32 noundef %30, i32 noundef 1, i8 noundef zeroext 0, ptr noundef %32)
          to label %34 unwind label %46

34:                                               ; preds = %33
  %35 = load ptr, ptr @g_pShip, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %36 unwind label %48

36:                                               ; preds = %34
  invoke void @_ZNK9Framework4Mesh6RenderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %37 unwind label %50

37:                                               ; preds = %36
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  %38 = load ptr, ptr @_funcptr_glUseProgram, align 8, !tbaa !5
  invoke void %38(i32 noundef 0)
          to label %39 unwind label %46

39:                                               ; preds = %37
  invoke void @glutSwapBuffers()
          to label %40 unwind label %46

40:                                               ; preds = %39
  invoke void @glutPostRedisplay()
          to label %41 unwind label %46

41:                                               ; preds = %40
  call void @_ZN6glutil11MatrixStackD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %1) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %1) #7
  ret void

42:                                               ; preds = %0
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #7
  br label %53

44:                                               ; preds = %19, %15, %13
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #7
  br label %53

46:                                               ; preds = %40, %39, %37, %33, %28, %25, %24, %23, %20
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %53

48:                                               ; preds = %34
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

50:                                               ; preds = %36
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  br label %52

52:                                               ; preds = %50, %48
  %.pn = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  br label %53

53:                                               ; preds = %52, %46, %44, %42
  %.pn4 = phi { ptr, i32 } [ %47, %46 ], [ %.pn, %52 ], [ %45, %44 ], [ %43, %42 ]
  call void @_ZN6glutil11MatrixStackD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %1) #7
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn4
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11Orientation10UpdateTimeEv(ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6glutil11MatrixStackC2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2 align 2

declare void @_ZN6glutil11MatrixStack9TranslateERKN3glm6detail5tvec3IfEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #4

; 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 #5 align 2

declare void @_ZN6glutil11MatrixStack11ApplyMatrixERKN3glm6detail7tmat4x4IfEE(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local { <2 x float>, <2 x float> } @_ZNK11Orientation9GetOrientEv(ptr noundef nonnull align 4 dereferenceable(36)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6glutil11MatrixStack5ScaleEfff(ptr noundef nonnull align 8 dereferenceable(88), float noundef, float noundef, float noundef) local_unnamed_addr #2 align 2

declare void @_ZN6glutil11MatrixStack7RotateXEf(ptr noundef nonnull align 8 dereferenceable(88), float noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN3glm9value_ptrIfEEPKT_RKNS_6detail7tmat4x4IS1_EE(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(64) ptr @_ZNK6glutil11MatrixStack3TopEv(ptr noundef nonnull align 8 dereferenceable(88)) local_unnamed_addr #1 align 2

declare void @_ZNK9Framework4Mesh6RenderERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4

declare void @glutSwapBuffers() local_unnamed_addr #4

declare void @glutPostRedisplay() local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6glutil11MatrixStackD2Ev(ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { 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 = { "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 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 = { 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 #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, !12, i64 0}
!12 = !{!"int", !7, i64 0}


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