; LLVM IR from unitreerobotics/kinect_teleoperate :: src/extern/glfw/src/src (osmesa_context)

; 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.GLFWallocator, %struct._GLFWplatform, %struct.anon, ptr, ptr, ptr, ptr, i32, i32, [16 x %struct._GLFWjoystick], ptr, i32, %struct._GLFWtls, %struct._GLFWtls, %struct._GLFWmutex, %struct.anon.8, %struct.anon.9, %struct.anon.10, %struct.anon.11, %struct.anon.12, %struct._GLFWlibraryNull }
%struct.GLFWallocator = type { ptr, ptr, ptr, ptr }
%struct._GLFWplatform = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.anon = type { %struct._GLFWinitconfig, %struct._GLFWfbconfig, %struct._GLFWwndconfig, %struct._GLFWctxconfig, i32 }
%struct._GLFWinitconfig = type { i32, i32, i32, ptr, %struct.anon.0, %struct.anon.1, %struct.anon.2 }
%struct.anon.0 = type { i32, i32 }
%struct.anon.1 = type { i32 }
%struct.anon.2 = type { 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, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.anon.3, %struct.anon.4, %struct.anon.5, %struct.anon.6 }
%struct.anon.3 = type { [256 x i8] }
%struct.anon.4 = type { [256 x i8], [256 x i8] }
%struct.anon.5 = type { i32, i32 }
%struct.anon.6 = type { [256 x i8] }
%struct._GLFWctxconfig = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, %struct.anon.7 }
%struct.anon.7 = type { i32 }
%struct._GLFWjoystick = type { i32, i32, ptr, i32, ptr, i32, ptr, i32, [128 x i8], ptr, [33 x i8], ptr }
%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.8 = type { i64, %struct._GLFWtimerPOSIX }
%struct._GLFWtimerPOSIX = type { i32, i64 }
%struct.anon.9 = type { i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, 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, ptr, ptr, ptr }
%struct.anon.10 = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.anon.11 = type { i32, ptr, [2 x ptr], ptr, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.anon.12 = type { ptr, ptr }
%struct._GLFWlibraryNull = type { i32, i32, ptr, ptr, [121 x i16], [349 x i8] }
%struct._GLFWwindow = type { ptr, i32, i32, i32, i32, i32, i32, i32, ptr, i32, %struct.GLFWvidmode, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [8 x i8], [349 x i8], double, double, i32, %struct._GLFWcontext, %struct.anon.15, %struct._GLFWwindowNull }
%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.anon.13, %struct.anon.14 }
%struct.anon.13 = type { ptr, ptr, ptr, ptr }
%struct.anon.14 = type { ptr, i32, i32, ptr }
%struct.anon.15 = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._GLFWwindowNull = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float }

@_glfw = external global %struct._GLFWlibrary, align 8
@.str.13 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__.glfwGetOSMesaColorBuffer = external hidden unnamed_addr constant [73 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [40 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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @glfwGetOSMesaColorBuffer(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #3 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %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
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %18 = load i32, ptr @_glfw, align 8, !tbaa !9
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %21, label %20

20:                                               ; preds = %5
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65537, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %70

21:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %22, ptr %17, align 8, !tbaa !5
  %23 = load ptr, ptr %17, align 8, !tbaa !5
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %21
  br label %27

26:                                               ; preds = %21
  call void @__assert_fail(ptr noundef @.str.17, ptr noundef @.str.13, i32 noundef 303, ptr noundef @__PRETTY_FUNCTION__.glfwGetOSMesaColorBuffer) #5
  unreachable

27:                                               ; preds = %25
  %28 = load ptr, ptr %17, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct._GLFWwindow, ptr %28, i32 0, i32 30
  %30 = getelementptr inbounds %struct._GLFWcontext, ptr %29, i32 0, i32 1
  %31 = load i32, ptr %30, align 4, !tbaa !35
  %32 = icmp ne i32 %31, 221187
  br i1 %32, label %33, label %34

33:                                               ; preds = %27
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65546, ptr noundef null)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %69

34:                                               ; preds = %27
  %35 = load ptr, ptr getelementptr inbounds (%struct.anon.10, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 18), i32 0, i32 5), align 8, !tbaa !45
  %36 = load ptr, ptr %17, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._GLFWwindow, ptr %36, i32 0, i32 30
  %38 = getelementptr inbounds %struct._GLFWcontext, ptr %37, i32 0, i32 21
  %39 = getelementptr inbounds %struct.anon.14, ptr %38, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !46
  %41 = call i32 %35(ptr noundef %40, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %12)
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %44, label %43

43:                                               ; preds = %34
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65544, ptr noundef @.str.18)
  store i32 0, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %69

44:                                               ; preds = %34
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %50

47:                                               ; preds = %44
  %48 = load i32, ptr %13, align 4, !tbaa !47
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %48, ptr %49, align 4, !tbaa !47
  br label %50

50:                                               ; preds = %47, %44
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %53, label %56

53:                                               ; preds = %50
  %54 = load i32, ptr %14, align 4, !tbaa !47
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %54, ptr %55, align 4, !tbaa !47
  br label %56

56:                                               ; preds = %53, %50
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %62

59:                                               ; preds = %56
  %60 = load i32, ptr %15, align 4, !tbaa !47
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  store i32 %60, ptr %61, align 4, !tbaa !47
  br label %62

62:                                               ; preds = %59, %56
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %68

65:                                               ; preds = %62
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %66, ptr %67, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %65, %62
  store i32 1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %69

69:                                               ; preds = %68, %43, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %70

70:                                               ; preds = %69, %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %71 = load i32, ptr %6, align 4
  ret i32 %71
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_GLFWlibrary", !11, i64 0, !12, i64 8, !13, i64 40, !14, i64 616, !6, i64 1896, !6, i64 1904, !6, i64 1912, !6, i64 1920, !11, i64 1928, !11, i64 1932, !7, i64 1936, !6, i64 5776, !11, i64 5784, !24, i64 5788, !24, i64 5796, !26, i64 5808, !28, i64 5856, !30, i64 5880, !31, i64 6136, !32, i64 6200, !33, i64 6272, !34, i64 6288}
!11 = !{!"int", !7, i64 0}
!12 = !{!"GLFWallocator", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!"_GLFWplatform", !11, 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, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568}
!14 = !{!"", !15, i64 0, !18, i64 40, !20, i64 112, !23, i64 1216, !11, i64 1272}
!15 = !{!"_GLFWinitconfig", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !16, i64 24, !17, i64 32, !17, i64 36}
!16 = !{!"", !11, i64 0, !11, i64 4}
!17 = !{!"", !11, i64 0}
!18 = !{!"_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, !19, i64 64}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_GLFWwndconfig", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !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, !21, i64 72, !22, i64 328, !16, i64 840, !21, i64 848}
!21 = !{!"", !7, i64 0}
!22 = !{!"", !7, i64 0, !7, i64 256}
!23 = !{!"_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, !17, i64 48}
!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 = !{!"", !19, i64 0, !29, i64 8}
!29 = !{!"_GLFWtimerPOSIX", !11, i64 0, !19, i64 8}
!30 = !{!"", !11, i64 0, !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, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !11, 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, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248}
!31 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!32 = !{!"", !11, i64 0, !6, i64 8, !7, i64 16, !6, i64 32, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68}
!33 = !{!"", !6, i64 0, !6, i64 8}
!34 = !{!"_GLFWlibraryNull", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !7, i64 24, !7, i64 266}
!35 = !{!36, !11, i64 540}
!36 = !{!"_GLFWwindow", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !6, i64 40, !11, i64 48, !37, i64 52, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !7, i64 148, !7, i64 156, !38, i64 512, !38, i64 520, !11, i64 528, !39, i64 536, !42, i64 712, !43, i64 848}
!37 = !{!"GLFWvidmode", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!38 = !{!"double", !7, i64 0}
!39 = !{!"_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, !40, i64 120, !41, i64 152}
!40 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!41 = !{!"", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16}
!42 = !{!"", !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}
!43 = !{!"_GLFWwindowNull", !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, !44, i64 44}
!44 = !{!"float", !7, i64 0}
!45 = !{!10, !6, i64 6176}
!46 = !{!36, !6, i64 688}
!47 = !{!11, !11, i64 0}


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

%struct._GLFWlibrary = type { i32, %struct.GLFWallocator, %struct._GLFWplatform, %struct.anon, ptr, ptr, ptr, ptr, i32, i32, [16 x %struct._GLFWjoystick], ptr, i32, %struct._GLFWtls, %struct._GLFWtls, %struct._GLFWmutex, %struct.anon.8, %struct.anon.9, %struct.anon.10, %struct.anon.11, %struct.anon.12, %struct._GLFWlibraryNull }
%struct.GLFWallocator = type { ptr, ptr, ptr, ptr }
%struct._GLFWplatform = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.anon = type { %struct._GLFWinitconfig, %struct._GLFWfbconfig, %struct._GLFWwndconfig, %struct._GLFWctxconfig, i32 }
%struct._GLFWinitconfig = type { i32, i32, i32, ptr, %struct.anon.0, %struct.anon.1, %struct.anon.2 }
%struct.anon.0 = type { i32, i32 }
%struct.anon.1 = type { i32 }
%struct.anon.2 = type { 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, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.anon.3, %struct.anon.4, %struct.anon.5, %struct.anon.6 }
%struct.anon.3 = type { [256 x i8] }
%struct.anon.4 = type { [256 x i8], [256 x i8] }
%struct.anon.5 = type { i32, i32 }
%struct.anon.6 = type { [256 x i8] }
%struct._GLFWctxconfig = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, %struct.anon.7 }
%struct.anon.7 = type { i32 }
%struct._GLFWjoystick = type { i32, i32, ptr, i32, ptr, i32, ptr, i32, [128 x i8], ptr, [33 x i8], ptr }
%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.8 = type { i64, %struct._GLFWtimerPOSIX }
%struct._GLFWtimerPOSIX = type { i32, i64 }
%struct.anon.9 = type { i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, 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, ptr, ptr, ptr }
%struct.anon.10 = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.anon.11 = type { i32, ptr, [2 x ptr], ptr, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.anon.12 = type { ptr, ptr }
%struct._GLFWlibraryNull = type { i32, i32, ptr, ptr, [121 x i16], [349 x i8] }

@_glfw = external local_unnamed_addr global %struct._GLFWlibrary, align 8
@.str.13 = external hidden unnamed_addr constant [109 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [15 x i8], align 1
@__PRETTY_FUNCTION__.glfwGetOSMesaColorBuffer = external hidden unnamed_addr constant [73 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [40 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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @glfwGetOSMesaColorBuffer(ptr noundef readonly %0, ptr noundef writeonly %1, ptr noundef writeonly %2, ptr noundef writeonly %3, ptr noundef writeonly %4) local_unnamed_addr #3 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  %10 = load i32, ptr @_glfw, align 8, !tbaa !5
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %11, label %12

11:                                               ; preds = %5
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65537, ptr noundef null) #4
  br label %36

12:                                               ; preds = %5
  %.not17 = icmp eq ptr %0, null
  br i1 %.not17, label %13, label %14

13:                                               ; preds = %12
  tail call void @__assert_fail(ptr noundef nonnull @.str.17, ptr noundef nonnull @.str.13, i32 noundef 303, ptr noundef nonnull @__PRETTY_FUNCTION__.glfwGetOSMesaColorBuffer) #5
  unreachable

14:                                               ; preds = %12
  %15 = getelementptr inbounds i8, ptr %0, i64 540
  %16 = load i32, ptr %15, align 4, !tbaa !34
  %.not18 = icmp eq i32 %16, 221187
  br i1 %.not18, label %18, label %17

17:                                               ; preds = %14
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65546, ptr noundef null) #4
  br label %36

18:                                               ; preds = %14
  %19 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 6176), align 8, !tbaa !44
  %20 = getelementptr inbounds i8, ptr %0, i64 688
  %21 = load ptr, ptr %20, align 8, !tbaa !45
  %22 = call i32 %19(ptr noundef %21, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %6) #4
  %.not19 = icmp eq i32 %22, 0
  br i1 %.not19, label %23, label %24

23:                                               ; preds = %18
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65544, ptr noundef nonnull @.str.18) #4
  br label %36

24:                                               ; preds = %18
  %.not20 = icmp eq ptr %1, null
  br i1 %.not20, label %27, label %25

25:                                               ; preds = %24
  %26 = load i32, ptr %7, align 4, !tbaa !46
  store i32 %26, ptr %1, align 4, !tbaa !46
  br label %27

27:                                               ; preds = %25, %24
  %.not21 = icmp eq ptr %2, null
  br i1 %.not21, label %30, label %28

28:                                               ; preds = %27
  %29 = load i32, ptr %8, align 4, !tbaa !46
  store i32 %29, ptr %2, align 4, !tbaa !46
  br label %30

30:                                               ; preds = %28, %27
  %.not22 = icmp eq ptr %3, null
  br i1 %.not22, label %33, label %31

31:                                               ; preds = %30
  %32 = load i32, ptr %9, align 4, !tbaa !46
  store i32 %32, ptr %3, align 4, !tbaa !46
  br label %33

33:                                               ; preds = %31, %30
  %.not23 = icmp eq ptr %4, null
  br i1 %.not23, label %36, label %34

34:                                               ; preds = %33
  %35 = load ptr, ptr %6, align 8, !tbaa !47
  store ptr %35, ptr %4, align 8, !tbaa !47
  br label %36

36:                                               ; preds = %17, %23, %34, %33, %11
  %.1 = phi i32 [ 0, %11 ], [ 0, %17 ], [ 0, %23 ], [ 1, %34 ], [ 1, %33 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  ret i32 %.1
}

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_GLFWlibrary", !7, i64 0, !10, i64 8, !12, i64 40, !13, i64 616, !11, i64 1896, !11, i64 1904, !11, i64 1912, !11, i64 1920, !7, i64 1928, !7, i64 1932, !8, i64 1936, !11, i64 5776, !7, i64 5784, !23, i64 5788, !23, i64 5796, !25, i64 5808, !27, i64 5856, !29, i64 5880, !30, i64 6136, !31, i64 6200, !32, i64 6272, !33, i64 6288}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"GLFWallocator", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_GLFWplatform", !7, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !11, i64 272, !11, i64 280, !11, i64 288, !11, i64 296, !11, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !11, i64 336, !11, i64 344, !11, i64 352, !11, i64 360, !11, i64 368, !11, i64 376, !11, i64 384, !11, i64 392, !11, i64 400, !11, i64 408, !11, i64 416, !11, i64 424, !11, i64 432, !11, i64 440, !11, i64 448, !11, i64 456, !11, i64 464, !11, i64 472, !11, i64 480, !11, i64 488, !11, i64 496, !11, i64 504, !11, i64 512, !11, i64 520, !11, i64 528, !11, i64 536, !11, i64 544, !11, i64 552, !11, i64 560, !11, i64 568}
!13 = !{!"", !14, i64 0, !17, i64 40, !19, i64 112, !22, i64 1216, !7, i64 1272}
!14 = !{!"_GLFWinitconfig", !7, i64 0, !7, i64 4, !7, i64 8, !11, i64 16, !15, i64 24, !16, i64 32, !16, i64 36}
!15 = !{!"", !7, i64 0, !7, i64 4}
!16 = !{!"", !7, i64 0}
!17 = !{!"_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, !18, i64 64}
!18 = !{!"long", !8, i64 0}
!19 = !{!"_GLFWwndconfig", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !11, 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, !20, i64 72, !21, i64 328, !15, i64 840, !20, i64 848}
!20 = !{!"", !8, i64 0}
!21 = !{!"", !8, i64 0, !8, i64 256}
!22 = !{!"_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, !11, i64 40, !16, i64 48}
!23 = !{!"_GLFWtls", !24, i64 0}
!24 = !{!"_GLFWtlsPOSIX", !7, i64 0, !7, i64 4}
!25 = !{!"_GLFWmutex", !26, i64 0}
!26 = !{!"_GLFWmutexPOSIX", !7, i64 0, !8, i64 8}
!27 = !{!"", !18, i64 0, !28, i64 8}
!28 = !{!"_GLFWtimerPOSIX", !7, i64 0, !18, i64 8}
!29 = !{!"", !7, i64 0, !11, 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, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !7, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248}
!30 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!31 = !{!"", !7, i64 0, !11, i64 8, !8, i64 16, !11, i64 32, !7, i64 40, !7, i64 44, !7, i64 48, !7, i64 52, !7, i64 56, !7, i64 60, !7, i64 64, !7, i64 68}
!32 = !{!"", !11, i64 0, !11, i64 8}
!33 = !{!"_GLFWlibraryNull", !7, i64 0, !7, i64 4, !11, i64 8, !11, i64 16, !8, i64 24, !8, i64 266}
!34 = !{!35, !7, i64 540}
!35 = !{!"_GLFWwindow", !11, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !11, i64 40, !7, i64 48, !36, i64 52, !11, i64 80, !11, i64 88, !11, i64 96, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !7, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !8, i64 148, !8, i64 156, !37, i64 512, !37, i64 520, !7, i64 528, !38, i64 536, !41, i64 712, !42, i64 848}
!36 = !{!"GLFWvidmode", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!37 = !{!"double", !8, i64 0}
!38 = !{!"_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, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !39, i64 120, !40, i64 152}
!39 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!40 = !{!"", !11, i64 0, !7, i64 8, !7, i64 12, !11, i64 16}
!41 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128}
!42 = !{!"_GLFWwindowNull", !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, !43, i64 44}
!43 = !{!"float", !8, i64 0}
!44 = !{!6, !11, i64 6176}
!45 = !{!35, !11, i64 688}
!46 = !{!7, !7, i64 0}
!47 = !{!11, !11, i64 0}


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