; LLVM IR from paroj/gltut :: Tut 10 Plane Lights/FragmentAttenuation.ll (Z7reshapeii)

; 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.glutil::MatrixStack" = type { %"class.std::stack", %"struct.glm::detail::tmat4x4" }
%"class.std::stack" = type { %"class.std::vector.14" }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = 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.10 }
%union.anon.10 = type { %struct.anon.11 }
%struct.anon.11 = type { float, float, float, float }
%struct.ProjectionBlock = type { %"struct.glm::detail::tmat4x4" }
%struct.UnProjectionBlock = type { %"struct.glm::detail::tmat4x4", %"struct.glm::detail::tvec2" }
%"struct.glm::detail::tvec2" = type { %union.anon.6 }
%union.anon.6 = type { %struct.anon.7 }
%struct.anon.7 = type { i32, i32 }

@g_fzNear = external dso_local global float, align 4
@g_fzFar = external dso_local global float, align 4
@g_projectionUniformBuffer = external dso_local global i32, align 4
@g_unprojectionUniformBuffer = external dso_local global i32, align 4
@_funcptr_glBindBuffer = external global ptr, align 8
@_funcptr_glBufferSubData = external global ptr, align 8
@_funcptr_glViewport = external global ptr, align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare void @glutPostRedisplay() #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7reshapeii(i32 noundef %0, i32 noundef %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.glutil::MatrixStack", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.ProjectionBlock, align 4
  %9 = alloca %struct.UnProjectionBlock, align 4
  %10 = alloca %"struct.glm::detail::tmat4x4", align 4
  %11 = alloca %"struct.glm::detail::tvec2", align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 88, ptr %5) #6
  call void @_ZN6glutil11MatrixStackC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5)
  %12 = load i32, ptr %3, align 4, !tbaa !5
  %13 = sitofp i32 %12 to float
  %14 = load i32, ptr %4, align 4, !tbaa !5
  %15 = sitofp i32 %14 to float
  %16 = fdiv float %13, %15
  %17 = load float, ptr @g_fzNear, align 4, !tbaa !9
  %18 = load float, ptr @g_fzFar, align 4, !tbaa !9
  invoke void @_ZN6glutil11MatrixStack11PerspectiveEffff(ptr noundef nonnull align 8 dereferenceable(88) %5, float noundef 4.500000e+01, float noundef %16, float noundef %17, float noundef %18)
          to label %19 unwind label %54

19:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 64, ptr %8) #6
  invoke void @_ZN15ProjectionBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %8)
          to label %20 unwind label %58

20:                                               ; preds = %19
  %21 = invoke noundef nonnull align 4 dereferenceable(64) ptr @_ZNK6glutil11MatrixStack3TopEv(ptr noundef nonnull align 8 dereferenceable(88) %5)
          to label %22 unwind label %58

22:                                               ; preds = %20
  %23 = getelementptr inbounds %struct.ProjectionBlock, ptr %8, i32 0, i32 0
  %24 = invoke noundef nonnull align 4 dereferenceable(64) ptr @_ZN3glm6detail7tmat4x4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(64) %23, ptr noundef nonnull align 4 dereferenceable(64) %21)
          to label %25 unwind label %58

25:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 72, ptr %9) #6
  invoke void @_ZN17UnProjectionBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(72) %9)
          to label %26 unwind label %62

26:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 64, ptr %10) #6
  %27 = invoke noundef nonnull align 4 dereferenceable(64) ptr @_ZNK6glutil11MatrixStack3TopEv(ptr noundef nonnull align 8 dereferenceable(88) %5)
          to label %28 unwind label %66

28:                                               ; preds = %26
  invoke void @_ZN3glm7inverseIfEENS_6detail7tmat4x4IT_EERKS4_(ptr dead_on_unwind writable sret(%"struct.glm::detail::tmat4x4") align 4 %10, ptr noundef nonnull align 4 dereferenceable(64) %27)
          to label %29 unwind label %66

29:                                               ; preds = %28
  %30 = getelementptr inbounds %struct.UnProjectionBlock, ptr %9, i32 0, i32 0
  %31 = invoke noundef nonnull align 4 dereferenceable(64) ptr @_ZN3glm6detail7tmat4x4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(64) %30, ptr noundef nonnull align 4 dereferenceable(64) %10)
          to label %32 unwind label %66

32:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  invoke void @_ZN3glm6detail5tvec2IiEC2ERKiS4_(ptr noundef nonnull align 4 dereferenceable(8) %11, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %33 unwind label %70

33:                                               ; preds = %32
  %34 = getelementptr inbounds %struct.UnProjectionBlock, ptr %9, i32 0, i32 1
  %35 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZN3glm6detail5tvec2IiEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %11)
          to label %36 unwind label %70

36:                                               ; preds = %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %37 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !11
  %38 = load i32, ptr @g_projectionUniformBuffer, align 4, !tbaa !5
  invoke void %37(i32 noundef 35345, i32 noundef %38)
          to label %39 unwind label %62

39:                                               ; preds = %36
  %40 = load ptr, ptr @_funcptr_glBufferSubData, align 8, !tbaa !11
  invoke void %40(i32 noundef 35345, i64 noundef 0, i64 noundef 64, ptr noundef %8)
          to label %41 unwind label %62

41:                                               ; preds = %39
  %42 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !11
  %43 = load i32, ptr @g_unprojectionUniformBuffer, align 4, !tbaa !5
  invoke void %42(i32 noundef 35345, i32 noundef %43)
          to label %44 unwind label %62

44:                                               ; preds = %41
  %45 = load ptr, ptr @_funcptr_glBufferSubData, align 8, !tbaa !11
  invoke void %45(i32 noundef 35345, i64 noundef 0, i64 noundef 72, ptr noundef %9)
          to label %46 unwind label %62

46:                                               ; preds = %44
  %47 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !11
  invoke void %47(i32 noundef 35345, i32 noundef 0)
          to label %48 unwind label %62

48:                                               ; preds = %46
  %49 = load ptr, ptr @_funcptr_glViewport, align 8, !tbaa !11
  %50 = load i32, ptr %3, align 4, !tbaa !5
  %51 = load i32, ptr %4, align 4, !tbaa !5
  invoke void %49(i32 noundef 0, i32 noundef 0, i32 noundef %50, i32 noundef %51)
          to label %52 unwind label %62

52:                                               ; preds = %48
  invoke void @glutPostRedisplay()
          to label %53 unwind label %62

53:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 72, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #6
  call void @_ZN6glutil11MatrixStackD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %5) #6
  ret void

54:                                               ; preds = %2
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %6, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %7, align 4
  br label %76

58:                                               ; preds = %22, %20, %19
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %6, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %7, align 4
  br label %75

62:                                               ; preds = %52, %48, %46, %44, %41, %39, %36, %25
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %6, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %7, align 4
  br label %74

66:                                               ; preds = %29, %28, %26
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %6, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %10) #6
  br label %74

70:                                               ; preds = %33, %32
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %6, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %74

74:                                               ; preds = %70, %66, %62
  call void @llvm.lifetime.end.p0(i64 72, ptr %9) #6
  br label %75

75:                                               ; preds = %74, %58
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #6
  br label %76

76:                                               ; preds = %75, %54
  call void @_ZN6glutil11MatrixStackD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr %5) #6
  br label %77

77:                                               ; preds = %76
  %78 = load ptr, ptr %6, align 8
  %79 = load i32, ptr %7, align 4
  %80 = insertvalue { ptr, i32 } poison, ptr %78, 0
  %81 = insertvalue { ptr, i32 } %80, i32 %79, 1
  resume { ptr, i32 } %81
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN15ProjectionBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #5 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN17UnProjectionBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(72)) unnamed_addr #5 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 #3 = { 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 #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 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 = !{!"int", !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 = !{!"any pointer", !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.glutil::MatrixStack" = type { %"class.std::stack", %"struct.glm::detail::tmat4x4" }
%"class.std::stack" = type { %"class.std::vector.14" }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = 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.10 }
%union.anon.10 = type { %struct.anon.11 }
%struct.anon.11 = type { float, float, float, float }
%struct.ProjectionBlock = type { %"struct.glm::detail::tmat4x4" }
%struct.UnProjectionBlock = type { %"struct.glm::detail::tmat4x4", %"struct.glm::detail::tvec2" }
%"struct.glm::detail::tvec2" = type { %union.anon.6 }
%union.anon.6 = type { %struct.anon.7 }
%struct.anon.7 = type { i32, i32 }

@g_fzNear = external dso_local local_unnamed_addr global float, align 4
@g_fzFar = external dso_local local_unnamed_addr global float, align 4
@g_projectionUniformBuffer = external dso_local local_unnamed_addr global i32, align 4
@g_unprojectionUniformBuffer = external dso_local local_unnamed_addr global i32, align 4
@_funcptr_glBindBuffer = external local_unnamed_addr global ptr, align 8
@_funcptr_glBufferSubData = external local_unnamed_addr global ptr, align 8
@_funcptr_glViewport = external local_unnamed_addr global ptr, align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare void @glutPostRedisplay() local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_Z7reshapeii(i32 noundef %0, i32 noundef %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.glutil::MatrixStack", align 8
  %6 = alloca %struct.ProjectionBlock, align 4
  %7 = alloca %struct.UnProjectionBlock, align 4
  %8 = alloca %"struct.glm::detail::tmat4x4", align 4
  %9 = alloca %"struct.glm::detail::tvec2", align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %5) #6
  call void @_ZN6glutil11MatrixStackC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5)
  %10 = sitofp i32 %0 to float
  %11 = sitofp i32 %1 to float
  %12 = fdiv float %10, %11
  %13 = load float, ptr @g_fzNear, align 4, !tbaa !9
  %14 = load float, ptr @g_fzFar, align 4, !tbaa !9
  invoke void @_ZN6glutil11MatrixStack11PerspectiveEffff(ptr noundef nonnull align 8 dereferenceable(88) %5, float noundef 4.500000e+01, float noundef %12, float noundef %13, float noundef %14)
          to label %15 unwind label %44

15:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #6
  invoke void @_ZN15ProjectionBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(64) %6)
          to label %16 unwind label %46

16:                                               ; preds = %15
  %17 = call noundef nonnull align 4 dereferenceable(64) ptr @_ZNK6glutil11MatrixStack3TopEv(ptr noundef nonnull align 8 dereferenceable(88) %5)
  %18 = invoke noundef nonnull align 4 dereferenceable(64) ptr @_ZN3glm6detail7tmat4x4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(64) %6, ptr noundef nonnull align 4 dereferenceable(64) %17)
          to label %19 unwind label %46

19:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %7) #6
  invoke void @_ZN17UnProjectionBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(72) %7)
          to label %20 unwind label %48

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #6
  %21 = call noundef nonnull align 4 dereferenceable(64) ptr @_ZNK6glutil11MatrixStack3TopEv(ptr noundef nonnull align 8 dereferenceable(88) %5)
  invoke void @_ZN3glm7inverseIfEENS_6detail7tmat4x4IT_EERKS4_(ptr dead_on_unwind nonnull writable sret(%"struct.glm::detail::tmat4x4") align 4 %8, ptr noundef nonnull align 4 dereferenceable(64) %21)
          to label %22 unwind label %50

22:                                               ; preds = %20
  %23 = invoke noundef nonnull align 4 dereferenceable(64) ptr @_ZN3glm6detail7tmat4x4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(64) %7, ptr noundef nonnull align 4 dereferenceable(64) %8)
          to label %24 unwind label %50

24:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  call void @_ZN3glm6detail5tvec2IiEC2ERKiS4_(ptr noundef nonnull align 4 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %25 = getelementptr inbounds i8, ptr %7, i64 64
  %26 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN3glm6detail5tvec2IiEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %27 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !11
  %28 = load i32, ptr @g_projectionUniformBuffer, align 4, !tbaa !5
  invoke void %27(i32 noundef 35345, i32 noundef %28)
          to label %29 unwind label %48

29:                                               ; preds = %24
  %30 = load ptr, ptr @_funcptr_glBufferSubData, align 8, !tbaa !11
  invoke void %30(i32 noundef 35345, i64 noundef 0, i64 noundef 64, ptr noundef nonnull %6)
          to label %31 unwind label %48

31:                                               ; preds = %29
  %32 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !11
  %33 = load i32, ptr @g_unprojectionUniformBuffer, align 4, !tbaa !5
  invoke void %32(i32 noundef 35345, i32 noundef %33)
          to label %34 unwind label %48

34:                                               ; preds = %31
  %35 = load ptr, ptr @_funcptr_glBufferSubData, align 8, !tbaa !11
  invoke void %35(i32 noundef 35345, i64 noundef 0, i64 noundef 72, ptr noundef nonnull %7)
          to label %36 unwind label %48

36:                                               ; preds = %34
  %37 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !11
  invoke void %37(i32 noundef 35345, i32 noundef 0)
          to label %38 unwind label %48

38:                                               ; preds = %36
  %39 = load ptr, ptr @_funcptr_glViewport, align 8, !tbaa !11
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %41 = load i32, ptr %4, align 4, !tbaa !5
  invoke void %39(i32 noundef 0, i32 noundef 0, i32 noundef %40, i32 noundef %41)
          to label %42 unwind label %48

42:                                               ; preds = %38
  invoke void @glutPostRedisplay()
          to label %43 unwind label %48

43:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #6
  call void @_ZN6glutil11MatrixStackD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %5) #6
  ret void

44:                                               ; preds = %2
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %54

46:                                               ; preds = %16, %15
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %53

48:                                               ; preds = %42, %38, %36, %34, %31, %29, %24, %19
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

50:                                               ; preds = %22, %20
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #6
  br label %52

52:                                               ; preds = %50, %48
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %7) #6
  br label %53

53:                                               ; preds = %52, %46
  %.pn.pn = phi { ptr, i32 } [ %.pn, %52 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #6
  br label %54

54:                                               ; preds = %53, %44
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %53 ], [ %45, %44 ]
  call void @_ZN6glutil11MatrixStackD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %5) #6
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN15ProjectionBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(64)) unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(64) ptr @_ZN3glm6detail7tmat4x4IfEaSERKS2_(ptr noundef nonnull align 4 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN17UnProjectionBlockC2Ev(ptr noundef nonnull align 4 dereferenceable(72)) unnamed_addr #5 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { 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 #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 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 = !{!"int", !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 = !{!"any pointer", !7, i64 0}


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