; LLVM IR from hbatagelo/abcg :: abcg (abcgOpenGLShader)

; 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.std::experimental::fundamentals_v2::source_location" = type { ptr, ptr, i32, i32 }
%"class.std::basic_string_view" = type { i64, ptr }
%"class.__gnu_cxx::__normal_iterator.10" = type { ptr }
%"struct.abcg::OpenGLShader" = type { i32, i32 }

@__glewCreateProgram = external global ptr, align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@_ZTIN4abcg12RuntimeErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@__glewAttachShader = external global ptr, align 8
@__glewLinkProgram = external global ptr, align 8
@__glewDetachShader = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1

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

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 hidden void @_ZN12_GLOBAL__N_113deleteShadersERKSt6vectorIN4abcg12OpenGLShaderESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24)) #1

declare ptr @__cxa_allocate_exception(i64)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12experimental15fundamentals_v215source_location7currentEPKcS3_ii(ptr dead_on_unwind noalias writable sret(%"struct.std::experimental::fundamentals_v2::source_location") align 8, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2 align 2

declare void @_ZN4abcg12RuntimeErrorC1ESt17basic_string_viewIcSt11char_traitsIcEERKNSt12experimental15fundamentals_v215source_locationE(ptr noundef nonnull align 8 dereferenceable(40), i64, ptr, ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

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

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4abcg23triggerOpenGLShaderLinkERKSt6vectorINS_12OpenGLShaderESaIS1_EEb(ptr noundef nonnull align 8 dereferenceable(24) %0, i1 noundef zeroext %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::basic_string_view", align 8
  %8 = alloca %"struct.std::experimental::fundamentals_v2::source_location", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i1, align 1
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %20 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %21 = zext i1 %1 to i8
  store i8 %21, ptr %5, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %22 = load ptr, ptr @__glewCreateProgram, align 8, !tbaa !5
  %23 = call i32 %22()
  store i32 %23, ptr %6, align 4, !tbaa !11
  %24 = load i32, ptr %6, align 4, !tbaa !11
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %45

26:                                               ; preds = %2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_113deleteShadersERKSt6vectorIN4abcg12OpenGLShaderESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %27)
  %28 = load i8, ptr %5, align 1, !tbaa !9, !range !13, !noundef !14
  %29 = trunc i8 %28 to i1
  br i1 %29, label %30, label %44

30:                                               ; preds = %26
  store i1 true, ptr %11, align 1
  %31 = call ptr @__cxa_allocate_exception(i64 40) #5
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef @.str) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  call void @_ZNSt12experimental15fundamentals_v215source_location7currentEPKcS3_ii(ptr dead_on_unwind writable sret(%"struct.std::experimental::fundamentals_v2::source_location") align 8 %8, ptr noundef @.str.1, ptr noundef @.str.7, i32 noundef 327, i32 noundef 0) #5
  %32 = getelementptr inbounds { i64, ptr }, ptr %7, i32 0, i32 0
  %33 = load i64, ptr %32, align 8
  %34 = getelementptr inbounds { i64, ptr }, ptr %7, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8
  invoke void @_ZN4abcg12RuntimeErrorC1ESt17basic_string_viewIcSt11char_traitsIcEERKNSt12experimental15fundamentals_v215source_locationE(ptr noundef nonnull align 8 dereferenceable(40) %31, i64 %33, ptr %35, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %36 unwind label %37

36:                                               ; preds = %30
  store i1 false, ptr %11, align 1
  invoke void @__cxa_throw(ptr %31, ptr @_ZTIN4abcg12RuntimeErrorE, ptr @_ZN4abcg9ExceptionD2Ev) #6
          to label %97 unwind label %37

37:                                               ; preds = %36, %30
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %9, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  %41 = load i1, ptr %11, align 1
  br i1 %41, label %42, label %43

42:                                               ; preds = %37
  call void @__cxa_free_exception(ptr %31) #5
  br label %43

43:                                               ; preds = %42, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  br label %92

44:                                               ; preds = %26
  store i32 0, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %90

45:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %46, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = call ptr @_ZNKSt6vectorIN4abcg12OpenGLShaderESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #5
  %49 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %14, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %50 = load ptr, ptr %13, align 8, !tbaa !5
  %51 = call ptr @_ZNKSt6vectorIN4abcg12OpenGLShaderESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #5
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %15, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  br label %53

53:                                               ; preds = %63, %45
  %54 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  br i1 %54, label %56, label %55

55:                                               ; preds = %53
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %65

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %57 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  store ptr %57, ptr %16, align 8, !tbaa !5
  %58 = load ptr, ptr @__glewAttachShader, align 8, !tbaa !5
  %59 = load i32, ptr %6, align 4, !tbaa !11
  %60 = load ptr, ptr %16, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.abcg::OpenGLShader", ptr %60, i32 0, i32 0
  %62 = load i32, ptr %61, align 4, !tbaa !15
  call void %58(i32 noundef %59, i32 noundef %62)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %63

63:                                               ; preds = %56
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br label %53

65:                                               ; preds = %55
  %66 = load ptr, ptr @__glewLinkProgram, align 8, !tbaa !5
  %67 = load i32, ptr %6, align 4, !tbaa !11
  call void %66(i32 noundef %67)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %68, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %69 = load ptr, ptr %17, align 8, !tbaa !5
  %70 = call ptr @_ZNKSt6vectorIN4abcg12OpenGLShaderESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %69) #5
  %71 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %18, i32 0, i32 0
  store ptr %70, ptr %71, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %72 = load ptr, ptr %17, align 8, !tbaa !5
  %73 = call ptr @_ZNKSt6vectorIN4abcg12OpenGLShaderESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %72) #5
  %74 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %19, i32 0, i32 0
  store ptr %73, ptr %74, align 8
  br label %75

