; LLVM IR from ronan-kerviche/glip-lib :: Tools/GlipCompute/src (CreateWindowlessContext)

; 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" = type { i8 }
%struct.anon = type { ptr, ptr, i32, i32, i32, i32, ptr, i64, i64, i64, i32, ptr, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, i32, i64, i64, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, ptr, i64, i64, i32, i32, ptr, ptr, i32, ptr }

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [107 x i8], align 1
@_ZTIN4Glip9ExceptionE = external constant ptr
@.str.4 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE13visualAttribs = external hidden global [1 x i32], align 4
@__const._Z23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.context_attribs = external hidden unnamed_addr constant [9 x i32], align 16
@__const._Z23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.pbufferAttribs = external hidden unnamed_addr constant [5 x i32], align 16
@.str.6 = external hidden unnamed_addr constant [54 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  %13 = alloca i32, align 4
  %14 = alloca i1, align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca i32, align 4
  %20 = alloca i1, align 1
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca [9 x i32], align 16
  %24 = alloca ptr, align 8
  %25 = alloca [5 x i32], align 16
  %26 = alloca i64, align 8
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::allocator", align 1
  %29 = alloca %"class.std::__cxx11::basic_string", align 8
  %30 = alloca %"class.std::allocator", align 1
  %31 = alloca i32, align 4
  %32 = alloca i1, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %33 = call ptr @glXGetProcAddressARB(ptr noundef @.str)
  store ptr %33, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %34 = call ptr @glXGetProcAddressARB(ptr noundef @.str.1)
  store ptr %34, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %35 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  br i1 %35, label %36, label %37

36:                                               ; preds = %1
  br label %39

37:                                               ; preds = %1
  %38 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  br label %39

39:                                               ; preds = %37, %36
  %40 = phi ptr [ null, %36 ], [ %38, %37 ]
  store ptr %40, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = call ptr @XOpenDisplay(ptr noundef %41)
  store ptr %42, ptr %6, align 8, !tbaa !5
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %97

45:                                               ; preds = %39
  %46 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  br i1 %46, label %47, label %69

47:                                               ; preds = %45
  store i1 true, ptr %14, align 1
  %48 = call ptr @__cxa_allocate_exception(i64 152) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %49 unwind label %52

49:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %50 unwind label %56

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 3, ptr %13, align 4, !tbaa !9
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %48, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef %11, i32 noundef 33, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %51 unwind label %60

51:                                               ; preds = %50
  store i1 false, ptr %14, align 1
  invoke void @__cxa_throw(ptr %48, ptr @_ZTIN4Glip9ExceptionE, ptr @_ZN4Glip9ExceptionD1Ev) #8
          to label %155 unwind label %60

52:                                               ; preds = %47
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %9, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %10, align 4
  br label %65

56:                                               ; preds = %49
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %9, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %10, align 4
  br label %64

60:                                               ; preds = %51, %50
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %9, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %64

64:                                               ; preds = %60, %56
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %65

65:                                               ; preds = %64, %52
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  %66 = load i1, ptr %14, align 1
  br i1 %66, label %67, label %68

67:                                               ; preds = %65
  call void @__cxa_free_exception(ptr %48) #7
  br label %68

68:                                               ; preds = %67, %65
  br label %149

69:                                               ; preds = %45
  store i1 true, ptr %20, align 1
  %70 = call ptr @__cxa_allocate_exception(i64 152) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef @.str.4, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %71 unwind label %75

71:                                               ; preds = %69
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.5)
          to label %72 unwind label %79

72:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %73 unwind label %83

73:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 3, ptr %19, align 4, !tbaa !9
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %70, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef %17, i32 noundef 35, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %74 unwind label %87

74:                                               ; preds = %73
  store i1 false, ptr %20, align 1
  invoke void @__cxa_throw(ptr %70, ptr @_ZTIN4Glip9ExceptionE, ptr @_ZN4Glip9ExceptionD1Ev) #8
          to label %155 unwind label %87

75:                                               ; preds = %69
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %9, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %10, align 4
  br label %93

79:                                               ; preds = %71
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %9, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %10, align 4
  br label %92

83:                                               ; preds = %72
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  br label %91

87:                                               ; preds = %74, %73
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %9, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %91

91:                                               ; preds = %87, %83
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  br label %92

92:                                               ; preds = %91, %79
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %93

93:                                               ; preds = %92, %75
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #7
  %94 = load i1, ptr %20, align 1
  br i1 %94, label %95, label %96

95:                                               ; preds = %93
  call void @__cxa_free_exception(ptr %70) #7
  br label %96

96:                                               ; preds = %95, %93
  br label %149

97:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.anon, ptr %99, i32 0, i32 33
  %101 = load i32, ptr %100, align 8, !tbaa !13
  %102 = call ptr @glXChooseFBConfig(ptr noundef %98, i32 noundef %101, ptr noundef @_ZZ23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE13visualAttribs, ptr noundef %21)
  store ptr %102, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 36, ptr %23) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %23, ptr align 16 @__const._Z23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.context_attribs, i64 36, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load ptr, ptr %22, align 8, !tbaa !5
  %106 = getelementptr inbounds ptr, ptr %105, i64 0
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = getelementptr inbounds [9 x i32], ptr %23, i64 0, i64 0
  %109 = call noundef ptr %103(ptr noundef %104, ptr noundef %107, ptr noundef null, i32 noundef 1, ptr noundef %108)
  store ptr %109, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 20, ptr %25) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %25, ptr align 16 @__const._Z23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.pbufferAttribs, i64 20, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = load ptr, ptr %22, align 8, !tbaa !5
  %112 = getelementptr inbounds ptr, ptr %111, i64 0
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = getelementptr inbounds [5 x i32], ptr %25, i64 0, i64 0
  %115 = call i64 @glXCreatePbuffer(ptr noundef %110, ptr noundef %113, ptr noundef %114)
  store i64 %115, ptr %26, align 8, !tbaa !16
  %116 = load ptr, ptr %22, align 8, !tbaa !5
  %117 = call i32 @XFree(ptr noundef %116)
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = call i32 @XSync(ptr noundef %118, i32 noundef 0)
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = load i64, ptr %26, align 8, !tbaa !16
  %122 = load i64, ptr %26, align 8, !tbaa !16
  %123 = load ptr, ptr %24, align 8, !tbaa !5
  %124 = call i32 @glXMakeContextCurrent(ptr noundef %120, i64 noundef %121, i64 noundef %122, ptr noundef %123)
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %148, label %126

126:                                              ; preds = %97
  store i1 true, ptr %32, align 1
  %127 = call ptr @__cxa_allocate_exception(i64 152) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %128 unwind label %131

128:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 1, ptr %30) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %30)
          to label %129 unwind label %135

129:                                              ; preds = %128
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #7
  store i32 3, ptr %31, align 4, !tbaa !9
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %127, ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef %29, i32 noundef 65, ptr noundef nonnull align 4 dereferenceable(4) %31)
          to label %130 unwind label %139

130:                                              ; preds = %129
  store i1 false, ptr %32, align 1
  invoke void @__cxa_throw(ptr %127, ptr @_ZTIN4Glip9ExceptionE, ptr @_ZN4Glip9ExceptionD1Ev) #8
          to label %155 unwind label %139

131:                                              ; preds = %126
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %9, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %10, align 4
  br label %144

135:                                              ; preds = %128
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %9, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %10, align 4
  br label %143

139:                                              ; preds = %130, %129
  %140 = landingpad { ptr, i32 }
          cleanup
  %141 = extractvalue { ptr, i32 } %140, 0
  store ptr %141, ptr %9, align 8
  %142 = extractvalue { ptr, i32 } %140, 1
  store i32 %142, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %29) #7
  br label %143

143:                                              ; preds = %139, %135
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %30) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %30) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #7
  br label %144

144:                                              ; preds = %143, %131
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #7
  %145 = load i1, ptr %32, align 1
  br i1 %145, label %146, label %147

146:                                              ; preds = %144
  call void @__cxa_free_exception(ptr %127) #7
  br label %147

147:                                              ; preds = %146, %144
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %149

148:                                              ; preds = %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 20, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  ret void

149:                                              ; preds = %147, %96, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  br label %150

150:                                              ; preds = %149
  %151 = load ptr, ptr %9, align 8
  %152 = load i32, ptr %10, align 4
  %153 = insertvalue { ptr, i32 } poison, ptr %151, 0
  %154 = insertvalue { ptr, i32 } %153, i32 %152, 1
  resume { ptr, i32 } %154

155:                                              ; preds = %130, %74, %51
  unreachable
}

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

declare ptr @glXGetProcAddressARB(ptr noundef) #2

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

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

declare ptr @XOpenDisplay(ptr noundef) #2

declare ptr @__cxa_allocate_exception(i64)

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

declare i32 @__gxx_personality_v0(...)

declare void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4Glip9ExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #4

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #0

declare ptr @glXChooseFBConfig(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #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) #6

declare i64 @glXCreatePbuffer(ptr noundef, ptr noundef, ptr noundef) #2

declare i32 @XFree(ptr noundef) #2

declare i32 @XSync(ptr noundef, i32 noundef) #2

declare i32 @glXMakeContextCurrent(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { 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 = !{!"_ZTSN4Glip9Exception4TypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 224}
!14 = !{!"_ZTS3$_0", !6, i64 0, !6, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !6, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !12, i64 64, !6, i64 72, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !6, i64 104, !12, i64 112, !12, i64 116, !6, i64 120, !6, i64 128, !12, i64 136, !15, i64 144, !15, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !12, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !12, i64 224, !12, i64 228, !6, i64 232, !15, i64 240, !15, i64 248, !12, i64 256, !12, i64 260, !6, i64 264, !6, i64 272, !12, i64 280, !6, i64 288}
!15 = !{!"long", !7, i64 0}
!16 = !{!15, !15, 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" = type { i8 }

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [107 x i8], align 1
@_ZTIN4Glip9ExceptionE = external constant ptr
@.str.4 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZZ23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE13visualAttribs = external hidden global [1 x i32], align 4
@__const._Z23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.context_attribs = external hidden unnamed_addr constant [9 x i32], align 16
@__const._Z23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.pbufferAttribs = external hidden unnamed_addr constant [5 x i32], align 16
@.str.6 = external hidden unnamed_addr constant [54 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca i32, align 4
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::__cxx11::basic_string", align 8
  %10 = alloca %"class.std::allocator", align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca [9 x i32], align 16
  %14 = alloca [5 x i32], align 16
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::allocator", align 1
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  %19 = alloca i32, align 4
  %20 = tail call ptr @glXGetProcAddressARB(ptr noundef nonnull @.str)
  %21 = tail call ptr @glXGetProcAddressARB(ptr noundef nonnull @.str.1)
  %22 = tail call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  br i1 %22, label %25, label %23

23:                                               ; preds = %1
  %24 = tail call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  br label %25

25:                                               ; preds = %1, %23
  %26 = phi ptr [ %24, %23 ], [ null, %1 ]
  %27 = tail call ptr @XOpenDisplay(ptr noundef %26)
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %56

29:                                               ; preds = %25
  %30 = tail call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %0) #7
  %31 = tail call ptr @__cxa_allocate_exception(i64 152) #7
  br i1 %30, label %32, label %43

32:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %33 unwind label %.thread

33:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %34 unwind label %37

34:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #7
  store i32 3, ptr %6, align 4, !tbaa !5
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %31, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull %4, i32 noundef 33, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %35 unwind label %39

35:                                               ; preds = %34
  invoke void @__cxa_throw(ptr nonnull %31, ptr nonnull @_ZTIN4Glip9ExceptionE, ptr nonnull @_ZN4Glip9ExceptionD1Ev) #8
          to label %82 unwind label %39

.thread:                                          ; preds = %32
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  br label %42

37:                                               ; preds = %33
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %41

39:                                               ; preds = %35, %34
  %.030 = phi i1 [ false, %35 ], [ true, %34 ]
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br label %41

41:                                               ; preds = %37, %39
  %.131 = phi i1 [ %.030, %39 ], [ true, %37 ]
  %.pn44 = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  br i1 %.131, label %42, label %81

42:                                               ; preds = %.thread, %41
  %.pn44.pn50 = phi { ptr, i32 } [ %36, %.thread ], [ %.pn44, %41 ]
  call void @__cxa_free_exception(ptr %31) #7
  br label %81

43:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull @.str.4, ptr noundef nonnull align 8 dereferenceable(32) %0)
          to label %44 unwind label %.thread51

44:                                               ; preds = %43
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.5)
          to label %45 unwind label %.thread55

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %46 unwind label %50

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #7
  store i32 3, ptr %11, align 4, !tbaa !5
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %31, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull %9, i32 noundef 35, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %47 unwind label %52

47:                                               ; preds = %46
  invoke void @__cxa_throw(ptr nonnull %31, ptr nonnull @_ZTIN4Glip9ExceptionE, ptr nonnull @_ZN4Glip9ExceptionD1Ev) #8
          to label %82 unwind label %52

.thread51:                                        ; preds = %43
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %55

.thread55:                                        ; preds = %44
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br label %55

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

52:                                               ; preds = %47, %46
  %.033 = phi i1 [ false, %47 ], [ true, %46 ]
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #7
  br label %54

54:                                               ; preds = %50, %52
  %.134 = phi i1 [ %.033, %52 ], [ true, %50 ]
  %.pn40 = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  br i1 %.134, label %55, label %81

55:                                               ; preds = %.thread55, %.thread51, %54
  %.pn40.pn.pn54 = phi { ptr, i32 } [ %48, %.thread51 ], [ %.pn40, %54 ], [ %49, %.thread55 ]
  call void @__cxa_free_exception(ptr %31) #7
  br label %81

56:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #7
  store i32 0, ptr %12, align 4, !tbaa !9
  %57 = getelementptr inbounds i8, ptr %27, i64 224
  %58 = load i32, ptr %57, align 8, !tbaa !11
  %59 = call ptr @glXChooseFBConfig(ptr noundef nonnull %27, i32 noundef %58, ptr noundef nonnull @_ZZ23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE13visualAttribs, ptr noundef nonnull %12)
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %13) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(36) %13, ptr noundef nonnull align 16 dereferenceable(36) @__const._Z23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.context_attribs, i64 36, i1 false)
  %60 = load ptr, ptr %59, align 8, !tbaa !15
  %61 = call noundef ptr %20(ptr noundef nonnull %27, ptr noundef %60, ptr noundef null, i32 noundef 1, ptr noundef nonnull %13)
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %14) #7
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(20) %14, ptr noundef nonnull align 16 dereferenceable(20) @__const._Z23createWindowlessContextNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE.pbufferAttribs, i64 20, i1 false)
  %62 = load ptr, ptr %59, align 8, !tbaa !15
  %63 = call i64 @glXCreatePbuffer(ptr noundef nonnull %27, ptr noundef %62, ptr noundef nonnull %14)
  %64 = call i32 @XFree(ptr noundef nonnull %59)
  %65 = call i32 @XSync(ptr noundef nonnull %27, i32 noundef 0)
  %66 = call i32 @glXMakeContextCurrent(ptr noundef nonnull %27, i64 noundef %63, i64 noundef %63, ptr noundef %61)
  %.not = icmp eq i32 %66, 0
  br i1 %.not, label %67, label %80

67:                                               ; preds = %56
  %68 = call ptr @__cxa_allocate_exception(i64 152) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull @.str.6, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %69 unwind label %.thread58

69:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %70 unwind label %73

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %19) #7
  store i32 3, ptr %19, align 4, !tbaa !5
  invoke void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152) %68, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull %17, i32 noundef 65, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %71 unwind label %75

71:                                               ; preds = %70
  invoke void @__cxa_throw(ptr nonnull %68, ptr nonnull @_ZTIN4Glip9ExceptionE, ptr nonnull @_ZN4Glip9ExceptionD1Ev) #8
          to label %82 unwind label %75

.thread58:                                        ; preds = %67
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  br label %78

73:                                               ; preds = %69
  %74 = landingpad { ptr, i32 }
          cleanup
  br label %77

75:                                               ; preds = %71, %70
  %.0 = phi i1 [ false, %71 ], [ true, %70 ]
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %19) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %77

77:                                               ; preds = %73, %75
  %.pn = phi { ptr, i32 } [ %76, %75 ], [ %74, %73 ]
  %.1 = phi i1 [ %.0, %75 ], [ true, %73 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #7
  br i1 %.1, label %78, label %79

78:                                               ; preds = %.thread58, %77
  %.pn.pn62 = phi { ptr, i32 } [ %72, %.thread58 ], [ %.pn, %77 ]
  call void @__cxa_free_exception(ptr %68) #7
  br label %79

79:                                               ; preds = %78, %77
  %.pn.pn61 = phi { ptr, i32 } [ %.pn.pn62, %78 ], [ %.pn, %77 ]
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  br label %81

80:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #7
  ret void

81:                                               ; preds = %54, %55, %41, %42, %79
  %.pn44.pn.pn = phi { ptr, i32 } [ %.pn44.pn50, %42 ], [ %.pn44, %41 ], [ %.pn40.pn.pn54, %55 ], [ %.pn40, %54 ], [ %.pn.pn61, %79 ]
  resume { ptr, i32 } %.pn44.pn.pn

82:                                               ; preds = %71, %47, %35
  unreachable
}

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

declare ptr @glXGetProcAddressARB(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

declare ptr @XOpenDisplay(ptr noundef) local_unnamed_addr #2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare i32 @__gxx_personality_v0(...)

declare void @_ZN4Glip9ExceptionC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_iRKNS0_4TypeE(ptr noundef nonnull align 8 dereferenceable(152), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i32 noundef, ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2

; Function Attrs: nounwind
declare void @_ZN4Glip9ExceptionD1Ev(ptr noundef nonnull align 8 dereferenceable(152)) unnamed_addr #4

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

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

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0

declare ptr @glXChooseFBConfig(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress 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) #6

declare i64 @glXCreatePbuffer(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @XFree(ptr noundef) local_unnamed_addr #2

declare i32 @XSync(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @glXMakeContextCurrent(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { 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 = !{!"_ZTSN4Glip9Exception4TypeE", !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 224}
!12 = !{!"_ZTS3$_0", !13, i64 0, !13, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !13, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !10, i64 64, !13, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !13, i64 104, !10, i64 112, !10, i64 116, !13, i64 120, !13, i64 128, !10, i64 136, !14, i64 144, !14, i64 152, !13, i64 160, !13, i64 168, !13, i64 176, !13, i64 184, !10, i64 192, !13, i64 200, !13, i64 208, !13, i64 216, !10, i64 224, !10, i64 228, !13, i64 232, !14, i64 240, !14, i64 248, !10, i64 256, !10, i64 260, !13, i64 264, !13, i64 272, !10, i64 280, !13, i64 288}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!13, !13, i64 0}


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