; LLVM IR from Razakhel/RaZ :: src/RaZ/Render/Renderer.ll (ZN3Raz8Renderer12createShaderENS_10ShaderTypeE)

; 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.3" = type { i8 }

@.str.6 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._ZN3Raz8Renderer12createShaderENS_10ShaderTypeE = external hidden unnamed_addr constant [60 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [279 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [202 x i8], align 1
@__glewCreateShader = 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3Raz8Renderer12checkVersionEii(i32 noundef, i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3Raz8Renderer13isInitializedEv() #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz8Renderer22printConditionalErrorsEv() #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3Raz8Renderer20isExtensionSupportedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3Raz8Renderer12createShaderENS_10ShaderTypeE(i32 noundef %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca i1, align 1
  %5 = alloca %"class.std::allocator.3", align 1
  %6 = alloca i1, align 1
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i1, align 1
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca i1, align 1
  %13 = alloca %"class.std::allocator.3", align 1
  %14 = alloca i1, align 1
  %15 = alloca i1, align 1
  %16 = alloca i1, align 1
  %17 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  %18 = call noundef zeroext i1 @_ZN3Raz8Renderer13isInitializedEv() #4
  br i1 %18, label %19, label %20

19:                                               ; preds = %1
  br label %22

20:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.7, i32 noundef 978, ptr noundef @__PRETTY_FUNCTION__._ZN3Raz8Renderer12createShaderENS_10ShaderTypeE) #5
  unreachable

21:                                               ; No predecessors!
  br label %22

22:                                               ; preds = %21, %19
  %23 = load i32, ptr %2, align 4, !tbaa !5
  %24 = icmp ne i32 %23, 36488
  store i1 false, ptr %4, align 1
  store i1 false, ptr %6, align 1
  store i1 false, ptr %7, align 1
  store i1 false, ptr %10, align 1
  br i1 %24, label %25, label %28

25:                                               ; preds = %22
  %26 = load i32, ptr %2, align 4, !tbaa !5
  %27 = icmp ne i32 %26, 36487
  br i1 %27, label %34, label %28

28:                                               ; preds = %25, %22
  %29 = call noundef zeroext i1 @_ZN3Raz8Renderer12checkVersionEii(i32 noundef 4, i32 noundef 0) #4
  br i1 %29, label %34, label %30

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #4
  store i1 true, ptr %4, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  store i1 true, ptr %6, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  store i1 true, ptr %7, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef @.str.10, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %31 unwind label %38

31:                                               ; preds = %30
  store i1 true, ptr %10, align 1
  %32 = invoke noundef zeroext i1 @_ZN3Raz8Renderer20isExtensionSupportedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %33 unwind label %42

33:                                               ; preds = %31
  br label %34

34:                                               ; preds = %33, %28, %25
  %35 = phi i1 [ true, %28 ], [ true, %25 ], [ %32, %33 ]
  br i1 %35, label %36, label %37

36:                                               ; preds = %34
  br label %48

37:                                               ; preds = %34
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.7, i32 noundef 982, ptr noundef @__PRETTY_FUNCTION__._ZN3Raz8Renderer12createShaderENS_10ShaderTypeE) #5
  unreachable

38:                                               ; preds = %30
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %8, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %9, align 4
  br label %75

42:                                               ; preds = %31
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %8, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %9, align 4
  %46 = load i1, ptr %10, align 1
  br i1 %46, label %73, label %74

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %36
  %49 = load i1, ptr %10, align 1
  br i1 %49, label %50, label %51

50:                                               ; preds = %48
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br label %51

51:                                               ; preds = %50, %48
  %52 = load i1, ptr %7, align 1
  br i1 %52, label %53, label %54

53:                                               ; preds = %51
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  br label %54

54:                                               ; preds = %53, %51
  %55 = load i1, ptr %6, align 1
  br i1 %55, label %56, label %57

56:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  br label %57

57:                                               ; preds = %56, %54
  %58 = load i1, ptr %4, align 1
  br i1 %58, label %59, label %60

59:                                               ; preds = %57
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #4
  br label %60

60:                                               ; preds = %59, %57
  %61 = load i32, ptr %2, align 4, !tbaa !5
  %62 = icmp ne i32 %61, 37305
  store i1 false, ptr %12, align 1
  store i1 false, ptr %14, align 1
  store i1 false, ptr %15, align 1
  store i1 false, ptr %16, align 1
  br i1 %62, label %69, label %63

63:                                               ; preds = %60
  %64 = call noundef zeroext i1 @_ZN3Raz8Renderer12checkVersionEii(i32 noundef 4, i32 noundef 3) #4
  br i1 %64, label %69, label %65

65:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #4
  store i1 true, ptr %12, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr %13) #4
  store i1 true, ptr %14, align 1
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  store i1 true, ptr %15, align 1
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.27, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %66 unwind label %85

66:                                               ; preds = %65
  store i1 true, ptr %16, align 1
  %67 = invoke noundef zeroext i1 @_ZN3Raz8Renderer20isExtensionSupportedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %11)
          to label %68 unwind label %89

68:                                               ; preds = %66
  br label %69

69:                                               ; preds = %68, %63, %60
  %70 = phi i1 [ true, %63 ], [ true, %60 ], [ %67, %68 ]
  br i1 %70, label %71, label %72

71:                                               ; preds = %69
  br label %95

72:                                               ; preds = %69
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str.7, i32 noundef 984, ptr noundef @__PRETTY_FUNCTION__._ZN3Raz8Renderer12createShaderENS_10ShaderTypeE) #5
  unreachable

73:                                               ; preds = %42
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br label %74

74:                                               ; preds = %73, %42
  br label %75

75:                                               ; preds = %74, %38
  %76 = load i1, ptr %7, align 1
  br i1 %76, label %77, label %78

77:                                               ; preds = %75
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  br label %78

78:                                               ; preds = %77, %75
  %79 = load i1, ptr %6, align 1
  br i1 %79, label %80, label %81

80:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  br label %81

81:                                               ; preds = %80, %78
  %82 = load i1, ptr %4, align 1
  br i1 %82, label %83, label %84

83:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #4
  br label %84

84:                                               ; preds = %83, %81
  br label %124

85:                                               ; preds = %65
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %8, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %9, align 4
  br label %114

89:                                               ; preds = %66
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %8, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %9, align 4
  %93 = load i1, ptr %16, align 1
  br i1 %93, label %112, label %113

94:                                               ; No predecessors!
  br label %95

95:                                               ; preds = %94, %71
  %96 = load i1, ptr %16, align 1
  br i1 %96, label %97, label %98

97:                                               ; preds = %95
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  br label %98

98:                                               ; preds = %97, %95
  %99 = load i1, ptr %15, align 1
  br i1 %99, label %100, label %101

100:                                              ; preds = %98
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  br label %101

101:                                              ; preds = %100, %98
  %102 = load i1, ptr %14, align 1
  br i1 %102, label %103, label %104

103:                                              ; preds = %101
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  br label %104

104:                                              ; preds = %103, %101
  %105 = load i1, ptr %12, align 1
  br i1 %105, label %106, label %107

106:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  br label %107

107:                                              ; preds = %106, %104
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  %108 = load ptr, ptr @__glewCreateShader, align 8, !tbaa !9
  %109 = load i32, ptr %2, align 4, !tbaa !5
  %110 = call i32 %108(i32 noundef %109)
  store i32 %110, ptr %17, align 4, !tbaa !11
  call void @_ZN3Raz8Renderer22printConditionalErrorsEv()
  %111 = load i32, ptr %17, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  ret i32 %111

112:                                              ; preds = %89
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #4
  br label %113

113:                                              ; preds = %112, %89
  br label %114

114:                                              ; preds = %113, %85
  %115 = load i1, ptr %15, align 1
  br i1 %115, label %116, label %117

116:                                              ; preds = %114
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #4
  br label %117

117:                                              ; preds = %116, %114
  %118 = load i1, ptr %14, align 1
  br i1 %118, label %119, label %120

119:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 1, ptr %13) #4
  br label %120

120:                                              ; preds = %119, %117
  %121 = load i1, ptr %12, align 1
  br i1 %121, label %122, label %123

122:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #4
  br label %123

123:                                              ; preds = %122, %120
  br label %124

124:                                              ; preds = %123, %84
  %125 = load ptr, ptr %8, align 8
  %126 = load i32, ptr %9, align 4
  %127 = insertvalue { ptr, i32 } poison, ptr %125, 0
  %128 = insertvalue { ptr, i32 } %127, i32 %126, 1
  resume { ptr, i32 } %128
}

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 = { noreturn 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 #4 = { nounwind }
attributes #5 = { 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 = !{!"_ZTSN3Raz10ShaderTypeE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}


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

%"class.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.3" = type { i8 }

@.str.6 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [27 x i8], align 1
@__PRETTY_FUNCTION__._ZN3Raz8Renderer12createShaderENS_10ShaderTypeE = external hidden unnamed_addr constant [60 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [279 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [202 x i8], align 1
@__glewCreateShader = 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 void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3Raz8Renderer12checkVersionEii(i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3Raz8Renderer13isInitializedEv() local_unnamed_addr #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3Raz8Renderer22printConditionalErrorsEv() local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3Raz8Renderer20isExtensionSupportedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3Raz8Renderer12createShaderENS_10ShaderTypeE(i32 noundef %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator.3", align 1
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.3", align 1
  %6 = tail call noundef zeroext i1 @_ZN3Raz8Renderer13isInitializedEv() #4
  br i1 %6, label %8, label %7

7:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.7, i32 noundef 978, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3Raz8Renderer12createShaderENS_10ShaderTypeE) #5
  unreachable

8:                                                ; preds = %1
  %9 = add i32 %0, -36489
  %or.cond = icmp ult i32 %9, -2
  br i1 %or.cond, label %.critedge43, label %10

10:                                               ; preds = %8
  %11 = tail call noundef zeroext i1 @_ZN3Raz8Renderer12checkVersionEii(i32 noundef 4, i32 noundef 0) #4
  br i1 %11, label %.critedge47, label %12

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

13:                                               ; preds = %12
  %14 = invoke noundef zeroext i1 @_ZN3Raz8Renderer20isExtensionSupportedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %15 unwind label %19

15:                                               ; preds = %13
  br i1 %14, label %.critedge41, label %16

16:                                               ; preds = %15
  call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.7, i32 noundef 982, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3Raz8Renderer12createShaderENS_10ShaderTypeE) #5
  unreachable

17:                                               ; preds = %12
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %28

19:                                               ; preds = %13
  %20 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  br label %28

.critedge41:                                      ; preds = %15
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  br label %.critedge47

.critedge43:                                      ; preds = %8
  %.not = icmp eq i32 %0, 37305
  br i1 %.not, label %21, label %.critedge47

21:                                               ; preds = %.critedge43
  %22 = tail call noundef zeroext i1 @_ZN3Raz8Renderer12checkVersionEii(i32 noundef 4, i32 noundef 3) #4
  br i1 %22, label %.critedge47, label %23

23:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.27, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %24 unwind label %29

24:                                               ; preds = %23
  %25 = invoke noundef zeroext i1 @_ZN3Raz8Renderer20isExtensionSupportedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %26 unwind label %31

26:                                               ; preds = %24
  br i1 %25, label %.critedge45, label %27

27:                                               ; preds = %26
  call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.7, i32 noundef 984, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3Raz8Renderer12createShaderENS_10ShaderTypeE) #5
  unreachable

28:                                               ; preds = %17, %19
  %.pn = phi { ptr, i32 } [ %20, %19 ], [ %18, %17 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  br label %36

29:                                               ; preds = %23
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %35

31:                                               ; preds = %24
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br label %35

.critedge45:                                      ; preds = %26
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  br label %.critedge47

.critedge47:                                      ; preds = %.critedge41, %10, %.critedge43, %21, %.critedge45
  %33 = load ptr, ptr @__glewCreateShader, align 8, !tbaa !5
  %34 = call i32 %33(i32 noundef %0)
  call void @_ZN3Raz8Renderer22printConditionalErrorsEv()
  ret i32 %34

35:                                               ; preds = %29, %31
  %.pn37 = phi { ptr, i32 } [ %32, %31 ], [ %30, %29 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #4
  br label %36

36:                                               ; preds = %35, %28
  %.pn37.pn = phi { ptr, i32 } [ %.pn37, %35 ], [ %.pn, %28 ]
  resume { ptr, i32 } %.pn37.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 = { noreturn 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 #4 = { nounwind }
attributes #5 = { 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"}


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