; LLVM IR from paroj/gltut :: Tut 14 Textures Are Not Pictures (MaterialTexture)

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

%struct.ProgramData = type { i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_funcptr_glGetUniformLocation = external global ptr, align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@_funcptr_glGetUniformBlockIndex = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@_funcptr_glUniformBlockBinding = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [17 x i8], align 1
@_funcptr_glUseProgram = external global ptr, align 8
@_funcptr_glUniform1i = 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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

declare noundef i32 @_ZN9Framework10LoadShaderEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

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

declare noundef i32 @_ZN9Framework13CreateProgramERKSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(24)) #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
define dso_local { i64, i32 } @_Z19LoadStandardProgramRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.ProgramData, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca { i64, i32 }, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #5
  call void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = invoke noundef i32 @_ZN9Framework10LoadShaderEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i32 noundef 35633, ptr noundef nonnull align 8 dereferenceable(32) %17)
          to label %19 unwind label %93

19:                                               ; preds = %2
  store i32 %18, ptr %7, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %20 unwind label %93

20:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = invoke noundef i32 @_ZN9Framework10LoadShaderEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i32 noundef 35632, ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %23 unwind label %97

23:                                               ; preds = %20
  store i32 %22, ptr %10, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %24 unwind label %97

24:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  %25 = invoke noundef i32 @_ZN9Framework13CreateProgramERKSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %26 unwind label %101

26:                                               ; preds = %24
  %27 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  store i32 %25, ptr %27, align 4, !tbaa !11
  %28 = load ptr, ptr @_funcptr_glGetUniformLocation, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  %30 = load i32, ptr %29, align 4, !tbaa !11
  %31 = invoke i32 %28(i32 noundef %30, ptr noundef @.str)
          to label %32 unwind label %101

32:                                               ; preds = %26
  %33 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 1
  store i32 %31, ptr %33, align 4, !tbaa !13
  %34 = load ptr, ptr @_funcptr_glGetUniformLocation, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  %36 = load i32, ptr %35, align 4, !tbaa !11
  %37 = invoke i32 %34(i32 noundef %36, ptr noundef @.str.3)
          to label %38 unwind label %101

38:                                               ; preds = %32
  %39 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 2
  store i32 %37, ptr %39, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %40 = load ptr, ptr @_funcptr_glGetUniformBlockIndex, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  %42 = load i32, ptr %41, align 4, !tbaa !11
  %43 = invoke i32 %40(i32 noundef %42, ptr noundef @.str.4)
          to label %44 unwind label %105

44:                                               ; preds = %38
  store i32 %43, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %45 = load ptr, ptr @_funcptr_glGetUniformBlockIndex, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  %47 = load i32, ptr %46, align 4, !tbaa !11
  %48 = invoke i32 %45(i32 noundef %47, ptr noundef @.str.5)
          to label %49 unwind label %109

49:                                               ; preds = %44
  store i32 %48, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %50 = load ptr, ptr @_funcptr_glGetUniformBlockIndex, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  %52 = load i32, ptr %51, align 4, !tbaa !11
  %53 = invoke i32 %50(i32 noundef %52, ptr noundef @.str.2)
          to label %54 unwind label %113

54:                                               ; preds = %49
  store i32 %53, ptr %13, align 4, !tbaa !9
  %55 = load ptr, ptr @_funcptr_glUniformBlockBinding, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  %57 = load i32, ptr %56, align 4, !tbaa !11
  %58 = load i32, ptr %11, align 4, !tbaa !9
  invoke void %55(i32 noundef %57, i32 noundef %58, i32 noundef 0)
          to label %59 unwind label %113

59:                                               ; preds = %54
  %60 = load ptr, ptr @_funcptr_glUniformBlockBinding, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  %62 = load i32, ptr %61, align 4, !tbaa !11
  %63 = load i32, ptr %12, align 4, !tbaa !9
  invoke void %60(i32 noundef %62, i32 noundef %63, i32 noundef 1)
          to label %64 unwind label %113

64:                                               ; preds = %59
  %65 = load ptr, ptr @_funcptr_glUniformBlockBinding, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  %67 = load i32, ptr %66, align 4, !tbaa !11
  %68 = load i32, ptr %13, align 4, !tbaa !9
  invoke void %65(i32 noundef %67, i32 noundef %68, i32 noundef 2)
          to label %69 unwind label %113

69:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %70 = load ptr, ptr @_funcptr_glGetUniformLocation, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  %72 = load i32, ptr %71, align 4, !tbaa !11
  %73 = invoke i32 %70(i32 noundef %72, ptr noundef @.str.6)
          to label %74 unwind label %117