75:                                               ; preds = %85, %65
  %76 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  br i1 %76, label %78, label %77

77:                                               ; preds = %75
  store i32 4, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %87

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %79 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  store ptr %79, ptr %20, align 8, !tbaa !5
  %80 = load ptr, ptr @__glewDetachShader, align 8, !tbaa !5
  %81 = load i32, ptr %6, align 4, !tbaa !11
  %82 = load ptr, ptr %20, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.abcg::OpenGLShader", ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 4, !tbaa !15
  call void %80(i32 noundef %81, i32 noundef %84)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %85

85:                                               ; preds = %78
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  br label %75

87:                                               ; preds = %77
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_113deleteShadersERKSt6vectorIN4abcg12OpenGLShaderESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %88)
  %89 = load i32, ptr %6, align 4, !tbaa !11
  store i32 %89, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %90

90:                                               ; preds = %87, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %91 = load i32, ptr %3, align 4
  ret i32 %91

92:                                               ; preds = %43
  %93 = load ptr, ptr %9, align 8
  %94 = load i32, ptr %10, align 4
  %95 = insertvalue { ptr, i32 } poison, ptr %93, 0
  %96 = insertvalue { ptr, i32 } %95, i32 %94, 1
  resume { ptr, i32 } %96

97:                                               ; preds = %36
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

!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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !12, i64 0}
!16 = !{!"_ZTSN4abcg12OpenGLShaderE", !12, i64 0, !12, i64 4}


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

%"struct.std::experimental::fundamentals_v2::source_location" = type { ptr, ptr, i32, i32 }
%"class.std::basic_string_view" = type { i64, ptr }
%"class.__gnu_cxx::__normal_iterator.10" = type { ptr }

@__glewCreateProgram = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [74 x i8], align 1
@_ZTIN4abcg12RuntimeErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@__glewAttachShader = external local_unnamed_addr global ptr, align 8
@__glewLinkProgram = external local_unnamed_addr global ptr, align 8
@__glewDetachShader = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1

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

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 hidden void @_ZN12_GLOBAL__N_113deleteShadersERKSt6vectorIN4abcg12OpenGLShaderESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12experimental15fundamentals_v215source_location7currentEPKcS3_ii(ptr dead_on_unwind noalias writable sret(%"struct.std::experimental::fundamentals_v2::source_location") align 8, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

declare void @_ZN4abcg12RuntimeErrorC1ESt17basic_string_viewIcSt11char_traitsIcEERKNSt12experimental15fundamentals_v215source_locationE(ptr noundef nonnull align 8 dereferenceable(40), i64, ptr, ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN4abcg23triggerOpenGLShaderLinkERKSt6vectorINS_12OpenGLShaderESaIS1_EEb(ptr noundef nonnull align 8 dereferenceable(24) %0, i1 noundef zeroext %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::basic_string_view", align 8
  %4 = alloca %"struct.std::experimental::fundamentals_v2::source_location", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %9 = load ptr, ptr @__glewCreateProgram, align 8, !tbaa !5
  %10 = tail call i32 %9()
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %12, label %21

12:                                               ; preds = %2
  tail call void @_ZN12_GLOBAL__N_113deleteShadersERKSt6vectorIN4abcg12OpenGLShaderESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %0)
  br i1 %1, label %13, label %39

13:                                               ; preds = %12
  %14 = tail call ptr @__cxa_allocate_exception(i64 40) #5
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef @.str) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZNSt12experimental15fundamentals_v215source_location7currentEPKcS3_ii(ptr dead_on_unwind nonnull writable sret(%"struct.std::experimental::fundamentals_v2::source_location") align 8 %4, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.7, i32 noundef 327, i32 noundef 0) #5
  %15 = load i64, ptr %3, align 8
  %16 = getelementptr inbounds i8, ptr %3, i64 8
  %17 = load ptr, ptr %16, align 8
  invoke void @_ZN4abcg12RuntimeErrorC1ESt17basic_string_viewIcSt11char_traitsIcEERKNSt12experimental15fundamentals_v215source_locationE(ptr noundef nonnull align 8 dereferenceable(40) %14, i64 %15, ptr %17, ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %18 unwind label %19

18:                                               ; preds = %13
  call void @__cxa_throw(ptr nonnull %14, ptr nonnull @_ZTIN4abcg12RuntimeErrorE, ptr nonnull @_ZN4abcg9ExceptionD2Ev) #6
  unreachable

19:                                               ; preds = %13
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @__cxa_free_exception(ptr %14) #5
  resume { ptr, i32 } %20

21:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %22 = tail call ptr @_ZNKSt6vectorIN4abcg12OpenGLShaderESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %22, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  %23 = tail call ptr @_ZNKSt6vectorIN4abcg12OpenGLShaderESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %23, ptr %6, align 8
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  %25 = load ptr, ptr @__glewLinkProgram, align 8, !tbaa !5
  call void %25(i32 noundef %10)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %26 = call ptr @_ZNKSt6vectorIN4abcg12OpenGLShaderESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %26, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %27 = call ptr @_ZNKSt6vectorIN4abcg12OpenGLShaderESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  store ptr %27, ptr %8, align 8
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br i1 %28, label %.lr.ph23, label %._crit_edge24

.lr.ph:                                           ; preds = %21, %.lr.ph
  %29 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %30 = load ptr, ptr @__glewAttachShader, align 8, !tbaa !5
  %31 = load i32, ptr %29, align 4, !tbaa !9
  call void %30(i32 noundef %10, i32 noundef %31)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br i1 %33, label %.lr.ph, label %._crit_edge

._crit_edge24:                                    ; preds = %.lr.ph23, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @_ZN12_GLOBAL__N_113deleteShadersERKSt6vectorIN4abcg12OpenGLShaderESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(24) %0)
  br label %39

.lr.ph23:                                         ; preds = %._crit_edge, %.lr.ph23
  %34 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %35 = load ptr, ptr @__glewDetachShader, align 8, !tbaa !5
  %36 = load i32, ptr %34, align 4, !tbaa !9
  call void %35(i32 noundef %10, i32 noundef %36)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %38 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br i1 %38, label %.lr.ph23, label %._crit_edge24

39:                                               ; preds = %12, %._crit_edge24
  ret i32 %10
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorIN4abcg12OpenGLShaderESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorIN4abcg12OpenGLShaderESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN4abcg12OpenGLShaderESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_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 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

!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, !11, i64 0}
!10 = !{!"_ZTSN4abcg12OpenGLShaderE", !11, i64 0, !11, i64 4}
!11 = !{!"int", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass