; LLVM IR from Eukky/TRender :: lib/glew/src (glewinfo)

; 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.XSetWindowAttributes = type { i64, i64, i64, i64, i32, i32, i32, i64, i64, i32, i64, i64, i32, i64, i64 }
%struct.createParams = type { ptr, i32, i32, i32, i32, i32, i32 }
%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 }
%struct.XVisualInfo = type { ptr, i64, i32, i32, i32, i64, i64, i64, i32, i32 }
%struct.Screen = type { ptr, ptr, i64, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, i64, i64, i64, i32, i32, i32, i32, i64 }

@dpy = external dso_local global ptr, align 8
@vi = external dso_local global ptr, align 8
@vis = external dso_local global ptr, align 8
@ctx = external dso_local global ptr, align 8
@wnd = external dso_local global i64, align 8
@cmap = external dso_local global i64, align 8
@__const.glewCreateContext.attrib = external hidden unnamed_addr constant [3 x i32], align 4
@__const.glewCreateContext.FBConfigAttrs = external hidden unnamed_addr constant [3 x i32], align 4
@.str.23 = external hidden unnamed_addr constant [23 x i8], align 1
@__glewXQueryContext = external global ptr, align 8
@__glewXChooseFBConfig = external global ptr, align 8
@__glewXCreateContextAttribsARB = 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: 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) #1

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @glewCreateContext(ptr noundef %0) #2 {
  %2 = alloca i8, align 1
  %3 = alloca ptr, align 8
  %4 = alloca [3 x i32], align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.XSetWindowAttributes, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca [3 x i32], align 4
  %14 = alloca [20 x i32], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %4) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %4, ptr align 4 @__const.glewCreateContext.attrib, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 112, ptr %7) #4
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.createParams, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = call ptr @XOpenDisplay(ptr noundef %19)
  store ptr %20, ptr @dpy, align 8, !tbaa !5
  %21 = load ptr, ptr @dpy, align 8, !tbaa !5
  %22 = icmp eq ptr null, %21
  br i1 %22, label %23, label %24

23:                                               ; preds = %1
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %271

24:                                               ; preds = %1
  %25 = load ptr, ptr @dpy, align 8, !tbaa !5
  %26 = call i32 @glXQueryExtension(ptr noundef %25, ptr noundef %5, ptr noundef %6)
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %271

29:                                               ; preds = %24
  %30 = load ptr, ptr %3, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.createParams, ptr %30, i32 0, i32 1
  %32 = load i32, ptr %31, align 8, !tbaa !12
  %33 = icmp eq i32 %32, -1
  br i1 %33, label %34, label %52

34:                                               ; preds = %29
  %35 = load ptr, ptr @dpy, align 8, !tbaa !5
  %36 = load ptr, ptr @dpy, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.anon, ptr %36, i32 0, i32 33
  %38 = load i32, ptr %37, align 8, !tbaa !13
  %39 = getelementptr inbounds [3 x i32], ptr %4, i64 0, i64 0
  %40 = call ptr @glXChooseVisual(ptr noundef %35, i32 noundef %38, ptr noundef %39)
  store ptr %40, ptr @vi, align 8, !tbaa !5
  %41 = load ptr, ptr @vi, align 8, !tbaa !5
  %42 = icmp eq ptr null, %41
  br i1 %42, label %43, label %44

43:                                               ; preds = %34
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %271

44:                                               ; preds = %34
  %45 = load ptr, ptr @vi, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.XVisualInfo, ptr %45, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8, !tbaa !16
  %48 = call i64 @XVisualIDFromVisual(ptr noundef %47)
  %49 = trunc i64 %48 to i32
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.createParams, ptr %50, i32 0, i32 1
  store i32 %49, ptr %51, align 8, !tbaa !12
  br label %89

52:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %53 = load ptr, ptr @dpy, align 8, !tbaa !5
  %54 = call ptr @XGetVisualInfo(ptr noundef %53, i64 noundef 0, ptr noundef null, ptr noundef %9)
  store ptr %54, ptr @vis, align 8, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !18
  br label %55

55:                                               ; preds = %78, %52
  %56 = load i32, ptr %10, align 4, !tbaa !18
  %57 = load i32, ptr %9, align 4, !tbaa !18
  %58 = icmp slt i32 %56, %57
  br i1 %58, label %59, label %81

59:                                               ; preds = %55
  %60 = load ptr, ptr @vis, align 8, !tbaa !5
  %61 = load i32, ptr %10, align 4, !tbaa !18
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds %struct.XVisualInfo, ptr %60, i64 %62
  %64 = getelementptr inbounds %struct.XVisualInfo, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !16
  %66 = call i64 @XVisualIDFromVisual(ptr noundef %65)
  %67 = trunc i64 %66 to i32
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.createParams, ptr %68, i32 0, i32 1
  %70 = load i32, ptr %69, align 8, !tbaa !12
  %71 = icmp eq i32 %67, %70
  br i1 %71, label %72, label %77

72:                                               ; preds = %59
  %73 = load ptr, ptr @vis, align 8, !tbaa !5
  %74 = load i32, ptr %10, align 4, !tbaa !18
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds %struct.XVisualInfo, ptr %73, i64 %75
  store ptr %76, ptr @vi, align 8, !tbaa !5
  br label %77

77:                                               ; preds = %72, %59
  br label %78

78:                                               ; preds = %77
  %79 = load i32, ptr %10, align 4, !tbaa !18
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %10, align 4, !tbaa !18
  br label %55, !llvm.loop !19

81:                                               ; preds = %55
  %82 = load ptr, ptr @vi, align 8, !tbaa !5
  %83 = icmp eq ptr %82, null
  br i1 %83, label %84, label %85

84:                                               ; preds = %81
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %86

85:                                               ; preds = %81
  store i32 0, ptr %8, align 4
  br label %86

86:                                               ; preds = %85, %84
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %87 = load i32, ptr %8, align 4
  switch i32 %87, label %271 [
    i32 0, label %88
  ]

88:                                               ; preds = %86
  br label %89

89:                                               ; preds = %88, %44
  %90 = load ptr, ptr @dpy, align 8, !tbaa !5
  %91 = load ptr, ptr @vi, align 8, !tbaa !5
  %92 = call ptr @glXCreateContext(ptr noundef %90, ptr noundef %91, ptr noundef null, i32 noundef 1)
  store ptr %92, ptr @ctx, align 8, !tbaa !5
  %93 = load ptr, ptr @ctx, align 8, !tbaa !5
  %94 = icmp eq ptr null, %93
  br i1 %94, label %95, label %96

95:                                               ; preds = %89
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %271

96:                                               ; preds = %89
  %97 = load ptr, ptr @dpy, align 8, !tbaa !5
  %98 = load ptr, ptr @dpy, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.anon, ptr %98, i32 0, i32 35
  %100 = load ptr, ptr %99, align 8, !tbaa !21
  %101 = load ptr, ptr @vi, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.XVisualInfo, ptr %101, i32 0, i32 2
  %103 = load i32, ptr %102, align 8, !tbaa !22
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds %struct.Screen, ptr %100, i64 %104
  %106 = getelementptr inbounds %struct.Screen, ptr %105, i32 0, i32 2
  %107 = load i64, ptr %106, align 8, !tbaa !23
  %108 = load ptr, ptr @vi, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.XVisualInfo, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !16
  %111 = call i64 @XCreateColormap(ptr noundef %97, i64 noundef %107, ptr noundef %110, i32 noundef 0)
  store i64 %111, ptr @cmap, align 8, !tbaa !25
  %112 = getelementptr inbounds %struct.XSetWindowAttributes, ptr %7, i32 0, i32 3
  store i64 0, ptr %112, align 8, !tbaa !26
  %113 = load i64, ptr @cmap, align 8, !tbaa !25
  %114 = getelementptr inbounds %struct.XSetWindowAttributes, ptr %7, i32 0, i32 13
  store i64 %113, ptr %114, align 8, !tbaa !28
  %115 = load ptr, ptr @dpy, align 8, !tbaa !5
  %116 = load ptr, ptr @dpy, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.anon, ptr %116, i32 0, i32 35
  %118 = load ptr, ptr %117, align 8, !tbaa !21
  %119 = load ptr, ptr @vi, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.XVisualInfo, ptr %119, i32 0, i32 2
  %121 = load i32, ptr %120, align 8, !tbaa !22
  %122 = sext i32 %121 to i64
  %123 = getelementptr inbounds %struct.Screen, ptr %118, i64 %122
  %124 = getelementptr inbounds %struct.Screen, ptr %123, i32 0, i32 2
  %125 = load i64, ptr %124, align 8, !tbaa !23
  %126 = load ptr, ptr @vi, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.XVisualInfo, ptr %126, i32 0, i32 3
  %128 = load i32, ptr %127, align 4, !tbaa !29
  %129 = load ptr, ptr @vi, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.XVisualInfo, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !16
  %132 = call i64 @XCreateWindow(ptr noundef %115, i64 noundef %125, i32 noundef 0, i32 noundef 0, i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef %128, i32 noundef 1, ptr noundef %131, i64 noundef 8200, ptr noundef %7)
  store i64 %132, ptr @wnd, align 8, !tbaa !25
  %133 = load ptr, ptr @dpy, align 8, !tbaa !5
  %134 = load i64, ptr @wnd, align 8, !tbaa !25
  %135 = load ptr, ptr @ctx, align 8, !tbaa !5
  %136 = call i32 @glXMakeCurrent(ptr noundef %133, i64 noundef %134, ptr noundef %135)
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %139, label %138

138:                                              ; preds = %96
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %271

139:                                              ; preds = %96
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.createParams, ptr %140, i32 0, i32 2
  %142 = load i32, ptr %141, align 4, !tbaa !30
  %143 = icmp ne i32 %142, 0
  br i1 %143, label %154, label %144

144:                                              ; preds = %139
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.createParams, ptr %145, i32 0, i32 4
  %147 = load i32, ptr %146, align 4, !tbaa !31
  %148 = icmp ne i32 %147, 0
  br i1 %148, label %154, label %149

149:                                              ; preds = %144
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.createParams, ptr %150, i32 0, i32 5
  %152 = load i32, ptr %151, align 8, !tbaa !32
  %153 = icmp ne i32 %152, 0
  br i1 %153, label %154, label %270

154:                                              ; preds = %149, %144, %139
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %155 = load ptr, ptr @ctx, align 8, !tbaa !5
  store ptr %155, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 @__const.glewCreateContext.FBConfigAttrs, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 80, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %156 = call i32 (...) @glxewInit()
  %157 = call zeroext i8 @glxewGetExtension(ptr noundef @.str.23)
  %158 = icmp ne i8 %157, 0
  br i1 %158, label %160, label %159

159:                                              ; preds = %154
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %267

160:                                              ; preds = %154
  %161 = load ptr, ptr @__glewXQueryContext, align 8, !tbaa !5
  %162 = load ptr, ptr @dpy, align 8, !tbaa !5
  %163 = load ptr, ptr %11, align 8, !tbaa !5
  %164 = getelementptr inbounds [3 x i32], ptr %13, i64 0, i64 1
  %165 = call i32 %161(ptr noundef %162, ptr noundef %163, i32 noundef 32787, ptr noundef %164)
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %167, label %168

167:                                              ; preds = %160
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %267

168:                                              ; preds = %160
  %169 = load ptr, ptr @__glewXChooseFBConfig, align 8, !tbaa !5
  %170 = load ptr, ptr @dpy, align 8, !tbaa !5
  %171 = load ptr, ptr @vi, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.XVisualInfo, ptr %171, i32 0, i32 2
  %173 = load i32, ptr %172, align 8, !tbaa !22
  %174 = getelementptr inbounds [3 x i32], ptr %13, i64 0, i64 0
  %175 = call ptr %169(ptr noundef %170, i32 noundef %173, ptr noundef %174, ptr noundef %15)
  store ptr %175, ptr %12, align 8, !tbaa !5
  %176 = load i32, ptr %15, align 4, !tbaa !18
  %177 = icmp slt i32 %176, 1
  br i1 %177, label %178, label %179

178:                                              ; preds = %168
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %267

179:                                              ; preds = %168
  store i32 0, ptr %16, align 4, !tbaa !18
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.createParams, ptr %180, i32 0, i32 2
  %182 = load i32, ptr %181, align 4, !tbaa !30
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %184, label %207

184:                                              ; preds = %179
  %185 = load i32, ptr %16, align 4, !tbaa !18
  %186 = add nsw i32 %185, 1
  store i32 %186, ptr %16, align 4, !tbaa !18
  %187 = sext i32 %185 to i64
  %188 = getelementptr inbounds [20 x i32], ptr %14, i64 0, i64 %187
  store i32 8337, ptr %188, align 4, !tbaa !18
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.createParams, ptr %189, i32 0, i32 2
  %191 = load i32, ptr %190, align 4, !tbaa !30
  %192 = load i32, ptr %16, align 4, !tbaa !18
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %16, align 4, !tbaa !18
  %194 = sext i32 %192 to i64
  %195 = getelementptr inbounds [20 x i32], ptr %14, i64 0, i64 %194
  store i32 %191, ptr %195, align 4, !tbaa !18
  %196 = load i32, ptr %16, align 4, !tbaa !18
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %16, align 4, !tbaa !18
  %198 = sext i32 %196 to i64
  %199 = getelementptr inbounds [20 x i32], ptr %14, i64 0, i64 %198
  store i32 8338, ptr %199, align 4, !tbaa !18
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.createParams, ptr %200, i32 0, i32 3
  %202 = load i32, ptr %201, align 8, !tbaa !33
  %203 = load i32, ptr %16, align 4, !tbaa !18
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %16, align 4, !tbaa !18
  %205 = sext i32 %203 to i64
  %206 = getelementptr inbounds [20 x i32], ptr %14, i64 0, i64 %205
  store i32 %202, ptr %206, align 4, !tbaa !18
  br label %207

207:                                              ; preds = %184, %179
  %208 = load ptr, ptr %3, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.createParams, ptr %208, i32 0, i32 4
  %210 = load i32, ptr %209, align 4, !tbaa !31
  %211 = icmp ne i32 %210, 0
  br i1 %211, label %212, label %224

212:                                              ; preds = %207
  %213 = load i32, ptr %16, align 4, !tbaa !18
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %16, align 4, !tbaa !18
  %215 = sext i32 %213 to i64
  %216 = getelementptr inbounds [20 x i32], ptr %14, i64 0, i64 %215
  store i32 37158, ptr %216, align 4, !tbaa !18
  %217 = load ptr, ptr %3, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.createParams, ptr %217, i32 0, i32 4
  %219 = load i32, ptr %218, align 4, !tbaa !31
  %220 = load i32, ptr %16, align 4, !tbaa !18
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %16, align 4, !tbaa !18
  %222 = sext i32 %220 to i64
  %223 = getelementptr inbounds [20 x i32], ptr %14, i64 0, i64 %222
  store i32 %219, ptr %223, align 4, !tbaa !18
  br label %224

