; LLVM IR from erincatto/box2d-lite :: extern/glfw/src/egl_context.ll (glfwCreateContextEGL)

; 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._GLFWlibrary = type { i32, %struct.anon, ptr, ptr, ptr, ptr, i32, [16 x %struct._GLFWjoystick], ptr, i32, %struct._GLFWtls, %struct._GLFWtls, %struct._GLFWmutex, %struct.anon.4, %struct.anon.5, %struct.anon.6, %struct._GLFWlibraryX11, %struct._GLFWlibraryGLX, %struct._GLFWlibraryLinux, %struct._GLFWlibraryEGL, %struct._GLFWlibraryOSMesa }
%struct.anon = type { %struct._GLFWinitconfig, %struct._GLFWfbconfig, %struct._GLFWwndconfig, %struct._GLFWctxconfig, i32 }
%struct._GLFWinitconfig = type { i32, %struct.anon.0 }
%struct.anon.0 = type { i32, i32 }
%struct._GLFWfbconfig = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }
%struct._GLFWwndconfig = type { i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.anon.1, %struct.anon.2 }
%struct.anon.1 = type { i32, [256 x i8] }
%struct.anon.2 = type { [256 x i8], [256 x i8] }
%struct._GLFWctxconfig = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, %struct.anon.3 }
%struct.anon.3 = type { i32 }
%struct._GLFWjoystick = type { i32, ptr, i32, ptr, i32, ptr, i32, ptr, ptr, [33 x i8], ptr, %struct._GLFWjoystickLinux }
%struct._GLFWjoystickLinux = type { i32, [4096 x i8], [512 x i32], [64 x i32], [64 x %struct.input_absinfo], [4 x [2 x i32]] }
%struct.input_absinfo = type { i32, i32, i32, i32, i32, i32 }
%struct._GLFWtls = type { %struct._GLFWtlsPOSIX }
%struct._GLFWtlsPOSIX = type { i32, i32 }
%struct._GLFWmutex = type { %struct._GLFWmutexPOSIX }
%struct._GLFWmutexPOSIX = type { i32, %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.anon.4 = type { i64, %struct._GLFWtimerPOSIX }
%struct._GLFWtimerPOSIX = type { i32, i64 }
%struct.anon.5 = type { i32, ptr, [2 x ptr], ptr, ptr, i32, i32, i32 }
%struct.anon.6 = type { ptr, ptr }
%struct._GLFWlibraryX11 = type { ptr, i32, i64, float, float, i64, i64, i32, ptr, i32, ptr, ptr, [5 x i8], [256 x i16], [349 x i16], double, double, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, %struct.anon.7, %struct.anon.8, %struct.anon.9, %struct.anon.10, %struct.anon.11, %struct.anon.12, %struct.anon.13, %struct.anon.14, %struct.anon.15, %struct.anon.16 }
%struct.anon.7 = type { i32, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.anon.8 = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.anon.9 = type { i32, i32, i32, i32, i32 }
%struct.anon.10 = type { i32, i64, i64 }
%struct.anon.11 = type { ptr, ptr, ptr, ptr }
%struct.anon.12 = type { i32, ptr, i32, i32, ptr, ptr, ptr }
%struct.anon.13 = type { ptr, ptr }
%struct.anon.14 = type { i32, ptr, i32, i32, ptr, ptr, ptr, ptr }
%struct.anon.15 = type { i32, ptr, i32, i32, i32, i32, i32, ptr, ptr }
%struct.anon.16 = type { i32, ptr, i32, i32, i32, i32, ptr, ptr, ptr }
%struct._GLFWlibraryGLX = type { i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct._GLFWlibraryLinux = type { i32, i32, %struct.re_pattern_buffer, i32 }
%struct.re_pattern_buffer = type { ptr, i64, i64, i64, ptr, ptr, i64, i8 }
%struct._GLFWlibraryEGL = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._GLFWlibraryOSMesa = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._GLFWwindow = type { ptr, i32, i32, i32, i32, i32, i32, ptr, %struct.GLFWvidmode, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [8 x i8], [349 x i8], double, double, %struct._GLFWcontext, %struct.anon.17, %struct._GLFWwindowX11 }
%struct.GLFWvidmode = type { i32, i32, i32, i32, i32, i32 }
%struct._GLFWcontext = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct._GLFWcontextGLX, %struct._GLFWcontextEGL, %struct._GLFWcontextOSMesa }
%struct._GLFWcontextGLX = type { ptr, i64 }
%struct._GLFWcontextEGL = type { ptr, ptr, ptr, ptr }
%struct._GLFWcontextOSMesa = type { ptr, i32, i32, ptr }
%struct.anon.17 = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._GLFWwindowX11 = type { i64, i64, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }

@_glfw = external global %struct._GLFWlibrary, align 8
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.31 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [84 x i8], align 1
@__PRETTY_FUNCTION__._glfwCreateContextEGL = external hidden unnamed_addr constant [93 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [41 x i8], align 1
@__const._glfwCreateContextEGL.es1sonames = external hidden unnamed_addr constant [3 x ptr], align 16
@__const._glfwCreateContextEGL.es2sonames = external hidden unnamed_addr constant [2 x ptr], align 16
@__const._glfwCreateContextEGL.glsonames = external hidden unnamed_addr constant [2 x ptr], align 16
@.str.39 = external hidden unnamed_addr constant [35 x i8], align 1

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

; 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
declare ptr @dlopen(ptr noundef, i32 noundef) #2

declare void @_glfwInputError(i32 noundef, ptr noundef, ...) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #4

; Function Attrs: nounwind uwtable
declare hidden ptr @getEGLErrorString(i32 noundef) #5

; Function Attrs: nounwind uwtable
declare hidden i32 @extensionSupportedEGL(ptr noundef) #5

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

; Function Attrs: nounwind uwtable
define dso_local i32 @_glfwCreateContextEGL(ptr noundef %0, ptr noundef %1, ptr noundef %2) #5 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca [40 x i32], align 16
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca [3 x ptr], align 16
  %19 = alloca [2 x ptr], align 16
  %20 = alloca [2 x ptr], align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 160, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  store ptr null, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  store i32 0, ptr %11, align 4, !tbaa !9
  %21 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), align 8, !tbaa !11
  %22 = icmp ne ptr %21, null
  br i1 %22, label %24, label %23

23:                                               ; preds = %3
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65542, ptr noundef @.str.27)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %542

24:                                               ; preds = %3
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._GLFWctxconfig, ptr %25, i32 0, i32 10
  %27 = load ptr, ptr %26, align 8, !tbaa !48
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %37

29:                                               ; preds = %24
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._GLFWctxconfig, ptr %30, i32 0, i32 10
  %32 = load ptr, ptr %31, align 8, !tbaa !48
  %33 = getelementptr inbounds %struct._GLFWwindow, ptr %32, i32 0, i32 25
  %34 = getelementptr inbounds %struct._GLFWcontext, ptr %33, i32 0, i32 21
  %35 = getelementptr inbounds %struct._GLFWcontextEGL, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !49
  store ptr %36, ptr %10, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %29, %24
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = call i32 @chooseEGLConfig(ptr noundef %38, ptr noundef %39, ptr noundef %9)
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %43, label %42

42:                                               ; preds = %37
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65545, ptr noundef @.str.28)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %542

43:                                               ; preds = %37
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._GLFWctxconfig, ptr %44, i32 0, i32 0
  %46 = load i32, ptr %45, align 8, !tbaa !58
  %47 = icmp eq i32 %46, 196610
  br i1 %47, label %48, label %57

48:                                               ; preds = %43
  %49 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 16), align 8, !tbaa !59
  %50 = call i32 %49(i32 noundef 12448)
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %56, label %52

52:                                               ; preds = %48
  %53 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 13), align 8, !tbaa !60
  %54 = call i32 %53()
  %55 = call ptr @getEGLErrorString(i32 noundef %54)
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65542, ptr noundef @.str.29, ptr noundef %55)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %542

56:                                               ; preds = %48
  br label %66

57:                                               ; preds = %43
  %58 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 16), align 8, !tbaa !59
  %59 = call i32 %58(i32 noundef 12450)
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %65, label %61

61:                                               ; preds = %57
  %62 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 13), align 8, !tbaa !60
  %63 = call i32 %62()
  %64 = call ptr @getEGLErrorString(i32 noundef %63)
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65542, ptr noundef @.str.30, ptr noundef %64)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %542

65:                                               ; preds = %57
  br label %66

66:                                               ; preds = %65, %56
  %67 = load i32, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 4), align 4, !tbaa !61
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %272

69:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._GLFWctxconfig, ptr %70, i32 0, i32 0
  %72 = load i32, ptr %71, align 8, !tbaa !58
  %73 = icmp eq i32 %72, 196609
  br i1 %73, label %74, label %100

74:                                               ; preds = %69
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._GLFWctxconfig, ptr %75, i32 0, i32 4
  %77 = load i32, ptr %76, align 8, !tbaa !62
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %82

79:                                               ; preds = %74
  %80 = load i32, ptr %14, align 4, !tbaa !9
  %81 = or i32 %80, 2
  store i32 %81, ptr %14, align 4, !tbaa !9
  br label %82

82:                                               ; preds = %79, %74
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct._GLFWctxconfig, ptr %83, i32 0, i32 7
  %85 = load i32, ptr %84, align 4, !tbaa !63
  %86 = icmp eq i32 %85, 204801
  br i1 %86, label %87, label %90

87:                                               ; preds = %82
  %88 = load i32, ptr %13, align 4, !tbaa !9
  %89 = or i32 %88, 1
  store i32 %89, ptr %13, align 4, !tbaa !9
  br label %99

90:                                               ; preds = %82
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._GLFWctxconfig, ptr %91, i32 0, i32 7
  %93 = load i32, ptr %92, align 4, !tbaa !63
  %94 = icmp eq i32 %93, 204802
  br i1 %94, label %95, label %98

95:                                               ; preds = %90
  %96 = load i32, ptr %13, align 4, !tbaa !9
  %97 = or i32 %96, 2
  store i32 %97, ptr %13, align 4, !tbaa !9
  br label %98

98:                                               ; preds = %95, %90
  br label %99

99:                                               ; preds = %98, %87
  br label %100

100:                                              ; preds = %99, %69
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._GLFWctxconfig, ptr %101, i32 0, i32 5
  %103 = load i32, ptr %102, align 4, !tbaa !64
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %108

105:                                              ; preds = %100
  %106 = load i32, ptr %14, align 4, !tbaa !9
  %107 = or i32 %106, 1
  store i32 %107, ptr %14, align 4, !tbaa !9
  br label %108

108:                                              ; preds = %105, %100
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._GLFWctxconfig, ptr %109, i32 0, i32 8
  %111 = load i32, ptr %110, align 8, !tbaa !65
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %159

113:                                              ; preds = %108
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._GLFWctxconfig, ptr %114, i32 0, i32 8
  %116 = load i32, ptr %115, align 8, !tbaa !65
  %117 = icmp eq i32 %116, 200705
  br i1 %117, label %118, label %134

118:                                              ; preds = %113
  %119 = load i32, ptr %11, align 4, !tbaa !9
  %120 = add nsw i32 %119, 1
  %121 = sext i32 %120 to i64
  %122 = icmp ult i64 %121, 40
  br i1 %122, label %123, label %124

123:                                              ; preds = %118
  br label %125

124:                                              ; preds = %118
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 525, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

125:                                              ; preds = %123
  %126 = load i32, ptr %11, align 4, !tbaa !9
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr %11, align 4, !tbaa !9
  %128 = sext i32 %126 to i64
  %129 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %128
  store i32 12733, ptr %129, align 4, !tbaa !9
  %130 = load i32, ptr %11, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr %11, align 4, !tbaa !9
  %132 = sext i32 %130 to i64
  %133 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %132
  store i32 12734, ptr %133, align 4, !tbaa !9
  br label %156

134:                                              ; preds = %113
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._GLFWctxconfig, ptr %135, i32 0, i32 8
  %137 = load i32, ptr %136, align 8, !tbaa !65
  %138 = icmp eq i32 %137, 200706
  br i1 %138, label %139, label %155

139:                                              ; preds = %134
  %140 = load i32, ptr %11, align 4, !tbaa !9
  %141 = add nsw i32 %140, 1
  %142 = sext i32 %141 to i64
  %143 = icmp ult i64 %142, 40
  br i1 %143, label %144, label %145

144:                                              ; preds = %139
  br label %146

145:                                              ; preds = %139
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 530, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

146:                                              ; preds = %144
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = add nsw i32 %147, 1
  store i32 %148, ptr %11, align 4, !tbaa !9
  %149 = sext i32 %147 to i64
  %150 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %149
  store i32 12733, ptr %150, align 4, !tbaa !9
  %151 = load i32, ptr %11, align 4, !tbaa !9
  %152 = add nsw i32 %151, 1
  store i32 %152, ptr %11, align 4, !tbaa !9
  %153 = sext i32 %151 to i64
  %154 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %153
  store i32 12735, ptr %154, align 4, !tbaa !9
  br label %155

155:                                              ; preds = %146, %134
  br label %156

156:                                              ; preds = %155, %125
  %157 = load i32, ptr %14, align 4, !tbaa !9
  %158 = or i32 %157, 4
  store i32 %158, ptr %14, align 4, !tbaa !9
  br label %159

159:                                              ; preds = %156, %108
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct._GLFWctxconfig, ptr %160, i32 0, i32 6
  %162 = load i32, ptr %161, align 8, !tbaa !66
  %163 = icmp ne i32 %162, 0
  br i1 %163, label %164, label %184

164:                                              ; preds = %159
  %165 = load i32, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 5), align 8, !tbaa !67
  %166 = icmp ne i32 %165, 0
  br i1 %166, label %167, label %183

167:                                              ; preds = %164
  %168 = load i32, ptr %11, align 4, !tbaa !9
  %169 = add nsw i32 %168, 1
  %170 = sext i32 %169 to i64
  %171 = icmp ult i64 %170, 40
  br i1 %171, label %172, label %173

172:                                              ; preds = %167
  br label %174

173:                                              ; preds = %167
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 539, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

174:                                              ; preds = %172
  %175 = load i32, ptr %11, align 4, !tbaa !9
  %176 = add nsw i32 %175, 1
  store i32 %176, ptr %11, align 4, !tbaa !9
  %177 = sext i32 %175 to i64
  %178 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %177
  store i32 12723, ptr %178, align 4, !tbaa !9
  %179 = load i32, ptr %11, align 4, !tbaa !9
  %180 = add nsw i32 %179, 1
  store i32 %180, ptr %11, align 4, !tbaa !9
  %181 = sext i32 %179 to i64
  %182 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %181
  store i32 1, ptr %182, align 4, !tbaa !9
  br label %183

183:                                              ; preds = %174, %164
  br label %184

184:                                              ; preds = %183, %159
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct._GLFWctxconfig, ptr %185, i32 0, i32 2
  %187 = load i32, ptr %186, align 8, !tbaa !68
  %188 = icmp ne i32 %187, 1
  br i1 %188, label %194, label %189

189:                                              ; preds = %184
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct._GLFWctxconfig, ptr %190, i32 0, i32 3
  %192 = load i32, ptr %191, align 4, !tbaa !69
  %193 = icmp ne i32 %192, 0
  br i1 %193, label %194, label %231

194:                                              ; preds = %189, %184
  %195 = load i32, ptr %11, align 4, !tbaa !9
  %196 = add nsw i32 %195, 1
  %197 = sext i32 %196 to i64
  %198 = icmp ult i64 %197, 40
  br i1 %198, label %199, label %200

199:                                              ; preds = %194
  br label %201

200:                                              ; preds = %194
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 544, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

201:                                              ; preds = %199
  %202 = load i32, ptr %11, align 4, !tbaa !9
  %203 = add nsw i32 %202, 1
  store i32 %203, ptr %11, align 4, !tbaa !9
  %204 = sext i32 %202 to i64
  %205 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %204
  store i32 12440, ptr %205, align 4, !tbaa !9
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct._GLFWctxconfig, ptr %206, i32 0, i32 2
  %208 = load i32, ptr %207, align 8, !tbaa !68
  %209 = load i32, ptr %11, align 4, !tbaa !9
  %210 = add nsw i32 %209, 1
  store i32 %210, ptr %11, align 4, !tbaa !9
  %211 = sext i32 %209 to i64
  %212 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %211
  store i32 %208, ptr %212, align 4, !tbaa !9
  %213 = load i32, ptr %11, align 4, !tbaa !9
  %214 = add nsw i32 %213, 1
  %215 = sext i32 %214 to i64
  %216 = icmp ult i64 %215, 40
  br i1 %216, label %217, label %218

217:                                              ; preds = %201
  br label %219

218:                                              ; preds = %201
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 545, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

219:                                              ; preds = %217
  %220 = load i32, ptr %11, align 4, !tbaa !9
  %221 = add nsw i32 %220, 1
  store i32 %221, ptr %11, align 4, !tbaa !9
  %222 = sext i32 %220 to i64
  %223 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %222
  store i32 12539, ptr %223, align 4, !tbaa !9
  %224 = load ptr, ptr %6, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct._GLFWctxconfig, ptr %224, i32 0, i32 3
  %226 = load i32, ptr %225, align 4, !tbaa !69
  %227 = load i32, ptr %11, align 4, !tbaa !9
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %11, align 4, !tbaa !9
  %229 = sext i32 %227 to i64
  %230 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %229
  store i32 %226, ptr %230, align 4, !tbaa !9
  br label %231

231:                                              ; preds = %219, %189
  %232 = load i32, ptr %13, align 4, !tbaa !9
  %233 = icmp ne i32 %232, 0
  br i1 %233, label %234, label %251

234:                                              ; preds = %231
  %235 = load i32, ptr %11, align 4, !tbaa !9
  %236 = add nsw i32 %235, 1
  %237 = sext i32 %236 to i64
  %238 = icmp ult i64 %237, 40
  br i1 %238, label %239, label %240

239:                                              ; preds = %234
  br label %241

240:                                              ; preds = %234
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 549, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

241:                                              ; preds = %239
  %242 = load i32, ptr %11, align 4, !tbaa !9
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %11, align 4, !tbaa !9
  %244 = sext i32 %242 to i64
  %245 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %244
  store i32 12541, ptr %245, align 4, !tbaa !9
  %246 = load i32, ptr %13, align 4, !tbaa !9
  %247 = load i32, ptr %11, align 4, !tbaa !9
  %248 = add nsw i32 %247, 1
  store i32 %248, ptr %11, align 4, !tbaa !9
  %249 = sext i32 %247 to i64
  %250 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %249
  store i32 %246, ptr %250, align 4, !tbaa !9
  br label %251

251:                                              ; preds = %241, %231
  %252 = load i32, ptr %14, align 4, !tbaa !9
  %253 = icmp ne i32 %252, 0
  br i1 %253, label %254, label %271

254:                                              ; preds = %251
  %255 = load i32, ptr %11, align 4, !tbaa !9
  %256 = add nsw i32 %255, 1
  %257 = sext i32 %256 to i64
  %258 = icmp ult i64 %257, 40
  br i1 %258, label %259, label %260

259:                                              ; preds = %254
  br label %261

260:                                              ; preds = %254
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 552, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

261:                                              ; preds = %259
  %262 = load i32, ptr %11, align 4, !tbaa !9
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %11, align 4, !tbaa !9
  %264 = sext i32 %262 to i64
  %265 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %264
  store i32 12540, ptr %265, align 4, !tbaa !9
  %266 = load i32, ptr %14, align 4, !tbaa !9
  %267 = load i32, ptr %11, align 4, !tbaa !9
  %268 = add nsw i32 %267, 1
  store i32 %268, ptr %11, align 4, !tbaa !9
  %269 = sext i32 %267 to i64
  %270 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %269
  store i32 %266, ptr %270, align 4, !tbaa !9
  br label %271

271:                                              ; preds = %261, %251
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %297

272:                                              ; preds = %66
  %273 = load ptr, ptr %6, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct._GLFWctxconfig, ptr %273, i32 0, i32 0
  %275 = load i32, ptr %274, align 8, !tbaa !58
  %276 = icmp eq i32 %275, 196610
  br i1 %276, label %277, label %296

277:                                              ; preds = %272
  %278 = load i32, ptr %11, align 4, !tbaa !9
  %279 = add nsw i32 %278, 1
  %280 = sext i32 %279 to i64
  %281 = icmp ult i64 %280, 40
  br i1 %281, label %282, label %283

282:                                              ; preds = %277
  br label %284

283:                                              ; preds = %277
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 557, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

284:                                              ; preds = %282
  %285 = load i32, ptr %11, align 4, !tbaa !9
  %286 = add nsw i32 %285, 1
  store i32 %286, ptr %11, align 4, !tbaa !9
  %287 = sext i32 %285 to i64
  %288 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %287
  store i32 12440, ptr %288, align 4, !tbaa !9
  %289 = load ptr, ptr %6, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct._GLFWctxconfig, ptr %289, i32 0, i32 2
  %291 = load i32, ptr %290, align 8, !tbaa !68
  %292 = load i32, ptr %11, align 4, !tbaa !9
  %293 = add nsw i32 %292, 1
  store i32 %293, ptr %11, align 4, !tbaa !9
  %294 = sext i32 %292 to i64
  %295 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %294
  store i32 %291, ptr %295, align 4, !tbaa !9
  br label %296

296:                                              ; preds = %284, %272
  br label %297

297:                                              ; preds = %296, %271
  %298 = load i32, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 8), align 4, !tbaa !70
  %299 = icmp ne i32 %298, 0
  br i1 %299, label %300, label %344

300:                                              ; preds = %297
  %301 = load ptr, ptr %6, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct._GLFWctxconfig, ptr %301, i32 0, i32 9
  %303 = load i32, ptr %302, align 4, !tbaa !71
  %304 = icmp eq i32 %303, 217090
  br i1 %304, label %305, label %321

305:                                              ; preds = %300
  %306 = load i32, ptr %11, align 4, !tbaa !9
  %307 = add nsw i32 %306, 1
  %308 = sext i32 %307 to i64
  %309 = icmp ult i64 %308, 40
  br i1 %309, label %310, label %311

310:                                              ; preds = %305
  br label %312

311:                                              ; preds = %305
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 565, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

312:                                              ; preds = %310
  %313 = load i32, ptr %11, align 4, !tbaa !9
  %314 = add nsw i32 %313, 1
  store i32 %314, ptr %11, align 4, !tbaa !9
  %315 = sext i32 %313 to i64
  %316 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %315
  store i32 8343, ptr %316, align 4, !tbaa !9
  %317 = load i32, ptr %11, align 4, !tbaa !9
  %318 = add nsw i32 %317, 1
  store i32 %318, ptr %11, align 4, !tbaa !9
  %319 = sext i32 %317 to i64
  %320 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %319
  store i32 0, ptr %320, align 4, !tbaa !9
  br label %343

321:                                              ; preds = %300
  %322 = load ptr, ptr %6, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct._GLFWctxconfig, ptr %322, i32 0, i32 9
  %324 = load i32, ptr %323, align 4, !tbaa !71
  %325 = icmp eq i32 %324, 217089
  br i1 %325, label %326, label %342

326:                                              ; preds = %321
  %327 = load i32, ptr %11, align 4, !tbaa !9
  %328 = add nsw i32 %327, 1
  %329 = sext i32 %328 to i64
  %330 = icmp ult i64 %329, 40
  br i1 %330, label %331, label %332

331:                                              ; preds = %326
  br label %333

332:                                              ; preds = %326
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 570, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

333:                                              ; preds = %331
  %334 = load i32, ptr %11, align 4, !tbaa !9
  %335 = add nsw i32 %334, 1
  store i32 %335, ptr %11, align 4, !tbaa !9
  %336 = sext i32 %334 to i64
  %337 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %336
  store i32 8343, ptr %337, align 4, !tbaa !9
  %338 = load i32, ptr %11, align 4, !tbaa !9
  %339 = add nsw i32 %338, 1
  store i32 %339, ptr %11, align 4, !tbaa !9
  %340 = sext i32 %338 to i64
  %341 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %340
  store i32 8344, ptr %341, align 4, !tbaa !9
  br label %342

342:                                              ; preds = %333, %321
  br label %343

343:                                              ; preds = %342, %312
  br label %344

344:                                              ; preds = %343, %297
  %345 = load i32, ptr %11, align 4, !tbaa !9
  %346 = add nsw i32 %345, 1
  %347 = sext i32 %346 to i64
  %348 = icmp ult i64 %347, 40
  br i1 %348, label %349, label %350

349:                                              ; preds = %344
  br label %351

350:                                              ; preds = %344
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 574, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

351:                                              ; preds = %349
  %352 = load i32, ptr %11, align 4, !tbaa !9
  %353 = add nsw i32 %352, 1
  store i32 %353, ptr %11, align 4, !tbaa !9
  %354 = sext i32 %352 to i64
  %355 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %354
  store i32 12344, ptr %355, align 4, !tbaa !9
  %356 = load i32, ptr %11, align 4, !tbaa !9
  %357 = add nsw i32 %356, 1
  store i32 %357, ptr %11, align 4, !tbaa !9
  %358 = sext i32 %356 to i64
  %359 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %358
  store i32 12344, ptr %359, align 4, !tbaa !9
  %360 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 17), align 8, !tbaa !72
  %361 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), align 8, !tbaa !11
  %362 = load ptr, ptr %9, align 8, !tbaa !5
  %363 = load ptr, ptr %10, align 8, !tbaa !5
  %364 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 0
  %365 = call ptr %360(ptr noundef %361, ptr noundef %362, ptr noundef %363, ptr noundef %364)
  %366 = load ptr, ptr %5, align 8, !tbaa !5
  %367 = getelementptr inbounds %struct._GLFWwindow, ptr %366, i32 0, i32 25
  %368 = getelementptr inbounds %struct._GLFWcontext, ptr %367, i32 0, i32 21
  %369 = getelementptr inbounds %struct._GLFWcontextEGL, ptr %368, i32 0, i32 1
  store ptr %365, ptr %369, align 8, !tbaa !49
  %370 = load ptr, ptr %5, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct._GLFWwindow, ptr %370, i32 0, i32 25
  %372 = getelementptr inbounds %struct._GLFWcontext, ptr %371, i32 0, i32 21
  %373 = getelementptr inbounds %struct._GLFWcontextEGL, ptr %372, i32 0, i32 1
  %374 = load ptr, ptr %373, align 8, !tbaa !49
  %375 = icmp eq ptr %374, null
  br i1 %375, label %376, label %380

376:                                              ; preds = %351
  %377 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 13), align 8, !tbaa !60
  %378 = call i32 %377()
  %379 = call ptr @getEGLErrorString(i32 noundef %378)
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65543, ptr noundef @.str.33, ptr noundef %379)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %542

380:                                              ; preds = %351
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  store i32 0, ptr %15, align 4, !tbaa !9
  %381 = load ptr, ptr %7, align 8, !tbaa !5
  %382 = getelementptr inbounds %struct._GLFWfbconfig, ptr %381, i32 0, i32 13
  %383 = load i32, ptr %382, align 4, !tbaa !73
  %384 = icmp ne i32 %383, 0
  br i1 %384, label %385, label %405

385:                                              ; preds = %380
  %386 = load i32, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 6), align 4, !tbaa !74
  %387 = icmp ne i32 %386, 0
  br i1 %387, label %388, label %404

388:                                              ; preds = %385
  %389 = load i32, ptr %15, align 4, !tbaa !9
  %390 = add nsw i32 %389, 1
  %391 = sext i32 %390 to i64
  %392 = icmp ult i64 %391, 40
  br i1 %392, label %393, label %394

393:                                              ; preds = %388
  br label %395

394:                                              ; preds = %388
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 594, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

395:                                              ; preds = %393
  %396 = load i32, ptr %15, align 4, !tbaa !9
  %397 = add nsw i32 %396, 1
  store i32 %397, ptr %15, align 4, !tbaa !9
  %398 = sext i32 %396 to i64
  %399 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %398
  store i32 12445, ptr %399, align 4, !tbaa !9
  %400 = load i32, ptr %15, align 4, !tbaa !9
  %401 = add nsw i32 %400, 1
  store i32 %401, ptr %15, align 4, !tbaa !9
  %402 = sext i32 %400 to i64
  %403 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %402
  store i32 12425, ptr %403, align 4, !tbaa !9
  br label %404

404:                                              ; preds = %395, %385
  br label %405

405:                                              ; preds = %404, %380
  %406 = load i32, ptr %15, align 4, !tbaa !9
  %407 = add nsw i32 %406, 1
  %408 = sext i32 %407 to i64
  %409 = icmp ult i64 %408, 40
  br i1 %409, label %410, label %411

410:                                              ; preds = %405
  br label %412

411:                                              ; preds = %405
  call void @__assert_fail(ptr noundef @.str.31, ptr noundef @.str.32, i32 noundef 597, ptr noundef @__PRETTY_FUNCTION__._glfwCreateContextEGL) #8
  unreachable

412:                                              ; preds = %410
  %413 = load i32, ptr %15, align 4, !tbaa !9
  %414 = add nsw i32 %413, 1
  store i32 %414, ptr %15, align 4, !tbaa !9
  %415 = sext i32 %413 to i64
  %416 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %415
  store i32 12344, ptr %416, align 4, !tbaa !9
  %417 = load i32, ptr %15, align 4, !tbaa !9
  %418 = add nsw i32 %417, 1
  store i32 %418, ptr %15, align 4, !tbaa !9
  %419 = sext i32 %417 to i64
  %420 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 %419
  store i32 12344, ptr %420, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  %421 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 20), align 8, !tbaa !75
  %422 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), align 8, !tbaa !11
  %423 = load ptr, ptr %9, align 8, !tbaa !5
  %424 = load ptr, ptr %5, align 8, !tbaa !5
  %425 = getelementptr inbounds %struct._GLFWwindow, ptr %424, i32 0, i32 27
  %426 = getelementptr inbounds %struct._GLFWwindowX11, ptr %425, i32 0, i32 1
  %427 = load i64, ptr %426, align 8, !tbaa !76
  %428 = getelementptr inbounds [40 x i32], ptr %8, i64 0, i64 0
  %429 = call ptr %421(ptr noundef %422, ptr noundef %423, i64 noundef %427, ptr noundef %428)
  %430 = load ptr, ptr %5, align 8, !tbaa !5
  %431 = getelementptr inbounds %struct._GLFWwindow, ptr %430, i32 0, i32 25
  %432 = getelementptr inbounds %struct._GLFWcontext, ptr %431, i32 0, i32 21
  %433 = getelementptr inbounds %struct._GLFWcontextEGL, ptr %432, i32 0, i32 2
  store ptr %429, ptr %433, align 8, !tbaa !77
  %434 = load ptr, ptr %5, align 8, !tbaa !5
  %435 = getelementptr inbounds %struct._GLFWwindow, ptr %434, i32 0, i32 25
  %436 = getelementptr inbounds %struct._GLFWcontext, ptr %435, i32 0, i32 21
  %437 = getelementptr inbounds %struct._GLFWcontextEGL, ptr %436, i32 0, i32 2
  %438 = load ptr, ptr %437, align 8, !tbaa !77
  %439 = icmp eq ptr %438, null
  br i1 %439, label %440, label %444

440:                                              ; preds = %412
  %441 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 13), align 8, !tbaa !60
  %442 = call i32 %441()
  %443 = call ptr @getEGLErrorString(i32 noundef %442)
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65544, ptr noundef @.str.34, ptr noundef %443)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %542

444:                                              ; preds = %412
  %445 = load ptr, ptr %9, align 8, !tbaa !5
  %446 = load ptr, ptr %5, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct._GLFWwindow, ptr %446, i32 0, i32 25
  %448 = getelementptr inbounds %struct._GLFWcontext, ptr %447, i32 0, i32 21
  %449 = getelementptr inbounds %struct._GLFWcontextEGL, ptr %448, i32 0, i32 0
  store ptr %445, ptr %449, align 8, !tbaa !78
  %450 = load i32, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 7), align 8, !tbaa !79
  %451 = icmp ne i32 %450, 0
  br i1 %451, label %523, label %452

452:                                              ; preds = %444
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 @__const._glfwCreateContextEGL.es1sonames, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 @__const._glfwCreateContextEGL.es2sonames, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %20, ptr align 16 @__const._glfwCreateContextEGL.glsonames, i64 16, i1 false)
  %453 = load ptr, ptr %6, align 8, !tbaa !5
  %454 = getelementptr inbounds %struct._GLFWctxconfig, ptr %453, i32 0, i32 0
  %455 = load i32, ptr %454, align 8, !tbaa !58
  %456 = icmp eq i32 %455, 196610
  br i1 %456, label %457, label %467

457:                                              ; preds = %452
  %458 = load ptr, ptr %6, align 8, !tbaa !5
  %459 = getelementptr inbounds %struct._GLFWctxconfig, ptr %458, i32 0, i32 2
  %460 = load i32, ptr %459, align 8, !tbaa !68
  %461 = icmp eq i32 %460, 1
  br i1 %461, label %462, label %464

462:                                              ; preds = %457
  %463 = getelementptr inbounds [3 x ptr], ptr %18, i64 0, i64 0
  store ptr %463, ptr %17, align 8, !tbaa !5
  br label %466

464:                                              ; preds = %457
  %465 = getelementptr inbounds [2 x ptr], ptr %19, i64 0, i64 0
  store ptr %465, ptr %17, align 8, !tbaa !5
  br label %466

466:                                              ; preds = %464, %462
  br label %469

467:                                              ; preds = %452
  %468 = getelementptr inbounds [2 x ptr], ptr %20, i64 0, i64 0
  store ptr %468, ptr %17, align 8, !tbaa !5
  br label %469

469:                                              ; preds = %467, %466
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %470

470:                                              ; preds = %508, %469
  %471 = load ptr, ptr %17, align 8, !tbaa !5
  %472 = load i32, ptr %16, align 4, !tbaa !9
  %473 = sext i32 %472 to i64
  %474 = getelementptr inbounds ptr, ptr %471, i64 %473
  %475 = load ptr, ptr %474, align 8, !tbaa !5
  %476 = icmp ne ptr %475, null
  br i1 %476, label %477, label %511

477:                                              ; preds = %470
  %478 = load i32, ptr getelementptr inbounds (%struct._GLFWlibraryEGL, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 19), i32 0, i32 3), align 8, !tbaa !80
  %479 = load ptr, ptr %17, align 8, !tbaa !5
  %480 = load i32, ptr %16, align 4, !tbaa !9
  %481 = sext i32 %480 to i64
  %482 = getelementptr inbounds ptr, ptr %479, i64 %481
  %483 = load ptr, ptr %482, align 8, !tbaa !5
  %484 = call i32 @strncmp(ptr noundef %483, ptr noundef @.str.2, i64 noundef 3) #9
  %485 = icmp eq i32 %484, 0
  %486 = zext i1 %485 to i32
  %487 = icmp ne i32 %478, %486
  br i1 %487, label %488, label %489

488:                                              ; preds = %477
  br label %508

489:                                              ; preds = %477
  %490 = load ptr, ptr %17, align 8, !tbaa !5
  %491 = load i32, ptr %16, align 4, !tbaa !9
  %492 = sext i32 %491 to i64
  %493 = getelementptr inbounds ptr, ptr %490, i64 %492
  %494 = load ptr, ptr %493, align 8, !tbaa !5
  %495 = call ptr @dlopen(ptr noundef %494, i32 noundef 1) #7
  %496 = load ptr, ptr %5, align 8, !tbaa !5
  %497 = getelementptr inbounds %struct._GLFWwindow, ptr %496, i32 0, i32 25
  %498 = getelementptr inbounds %struct._GLFWcontext, ptr %497, i32 0, i32 21
  %499 = getelementptr inbounds %struct._GLFWcontextEGL, ptr %498, i32 0, i32 3
  store ptr %495, ptr %499, align 8, !tbaa !81
  %500 = load ptr, ptr %5, align 8, !tbaa !5
  %501 = getelementptr inbounds %struct._GLFWwindow, ptr %500, i32 0, i32 25
  %502 = getelementptr inbounds %struct._GLFWcontext, ptr %501, i32 0, i32 21
  %503 = getelementptr inbounds %struct._GLFWcontextEGL, ptr %502, i32 0, i32 3
  %504 = load ptr, ptr %503, align 8, !tbaa !81
  %505 = icmp ne ptr %504, null
  br i1 %505, label %506, label %507

506:                                              ; preds = %489
  br label %511

507:                                              ; preds = %489
  br label %508

508:                                              ; preds = %507, %488
  %509 = load i32, ptr %16, align 4, !tbaa !9
  %510 = add nsw i32 %509, 1
  store i32 %510, ptr %16, align 4, !tbaa !9
  br label %470, !llvm.loop !82

511:                                              ; preds = %506, %470
  %512 = load ptr, ptr %5, align 8, !tbaa !5
  %513 = getelementptr inbounds %struct._GLFWwindow, ptr %512, i32 0, i32 25
  %514 = getelementptr inbounds %struct._GLFWcontext, ptr %513, i32 0, i32 21
  %515 = getelementptr inbounds %struct._GLFWcontextEGL, ptr %514, i32 0, i32 3
  %516 = load ptr, ptr %515, align 8, !tbaa !81
  %517 = icmp ne ptr %516, null
  br i1 %517, label %519, label %518

518:                                              ; preds = %511
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65542, ptr noundef @.str.39)
  store i32 0, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %520

519:                                              ; preds = %511
  store i32 0, ptr %12, align 4
  br label %520

520:                                              ; preds = %519, %518
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  %521 = load i32, ptr %12, align 4
  switch i32 %521, label %542 [
    i32 0, label %522
  ]

522:                                              ; preds = %520
  br label %523

523:                                              ; preds = %522, %444
  %524 = load ptr, ptr %5, align 8, !tbaa !5
  %525 = getelementptr inbounds %struct._GLFWwindow, ptr %524, i32 0, i32 25
  %526 = getelementptr inbounds %struct._GLFWcontext, ptr %525, i32 0, i32 14
  store ptr @makeContextCurrentEGL, ptr %526, align 8, !tbaa !84
  %527 = load ptr, ptr %5, align 8, !tbaa !5
  %528 = getelementptr inbounds %struct._GLFWwindow, ptr %527, i32 0, i32 25
  %529 = getelementptr inbounds %struct._GLFWcontext, ptr %528, i32 0, i32 15
  store ptr @swapBuffersEGL, ptr %529, align 8, !tbaa !85
  %530 = load ptr, ptr %5, align 8, !tbaa !5
  %531 = getelementptr inbounds %struct._GLFWwindow, ptr %530, i32 0, i32 25
  %532 = getelementptr inbounds %struct._GLFWcontext, ptr %531, i32 0, i32 16
  store ptr @swapIntervalEGL, ptr %532, align 8, !tbaa !86
  %533 = load ptr, ptr %5, align 8, !tbaa !5
  %534 = getelementptr inbounds %struct._GLFWwindow, ptr %533, i32 0, i32 25
  %535 = getelementptr inbounds %struct._GLFWcontext, ptr %534, i32 0, i32 17
  store ptr @extensionSupportedEGL, ptr %535, align 8, !tbaa !87
  %536 = load ptr, ptr %5, align 8, !tbaa !5
  %537 = getelementptr inbounds %struct._GLFWwindow, ptr %536, i32 0, i32 25
  %538 = getelementptr inbounds %struct._GLFWcontext, ptr %537, i32 0, i32 18
  store ptr @getProcAddressEGL, ptr %538, align 8, !tbaa !88
  %539 = load ptr, ptr %5, align 8, !tbaa !5
  %540 = getelementptr inbounds %struct._GLFWwindow, ptr %539, i32 0, i32 25
  %541 = getelementptr inbounds %struct._GLFWcontext, ptr %540, i32 0, i32 19
  store ptr @destroyContextEGL, ptr %541, align 8, !tbaa !89
  store i32 1, ptr %4, align 4
  store i32 1, ptr %12, align 4
  br label %542

542:                                              ; preds = %523, %520, %440, %376, %61, %52, %42, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 160, ptr %8) #7
  %543 = load i32, ptr %4, align 4
  ret i32 %543
}

; Function Attrs: nounwind uwtable
declare hidden i32 @chooseEGLConfig(ptr noundef, ptr noundef, ptr noundef) #5

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

; Function Attrs: nounwind uwtable
declare hidden void @makeContextCurrentEGL(ptr noundef) #5

; Function Attrs: nounwind uwtable
declare hidden void @swapBuffersEGL(ptr noundef) #5

; Function Attrs: nounwind uwtable
declare hidden void @swapIntervalEGL(i32 noundef) #5

; Function Attrs: nounwind uwtable
declare hidden ptr @getProcAddressEGL(ptr noundef) #5

; Function Attrs: nounwind uwtable
declare hidden void @destroyContextEGL(ptr noundef) #5

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

!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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 133264}
!12 = !{!"_GLFWlibrary", !10, i64 0, !13, i64 8, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !10, i64 1024, !7, i64 1032, !6, i64 130568, !10, i64 130576, !23, i64 130580, !23, i64 130588, !25, i64 130600, !27, i64 130648, !29, i64 130672, !30, i64 130736, !31, i64 130752, !43, i64 132960, !44, i64 133184, !46, i64 133264, !47, i64 133440}
!13 = !{!"", !14, i64 0, !16, i64 16, !18, i64 88, !21, i64 920, !10, i64 976}
!14 = !{!"_GLFWinitconfig", !10, i64 0, !15, i64 4}
!15 = !{!"", !10, i64 0, !10, i64 4}
!16 = !{!"_GLFWfbconfig", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !17, i64 64}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_GLFWwndconfig", !10, i64 0, !10, i64 4, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !19, i64 56, !20, i64 316}
!19 = !{!"", !10, i64 0, !7, i64 4}
!20 = !{!"", !7, i64 0, !7, i64 256}
!21 = !{!"_GLFWctxconfig", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !6, i64 40, !22, i64 48}
!22 = !{!"", !10, i64 0}
!23 = !{!"_GLFWtls", !24, i64 0}
!24 = !{!"_GLFWtlsPOSIX", !10, i64 0, !10, i64 4}
!25 = !{!"_GLFWmutex", !26, i64 0}
!26 = !{!"_GLFWmutexPOSIX", !10, i64 0, !7, i64 8}
!27 = !{!"", !17, i64 0, !28, i64 8}
!28 = !{!"_GLFWtimerPOSIX", !10, i64 0, !17, i64 8}
!29 = !{!"", !10, i64 0, !6, i64 8, !7, i64 16, !6, i64 32, !6, i64 40, !10, i64 48, !10, i64 52, !10, i64 56}
!30 = !{!"", !6, i64 0, !6, i64 8}
!31 = !{!"_GLFWlibraryX11", !6, i64 0, !10, i64 8, !17, i64 16, !32, i64 24, !32, i64 28, !17, i64 32, !17, i64 40, !10, i64 48, !6, i64 56, !10, i64 64, !6, i64 72, !6, i64 80, !7, i64 88, !7, i64 94, !7, i64 606, !33, i64 1304, !33, i64 1312, !6, i64 1320, !17, i64 1328, !17, i64 1336, !17, i64 1344, !17, i64 1352, !17, i64 1360, !17, i64 1368, !17, i64 1376, !17, i64 1384, !17, i64 1392, !17, i64 1400, !17, i64 1408, !17, i64 1416, !17, i64 1424, !17, i64 1432, !17, i64 1440, !17, i64 1448, !17, i64 1456, !17, i64 1464, !17, i64 1472, !17, i64 1480, !17, i64 1488, !17, i64 1496, !17, i64 1504, !17, i64 1512, !17, i64 1520, !17, i64 1528, !17, i64 1536, !17, i64 1544, !17, i64 1552, !17, i64 1560, !17, i64 1568, !17, i64 1576, !17, i64 1584, !17, i64 1592, !17, i64 1600, !17, i64 1608, !17, i64 1616, !17, i64 1624, !17, i64 1632, !17, i64 1640, !17, i64 1648, !17, i64 1656, !17, i64 1664, !17, i64 1672, !17, i64 1680, !17, i64 1688, !34, i64 1696, !35, i64 1872, !36, i64 1900, !37, i64 1920, !38, i64 1944, !39, i64 1976, !30, i64 2024, !40, i64 2040, !41, i64 2096, !42, i64 2152}
!32 = !{!"float", !7, i64 0}
!33 = !{!"double", !7, i64 0}
!34 = !{!"", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168}
!35 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!36 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!37 = !{!"", !10, i64 0, !17, i64 8, !17, i64 16}
!38 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!39 = !{!"", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!40 = !{!"", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!41 = !{!"", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !6, i64 40, !6, i64 48}
!42 = !{!"", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !6, i64 32, !6, i64 40, !6, i64 48}
!43 = !{!"_GLFWlibraryGLX", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220}
!44 = !{!"_GLFWlibraryLinux", !10, i64 0, !10, i64 4, !45, i64 8, !10, i64 72}
!45 = !{!"re_pattern_buffer", !6, i64 0, !17, i64 8, !17, i64 16, !17, i64 24, !6, i64 32, !6, i64 40, !17, i64 48, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56}
!46 = !{!"_GLFWlibraryEGL", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168}
!47 = !{!"_GLFWlibraryOSMesa", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!48 = !{!21, !6, i64 40}
!49 = !{!50, !6, i64 640}
!50 = !{!"_GLFWwindow", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !6, i64 32, !51, i64 40, !6, i64 64, !6, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !7, i64 120, !7, i64 128, !33, i64 480, !33, i64 488, !52, i64 496, !56, i64 688, !57, i64 824}
!51 = !{!"GLFWvidmode", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!52 = !{!"_GLFWcontext", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !53, i64 120, !54, i64 136, !55, i64 168}
!53 = !{!"_GLFWcontextGLX", !6, i64 0, !17, i64 8}
!54 = !{!"_GLFWcontextEGL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!55 = !{!"_GLFWcontextOSMesa", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16}
!56 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!57 = !{!"_GLFWwindowX11", !17, i64 0, !17, i64 8, !6, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !17, i64 72}
!58 = !{!21, !10, i64 0}
!59 = !{!12, !6, i64 133360}
!60 = !{!12, !6, i64 133336}
!61 = !{!12, !10, i64 133284}
!62 = !{!21, !10, i64 16}
!63 = !{!21, !10, i64 28}
!64 = !{!21, !10, i64 20}
!65 = !{!21, !10, i64 32}
!66 = !{!21, !10, i64 24}
!67 = !{!12, !10, i64 133288}
!68 = !{!21, !10, i64 8}
!69 = !{!21, !10, i64 12}
!70 = !{!12, !10, i64 133300}
!71 = !{!21, !10, i64 36}
!72 = !{!12, !6, i64 133368}
!73 = !{!16, !10, i64 52}
!74 = !{!12, !10, i64 133292}
!75 = !{!12, !6, i64 133392}
!76 = !{!50, !17, i64 832}
!77 = !{!50, !6, i64 648}
!78 = !{!50, !6, i64 632}
!79 = !{!12, !10, i64 133296}
!80 = !{!12, !10, i64 133280}
!81 = !{!50, !6, i64 656}
!82 = distinct !{!82, !83}
!83 = !{!"llvm.loop.mustprogress"}
!84 = !{!50, !6, i64 568}
!85 = !{!50, !6, i64 576}
!86 = !{!50, !6, i64 584}
!87 = !{!50, !6, i64 592}
!88 = !{!50, !6, i64 600}
!89 = !{!50, !6, i64 608}


; 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._GLFWlibrary = type { i32, %struct.anon, ptr, ptr, ptr, ptr, i32, [16 x %struct._GLFWjoystick], ptr, i32, %struct._GLFWtls, %struct._GLFWtls, %struct._GLFWmutex, %struct.anon.4, %struct.anon.5, %struct.anon.6, %struct._GLFWlibraryX11, %struct._GLFWlibraryGLX, %struct._GLFWlibraryLinux, %struct._GLFWlibraryEGL, %struct._GLFWlibraryOSMesa }
%struct.anon = type { %struct._GLFWinitconfig, %struct._GLFWfbconfig, %struct._GLFWwndconfig, %struct._GLFWctxconfig, i32 }
%struct._GLFWinitconfig = type { i32, %struct.anon.0 }
%struct.anon.0 = type { i32, i32 }
%struct._GLFWfbconfig = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }
%struct._GLFWwndconfig = type { i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.anon.1, %struct.anon.2 }
%struct.anon.1 = type { i32, [256 x i8] }
%struct.anon.2 = type { [256 x i8], [256 x i8] }
%struct._GLFWctxconfig = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, %struct.anon.3 }
%struct.anon.3 = type { i32 }
%struct._GLFWjoystick = type { i32, ptr, i32, ptr, i32, ptr, i32, ptr, ptr, [33 x i8], ptr, %struct._GLFWjoystickLinux }
%struct._GLFWjoystickLinux = type { i32, [4096 x i8], [512 x i32], [64 x i32], [64 x %struct.input_absinfo], [4 x [2 x i32]] }
%struct.input_absinfo = type { i32, i32, i32, i32, i32, i32 }
%struct._GLFWtls = type { %struct._GLFWtlsPOSIX }
%struct._GLFWtlsPOSIX = type { i32, i32 }
%struct._GLFWmutex = type { %struct._GLFWmutexPOSIX }
%struct._GLFWmutexPOSIX = type { i32, %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.anon.4 = type { i64, %struct._GLFWtimerPOSIX }
%struct._GLFWtimerPOSIX = type { i32, i64 }
%struct.anon.5 = type { i32, ptr, [2 x ptr], ptr, ptr, i32, i32, i32 }
%struct.anon.6 = type { ptr, ptr }
%struct._GLFWlibraryX11 = type { ptr, i32, i64, float, float, i64, i64, i32, ptr, i32, ptr, ptr, [5 x i8], [256 x i16], [349 x i16], double, double, ptr, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, %struct.anon.7, %struct.anon.8, %struct.anon.9, %struct.anon.10, %struct.anon.11, %struct.anon.12, %struct.anon.13, %struct.anon.14, %struct.anon.15, %struct.anon.16 }
%struct.anon.7 = type { i32, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.anon.8 = type { i32, i32, i32, i32, i32, i32, i32 }
%struct.anon.9 = type { i32, i32, i32, i32, i32 }
%struct.anon.10 = type { i32, i64, i64 }
%struct.anon.11 = type { ptr, ptr, ptr, ptr }
%struct.anon.12 = type { i32, ptr, i32, i32, ptr, ptr, ptr }
%struct.anon.13 = type { ptr, ptr }
%struct.anon.14 = type { i32, ptr, i32, i32, ptr, ptr, ptr, ptr }
%struct.anon.15 = type { i32, ptr, i32, i32, i32, i32, i32, ptr, ptr }
%struct.anon.16 = type { i32, ptr, i32, i32, i32, i32, ptr, ptr, ptr }
%struct._GLFWlibraryGLX = type { i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct._GLFWlibraryLinux = type { i32, i32, %struct.re_pattern_buffer, i32 }
%struct.re_pattern_buffer = type { ptr, i64, i64, i64, ptr, ptr, i64, i8 }
%struct._GLFWlibraryEGL = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._GLFWlibraryOSMesa = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@_glfw = external local_unnamed_addr global %struct._GLFWlibrary, align 8
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [41 x i8], align 1
@__const._glfwCreateContextEGL.es1sonames = external hidden unnamed_addr constant [3 x ptr], align 16
@__const._glfwCreateContextEGL.es2sonames = external hidden unnamed_addr constant [2 x ptr], align 16
@__const._glfwCreateContextEGL.glsonames = external hidden unnamed_addr constant [2 x ptr], align 16
@.str.39 = external hidden unnamed_addr constant [35 x i8], align 1

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

; Function Attrs: nounwind
declare ptr @dlopen(ptr noundef, i32 noundef) local_unnamed_addr #1

declare void @_glfwInputError(i32 noundef, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden ptr @getEGLErrorString(i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden i32 @extensionSupportedEGL(ptr noundef) #4

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @_glfwCreateContextEGL(ptr nocapture noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #4 {
  %4 = alloca [40 x i32], align 16
  %5 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %6 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133264), align 8, !tbaa !5
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %7, label %8

7:                                                ; preds = %3
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65542, ptr noundef nonnull @.str.27) #5
  br label %195

8:                                                ; preds = %3
  %9 = getelementptr inbounds i8, ptr %1, i64 40
  %10 = load ptr, ptr %9, align 8, !tbaa !46
  %.not126 = icmp eq ptr %10, null
  br i1 %.not126, label %14, label %11

11:                                               ; preds = %8
  %12 = getelementptr inbounds i8, ptr %10, i64 640
  %13 = load ptr, ptr %12, align 8, !tbaa !47
  br label %14

14:                                               ; preds = %11, %8
  %.0109 = phi ptr [ %13, %11 ], [ null, %8 ]
  %15 = call i32 @chooseEGLConfig(ptr noundef nonnull %1, ptr noundef %2, ptr noundef nonnull %5)
  %.not127 = icmp eq i32 %15, 0
  br i1 %.not127, label %16, label %17

16:                                               ; preds = %14
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65545, ptr noundef nonnull @.str.28) #5
  br label %195

17:                                               ; preds = %14
  %18 = load i32, ptr %1, align 8, !tbaa !56
  %19 = icmp eq i32 %18, 196610
  %20 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133360), align 8, !tbaa !57
  br i1 %19, label %21, label %27

21:                                               ; preds = %17
  %22 = call i32 %20(i32 noundef 12448) #5
  %.not129 = icmp eq i32 %22, 0
  br i1 %.not129, label %23, label %33

23:                                               ; preds = %21
  %24 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133336), align 8, !tbaa !58
  %25 = call i32 %24() #5
  %26 = call ptr @getEGLErrorString(i32 noundef %25)
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65542, ptr noundef nonnull @.str.29, ptr noundef %26) #5
  br label %195

27:                                               ; preds = %17
  %28 = call i32 %20(i32 noundef 12450) #5
  %.not128 = icmp eq i32 %28, 0
  br i1 %.not128, label %29, label %33

29:                                               ; preds = %27
  %30 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133336), align 8, !tbaa !58
  %31 = call i32 %30() #5
  %32 = call ptr @getEGLErrorString(i32 noundef %31)
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65542, ptr noundef nonnull @.str.30, ptr noundef %32) #5
  br label %195

33:                                               ; preds = %27, %21
  %34 = load i32, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133284), align 4, !tbaa !59
  %.not130 = icmp eq i32 %34, 0
  %35 = load i32, ptr %1, align 8, !tbaa !56
  br i1 %.not130, label %100, label %36

36:                                               ; preds = %33
  %37 = icmp eq i32 %35, 196609
  br i1 %37, label %38, label %44

38:                                               ; preds = %36
  %39 = getelementptr inbounds i8, ptr %1, i64 16
  %40 = load i32, ptr %39, align 8, !tbaa !60
  %.not131 = icmp eq i32 %40, 0
  %spec.select = select i1 %.not131, i32 0, i32 2
  %41 = getelementptr inbounds i8, ptr %1, i64 28
  %42 = load i32, ptr %41, align 4, !tbaa !61
  switch i32 %42, label %.fold.split [
    i32 204801, label %44
    i32 204802, label %43
  ]

43:                                               ; preds = %38
  br label %44

.fold.split:                                      ; preds = %38
  br label %44

44:                                               ; preds = %38, %.fold.split, %43, %36
  %.not136 = phi i1 [ false, %43 ], [ true, %36 ], [ false, %38 ], [ true, %.fold.split ]
  %.0103 = phi i32 [ 2, %43 ], [ 0, %36 ], [ 1, %38 ], [ 0, %.fold.split ]
  %.1 = phi i32 [ %spec.select, %43 ], [ 0, %36 ], [ %spec.select, %38 ], [ %spec.select, %.fold.split ]
  %45 = getelementptr inbounds i8, ptr %1, i64 20
  %46 = load i32, ptr %45, align 4, !tbaa !62
  %.not132 = icmp ne i32 %46, 0
  %47 = zext i1 %.not132 to i32
  %spec.select144 = or disjoint i32 %.1, %47
  %48 = getelementptr inbounds i8, ptr %1, i64 32
  %49 = load i32, ptr %48, align 8, !tbaa !63
  switch i32 %49, label %52 [
    i32 0, label %54
    i32 200705, label %.sink.split
    i32 200706, label %50
  ]

50:                                               ; preds = %44
  br label %.sink.split

.sink.split:                                      ; preds = %44, %50
  %.sink = phi i32 [ 12735, %50 ], [ 12734, %44 ]
  store i32 12733, ptr %4, align 16, !tbaa !64
  %51 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 %.sink, ptr %51, align 4, !tbaa !64
  br label %52

52:                                               ; preds = %.sink.split, %44
  %.0105 = phi i32 [ 0, %44 ], [ 2, %.sink.split ]
  %53 = or disjoint i32 %spec.select144, 4
  br label %54

54:                                               ; preds = %44, %52
  %.1106 = phi i32 [ %.0105, %52 ], [ %49, %44 ]
  %.3 = phi i32 [ %53, %52 ], [ %spec.select144, %44 ]
  %55 = getelementptr inbounds i8, ptr %1, i64 24
  %56 = load i32, ptr %55, align 8, !tbaa !65
  %57 = icmp ne i32 %56, 0
  %58 = load i32, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133288), align 8
  %59 = icmp ne i32 %58, 0
  %or.cond = select i1 %57, i1 %59, i1 false
  br i1 %or.cond, label %60, label %67

60:                                               ; preds = %54
  %61 = add nuw nsw i32 %.1106, 1
  %62 = zext nneg i32 %61 to i64
  %63 = zext nneg i32 %.1106 to i64
  %64 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %63
  store i32 12723, ptr %64, align 4, !tbaa !64
  %65 = add nuw nsw i32 %.1106, 2
  %66 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %62
  store i32 1, ptr %66, align 4, !tbaa !64
  br label %67

67:                                               ; preds = %60, %54
  %.2107 = phi i32 [ %65, %60 ], [ %.1106, %54 ]
  %68 = getelementptr inbounds i8, ptr %1, i64 8
  %69 = load i32, ptr %68, align 8, !tbaa !66
  %.not134 = icmp eq i32 %69, 1
  %70 = getelementptr inbounds i8, ptr %1, i64 12
  %71 = load i32, ptr %70, align 4, !tbaa !67
  %.not135 = icmp eq i32 %71, 0
  %or.cond153 = select i1 %.not134, i1 %.not135, i1 false
  br i1 %or.cond153, label %84, label %._crit_edge149

._crit_edge149:                                   ; preds = %67
  %72 = add nuw nsw i32 %.2107, 1
  %73 = zext nneg i32 %72 to i64
  %74 = zext nneg i32 %.2107 to i64
  %75 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %74
  store i32 12440, ptr %75, align 4, !tbaa !64
  %76 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %73
  store i32 %69, ptr %76, align 4, !tbaa !64
  %77 = add nuw nsw i32 %.2107, 3
  %78 = zext nneg i32 %77 to i64
  %79 = add nuw nsw i32 %.2107, 2
  %80 = zext nneg i32 %79 to i64
  %81 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %80
  store i32 12539, ptr %81, align 4, !tbaa !64
  %82 = add nuw nsw i32 %.2107, 4
  %83 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %78
  store i32 %71, ptr %83, align 4, !tbaa !64
  br label %84

84:                                               ; preds = %67, %._crit_edge149
  %.3108 = phi i32 [ %82, %._crit_edge149 ], [ %.2107, %67 ]
  br i1 %.not136, label %92, label %85

85:                                               ; preds = %84
  %86 = add nuw nsw i32 %.3108, 1
  %87 = zext nneg i32 %86 to i64
  %88 = zext nneg i32 %.3108 to i64
  %89 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %88
  store i32 12541, ptr %89, align 4, !tbaa !64
  %90 = add nuw nsw i32 %.3108, 2
  %91 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %87
  store i32 %.0103, ptr %91, align 4, !tbaa !64
  br label %92

92:                                               ; preds = %85, %84
  %.4 = phi i32 [ %90, %85 ], [ %.3108, %84 ]
  %.not137 = icmp eq i32 %.3, 0
  br i1 %.not137, label %106, label %93

93:                                               ; preds = %92
  %94 = add nuw nsw i32 %.4, 1
  %95 = zext nneg i32 %94 to i64
  %96 = zext nneg i32 %.4 to i64
  %97 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %96
  store i32 12540, ptr %97, align 4, !tbaa !64
  %98 = add nuw nsw i32 %.4, 2
  %99 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %95
  store i32 %.3, ptr %99, align 4, !tbaa !64
  br label %106

100:                                              ; preds = %33
  %101 = icmp eq i32 %35, 196610
  br i1 %101, label %102, label %106

102:                                              ; preds = %100
  store i32 12440, ptr %4, align 16, !tbaa !64
  %103 = getelementptr inbounds i8, ptr %1, i64 8
  %104 = load i32, ptr %103, align 8, !tbaa !66
  %105 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 %104, ptr %105, align 4, !tbaa !64
  br label %106

106:                                              ; preds = %92, %93, %100, %102
  %.6 = phi i32 [ 2, %102 ], [ 0, %100 ], [ %98, %93 ], [ %.4, %92 ]
  %107 = load i32, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133300), align 4, !tbaa !68
  %.not138 = icmp eq i32 %107, 0
  br i1 %.not138, label %118, label %108

108:                                              ; preds = %106
  %109 = getelementptr inbounds i8, ptr %1, i64 36
  %110 = load i32, ptr %109, align 4, !tbaa !69
  switch i32 %110, label %118 [
    i32 217090, label %.sink.split154
    i32 217089, label %111
  ]

111:                                              ; preds = %108
  br label %.sink.split154

.sink.split154:                                   ; preds = %108, %111
  %.sink155 = phi i32 [ 8344, %111 ], [ 0, %108 ]
  %112 = add nuw nsw i32 %.6, 1
  %113 = zext nneg i32 %112 to i64
  %114 = zext nneg i32 %.6 to i64
  %115 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %114
  store i32 8343, ptr %115, align 4, !tbaa !64
  %116 = add nuw nsw i32 %.6, 2
  %117 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %113
  store i32 %.sink155, ptr %117, align 4, !tbaa !64
  br label %118

118:                                              ; preds = %.sink.split154, %108, %106
  %.7 = phi i32 [ %.6, %106 ], [ %.6, %108 ], [ %116, %.sink.split154 ]
  %119 = add nuw nsw i32 %.7, 1
  %120 = zext nneg i32 %119 to i64
  %121 = zext nneg i32 %.7 to i64
  %122 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %121
  store i32 12344, ptr %122, align 4, !tbaa !64
  %123 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %120
  store i32 12344, ptr %123, align 4, !tbaa !64
  %124 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133368), align 8, !tbaa !70
  %125 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133264), align 8, !tbaa !5
  %126 = load ptr, ptr %5, align 8, !tbaa !71
  %127 = call ptr %124(ptr noundef %125, ptr noundef %126, ptr noundef %.0109, ptr noundef nonnull %4) #5
  %128 = getelementptr inbounds i8, ptr %0, i64 632
  %129 = getelementptr inbounds i8, ptr %0, i64 640
  store ptr %127, ptr %129, align 8, !tbaa !47
  %130 = icmp eq ptr %127, null
  br i1 %130, label %131, label %135

131:                                              ; preds = %118
  %132 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133336), align 8, !tbaa !58
  %133 = call i32 %132() #5
  %134 = call ptr @getEGLErrorString(i32 noundef %133)
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65543, ptr noundef nonnull @.str.33, ptr noundef %134) #5
  br label %195

135:                                              ; preds = %118
  %136 = getelementptr inbounds i8, ptr %2, i64 52
  %137 = load i32, ptr %136, align 4, !tbaa !72
  %138 = icmp ne i32 %137, 0
  %139 = load i32, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133292), align 4
  %140 = icmp ne i32 %139, 0
  %or.cond3 = select i1 %138, i1 %140, i1 false
  br i1 %or.cond3, label %141, label %143

141:                                              ; preds = %135
  store i32 12445, ptr %4, align 16, !tbaa !64
  %142 = getelementptr inbounds i8, ptr %4, i64 4
  store i32 12425, ptr %142, align 4, !tbaa !64
  br label %143

143:                                              ; preds = %135, %141
  %.0101 = phi i32 [ 2, %141 ], [ 0, %135 ]
  %144 = or disjoint i32 %.0101, 1
  %145 = zext nneg i32 %144 to i64
  %146 = zext nneg i32 %.0101 to i64
  %147 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %146
  store i32 12344, ptr %147, align 8, !tbaa !64
  %148 = getelementptr inbounds [40 x i32], ptr %4, i64 0, i64 %145
  store i32 12344, ptr %148, align 4, !tbaa !64
  %149 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133392), align 8, !tbaa !73
  %150 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133264), align 8, !tbaa !5
  %151 = load ptr, ptr %5, align 8, !tbaa !71
  %152 = getelementptr inbounds i8, ptr %0, i64 832
  %153 = load i64, ptr %152, align 8, !tbaa !74
  %154 = call ptr %149(ptr noundef %150, ptr noundef %151, i64 noundef %153, ptr noundef nonnull %4) #5
  %155 = getelementptr inbounds i8, ptr %0, i64 648
  store ptr %154, ptr %155, align 8, !tbaa !75
  %156 = icmp eq ptr %154, null
  br i1 %156, label %157, label %161

157:                                              ; preds = %143
  %158 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133336), align 8, !tbaa !58
  %159 = call i32 %158() #5
  %160 = call ptr @getEGLErrorString(i32 noundef %159)
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65544, ptr noundef nonnull @.str.34, ptr noundef %160) #5
  br label %195

161:                                              ; preds = %143
  %162 = load ptr, ptr %5, align 8, !tbaa !71
  store ptr %162, ptr %128, align 8, !tbaa !76
  %163 = load i32, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133296), align 8, !tbaa !77
  %.not139 = icmp eq i32 %163, 0
  br i1 %.not139, label %164, label %.critedge

164:                                              ; preds = %161
  %165 = load i32, ptr %1, align 8, !tbaa !56
  %166 = icmp eq i32 %165, 196610
  br i1 %166, label %167, label %171

167:                                              ; preds = %164
  %168 = getelementptr inbounds i8, ptr %1, i64 8
  %169 = load i32, ptr %168, align 8, !tbaa !66
  %170 = icmp eq i32 %169, 1
  %__const._glfwCreateContextEGL.es1sonames.__const._glfwCreateContextEGL.es2sonames = select i1 %170, ptr @__const._glfwCreateContextEGL.es1sonames, ptr @__const._glfwCreateContextEGL.es2sonames
  br label %171

171:                                              ; preds = %164, %167
  %.0 = phi ptr [ %__const._glfwCreateContextEGL.es1sonames.__const._glfwCreateContextEGL.es2sonames, %167 ], [ @__const._glfwCreateContextEGL.glsonames, %164 ]
  %172 = load ptr, ptr %.0, align 8, !tbaa !71
  %.not140145 = icmp eq ptr %172, null
  br i1 %.not140145, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %171
  %173 = getelementptr inbounds i8, ptr %0, i64 656
  %.pre151 = load i32, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133280), align 8, !tbaa !78
  br label %174

174:                                              ; preds = %.lr.ph, %182
  %175 = phi i32 [ %.pre151, %.lr.ph ], [ %183, %182 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %182 ]
  %176 = phi ptr [ %172, %.lr.ph ], [ %185, %182 ]
  %177 = call i32 @strncmp(ptr noundef nonnull dereferenceable(1) %176, ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef 3) #6
  %178 = icmp eq i32 %177, 0
  %179 = zext i1 %178 to i32
  %.not141 = icmp eq i32 %175, %179
  br i1 %.not141, label %180, label %182

180:                                              ; preds = %174
  %181 = call ptr @dlopen(ptr noundef nonnull %176, i32 noundef 1) #5
  store ptr %181, ptr %173, align 8, !tbaa !79
  %.not142 = icmp eq ptr %181, null
  %.pre150 = load i32, ptr getelementptr inbounds (i8, ptr @_glfw, i64 133280), align 8, !tbaa !78
  br i1 %.not142, label %182, label %._crit_edge

182:                                              ; preds = %180, %174
  %183 = phi i32 [ %.pre150, %180 ], [ %175, %174 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %184 = getelementptr inbounds ptr, ptr %.0, i64 %indvars.iv.next
  %185 = load ptr, ptr %184, align 8, !tbaa !71
  %.not140 = icmp eq ptr %185, null
  br i1 %.not140, label %._crit_edge, label %174, !llvm.loop !80

._crit_edge:                                      ; preds = %182, %180, %171
  %186 = getelementptr inbounds i8, ptr %0, i64 656
  %187 = load ptr, ptr %186, align 8, !tbaa !79
  %.not143.not = icmp eq ptr %187, null
  br i1 %.not143.not, label %188, label %.critedge

188:                                              ; preds = %._crit_edge
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65542, ptr noundef nonnull @.str.39) #5
  br label %195

.critedge:                                        ; preds = %._crit_edge, %161
  %189 = getelementptr inbounds i8, ptr %0, i64 568
  store ptr @makeContextCurrentEGL, ptr %189, align 8, !tbaa !82
  %190 = getelementptr inbounds i8, ptr %0, i64 576
  store ptr @swapBuffersEGL, ptr %190, align 8, !tbaa !83
  %191 = getelementptr inbounds i8, ptr %0, i64 584
  store ptr @swapIntervalEGL, ptr %191, align 8, !tbaa !84
  %192 = getelementptr inbounds i8, ptr %0, i64 592
  store ptr @extensionSupportedEGL, ptr %192, align 8, !tbaa !85
  %193 = getelementptr inbounds i8, ptr %0, i64 600
  store ptr @getProcAddressEGL, ptr %193, align 8, !tbaa !86
  %194 = getelementptr inbounds i8, ptr %0, i64 608
  store ptr @destroyContextEGL, ptr %194, align 8, !tbaa !87
  br label %195

195:                                              ; preds = %188, %.critedge, %157, %131, %29, %23, %16, %7
  %.1111 = phi i32 [ 0, %131 ], [ 0, %157 ], [ 1, %.critedge ], [ 0, %188 ], [ 0, %23 ], [ 0, %29 ], [ 0, %16 ], [ 0, %7 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %4) #5
  ret i32 %.1111
}

; Function Attrs: nounwind uwtable
declare hidden i32 @chooseEGLConfig(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden void @makeContextCurrentEGL(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @swapBuffersEGL(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @swapIntervalEGL(i32 noundef) #4

; Function Attrs: nounwind uwtable
declare hidden ptr @getProcAddressEGL(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @destroyContextEGL(ptr noundef) #4

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

!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, !16, i64 133264}
!6 = !{!"_GLFWlibrary", !7, i64 0, !10, i64 8, !16, i64 992, !16, i64 1000, !16, i64 1008, !16, i64 1016, !7, i64 1024, !8, i64 1032, !16, i64 130568, !7, i64 130576, !21, i64 130580, !21, i64 130588, !23, i64 130600, !25, i64 130648, !27, i64 130672, !28, i64 130736, !29, i64 130752, !41, i64 132960, !42, i64 133184, !44, i64 133264, !45, i64 133440}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"", !11, i64 0, !13, i64 16, !15, i64 88, !19, i64 920, !7, i64 976}
!11 = !{!"_GLFWinitconfig", !7, i64 0, !12, i64 4}
!12 = !{!"", !7, i64 0, !7, i64 4}
!13 = !{!"_GLFWfbconfig", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !14, i64 64}
!14 = !{!"long", !8, i64 0}
!15 = !{!"_GLFWwndconfig", !7, i64 0, !7, i64 4, !16, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !17, i64 56, !18, i64 316}
!16 = !{!"any pointer", !8, i64 0}
!17 = !{!"", !7, i64 0, !8, i64 4}
!18 = !{!"", !8, i64 0, !8, i64 256}
!19 = !{!"_GLFWctxconfig", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !16, i64 40, !20, i64 48}
!20 = !{!"", !7, i64 0}
!21 = !{!"_GLFWtls", !22, i64 0}
!22 = !{!"_GLFWtlsPOSIX", !7, i64 0, !7, i64 4}
!23 = !{!"_GLFWmutex", !24, i64 0}
!24 = !{!"_GLFWmutexPOSIX", !7, i64 0, !8, i64 8}
!25 = !{!"", !14, i64 0, !26, i64 8}
!26 = !{!"_GLFWtimerPOSIX", !7, i64 0, !14, i64 8}
!27 = !{!"", !7, i64 0, !16, i64 8, !8, i64 16, !16, i64 32, !16, i64 40, !7, i64 48, !7, i64 52, !7, i64 56}
!28 = !{!"", !16, i64 0, !16, i64 8}
!29 = !{!"_GLFWlibraryX11", !16, i64 0, !7, i64 8, !14, i64 16, !30, i64 24, !30, i64 28, !14, i64 32, !14, i64 40, !7, i64 48, !16, i64 56, !7, i64 64, !16, i64 72, !16, i64 80, !8, i64 88, !8, i64 94, !8, i64 606, !31, i64 1304, !31, i64 1312, !16, i64 1320, !14, i64 1328, !14, i64 1336, !14, i64 1344, !14, i64 1352, !14, i64 1360, !14, i64 1368, !14, i64 1376, !14, i64 1384, !14, i64 1392, !14, i64 1400, !14, i64 1408, !14, i64 1416, !14, i64 1424, !14, i64 1432, !14, i64 1440, !14, i64 1448, !14, i64 1456, !14, i64 1464, !14, i64 1472, !14, i64 1480, !14, i64 1488, !14, i64 1496, !14, i64 1504, !14, i64 1512, !14, i64 1520, !14, i64 1528, !14, i64 1536, !14, i64 1544, !14, i64 1552, !14, i64 1560, !14, i64 1568, !14, i64 1576, !14, i64 1584, !14, i64 1592, !14, i64 1600, !14, i64 1608, !14, i64 1616, !14, i64 1624, !14, i64 1632, !14, i64 1640, !14, i64 1648, !14, i64 1656, !14, i64 1664, !14, i64 1672, !14, i64 1680, !14, i64 1688, !32, i64 1696, !33, i64 1872, !34, i64 1900, !35, i64 1920, !36, i64 1944, !37, i64 1976, !28, i64 2024, !38, i64 2040, !39, i64 2096, !40, i64 2152}
!30 = !{!"float", !8, i64 0}
!31 = !{!"double", !8, i64 0}
!32 = !{!"", !7, i64 0, !16, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168}
!33 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24}
!34 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16}
!35 = !{!"", !7, i64 0, !14, i64 8, !14, i64 16}
!36 = !{!"", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!37 = !{!"", !7, i64 0, !16, i64 8, !7, i64 16, !7, i64 20, !16, i64 24, !16, i64 32, !16, i64 40}
!38 = !{!"", !7, i64 0, !16, i64 8, !7, i64 16, !7, i64 20, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48}
!39 = !{!"", !7, i64 0, !16, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !16, i64 40, !16, i64 48}
!40 = !{!"", !7, i64 0, !16, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !16, i64 32, !16, i64 40, !16, i64 48}
!41 = !{!"_GLFWlibraryGLX", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168, !7, i64 176, !7, i64 180, !7, i64 184, !7, i64 188, !7, i64 192, !7, i64 196, !7, i64 200, !7, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !7, i64 220}
!42 = !{!"_GLFWlibraryLinux", !7, i64 0, !7, i64 4, !43, i64 8, !7, i64 72}
!43 = !{!"re_pattern_buffer", !16, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !16, i64 32, !16, i64 40, !14, i64 48, !7, i64 56, !7, i64 56, !7, i64 56, !7, i64 56, !7, i64 56, !7, i64 56, !7, i64 56}
!44 = !{!"_GLFWlibraryEGL", !16, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !16, i64 120, !16, i64 128, !16, i64 136, !16, i64 144, !16, i64 152, !16, i64 160, !16, i64 168}
!45 = !{!"_GLFWlibraryOSMesa", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56}
!46 = !{!19, !16, i64 40}
!47 = !{!48, !16, i64 640}
!48 = !{!"_GLFWwindow", !16, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !16, i64 32, !49, i64 40, !16, i64 64, !16, i64 72, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !8, i64 120, !8, i64 128, !31, i64 480, !31, i64 488, !50, i64 496, !54, i64 688, !55, i64 824}
!49 = !{!"GLFWvidmode", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!50 = !{!"_GLFWcontext", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !51, i64 120, !52, i64 136, !53, i64 168}
!51 = !{!"_GLFWcontextGLX", !16, i64 0, !14, i64 8}
!52 = !{!"_GLFWcontextEGL", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!53 = !{!"_GLFWcontextOSMesa", !16, i64 0, !7, i64 8, !7, i64 12, !16, i64 16}
!54 = !{!"", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !16, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !16, i64 120, !16, i64 128}
!55 = !{!"_GLFWwindowX11", !14, i64 0, !14, i64 8, !16, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !14, i64 72}
!56 = !{!19, !7, i64 0}
!57 = !{!6, !16, i64 133360}
!58 = !{!6, !16, i64 133336}
!59 = !{!6, !7, i64 133284}
!60 = !{!19, !7, i64 16}
!61 = !{!19, !7, i64 28}
!62 = !{!19, !7, i64 20}
!63 = !{!19, !7, i64 32}
!64 = !{!7, !7, i64 0}
!65 = !{!19, !7, i64 24}
!66 = !{!19, !7, i64 8}
!67 = !{!19, !7, i64 12}
!68 = !{!6, !7, i64 133300}
!69 = !{!19, !7, i64 36}
!70 = !{!6, !16, i64 133368}
!71 = !{!16, !16, i64 0}
!72 = !{!13, !7, i64 52}
!73 = !{!6, !16, i64 133392}
!74 = !{!48, !14, i64 832}
!75 = !{!48, !16, i64 648}
!76 = !{!48, !16, i64 632}
!77 = !{!6, !7, i64 133296}
!78 = !{!6, !7, i64 133280}
!79 = !{!48, !16, i64 656}
!80 = distinct !{!80, !81}
!81 = !{!"llvm.loop.mustprogress"}
!82 = !{!48, !16, i64 568}
!83 = !{!48, !16, i64 576}
!84 = !{!48, !16, i64 584}
!85 = !{!48, !16, i64 592}
!86 = !{!48, !16, i64 600}
!87 = !{!48, !16, i64 608}


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