74:                                               ; preds = %69
  store i32 %73, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %75 = load ptr, ptr @_funcptr_glGetUniformLocation, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  %77 = load i32, ptr %76, align 4, !tbaa !11
  %78 = invoke i32 %75(i32 noundef %77, ptr noundef @.str.7)
          to label %79 unwind label %121

79:                                               ; preds = %74
  store i32 %78, ptr %15, align 4, !tbaa !9
  %80 = load ptr, ptr @_funcptr_glUseProgram, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ProgramData, ptr %3, i32 0, i32 0
  %82 = load i32, ptr %81, align 4, !tbaa !11
  invoke void %80(i32 noundef %82)
          to label %83 unwind label %121

83:                                               ; preds = %79
  %84 = load ptr, ptr @_funcptr_glUniform1i, align 8, !tbaa !5
  %85 = load i32, ptr %14, align 4, !tbaa !9
  invoke void %84(i32 noundef %85, i32 noundef 0)
          to label %86 unwind label %121

86:                                               ; preds = %83
  %87 = load ptr, ptr @_funcptr_glUniform1i, align 8, !tbaa !5
  %88 = load i32, ptr %15, align 4, !tbaa !9
  invoke void %87(i32 noundef %88, i32 noundef 1)
          to label %89 unwind label %121

89:                                               ; preds = %86
  %90 = load ptr, ptr @_funcptr_glUseProgram, align 8, !tbaa !5
  invoke void %90(i32 noundef 0)
          to label %91 unwind label %121

91:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 4 %3, i64 12, i1 false)
  %92 = load { i64, i32 }, ptr %16, align 8
  ret { i64, i32 } %92

93:                                               ; preds = %19, %2
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %8, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %129

97:                                               ; preds = %23, %20
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %8, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %129

101:                                              ; preds = %32, %26, %24
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %8, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %9, align 4
  br label %129

105:                                              ; preds = %38
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %8, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %9, align 4
  br label %128

109:                                              ; preds = %44
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %8, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %9, align 4
  br label %127

113:                                              ; preds = %64, %59, %54, %49
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %8, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %9, align 4
  br label %126

117:                                              ; preds = %69
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %8, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %9, align 4
  br label %125

121:                                              ; preds = %89, %86, %83, %79, %74
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %8, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %125

125:                                              ; preds = %121, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %126

126:                                              ; preds = %125, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %127

127:                                              ; preds = %126, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %128

128:                                              ; preds = %127, %105
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %129

129:                                              ; preds = %128, %101, %97, %93
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #5
  br label %130

130:                                              ; preds = %129
  %131 = load ptr, ptr %8, align 8
  %132 = load i32, ptr %9, align 4
  %133 = insertvalue { ptr, i32 } poison, ptr %131, 0
  %134 = insertvalue { ptr, i32 } %133, i32 %132, 1
  resume { ptr, i32 } %134
}

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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, !10, i64 0}
!12 = !{!"_ZTS11ProgramData", !10, i64 0, !10, i64 4, !10, i64 8}
!13 = !{!12, !10, i64 4}
!14 = !{!12, !10, i64 8}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_funcptr_glGetUniformLocation = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [20 x i8], align 1
@_funcptr_glGetUniformBlockIndex = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@_funcptr_glUniformBlockBinding = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [17 x i8], align 1
@_funcptr_glUseProgram = external local_unnamed_addr global ptr, align 8
@_funcptr_glUniform1i = 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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

declare noundef i32 @_ZN9Framework10LoadShaderEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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

declare noundef i32 @_ZN9Framework13CreateProgramERKSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
define dso_local { i64, i32 } @_Z19LoadStandardProgramRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #4
  call void @_ZNSt6vectorIjSaIjEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %6 = invoke noundef i32 @_ZN9Framework10LoadShaderEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i32 noundef 35633, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %7 unwind label %49

7:                                                ; preds = %2
  store i32 %6, ptr %4, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %8 unwind label %49

8:                                                ; preds = %7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %9 = invoke noundef i32 @_ZN9Framework10LoadShaderEjRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(i32 noundef 35632, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %10 unwind label %51

10:                                               ; preds = %8
  store i32 %9, ptr %5, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %11 unwind label %51

11:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  %12 = invoke noundef i32 @_ZN9Framework13CreateProgramERKSt6vectorIjSaIjEE(ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %13 unwind label %53

13:                                               ; preds = %11
  %14 = load ptr, ptr @_funcptr_glGetUniformLocation, align 8, !tbaa !9
  %15 = invoke i32 %14(i32 noundef %12, ptr noundef nonnull @.str)
          to label %16 unwind label %53

16:                                               ; preds = %13
  %17 = load ptr, ptr @_funcptr_glGetUniformLocation, align 8, !tbaa !9
  %18 = invoke i32 %17(i32 noundef %12, ptr noundef nonnull @.str.3)
          to label %19 unwind label %53

19:                                               ; preds = %16
  %20 = load ptr, ptr @_funcptr_glGetUniformBlockIndex, align 8, !tbaa !9
  %21 = invoke i32 %20(i32 noundef %12, ptr noundef nonnull @.str.4)
          to label %22 unwind label %55

22:                                               ; preds = %19
  %23 = load ptr, ptr @_funcptr_glGetUniformBlockIndex, align 8, !tbaa !9
  %24 = invoke i32 %23(i32 noundef %12, ptr noundef nonnull @.str.5)
          to label %25 unwind label %57

25:                                               ; preds = %22
  %26 = load ptr, ptr @_funcptr_glGetUniformBlockIndex, align 8, !tbaa !9
  %27 = invoke i32 %26(i32 noundef %12, ptr noundef nonnull @.str.2)
          to label %28 unwind label %59

28:                                               ; preds = %25
  %29 = load ptr, ptr @_funcptr_glUniformBlockBinding, align 8, !tbaa !9
  invoke void %29(i32 noundef %12, i32 noundef %21, i32 noundef 0)
          to label %30 unwind label %59

30:                                               ; preds = %28
  %31 = load ptr, ptr @_funcptr_glUniformBlockBinding, align 8, !tbaa !9
  invoke void %31(i32 noundef %12, i32 noundef %24, i32 noundef 1)
          to label %32 unwind label %59

32:                                               ; preds = %30
  %33 = load ptr, ptr @_funcptr_glUniformBlockBinding, align 8, !tbaa !9
  invoke void %33(i32 noundef %12, i32 noundef %27, i32 noundef 2)
          to label %34 unwind label %59

34:                                               ; preds = %32
  %35 = load ptr, ptr @_funcptr_glGetUniformLocation, align 8, !tbaa !9
  %36 = invoke i32 %35(i32 noundef %12, ptr noundef nonnull @.str.6)
          to label %37 unwind label %61

37:                                               ; preds = %34
  %38 = load ptr, ptr @_funcptr_glGetUniformLocation, align 8, !tbaa !9
  %39 = invoke i32 %38(i32 noundef %12, ptr noundef nonnull @.str.7)
          to label %40 unwind label %63

40:                                               ; preds = %37
  %41 = load ptr, ptr @_funcptr_glUseProgram, align 8, !tbaa !9
  invoke void %41(i32 noundef %12)
          to label %42 unwind label %63

42:                                               ; preds = %40
  %43 = load ptr, ptr @_funcptr_glUniform1i, align 8, !tbaa !9
  invoke void %43(i32 noundef %36, i32 noundef 0)
          to label %44 unwind label %63

44:                                               ; preds = %42
  %45 = load ptr, ptr @_funcptr_glUniform1i, align 8, !tbaa !9
  invoke void %45(i32 noundef %39, i32 noundef 1)
          to label %46 unwind label %63

46:                                               ; preds = %44
  %47 = load ptr, ptr @_funcptr_glUseProgram, align 8, !tbaa !9
  invoke void %47(i32 noundef 0)
          to label %48 unwind label %63

48:                                               ; preds = %46
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  %.sroa.13.0.insert.ext = zext i32 %15 to i64
  %.sroa.13.0.insert.shift = shl nuw i64 %.sroa.13.0.insert.ext, 32
  %.sroa.08.0.insert.ext = zext i32 %12 to i64
  %.sroa.08.0.insert.insert = or disjoint i64 %.sroa.13.0.insert.shift, %.sroa.08.0.insert.ext
  %.fca.0.insert = insertvalue { i64, i32 } poison, i64 %.sroa.08.0.insert.insert, 0
  %.fca.1.insert = insertvalue { i64, i32 } %.fca.0.insert, i32 %18, 1
  ret { i64, i32 } %.fca.1.insert

49:                                               ; preds = %7, %2
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  br label %65

51:                                               ; preds = %10, %8
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  br label %65

53:                                               ; preds = %16, %13, %11
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %65

55:                                               ; preds = %19
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %65

57:                                               ; preds = %22
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %65

59:                                               ; preds = %32, %30, %28, %25
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %65

61:                                               ; preds = %34
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %46, %44, %42, %40, %37
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %65

65:                                               ; preds = %55, %59, %63, %61, %57, %53, %51, %49
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %54, %53 ], [ %52, %51 ], [ %50, %49 ], [ %56, %55 ], [ %58, %57 ], [ %60, %59 ], [ %64, %63 ], [ %62, %61 ]
  call void @_ZNSt6vectorIjSaIjEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!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 = !{!"any pointer", !7, i64 0}


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