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

; 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }

@g_pCylinderMesh = external dso_local global ptr, align 8
@g_pPlaneMesh = external dso_local global ptr, align 8
@g_pCubeMesh = external dso_local global ptr, align 8
@g_projectionUniformBuffer = external dso_local global i32, align 4
@_ZTISt9exception = external constant ptr
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [4 x i8], align 1
@_funcptr_glEnable = external global ptr, align 8
@_funcptr_glCullFace = external global ptr, align 8
@_funcptr_glFrontFace = external global ptr, align 8
@_funcptr_glDepthMask = external global ptr, align 8
@_funcptr_glDepthFunc = external global ptr, align 8
@_funcptr_glDepthRange = external global ptr, align 8
@_funcptr_glGenBuffers = external global ptr, align 8
@_funcptr_glBindBuffer = external global ptr, align 8
@_funcptr_glBufferData = external global ptr, align 8
@_funcptr_glBindBufferRange = 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 @_Z18InitializeProgramsv() #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4initv() #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.0", align 1
  %5 = alloca i1, align 1
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.0", align 1
  %8 = alloca i1, align 1
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator.0", align 1
  %11 = alloca i1, align 1
  %12 = alloca ptr, align 8
  call void @_Z18InitializeProgramsv()
  %13 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #8
          to label %14 unwind label %25

14:                                               ; preds = %0
  store i1 true, ptr %5, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %15 unwind label %29

15:                                               ; preds = %14
  invoke void @_ZN9Framework4MeshC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %16 unwind label %33

16:                                               ; preds = %15
  store i1 false, ptr %5, align 1
  store ptr %13, ptr @g_pCylinderMesh, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #9
  %17 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #8
          to label %18 unwind label %25

18:                                               ; preds = %16
  store i1 true, ptr %8, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %19 unwind label %41

19:                                               ; preds = %18
  invoke void @_ZN9Framework4MeshC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %20 unwind label %45

20:                                               ; preds = %19
  store i1 false, ptr %8, align 1
  store ptr %17, ptr @g_pPlaneMesh, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #9
  %21 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 8) #8
          to label %22 unwind label %25

22:                                               ; preds = %20
  store i1 true, ptr %11, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #9
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef @.str.19, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %23 unwind label %53

23:                                               ; preds = %22
  invoke void @_ZN9Framework4MeshC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(32) %9)
          to label %24 unwind label %57

24:                                               ; preds = %23
  store i1 false, ptr %11, align 1
  store ptr %21, ptr @g_pCubeMesh, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #9
  br label %84

25:                                               ; preds = %20, %16, %0
  %26 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %1, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %2, align 4
  br label %65

29:                                               ; preds = %14
  %30 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %31 = extractvalue { ptr, i32 } %30, 0
  store ptr %31, ptr %1, align 8
  %32 = extractvalue { ptr, i32 } %30, 1
  store i32 %32, ptr %2, align 4
  br label %37

33:                                               ; preds = %15
  %34 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %1, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %2, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #9
  br label %37

37:                                               ; preds = %33, %29
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #9
  %38 = load i1, ptr %5, align 1
  br i1 %38, label %39, label %40

39:                                               ; preds = %37
  call void @_ZdlPvm(ptr noundef %13, i64 noundef 8) #10
  br label %40

40:                                               ; preds = %39, %37
  br label %65

41:                                               ; preds = %18
  %42 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %1, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %2, align 4
  br label %49

45:                                               ; preds = %19
  %46 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %1, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %2, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #9
  br label %49

49:                                               ; preds = %45, %41
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #9
  %50 = load i1, ptr %8, align 1
  br i1 %50, label %51, label %52

51:                                               ; preds = %49
  call void @_ZdlPvm(ptr noundef %17, i64 noundef 8) #10
  br label %52

52:                                               ; preds = %51, %49
  br label %65

53:                                               ; preds = %22
  %54 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %1, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %2, align 4
  br label %61

57:                                               ; preds = %23
  %58 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %1, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %2, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #9
  br label %61

61:                                               ; preds = %57, %53
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #9
  %62 = load i1, ptr %11, align 1
  br i1 %62, label %63, label %64

63:                                               ; preds = %61
  call void @_ZdlPvm(ptr noundef %21, i64 noundef 8) #10
  br label %64

64:                                               ; preds = %63, %61
  br label %65

65:                                               ; preds = %64, %52, %40, %25
  %66 = load i32, ptr %2, align 4
  %67 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #9
  %68 = icmp eq i32 %66, %67
  br i1 %68, label %69, label %100

69:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  %70 = load ptr, ptr %1, align 8
  %71 = call ptr @__cxa_begin_catch(ptr %70) #9
  store ptr %71, ptr %12, align 8
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds ptr, ptr %73, i64 2
  %75 = load ptr, ptr %74, align 8
  %76 = call noundef ptr %75(ptr noundef nonnull align 8 dereferenceable(8) %72) #9
  %77 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.20, ptr noundef %76)
          to label %78 unwind label %79

78:                                               ; preds = %69
  invoke void @__cxa_rethrow() #11
          to label %108 unwind label %79

79:                                               ; preds = %78, %69
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %1, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %2, align 4
  invoke void @__cxa_end_catch()
          to label %83 unwind label %105

83:                                               ; preds = %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  br label %100

84:                                               ; preds = %24
  call void @glutMouseFunc(ptr noundef @_ZN12_GLOBAL__N_111MouseButtonEiiii)
  call void @glutMotionFunc(ptr noundef @_ZN12_GLOBAL__N_111MouseMotionEii)
  call void @glutMouseWheelFunc(ptr noundef @_ZN12_GLOBAL__N_110MouseWheelEiiii)
  %85 = load ptr, ptr @_funcptr_glEnable, align 8, !tbaa !5
  call void %85(i32 noundef 2884)
  %86 = load ptr, ptr @_funcptr_glCullFace, align 8, !tbaa !5
  call void %86(i32 noundef 1029)
  %87 = load ptr, ptr @_funcptr_glFrontFace, align 8, !tbaa !5
  call void %87(i32 noundef 2304)
  %88 = load ptr, ptr @_funcptr_glEnable, align 8, !tbaa !5
  call void %88(i32 noundef 2929)
  %89 = load ptr, ptr @_funcptr_glDepthMask, align 8, !tbaa !5
  call void %89(i8 noundef zeroext 1)
  %90 = load ptr, ptr @_funcptr_glDepthFunc, align 8, !tbaa !5
  call void %90(i32 noundef 515)
  %91 = load ptr, ptr @_funcptr_glDepthRange, align 8, !tbaa !5
  call void %91(double noundef 0.000000e+00, double noundef 1.000000e+00)
  %92 = load ptr, ptr @_funcptr_glEnable, align 8, !tbaa !5
  call void %92(i32 noundef 34383)
  %93 = load ptr, ptr @_funcptr_glGenBuffers, align 8, !tbaa !5
  call void %93(i32 noundef 1, ptr noundef @g_projectionUniformBuffer)
  %94 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !5
  %95 = load i32, ptr @g_projectionUniformBuffer, align 4, !tbaa !11
  call void %94(i32 noundef 35345, i32 noundef %95)
  %96 = load ptr, ptr @_funcptr_glBufferData, align 8, !tbaa !5
  call void %96(i32 noundef 35345, i64 noundef 64, ptr noundef null, i32 noundef 35048)
  %97 = load ptr, ptr @_funcptr_glBindBufferRange, align 8, !tbaa !5
  %98 = load i32, ptr @g_projectionUniformBuffer, align 4, !tbaa !11
  call void %97(i32 noundef 35345, i32 noundef 2, i32 noundef %98, i64 noundef 0, i64 noundef 64)
  %99 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !5
  call void %99(i32 noundef 35345, i32 noundef 0)
  ret void

100:                                              ; preds = %83, %65
  %101 = load ptr, ptr %1, align 8
  %102 = load i32, ptr %2, align 4
  %103 = insertvalue { ptr, i32 } poison, ptr %101, 0
  %104 = insertvalue { ptr, i32 } %103, i32 %102, 1
  resume { ptr, i32 } %104

105:                                              ; preds = %79
  %106 = landingpad { ptr, i32 }
          catch ptr null
  %107 = extractvalue { ptr, i32 } %106, 0
  call void @__clang_call_terminate(ptr %107) #12
  unreachable

108:                                              ; preds = %78
  unreachable
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #3

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #5

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #6

declare ptr @__cxa_begin_catch(ptr)

declare i32 @printf(ptr noundef, ...) #4

declare void @__cxa_rethrow()

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #7

declare void @glutMouseFunc(ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_111MouseButtonEiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @glutMotionFunc(ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_111MouseMotionEii(i32 noundef, i32 noundef) #1

declare void @glutMouseWheelFunc(ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_110MouseWheelEiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { nobuiltin allocsize(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 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind memory(none) }
attributes #7 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { nounwind }
attributes #10 = { builtin nounwind }
attributes #11 = { noreturn }
attributes #12 = { noreturn 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 = !{!"vtable pointer", !8, 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.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.0" = type { i8 }

@g_pCylinderMesh = external dso_local local_unnamed_addr global ptr, align 8
@g_pPlaneMesh = external dso_local local_unnamed_addr global ptr, align 8
@g_pCubeMesh = external dso_local local_unnamed_addr global ptr, align 8
@g_projectionUniformBuffer = external dso_local global i32, align 4
@_ZTISt9exception = external constant ptr
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [4 x i8], align 1
@_funcptr_glEnable = external local_unnamed_addr global ptr, align 8
@_funcptr_glCullFace = external local_unnamed_addr global ptr, align 8
@_funcptr_glFrontFace = external local_unnamed_addr global ptr, align 8
@_funcptr_glDepthMask = external local_unnamed_addr global ptr, align 8
@_funcptr_glDepthFunc = external local_unnamed_addr global ptr, align 8
@_funcptr_glDepthRange = external local_unnamed_addr global ptr, align 8
@_funcptr_glGenBuffers = external local_unnamed_addr global ptr, align 8
@_funcptr_glBindBuffer = external local_unnamed_addr global ptr, align 8
@_funcptr_glBufferData = external local_unnamed_addr global ptr, align 8
@_funcptr_glBindBufferRange = 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 @_Z18InitializeProgramsv() local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4initv() local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %1 = alloca %"class.std::__cxx11::basic_string", align 8
  %2 = alloca %"class.std::allocator.0", align 1
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.0", align 1
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator.0", align 1
  tail call void @_Z18InitializeProgramsv()
  %7 = invoke noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #9
          to label %8 unwind label %34

8:                                                ; preds = %0
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %1) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull @.str.17, ptr noundef nonnull align 1 dereferenceable(1) %2)
          to label %9 unwind label %36

9:                                                ; preds = %8
  invoke void @_ZN9Framework4MeshC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %10 unwind label %38

10:                                               ; preds = %9
  store ptr %7, ptr @g_pCylinderMesh, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #10
  %11 = invoke noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #9
          to label %12 unwind label %34

12:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.18, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %13 unwind label %41

13:                                               ; preds = %12
  invoke void @_ZN9Framework4MeshC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %14 unwind label %43

14:                                               ; preds = %13
  store ptr %11, ptr @g_pPlaneMesh, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #10
  %15 = invoke noalias noundef nonnull dereferenceable(8) ptr @_Znwm(i64 noundef 8) #9
          to label %16 unwind label %34

16:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #10
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #10
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.19, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %17 unwind label %46

17:                                               ; preds = %16
  invoke void @_ZN9Framework4MeshC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %18 unwind label %48

18:                                               ; preds = %17
  store ptr %15, ptr @g_pCubeMesh, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  call void @glutMouseFunc(ptr noundef nonnull @_ZN12_GLOBAL__N_111MouseButtonEiiii)
  call void @glutMotionFunc(ptr noundef nonnull @_ZN12_GLOBAL__N_111MouseMotionEii)
  call void @glutMouseWheelFunc(ptr noundef nonnull @_ZN12_GLOBAL__N_110MouseWheelEiiii)
  %19 = load ptr, ptr @_funcptr_glEnable, align 8, !tbaa !5
  call void %19(i32 noundef 2884)
  %20 = load ptr, ptr @_funcptr_glCullFace, align 8, !tbaa !5
  call void %20(i32 noundef 1029)
  %21 = load ptr, ptr @_funcptr_glFrontFace, align 8, !tbaa !5
  call void %21(i32 noundef 2304)
  %22 = load ptr, ptr @_funcptr_glEnable, align 8, !tbaa !5
  call void %22(i32 noundef 2929)
  %23 = load ptr, ptr @_funcptr_glDepthMask, align 8, !tbaa !5
  call void %23(i8 noundef zeroext 1)
  %24 = load ptr, ptr @_funcptr_glDepthFunc, align 8, !tbaa !5
  call void %24(i32 noundef 515)
  %25 = load ptr, ptr @_funcptr_glDepthRange, align 8, !tbaa !5
  call void %25(double noundef 0.000000e+00, double noundef 1.000000e+00)
  %26 = load ptr, ptr @_funcptr_glEnable, align 8, !tbaa !5
  call void %26(i32 noundef 34383)
  %27 = load ptr, ptr @_funcptr_glGenBuffers, align 8, !tbaa !5
  call void %27(i32 noundef 1, ptr noundef nonnull @g_projectionUniformBuffer)
  %28 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !5
  %29 = load i32, ptr @g_projectionUniformBuffer, align 4, !tbaa !9
  call void %28(i32 noundef 35345, i32 noundef %29)
  %30 = load ptr, ptr @_funcptr_glBufferData, align 8, !tbaa !5
  call void %30(i32 noundef 35345, i64 noundef 64, ptr noundef null, i32 noundef 35048)
  %31 = load ptr, ptr @_funcptr_glBindBufferRange, align 8, !tbaa !5
  %32 = load i32, ptr @g_projectionUniformBuffer, align 4, !tbaa !9
  call void %31(i32 noundef 35345, i32 noundef 2, i32 noundef %32, i64 noundef 0, i64 noundef 64)
  %33 = load ptr, ptr @_funcptr_glBindBuffer, align 8, !tbaa !5
  call void %33(i32 noundef 35345, i32 noundef 0)
  ret void

34:                                               ; preds = %14, %10, %0
  %35 = landingpad { ptr, i32 }
          catch ptr @_ZTISt9exception
  br label %51

36:                                               ; preds = %8
  %37 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %40

38:                                               ; preds = %9
  %39 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %1) #10
  br label %40

40:                                               ; preds = %38, %36
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %2) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %1) #10
  call void @_ZdlPvm(ptr noundef nonnull %7, i64 noundef 8) #11
  br label %51

41:                                               ; preds = %12
  %42 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %45

43:                                               ; preds = %13
  %44 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #10
  br label %45

45:                                               ; preds = %43, %41
  %.pn13 = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #10
  call void @_ZdlPvm(ptr noundef nonnull %11, i64 noundef 8) #11
  br label %51

46:                                               ; preds = %16
  %47 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %50

48:                                               ; preds = %17
  %49 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #10
  br label %50

50:                                               ; preds = %48, %46
  %.pn15 = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #10
  call void @_ZdlPvm(ptr noundef nonnull %15, i64 noundef 8) #11
  br label %51

51:                                               ; preds = %50, %45, %40, %34
  %.pn15.pn = phi { ptr, i32 } [ %.pn15, %50 ], [ %35, %34 ], [ %.pn13, %45 ], [ %.pn, %40 ]
  %.310 = extractvalue { ptr, i32 } %.pn15.pn, 1
  %52 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #10
  %53 = icmp eq i32 %.310, %52
  br i1 %53, label %54, label %63

54:                                               ; preds = %51
  %.3 = extractvalue { ptr, i32 } %.pn15.pn, 0
  %55 = call ptr @__cxa_begin_catch(ptr %.3) #10
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %58 = load ptr, ptr %57, align 8
  %59 = call noundef ptr %58(ptr noundef nonnull align 8 dereferenceable(8) %55) #10
  %60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20, ptr noundef %59)
  invoke void @__cxa_rethrow() #12
          to label %67 unwind label %61

61:                                               ; preds = %54
  %62 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %63 unwind label %64

63:                                               ; preds = %61, %51
  %.merged = phi { ptr, i32 } [ %.pn15.pn, %51 ], [ %62, %61 ]
  resume { ptr, i32 } %.merged

64:                                               ; preds = %61
  %65 = landingpad { ptr, i32 }
          catch ptr null
  %66 = extractvalue { ptr, i32 } %65, 0
  call void @__clang_call_terminate(ptr %66) #13
  unreachable

67:                                               ; preds = %54
  unreachable
}

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #6

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7

declare void @__cxa_rethrow() local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #8

declare void @glutMouseFunc(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_111MouseButtonEiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

declare void @glutMotionFunc(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_111MouseMotionEii(i32 noundef, i32 noundef) #1

declare void @glutMouseWheelFunc(ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_110MouseWheelEiiii(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 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 = { nobuiltin allocsize(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 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nofree nosync nounwind memory(none) }
attributes #7 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { nounwind }
attributes #11 = { builtin nounwind }
attributes #12 = { noreturn }
attributes #13 = { noreturn 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass