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

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

; 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 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 @_glfwPlatformCreateWindow(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %13 = load ptr, ptr %8, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct._GLFWctxconfig, ptr %13, i32 0, i32 0
  %15 = load i32, ptr %14, align 8, !tbaa !9
  %16 = icmp ne i32 %15, 0
  br i1 %16, label %17, label %64

17:                                               ; preds = %4
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct._GLFWctxconfig, ptr %18, i32 0, i32 1
  %20 = load i32, ptr %19, align 4, !tbaa !13
  %21 = icmp eq i32 %20, 221185
  br i1 %21, label %22, label %34

22:                                               ; preds = %17
  %23 = call i32 @_glfwInitGLX()
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %26, label %25

25:                                               ; preds = %22
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %158

26:                                               ; preds = %22
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = call i32 @_glfwChooseVisualGLX(ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %10, ptr noundef %11)
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %33, label %32

32:                                               ; preds = %26
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %158

33:                                               ; preds = %26
  br label %63

34:                                               ; preds = %17
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._GLFWctxconfig, ptr %35, i32 0, i32 1
  %37 = load i32, ptr %36, align 4, !tbaa !13
  %38 = icmp eq i32 %37, 221186
  br i1 %38, label %39, label %51

39:                                               ; preds = %34
  %40 = call i32 @_glfwInitEGL()
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %158

43:                                               ; preds = %39
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = call i32 @_glfwChooseVisualEGL(ptr noundef %44, ptr noundef %45, ptr noundef %46, ptr noundef %10, ptr noundef %11)
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %50, label %49

49:                                               ; preds = %43
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %158

50:                                               ; preds = %43
  br label %62

51:                                               ; preds = %34
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct._GLFWctxconfig, ptr %52, i32 0, i32 1
  %54 = load i32, ptr %53, align 4, !tbaa !13
  %55 = icmp eq i32 %54, 221187
  br i1 %55, label %56, label %61

56:                                               ; preds = %51
  %57 = call i32 @_glfwInitOSMesa()
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %60, label %59

59:                                               ; preds = %56
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %158

60:                                               ; preds = %56
  br label %61

61:                                               ; preds = %60, %51
  br label %62

62:                                               ; preds = %61, %50
  br label %63

63:                                               ; preds = %62, %33
  br label %64

64:                                               ; preds = %63, %4
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._GLFWctxconfig, ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 8, !tbaa !9
  %68 = icmp eq i32 %67, 0
  br i1 %68, label %74, label %69

69:                                               ; preds = %64
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._GLFWctxconfig, ptr %70, i32 0, i32 1
  %72 = load i32, ptr %71, align 4, !tbaa !13
  %73 = icmp eq i32 %72, 221187
  br i1 %73, label %74, label %91

74:                                               ; preds = %69, %64
  %75 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 16), align 8, !tbaa !14
  %76 = getelementptr inbounds %struct.anon.17, ptr %75, i32 0, i32 35
  %77 = load ptr, ptr %76, align 8, !tbaa !49
  %78 = load i32, ptr getelementptr inbounds (%struct._GLFWlibraryX11, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 16), i32 0, i32 1), align 8, !tbaa !51
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds %struct.Screen, ptr %77, i64 %79
  %81 = getelementptr inbounds %struct.Screen, ptr %80, i32 0, i32 10
  %82 = load ptr, ptr %81, align 8, !tbaa !52
  store ptr %82, ptr %10, align 8, !tbaa !5
  %83 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 16), align 8, !tbaa !14
  %84 = getelementptr inbounds %struct.anon.17, ptr %83, i32 0, i32 35
  %85 = load ptr, ptr %84, align 8, !tbaa !49
  %86 = load i32, ptr getelementptr inbounds (%struct._GLFWlibraryX11, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 16), i32 0, i32 1), align 8, !tbaa !51
  %87 = sext i32 %86 to i64
  %88 = getelementptr inbounds %struct.Screen, ptr %85, i64 %87
  %89 = getelementptr inbounds %struct.Screen, ptr %88, i32 0, i32 9
  %90 = load i32, ptr %89, align 8, !tbaa !54
  store i32 %90, ptr %11, align 4, !tbaa !55
  br label %91

91:                                               ; preds = %74, %69
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = load i32, ptr %11, align 4, !tbaa !55
  %96 = call i32 @createNativeWindow(ptr noundef %92, ptr noundef %93, ptr noundef %94, i32 noundef %95)
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %99, label %98

98:                                               ; preds = %91
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %158

99:                                               ; preds = %91
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._GLFWctxconfig, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 8, !tbaa !9
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %146

104:                                              ; preds = %99
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._GLFWctxconfig, ptr %105, i32 0, i32 1
  %107 = load i32, ptr %106, align 4, !tbaa !13
  %108 = icmp eq i32 %107, 221185
  br i1 %108, label %109, label %117

109:                                              ; preds = %104
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = call i32 @_glfwCreateContextGLX(ptr noundef %110, ptr noundef %111, ptr noundef %112)
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %116, label %115

115:                                              ; preds = %109
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %158

116:                                              ; preds = %109
  br label %145

117:                                              ; preds = %104
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._GLFWctxconfig, ptr %118, i32 0, i32 1
  %120 = load i32, ptr %119, align 4, !tbaa !13
  %121 = icmp eq i32 %120, 221186
  br i1 %121, label %122, label %130

122:                                              ; preds = %117
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = call i32 @_glfwCreateContextEGL(ptr noundef %123, ptr noundef %124, ptr noundef %125)
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %129, label %128

128:                                              ; preds = %122
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %158

129:                                              ; preds = %122
  br label %144

130:                                              ; preds = %117
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._GLFWctxconfig, ptr %131, i32 0, i32 1
  %133 = load i32, ptr %132, align 4, !tbaa !13
  %134 = icmp eq i32 %133, 221187
  br i1 %134, label %135, label %143

135:                                              ; preds = %130
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = load ptr, ptr %8, align 8, !tbaa !5
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = call i32 @_glfwCreateContextOSMesa(ptr noundef %136, ptr noundef %137, ptr noundef %138)
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %142, label %141

141:                                              ; preds = %135
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %158

142:                                              ; preds = %135
  br label %143

143:                                              ; preds = %142, %130
  br label %144

144:                                              ; preds = %143, %129
  br label %145

145:                                              ; preds = %144, %116
  br label %146

146:                                              ; preds = %145, %99
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct._GLFWwindow, ptr %147, i32 0, i32 9
  %149 = load ptr, ptr %148, align 8, !tbaa !56
  %150 = icmp ne ptr %149, null
  br i1 %150, label %151, label %155

151:                                              ; preds = %146
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_glfwPlatformShowWindow(ptr noundef %152)
  %153 = load ptr, ptr %6, align 8, !tbaa !5
  call void @updateWindowMode(ptr noundef %153)
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  call void @acquireMonitor(ptr noundef %154)
  br label %155

155:                                              ; preds = %151, %146
  %156 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 16), align 8, !tbaa !14
  %157 = call i32 @XFlush(ptr noundef %156)
  store i32 1, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %158

158:                                              ; preds = %155, %141, %128, %115, %98, %59, %49, %42, %32, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %159 = load i32, ptr %5, align 4
  ret i32 %159
}

declare i32 @_glfwInitGLX() #2

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

declare i32 @_glfwInitEGL() #2

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

declare i32 @_glfwInitOSMesa() #2

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @_glfwPlatformShowWindow(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @updateWindowMode(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @acquireMonitor(ptr noundef) #1

declare i32 @XFlush(ptr noundef) #2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_GLFWctxconfig", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !6, i64 40, !12, i64 48}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !11, i64 0}
!13 = !{!10, !11, i64 4}
!14 = !{!15, !6, i64 130752}
!15 = !{!"_GLFWlibrary", !11, i64 0, !16, i64 8, !6, i64 992, !6, i64 1000, !6, i64 1008, !6, i64 1016, !11, i64 1024, !7, i64 1032, !6, i64 130568, !11, i64 130576, !24, i64 130580, !24, i64 130588, !26, i64 130600, !28, i64 130648, !30, i64 130672, !31, i64 130736, !32, i64 130752, !44, i64 132960, !45, i64 133184, !47, i64 133264, !48, i64 133440}
!16 = !{!"", !17, i64 0, !19, i64 16, !21, i64 88, !10, i64 920, !11, i64 976}
!17 = !{!"_GLFWinitconfig", !11, i64 0, !18, i64 4}
!18 = !{!"", !11, i64 0, !11, i64 4}
!19 = !{!"_GLFWfbconfig", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !20, i64 64}
!20 = !{!"long", !7, i64 0}
!21 = !{!"_GLFWwndconfig", !11, i64 0, !11, i64 4, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !22, i64 56, !23, i64 316}
!22 = !{!"", !11, i64 0, !7, i64 4}
!23 = !{!"", !7, i64 0, !7, i64 256}
!24 = !{!"_GLFWtls", !25, i64 0}
!25 = !{!"_GLFWtlsPOSIX", !11, i64 0, !11, i64 4}
!26 = !{!"_GLFWmutex", !27, i64 0}
!27 = !{!"_GLFWmutexPOSIX", !11, i64 0, !7, i64 8}
!28 = !{!"", !20, i64 0, !29, i64 8}
!29 = !{!"_GLFWtimerPOSIX", !11, i64 0, !20, i64 8}
!30 = !{!"", !11, i64 0, !6, i64 8, !7, i64 16, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56}
!31 = !{!"", !6, i64 0, !6, i64 8}
!32 = !{!"_GLFWlibraryX11", !6, i64 0, !11, i64 8, !20, i64 16, !33, i64 24, !33, i64 28, !20, i64 32, !20, i64 40, !11, i64 48, !6, i64 56, !11, i64 64, !6, i64 72, !6, i64 80, !7, i64 88, !7, i64 94, !7, i64 606, !34, i64 1304, !34, i64 1312, !6, i64 1320, !20, i64 1328, !20, i64 1336, !20, i64 1344, !20, i64 1352, !20, i64 1360, !20, i64 1368, !20, i64 1376, !20, i64 1384, !20, i64 1392, !20, i64 1400, !20, i64 1408, !20, i64 1416, !20, i64 1424, !20, i64 1432, !20, i64 1440, !20, i64 1448, !20, i64 1456, !20, i64 1464, !20, i64 1472, !20, i64 1480, !20, i64 1488, !20, i64 1496, !20, i64 1504, !20, i64 1512, !20, i64 1520, !20, i64 1528, !20, i64 1536, !20, i64 1544, !20, i64 1552, !20, i64 1560, !20, i64 1568, !20, i64 1576, !20, i64 1584, !20, i64 1592, !20, i64 1600, !20, i64 1608, !20, i64 1616, !20, i64 1624, !20, i64 1632, !20, i64 1640, !20, i64 1648, !20, i64 1656, !20, i64 1664, !20, i64 1672, !20, i64 1680, !20, i64 1688, !35, i64 1696, !36, i64 1872, !37, i64 1900, !38, i64 1920, !39, i64 1944, !40, i64 1976, !31, i64 2024, !41, i64 2040, !42, i64 2096, !43, i64 2152}
!33 = !{!"float", !7, i64 0}
!34 = !{!"double", !7, i64 0}
!35 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, 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}
!36 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24}
!37 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!38 = !{!"", !11, i64 0, !20, i64 8, !20, i64 16}
!39 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!40 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!41 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!42 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !6, i64 40, !6, i64 48}
!43 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !6, i64 32, !6, i64 40, !6, i64 48}
!44 = !{!"_GLFWlibraryGLX", !11, i64 0, !11, i64 4, !11, i64 8, !11, 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, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !11, i64 196, !11, i64 200, !11, i64 204, !11, i64 208, !11, i64 212, !11, i64 216, !11, i64 220}
!45 = !{!"_GLFWlibraryLinux", !11, i64 0, !11, i64 4, !46, i64 8, !11, i64 72}
!46 = !{!"re_pattern_buffer", !6, i64 0, !20, i64 8, !20, i64 16, !20, i64 24, !6, i64 32, !6, i64 40, !20, i64 48, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56}
!47 = !{!"_GLFWlibraryEGL", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, 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}
!48 = !{!"_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}
!49 = !{!50, !6, i64 232}
!50 = !{!"", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !6, i64 32, !20, i64 40, !20, i64 48, !20, i64 56, !11, i64 64, !6, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !6, i64 120, !6, i64 128, !11, i64 136, !20, i64 144, !20, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !11, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !11, i64 228, !6, i64 232, !20, i64 240, !20, i64 248, !11, i64 256, !11, i64 260, !6, i64 264, !6, i64 272, !11, i64 280, !6, i64 288}
!51 = !{!15, !11, i64 130760}
!52 = !{!53, !6, i64 64}
!53 = !{!"", !6, i64 0, !6, i64 8, !20, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !6, i64 72, !20, i64 80, !20, i64 88, !20, i64 96, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !20, i64 120}
!54 = !{!53, !11, i64 56}
!55 = !{!11, !11, i64 0}
!56 = !{!57, !6, i64 64}
!57 = !{!"_GLFWwindow", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !6, i64 32, !58, i64 40, !6, i64 64, !6, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !7, i64 120, !7, i64 128, !34, i64 480, !34, i64 488, !59, i64 496, !63, i64 688, !64, i64 824}
!58 = !{!"GLFWvidmode", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!59 = !{!"_GLFWcontext", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, 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, !60, i64 120, !61, i64 136, !62, i64 168}
!60 = !{!"_GLFWcontextGLX", !6, i64 0, !20, i64 8}
!61 = !{!"_GLFWcontextEGL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!62 = !{!"_GLFWcontextOSMesa", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16}
!63 = !{!"", !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}
!64 = !{!"_GLFWwindowX11", !20, i64 0, !20, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !20, i64 72}


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

@_glfw = external local_unnamed_addr global %struct._GLFWlibrary, align 8

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

; Function Attrs: mustprogress nocallback nofree 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 @_glfwPlatformCreateWindow(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  %7 = load i32, ptr %2, align 8, !tbaa !5
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %.thread, label %8

8:                                                ; preds = %4
  %9 = getelementptr inbounds i8, ptr %2, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !12
  switch i32 %10, label %.thread44._crit_edge [
    i32 221185, label %11
    i32 221186, label %15
    i32 221187, label %19
  ]

11:                                               ; preds = %8
  %12 = tail call i32 @_glfwInitGLX() #3
  %.not36 = icmp eq i32 %12, 0
  br i1 %.not36, label %55, label %13

13:                                               ; preds = %11
  %14 = call i32 @_glfwChooseVisualGLX(ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef nonnull %5, ptr noundef nonnull %6) #3
  %.not37 = icmp eq i32 %14, 0
  br i1 %.not37, label %55, label %21

15:                                               ; preds = %8
  %16 = tail call i32 @_glfwInitEGL() #3
  %.not34 = icmp eq i32 %16, 0
  br i1 %.not34, label %55, label %17

17:                                               ; preds = %15
  %18 = call i32 @_glfwChooseVisualEGL(ptr noundef %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef nonnull %5, ptr noundef nonnull %6) #3
  %.not35 = icmp eq i32 %18, 0
  br i1 %.not35, label %55, label %21

19:                                               ; preds = %8
  %20 = tail call i32 @_glfwInitOSMesa() #3
  %.not33 = icmp eq i32 %20, 0
  br i1 %.not33, label %55, label %21

21:                                               ; preds = %13, %19, %17
  %.pr = load i32, ptr %2, align 8, !tbaa !5
  %22 = icmp eq i32 %.pr, 0
  br i1 %22, label %.thread, label %.thread44

.thread44:                                        ; preds = %21
  %.pre = load i32, ptr %9, align 4, !tbaa !12
  %23 = icmp eq i32 %.pre, 221187
  br i1 %23, label %.thread, label %.thread44._crit_edge

.thread44._crit_edge:                             ; preds = %8, %.thread44
  %.pre45 = load ptr, ptr %5, align 8, !tbaa !13
  %.pre46 = load i32, ptr %6, align 4, !tbaa !14
  br label %33

.thread:                                          ; preds = %4, %.thread44, %21
  %24 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 130752), align 8, !tbaa !15
  %25 = getelementptr inbounds i8, ptr %24, i64 232
  %26 = load ptr, ptr %25, align 8, !tbaa !50
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @_glfw, i64 130760), align 8, !tbaa !52
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds %struct.Screen, ptr %26, i64 %28, i32 10
  %30 = load ptr, ptr %29, align 8, !tbaa !53
  store ptr %30, ptr %5, align 8, !tbaa !13
  %31 = getelementptr inbounds %struct.Screen, ptr %26, i64 %28, i32 9
  %32 = load i32, ptr %31, align 8, !tbaa !55
  store i32 %32, ptr %6, align 4, !tbaa !14
  br label %33

33:                                               ; preds = %.thread44._crit_edge, %.thread
  %34 = phi i32 [ %.pre46, %.thread44._crit_edge ], [ %32, %.thread ]
  %35 = phi ptr [ %.pre45, %.thread44._crit_edge ], [ %30, %.thread ]
  %36 = call i32 @createNativeWindow(ptr noundef %0, ptr noundef %1, ptr noundef %35, i32 noundef %34)
  %.not38 = icmp eq i32 %36, 0
  br i1 %.not38, label %55, label %37

37:                                               ; preds = %33
  %38 = load i32, ptr %2, align 8, !tbaa !5
  %.not39 = icmp eq i32 %38, 0
  br i1 %.not39, label %48, label %39

39:                                               ; preds = %37
  %40 = getelementptr inbounds i8, ptr %2, i64 4
  %41 = load i32, ptr %40, align 4, !tbaa !12
  switch i32 %41, label %48 [
    i32 221185, label %42
    i32 221186, label %44
    i32 221187, label %46
  ]

42:                                               ; preds = %39
  %43 = call i32 @_glfwCreateContextGLX(ptr noundef %0, ptr noundef nonnull %2, ptr noundef %3) #3
  %.not42 = icmp eq i32 %43, 0
  br i1 %.not42, label %55, label %48

44:                                               ; preds = %39
  %45 = call i32 @_glfwCreateContextEGL(ptr noundef %0, ptr noundef nonnull %2, ptr noundef %3) #3
  %.not41 = icmp eq i32 %45, 0
  br i1 %.not41, label %55, label %48

46:                                               ; preds = %39
  %47 = call i32 @_glfwCreateContextOSMesa(ptr noundef %0, ptr noundef nonnull %2, ptr noundef %3) #3
  %.not40 = icmp eq i32 %47, 0
  br i1 %.not40, label %55, label %48

48:                                               ; preds = %39, %42, %46, %44, %37
  %49 = getelementptr inbounds i8, ptr %0, i64 64
  %50 = load ptr, ptr %49, align 8, !tbaa !56
  %.not43 = icmp eq ptr %50, null
  br i1 %.not43, label %52, label %51

51:                                               ; preds = %48
  call void @_glfwPlatformShowWindow(ptr noundef nonnull %0)
  call void @updateWindowMode(ptr noundef nonnull %0)
  call void @acquireMonitor(ptr noundef nonnull %0)
  br label %52

52:                                               ; preds = %51, %48
  %53 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 130752), align 8, !tbaa !15
  %54 = call i32 @XFlush(ptr noundef %53) #3
  br label %55

55:                                               ; preds = %46, %44, %42, %33, %19, %17, %15, %13, %11, %52
  %.0 = phi i32 [ 1, %52 ], [ 0, %11 ], [ 0, %13 ], [ 0, %15 ], [ 0, %17 ], [ 0, %19 ], [ 0, %33 ], [ 0, %42 ], [ 0, %44 ], [ 0, %46 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  ret i32 %.0
}

declare i32 @_glfwInitGLX() local_unnamed_addr #2

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

declare i32 @_glfwInitEGL() local_unnamed_addr #2

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

declare i32 @_glfwInitOSMesa() local_unnamed_addr #2

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @_glfwPlatformShowWindow(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @updateWindowMode(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @acquireMonitor(ptr noundef) local_unnamed_addr #1

declare i32 @XFlush(ptr noundef) local_unnamed_addr #2

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_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, !10, i64 40, !11, i64 48}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"", !7, i64 0}
!12 = !{!6, !7, i64 4}
!13 = !{!10, !10, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !10, i64 130752}
!16 = !{!"_GLFWlibrary", !7, i64 0, !17, i64 8, !10, i64 992, !10, i64 1000, !10, i64 1008, !10, i64 1016, !7, i64 1024, !8, i64 1032, !10, i64 130568, !7, i64 130576, !25, i64 130580, !25, i64 130588, !27, i64 130600, !29, i64 130648, !31, i64 130672, !32, i64 130736, !33, i64 130752, !45, i64 132960, !46, i64 133184, !48, i64 133264, !49, i64 133440}
!17 = !{!"", !18, i64 0, !20, i64 16, !22, i64 88, !6, i64 920, !7, i64 976}
!18 = !{!"_GLFWinitconfig", !7, i64 0, !19, i64 4}
!19 = !{!"", !7, i64 0, !7, i64 4}
!20 = !{!"_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, !21, i64 64}
!21 = !{!"long", !8, i64 0}
!22 = !{!"_GLFWwndconfig", !7, i64 0, !7, i64 4, !10, 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, !23, i64 56, !24, i64 316}
!23 = !{!"", !7, i64 0, !8, i64 4}
!24 = !{!"", !8, i64 0, !8, i64 256}
!25 = !{!"_GLFWtls", !26, i64 0}
!26 = !{!"_GLFWtlsPOSIX", !7, i64 0, !7, i64 4}
!27 = !{!"_GLFWmutex", !28, i64 0}
!28 = !{!"_GLFWmutexPOSIX", !7, i64 0, !8, i64 8}
!29 = !{!"", !21, i64 0, !30, i64 8}
!30 = !{!"_GLFWtimerPOSIX", !7, i64 0, !21, i64 8}
!31 = !{!"", !7, i64 0, !10, i64 8, !8, i64 16, !10, i64 32, !10, i64 40, !7, i64 48, !7, i64 52, !7, i64 56}
!32 = !{!"", !10, i64 0, !10, i64 8}
!33 = !{!"_GLFWlibraryX11", !10, i64 0, !7, i64 8, !21, i64 16, !34, i64 24, !34, i64 28, !21, i64 32, !21, i64 40, !7, i64 48, !10, i64 56, !7, i64 64, !10, i64 72, !10, i64 80, !8, i64 88, !8, i64 94, !8, i64 606, !35, i64 1304, !35, i64 1312, !10, i64 1320, !21, i64 1328, !21, i64 1336, !21, i64 1344, !21, i64 1352, !21, i64 1360, !21, i64 1368, !21, i64 1376, !21, i64 1384, !21, i64 1392, !21, i64 1400, !21, i64 1408, !21, i64 1416, !21, i64 1424, !21, i64 1432, !21, i64 1440, !21, i64 1448, !21, i64 1456, !21, i64 1464, !21, i64 1472, !21, i64 1480, !21, i64 1488, !21, i64 1496, !21, i64 1504, !21, i64 1512, !21, i64 1520, !21, i64 1528, !21, i64 1536, !21, i64 1544, !21, i64 1552, !21, i64 1560, !21, i64 1568, !21, i64 1576, !21, i64 1584, !21, i64 1592, !21, i64 1600, !21, i64 1608, !21, i64 1616, !21, i64 1624, !21, i64 1632, !21, i64 1640, !21, i64 1648, !21, i64 1656, !21, i64 1664, !21, i64 1672, !21, i64 1680, !21, i64 1688, !36, i64 1696, !37, i64 1872, !38, i64 1900, !39, i64 1920, !40, i64 1944, !41, i64 1976, !32, i64 2024, !42, i64 2040, !43, i64 2096, !44, i64 2152}
!34 = !{!"float", !8, i64 0}
!35 = !{!"double", !8, i64 0}
!36 = !{!"", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168}
!37 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24}
!38 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16}
!39 = !{!"", !7, i64 0, !21, i64 8, !21, i64 16}
!40 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!41 = !{!"", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !10, i64 24, !10, i64 32, !10, i64 40}
!42 = !{!"", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!43 = !{!"", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !10, i64 40, !10, i64 48}
!44 = !{!"", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !10, i64 32, !10, i64 40, !10, i64 48}
!45 = !{!"_GLFWlibraryGLX", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, 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}
!46 = !{!"_GLFWlibraryLinux", !7, i64 0, !7, i64 4, !47, i64 8, !7, i64 72}
!47 = !{!"re_pattern_buffer", !10, i64 0, !21, i64 8, !21, i64 16, !21, i64 24, !10, i64 32, !10, i64 40, !21, i64 48, !7, i64 56, !7, i64 56, !7, i64 56, !7, i64 56, !7, i64 56, !7, i64 56, !7, i64 56}
!48 = !{!"_GLFWlibraryEGL", !10, 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, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168}
!49 = !{!"_GLFWlibraryOSMesa", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!50 = !{!51, !10, i64 232}
!51 = !{!"", !10, i64 0, !10, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !10, i64 32, !21, i64 40, !21, i64 48, !21, i64 56, !7, i64 64, !10, i64 72, !7, i64 80, !7, i64 84, !7, i64 88, !7, i64 92, !7, i64 96, !10, i64 104, !7, i64 112, !7, i64 116, !10, i64 120, !10, i64 128, !7, i64 136, !21, i64 144, !21, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !7, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !7, i64 224, !7, i64 228, !10, i64 232, !21, i64 240, !21, i64 248, !7, i64 256, !7, i64 260, !10, i64 264, !10, i64 272, !7, i64 280, !10, i64 288}
!52 = !{!16, !7, i64 130760}
!53 = !{!54, !10, i64 64}
!54 = !{!"", !10, i64 0, !10, i64 8, !21, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !10, i64 72, !21, i64 80, !21, i64 88, !21, i64 96, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !21, i64 120}
!55 = !{!54, !7, i64 56}
!56 = !{!57, !10, i64 64}
!57 = !{!"_GLFWwindow", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !10, i64 32, !58, i64 40, !10, i64 64, !10, 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, !35, i64 480, !35, i64 488, !59, i64 496, !63, i64 688, !64, i64 824}
!58 = !{!"GLFWvidmode", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!59 = !{!"_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, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !60, i64 120, !61, i64 136, !62, i64 168}
!60 = !{!"_GLFWcontextGLX", !10, i64 0, !21, i64 8}
!61 = !{!"_GLFWcontextEGL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!62 = !{!"_GLFWcontextOSMesa", !10, i64 0, !7, i64 8, !7, i64 12, !10, i64 16}
!63 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128}
!64 = !{!"_GLFWwindowX11", !21, i64 0, !21, i64 8, !10, 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, !21, i64 72}


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