224:                                              ; preds = %212, %207
  %225 = load ptr, ptr %3, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.createParams, ptr %225, i32 0, i32 5
  %227 = load i32, ptr %226, align 8, !tbaa !32
  %228 = icmp ne i32 %227, 0
  br i1 %228, label %229, label %241

229:                                              ; preds = %224
  %230 = load i32, ptr %16, align 4, !tbaa !18
  %231 = add nsw i32 %230, 1
  store i32 %231, ptr %16, align 4, !tbaa !18
  %232 = sext i32 %230 to i64
  %233 = getelementptr inbounds [20 x i32], ptr %14, i64 0, i64 %232
  store i32 8340, ptr %233, align 4, !tbaa !18
  %234 = load ptr, ptr %3, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.createParams, ptr %234, i32 0, i32 5
  %236 = load i32, ptr %235, align 8, !tbaa !32
  %237 = load i32, ptr %16, align 4, !tbaa !18
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %16, align 4, !tbaa !18
  %239 = sext i32 %237 to i64
  %240 = getelementptr inbounds [20 x i32], ptr %14, i64 0, i64 %239
  store i32 %236, ptr %240, align 4, !tbaa !18
  br label %241

241:                                              ; preds = %229, %224
  %242 = load i32, ptr %16, align 4, !tbaa !18
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %16, align 4, !tbaa !18
  %244 = sext i32 %242 to i64
  %245 = getelementptr inbounds [20 x i32], ptr %14, i64 0, i64 %244
  store i32 0, ptr %245, align 4, !tbaa !18
  %246 = load ptr, ptr @__glewXCreateContextAttribsARB, align 8, !tbaa !5
  %247 = load ptr, ptr @dpy, align 8, !tbaa !5
  %248 = load ptr, ptr %12, align 8, !tbaa !5
  %249 = load ptr, ptr %248, align 8, !tbaa !5
  %250 = getelementptr inbounds [20 x i32], ptr %14, i64 0, i64 0
  %251 = call ptr %246(ptr noundef %247, ptr noundef %249, ptr noundef null, i32 noundef 1, ptr noundef %250)
  store ptr %251, ptr @ctx, align 8, !tbaa !5
  %252 = load ptr, ptr @ctx, align 8, !tbaa !5
  %253 = icmp eq ptr null, %252
  br i1 %253, label %254, label %255

254:                                              ; preds = %241
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %267

255:                                              ; preds = %241
  %256 = load ptr, ptr @dpy, align 8, !tbaa !5
  %257 = load i64, ptr @wnd, align 8, !tbaa !25
  %258 = load ptr, ptr @ctx, align 8, !tbaa !5
  %259 = call i32 @glXMakeCurrent(ptr noundef %256, i64 noundef %257, ptr noundef %258)
  %260 = icmp ne i32 %259, 0
  br i1 %260, label %262, label %261

261:                                              ; preds = %255
  store i8 1, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %267

262:                                              ; preds = %255
  %263 = load ptr, ptr @dpy, align 8, !tbaa !5
  %264 = load ptr, ptr %11, align 8, !tbaa !5
  call void @glXDestroyContext(ptr noundef %263, ptr noundef %264)
  %265 = load ptr, ptr %12, align 8, !tbaa !5
  %266 = call i32 @XFree(ptr noundef %265)
  store i32 0, ptr %8, align 4
  br label %267

267:                                              ; preds = %262, %261, %254, %178, %167, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  %268 = load i32, ptr %8, align 4
  switch i32 %268, label %271 [
    i32 0, label %269
  ]

269:                                              ; preds = %267
  br label %270

270:                                              ; preds = %269, %149
  store i8 0, ptr %2, align 1
  store i32 1, ptr %8, align 4
  br label %271

271:                                              ; preds = %270, %267, %138, %95, %86, %43, %28, %23
  call void @llvm.lifetime.end.p0(i64 112, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %4) #4
  %272 = load i8, ptr %2, align 1
  ret i8 %272
}

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

declare ptr @XOpenDisplay(ptr noundef) #3

declare i32 @glXQueryExtension(ptr noundef, ptr noundef, ptr noundef) #3

declare ptr @glXChooseVisual(ptr noundef, i32 noundef, ptr noundef) #3

declare i64 @XVisualIDFromVisual(ptr noundef) #3

declare ptr @XGetVisualInfo(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

declare ptr @glXCreateContext(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

declare i64 @XCreateColormap(ptr noundef, i64 noundef, ptr noundef, i32 noundef) #3

declare i64 @XCreateWindow(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i64 noundef, ptr noundef) #3

declare i32 @glXMakeCurrent(ptr noundef, i64 noundef, ptr noundef) #3

declare i32 @glxewInit(...) #3

declare zeroext i8 @glxewGetExtension(ptr noundef) #3

declare void @glXDestroyContext(ptr noundef, ptr noundef) #3

declare i32 @XFree(ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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/C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"createParams", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!14, !11, i64 224}
!14 = !{!"", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !6, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !11, i64 64, !6, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !6, i64 120, !6, i64 128, !11, i64 136, !15, i64 144, !15, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !11, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !11, i64 228, !6, i64 232, !15, i64 240, !15, i64 248, !11, i64 256, !11, i64 260, !6, i64 264, !6, i64 272, !11, i64 280, !6, i64 288}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"", !6, i64 0, !15, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !11, i64 56, !11, i64 60}
!18 = !{!11, !11, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!14, !6, i64 232}
!22 = !{!17, !11, i64 16}
!23 = !{!24, !15, i64 16}
!24 = !{!"", !6, i64 0, !6, i64 8, !15, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !6, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !15, i64 120}
!25 = !{!15, !15, i64 0}
!26 = !{!27, !15, i64 24}
!27 = !{!"", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !15, i64 48, !15, i64 56, !11, i64 64, !15, i64 72, !15, i64 80, !11, i64 88, !15, i64 96, !15, i64 104}
!28 = !{!27, !15, i64 96}
!29 = !{!17, !11, i64 20}
!30 = !{!10, !11, i64 12}
!31 = !{!10, !11, i64 20}
!32 = !{!10, !11, i64 24}
!33 = !{!10, !11, i64 16}


; 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.XSetWindowAttributes = type { i64, i64, i64, i64, i32, i32, i32, i64, i64, i32, i64, i64, i32, i64, i64 }
%struct.XVisualInfo = type { ptr, i64, i32, i32, i32, i64, i64, i64, i32, i32 }
%struct.Screen = type { ptr, ptr, i64, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, i64, i64, i64, i32, i32, i32, i32, i64 }

@dpy = external dso_local local_unnamed_addr global ptr, align 8
@vi = external dso_local local_unnamed_addr global ptr, align 8
@vis = external dso_local local_unnamed_addr global ptr, align 8
@ctx = external dso_local local_unnamed_addr global ptr, align 8
@wnd = external dso_local local_unnamed_addr global i64, align 8
@cmap = external dso_local local_unnamed_addr global i64, align 8
@__const.glewCreateContext.attrib = external hidden unnamed_addr constant [3 x i32], align 4
@__const.glewCreateContext.FBConfigAttrs = external hidden unnamed_addr constant [3 x i32], align 4
@.str.23 = external hidden unnamed_addr constant [23 x i8], align 1
@__glewXQueryContext = external local_unnamed_addr global ptr, align 8
@__glewXChooseFBConfig = external local_unnamed_addr global ptr, align 8
@__glewXCreateContextAttribsARB = 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 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) #1

; Function Attrs: nounwind uwtable
define dso_local zeroext range(i8 0, 2) i8 @glewCreateContext(ptr nocapture noundef %0) local_unnamed_addr #2 {
  %2 = alloca [3 x i32], align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.XSetWindowAttributes, align 8
  %6 = alloca i32, align 4
  %7 = alloca [3 x i32], align 4
  %8 = alloca [20 x i32], align 16
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %2) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %2, ptr noundef nonnull align 4 dereferenceable(12) @__const.glewCreateContext.attrib, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %5) #4
  %10 = load ptr, ptr %0, align 8, !tbaa !5
  %11 = tail call ptr @XOpenDisplay(ptr noundef %10) #4
  store ptr %11, ptr @dpy, align 8, !tbaa !11
  %12 = icmp eq ptr %11, null
  br i1 %12, label %154, label %13

13:                                               ; preds = %1
  %14 = call i32 @glXQueryExtension(ptr noundef nonnull %11, ptr noundef nonnull %3, ptr noundef nonnull %4) #4
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %154, label %15

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = load i32, ptr %16, align 8, !tbaa !12
  %18 = icmp eq i32 %17, -1
  br i1 %18, label %19, label %29

19:                                               ; preds = %15
  %20 = load ptr, ptr @dpy, align 8, !tbaa !11
  %21 = getelementptr inbounds i8, ptr %20, i64 224
  %22 = load i32, ptr %21, align 8, !tbaa !13
  %23 = call ptr @glXChooseVisual(ptr noundef %20, i32 noundef %22, ptr noundef nonnull %2) #4
  store ptr %23, ptr @vi, align 8, !tbaa !11
  %24 = icmp eq ptr %23, null
  br i1 %24, label %154, label %25

25:                                               ; preds = %19
  %26 = load ptr, ptr %23, align 8, !tbaa !16
  %27 = call i64 @XVisualIDFromVisual(ptr noundef %26) #4
  %28 = trunc i64 %27 to i32
  store i32 %28, ptr %16, align 8, !tbaa !12
  %.pre = load ptr, ptr @vi, align 8, !tbaa !11
  br label %49

29:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  %30 = load ptr, ptr @dpy, align 8, !tbaa !11
  %31 = call ptr @XGetVisualInfo(ptr noundef %30, i64 noundef 0, ptr noundef null, ptr noundef nonnull %6) #4
  store ptr %31, ptr @vis, align 8, !tbaa !11
  %32 = load i32, ptr %6, align 4, !tbaa !18
  %33 = icmp sgt i32 %32, 0
  br i1 %33, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %29, %44
  %indvars.iv = phi i64 [ %indvars.iv.next, %44 ], [ 0, %29 ]
  %34 = load ptr, ptr @vis, align 8, !tbaa !11
  %35 = getelementptr inbounds %struct.XVisualInfo, ptr %34, i64 %indvars.iv
  %36 = load ptr, ptr %35, align 8, !tbaa !16
  %37 = call i64 @XVisualIDFromVisual(ptr noundef %36) #4
  %38 = trunc i64 %37 to i32
  %39 = load i32, ptr %16, align 8, !tbaa !12
  %40 = icmp eq i32 %39, %38
  br i1 %40, label %41, label %44

41:                                               ; preds = %.lr.ph
  %42 = load ptr, ptr @vis, align 8, !tbaa !11
  %43 = getelementptr inbounds %struct.XVisualInfo, ptr %42, i64 %indvars.iv
  store ptr %43, ptr @vi, align 8, !tbaa !11
  br label %44

44:                                               ; preds = %.lr.ph, %41
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %45 = load i32, ptr %6, align 4, !tbaa !18
  %46 = sext i32 %45 to i64
  %47 = icmp slt i64 %indvars.iv.next, %46
  br i1 %47, label %.lr.ph, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %44, %29
  %48 = load ptr, ptr @vi, align 8, !tbaa !11
  %.not43 = icmp eq ptr %48, null
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  br i1 %.not43, label %154, label %49

49:                                               ; preds = %._crit_edge, %25
  %50 = phi ptr [ %48, %._crit_edge ], [ %.pre, %25 ]
  %51 = load ptr, ptr @dpy, align 8, !tbaa !11
  %52 = call ptr @glXCreateContext(ptr noundef %51, ptr noundef %50, ptr noundef null, i32 noundef 1) #4
  store ptr %52, ptr @ctx, align 8, !tbaa !11
  %53 = icmp eq ptr %52, null
  br i1 %53, label %154, label %54

54:                                               ; preds = %49
  %55 = load ptr, ptr @dpy, align 8, !tbaa !11
  %56 = getelementptr inbounds i8, ptr %55, i64 232
  %57 = load ptr, ptr %56, align 8, !tbaa !21
  %58 = load ptr, ptr @vi, align 8, !tbaa !11
  %59 = getelementptr inbounds i8, ptr %58, i64 16
  %60 = load i32, ptr %59, align 8, !tbaa !22
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds %struct.Screen, ptr %57, i64 %61, i32 2
  %63 = load i64, ptr %62, align 8, !tbaa !23
  %64 = load ptr, ptr %58, align 8, !tbaa !16
  %65 = call i64 @XCreateColormap(ptr noundef %55, i64 noundef %63, ptr noundef %64, i32 noundef 0) #4
  store i64 %65, ptr @cmap, align 8, !tbaa !25
  %66 = getelementptr inbounds i8, ptr %5, i64 24
  store i64 0, ptr %66, align 8, !tbaa !26
  %67 = getelementptr inbounds i8, ptr %5, i64 96
  store i64 %65, ptr %67, align 8, !tbaa !28
  %68 = load ptr, ptr @dpy, align 8, !tbaa !11
  %69 = getelementptr inbounds i8, ptr %68, i64 232
  %70 = load ptr, ptr %69, align 8, !tbaa !21
  %71 = load ptr, ptr @vi, align 8, !tbaa !11
  %72 = getelementptr inbounds i8, ptr %71, i64 16
  %73 = load i32, ptr %72, align 8, !tbaa !22
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds %struct.Screen, ptr %70, i64 %74, i32 2
  %76 = load i64, ptr %75, align 8, !tbaa !23
  %77 = getelementptr inbounds i8, ptr %71, i64 20
  %78 = load i32, ptr %77, align 4, !tbaa !29
  %79 = load ptr, ptr %71, align 8, !tbaa !16
  %80 = call i64 @XCreateWindow(ptr noundef %68, i64 noundef %76, i32 noundef 0, i32 noundef 0, i32 noundef 1, i32 noundef 1, i32 noundef 0, i32 noundef %78, i32 noundef 1, ptr noundef %79, i64 noundef 8200, ptr noundef nonnull %5) #4
  store i64 %80, ptr @wnd, align 8, !tbaa !25
  %81 = load ptr, ptr @dpy, align 8, !tbaa !11
  %82 = load ptr, ptr @ctx, align 8, !tbaa !11
  %83 = call i32 @glXMakeCurrent(ptr noundef %81, i64 noundef %80, ptr noundef %82) #4
  %.not44 = icmp eq i32 %83, 0
  br i1 %.not44, label %154, label %84

84:                                               ; preds = %54
  %85 = getelementptr inbounds i8, ptr %0, i64 12
  %86 = load i32, ptr %85, align 4, !tbaa !30
  %.not45 = icmp eq i32 %86, 0
  br i1 %.not45, label %87, label %93

87:                                               ; preds = %84
  %88 = getelementptr inbounds i8, ptr %0, i64 20
  %89 = load i32, ptr %88, align 4, !tbaa !31
  %.not46 = icmp eq i32 %89, 0
  br i1 %.not46, label %90, label %93

90:                                               ; preds = %87
  %91 = getelementptr inbounds i8, ptr %0, i64 24
  %92 = load i32, ptr %91, align 8, !tbaa !32
  %.not47 = icmp eq i32 %92, 0
  br i1 %.not47, label %154, label %93

93:                                               ; preds = %90, %87, %84
  %94 = load ptr, ptr @ctx, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %7, ptr noundef nonnull align 4 dereferenceable(12) @__const.glewCreateContext.FBConfigAttrs, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  %95 = call i32 (...) @glxewInit() #4
  %96 = call zeroext i8 @glxewGetExtension(ptr noundef nonnull @.str.23) #4
  %.not48 = icmp eq i8 %96, 0
  br i1 %.not48, label %153, label %97

97:                                               ; preds = %93
  %98 = load ptr, ptr @__glewXQueryContext, align 8, !tbaa !11
  %99 = load ptr, ptr @dpy, align 8, !tbaa !11
  %100 = getelementptr inbounds i8, ptr %7, i64 4
  %101 = call i32 %98(ptr noundef %99, ptr noundef %94, i32 noundef 32787, ptr noundef nonnull %100) #4
  %.not49 = icmp eq i32 %101, 0
  br i1 %.not49, label %102, label %153

102:                                              ; preds = %97
  %103 = load ptr, ptr @__glewXChooseFBConfig, align 8, !tbaa !11
  %104 = load ptr, ptr @dpy, align 8, !tbaa !11
  %105 = load ptr, ptr @vi, align 8, !tbaa !11
  %106 = getelementptr inbounds i8, ptr %105, i64 16
  %107 = load i32, ptr %106, align 8, !tbaa !22
  %108 = call ptr %103(ptr noundef %104, i32 noundef %107, ptr noundef nonnull %7, ptr noundef nonnull %9) #4
  %109 = load i32, ptr %9, align 4, !tbaa !18
  %110 = icmp slt i32 %109, 1
  br i1 %110, label %153, label %111

111:                                              ; preds = %102
  %112 = load i32, ptr %85, align 4, !tbaa !30
  %.not50 = icmp eq i32 %112, 0
  br i1 %.not50, label %119, label %113

113:                                              ; preds = %111
  store i32 8337, ptr %8, align 16, !tbaa !18
  %114 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 %112, ptr %114, align 4, !tbaa !18
  %115 = getelementptr inbounds i8, ptr %8, i64 8
  store i32 8338, ptr %115, align 8, !tbaa !18
  %116 = getelementptr inbounds i8, ptr %0, i64 16
  %117 = load i32, ptr %116, align 8, !tbaa !33
  %118 = getelementptr inbounds i8, ptr %8, i64 12
  store i32 %117, ptr %118, align 4, !tbaa !18
  br label %119

119:                                              ; preds = %113, %111
  %.0 = phi i32 [ 4, %113 ], [ 0, %111 ]
  %120 = getelementptr inbounds i8, ptr %0, i64 20
  %121 = load i32, ptr %120, align 4, !tbaa !31
  %.not51 = icmp eq i32 %121, 0
  br i1 %.not51, label %129, label %122

122:                                              ; preds = %119
  %123 = or disjoint i32 %.0, 1
  %124 = zext nneg i32 %.0 to i64
  %125 = getelementptr inbounds [20 x i32], ptr %8, i64 0, i64 %124
  store i32 37158, ptr %125, align 16, !tbaa !18
  %126 = or disjoint i32 %.0, 2
  %127 = zext nneg i32 %123 to i64
  %128 = getelementptr inbounds [20 x i32], ptr %8, i64 0, i64 %127
  store i32 %121, ptr %128, align 4, !tbaa !18
  br label %129

129:                                              ; preds = %122, %119
  %.1 = phi i32 [ %126, %122 ], [ %.0, %119 ]
  %130 = getelementptr inbounds i8, ptr %0, i64 24
  %131 = load i32, ptr %130, align 8, !tbaa !32
  %.not52 = icmp eq i32 %131, 0
  br i1 %.not52, label %139, label %132

132:                                              ; preds = %129
  %133 = add nuw nsw i32 %.1, 1
  %134 = zext nneg i32 %.1 to i64
  %135 = getelementptr inbounds [20 x i32], ptr %8, i64 0, i64 %134
  store i32 8340, ptr %135, align 4, !tbaa !18
  %136 = add nuw nsw i32 %.1, 2
  %137 = zext nneg i32 %133 to i64
  %138 = getelementptr inbounds [20 x i32], ptr %8, i64 0, i64 %137
  store i32 %131, ptr %138, align 4, !tbaa !18
  br label %139

139:                                              ; preds = %132, %129
  %.2 = phi i32 [ %136, %132 ], [ %.1, %129 ]
  %140 = zext nneg i32 %.2 to i64
  %141 = getelementptr inbounds [20 x i32], ptr %8, i64 0, i64 %140
  store i32 0, ptr %141, align 4, !tbaa !18
  %142 = load ptr, ptr @__glewXCreateContextAttribsARB, align 8, !tbaa !11
  %143 = load ptr, ptr @dpy, align 8, !tbaa !11
  %144 = load ptr, ptr %108, align 8, !tbaa !11
  %145 = call ptr %142(ptr noundef %143, ptr noundef %144, ptr noundef null, i32 noundef 1, ptr noundef nonnull %8) #4
  store ptr %145, ptr @ctx, align 8, !tbaa !11
  %146 = icmp eq ptr %145, null
  br i1 %146, label %153, label %147

147:                                              ; preds = %139
  %148 = load ptr, ptr @dpy, align 8, !tbaa !11
  %149 = load i64, ptr @wnd, align 8, !tbaa !25
  %150 = call i32 @glXMakeCurrent(ptr noundef %148, i64 noundef %149, ptr noundef nonnull %145) #4
  %.not53 = icmp eq i32 %150, 0
  br i1 %.not53, label %153, label %.critedge

.critedge:                                        ; preds = %147
  %151 = load ptr, ptr @dpy, align 8, !tbaa !11
  call void @glXDestroyContext(ptr noundef %151, ptr noundef %94) #4
  %152 = call i32 @XFree(ptr noundef nonnull %108) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #4
  br label %154

153:                                              ; preds = %147, %139, %102, %97, %93
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #4
  br label %154

154:                                              ; preds = %90, %.critedge, %153, %54, %49, %19, %13, %1, %._crit_edge
  %.3 = phi i8 [ 1, %153 ], [ 1, %._crit_edge ], [ 1, %1 ], [ 1, %13 ], [ 1, %19 ], [ 1, %49 ], [ 1, %54 ], [ 0, %.critedge ], [ 0, %90 ]
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %2) #4
  ret i8 %.3
}

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

declare ptr @XOpenDisplay(ptr noundef) local_unnamed_addr #3

declare i32 @glXQueryExtension(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @glXChooseVisual(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare i64 @XVisualIDFromVisual(ptr noundef) local_unnamed_addr #3

declare ptr @XGetVisualInfo(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @glXCreateContext(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare i64 @XCreateColormap(ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare i64 @XCreateWindow(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare i32 @glXMakeCurrent(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare i32 @glxewInit(...) local_unnamed_addr #3

declare zeroext i8 @glxewGetExtension(ptr noundef) local_unnamed_addr #3

declare void @glXDestroyContext(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @XFree(ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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, !7, i64 0}
!6 = !{!"createParams", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!6, !10, i64 8}
!13 = !{!14, !10, i64 224}
!14 = !{!"", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !7, i64 32, !15, i64 40, !15, i64 48, !15, i64 56, !10, i64 64, !7, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !7, i64 104, !10, i64 112, !10, i64 116, !7, i64 120, !7, i64 128, !10, i64 136, !15, i64 144, !15, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !10, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !10, i64 224, !10, i64 228, !7, i64 232, !15, i64 240, !15, i64 248, !10, i64 256, !10, i64 260, !7, i64 264, !7, i64 272, !10, i64 280, !7, i64 288}
!15 = !{!"long", !8, i64 0}
!16 = !{!17, !7, i64 0}
!17 = !{!"", !7, i64 0, !15, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !15, i64 32, !15, i64 40, !15, i64 48, !10, i64 56, !10, i64 60}
!18 = !{!10, !10, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!14, !7, i64 232}
!22 = !{!17, !10, i64 16}
!23 = !{!24, !15, i64 16}
!24 = !{!"", !7, i64 0, !7, i64 8, !15, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !7, i64 48, !10, i64 56, !7, i64 64, !7, i64 72, !15, i64 80, !15, i64 88, !15, i64 96, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !15, i64 120}
!25 = !{!15, !15, i64 0}
!26 = !{!27, !15, i64 24}
!27 = !{!"", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !15, i64 48, !15, i64 56, !10, i64 64, !15, i64 72, !15, i64 80, !10, i64 88, !15, i64 96, !15, i64 104}
!28 = !{!27, !15, i64 96}
!29 = !{!17, !10, i64 20}
!30 = !{!6, !10, i64 12}
!31 = !{!6, !10, i64 20}
!32 = !{!6, !10, i64 24}
!33 = !{!6, !10, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass