; LLVM IR from unitreerobotics/kinect_teleoperate :: src/extern/glfw/src/src (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.3, ptr, ptr, ptr, ptr, i32, i32, [16 x %struct._GLFWjoystick], ptr, i32, %struct._GLFWtls, %struct._GLFWtls, %struct._GLFWmutex, %struct.anon.11, %struct.anon.12, %struct.anon.13, %struct.anon.14, %struct.anon.15, %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.3 = type { %struct._GLFWinitconfig, %struct._GLFWfbconfig, %struct._GLFWwndconfig, %struct._GLFWctxconfig, i32 }
%struct._GLFWinitconfig = type { i32, i32, i32, ptr, %struct.anon.4, %struct.anon.5, %struct.anon.6 }
%struct.anon.4 = type { i32, i32 }
%struct.anon.5 = type { i32 }
%struct.anon.6 = 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.7, %struct.anon.8, %struct.anon.9, %struct.anon.10 }
%struct.anon.7 = type { [256 x i8] }
%struct.anon.8 = type { [256 x i8], [256 x i8] }
%struct.anon.9 = type { i32, i32 }
%struct.anon.10 = type { [256 x i8] }
%struct._GLFWctxconfig = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, %struct.anon }
%struct.anon = 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.11 = type { i64, %struct._GLFWtimerPOSIX }
%struct._GLFWtimerPOSIX = type { i32, i64 }
%struct.anon.12 = 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.13 = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.anon.14 = type { i32, ptr, [2 x ptr], ptr, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.anon.15 = 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.2, %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.0, %struct.anon.1 }
%struct.anon.0 = type { ptr, ptr, ptr, ptr }
%struct.anon.1 = type { ptr, i32, i32, ptr }
%struct.anon.2 = 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.30 = external hidden unnamed_addr constant [74 x i8], align 1

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

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

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

declare ptr @_glfwPlatformGetTls(ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local void @glfwMakeContextCurrent(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %6 = load i32, ptr @_glfw, align 8, !tbaa !9
  %7 = icmp ne i32 %6, 0
  br i1 %7, label %9, label %8

8:                                                ; preds = %1
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65537, ptr noundef null)
  br label %55

9:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %10, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %11 = call ptr @_glfwPlatformGetTls(ptr noundef getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 14))
  store ptr %11, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = icmp ne ptr %12, null
  br i1 %13, label %14, label %21

14:                                               ; preds = %9
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._GLFWwindow, ptr %15, i32 0, i32 30
  %17 = getelementptr inbounds %struct._GLFWcontext, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 8, !tbaa !35
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %21

20:                                               ; preds = %14
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65546, ptr noundef @.str.30)
  store i32 1, ptr %5, align 4
  br label %53

21:                                               ; preds = %14, %9
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %24, label %43

24:                                               ; preds = %21
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %37

27:                                               ; preds = %24
  %28 = load ptr, ptr %3, 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 !45
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._GLFWwindow, ptr %32, i32 0, i32 30
  %34 = getelementptr inbounds %struct._GLFWcontext, ptr %33, i32 0, i32 1
  %35 = load i32, ptr %34, align 4, !tbaa !45
  %36 = icmp ne i32 %31, %35
  br i1 %36, label %37, label %42

37:                                               ; preds = %27, %24
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct._GLFWwindow, ptr %38, i32 0, i32 30
  %40 = getelementptr inbounds %struct._GLFWcontext, ptr %39, i32 0, i32 14
  %41 = load ptr, ptr %40, align 8, !tbaa !46
  call void %41(ptr noundef null)
  br label %42

42:                                               ; preds = %37, %27
  br label %43

43:                                               ; preds = %42, %21
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %52

46:                                               ; preds = %43
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._GLFWwindow, ptr %47, i32 0, i32 30
  %49 = getelementptr inbounds %struct._GLFWcontext, ptr %48, i32 0, i32 14
  %50 = load ptr, ptr %49, align 8, !tbaa !46
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  call void %50(ptr noundef %51)
  br label %52

52:                                               ; preds = %46, %43
  store i32 0, ptr %5, align 4
  br label %53

53:                                               ; preds = %52, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  %54 = load i32, ptr %5, align 4
  switch i32 %54, label %56 [
    i32 0, label %55
    i32 1, label %55
  ]

55:                                               ; preds = %53, %53, %8
  ret void

56:                                               ; preds = %53
  unreachable
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 536}
!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 = !{!36, !11, i64 540}
!46 = !{!36, !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.GLFWallocator, %struct._GLFWplatform, %struct.anon.3, ptr, ptr, ptr, ptr, i32, i32, [16 x %struct._GLFWjoystick], ptr, i32, %struct._GLFWtls, %struct._GLFWtls, %struct._GLFWmutex, %struct.anon.11, %struct.anon.12, %struct.anon.13, %struct.anon.14, %struct.anon.15, %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.3 = type { %struct._GLFWinitconfig, %struct._GLFWfbconfig, %struct._GLFWwndconfig, %struct._GLFWctxconfig, i32 }
%struct._GLFWinitconfig = type { i32, i32, i32, ptr, %struct.anon.4, %struct.anon.5, %struct.anon.6 }
%struct.anon.4 = type { i32, i32 }
%struct.anon.5 = type { i32 }
%struct.anon.6 = 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.7, %struct.anon.8, %struct.anon.9, %struct.anon.10 }
%struct.anon.7 = type { [256 x i8] }
%struct.anon.8 = type { [256 x i8], [256 x i8] }
%struct.anon.9 = type { i32, i32 }
%struct.anon.10 = type { [256 x i8] }
%struct._GLFWctxconfig = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, %struct.anon }
%struct.anon = 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.11 = type { i64, %struct._GLFWtimerPOSIX }
%struct._GLFWtimerPOSIX = type { i32, i64 }
%struct.anon.12 = 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.13 = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.anon.14 = type { i32, ptr, [2 x ptr], ptr, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.anon.15 = type { ptr, ptr }
%struct._GLFWlibraryNull = type { i32, i32, ptr, ptr, [121 x i16], [349 x i8] }

@_glfw = external global %struct._GLFWlibrary, align 8
@.str.30 = external hidden unnamed_addr constant [74 x i8], align 1

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

declare ptr @_glfwPlatformGetTls(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @glfwMakeContextCurrent(ptr noundef %0) local_unnamed_addr #1 {
  %2 = load i32, ptr @_glfw, align 8, !tbaa !5
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %3, label %4

3:                                                ; preds = %1
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65537, ptr noundef null) #2
  br label %.thread18

4:                                                ; preds = %1
  %5 = tail call ptr @_glfwPlatformGetTls(ptr noundef nonnull getelementptr inbounds (i8, ptr @_glfw, i64 5796)) #2
  %.not12 = icmp eq ptr %0, null
  br i1 %.not12, label %11, label %6

6:                                                ; preds = %4
  %7 = getelementptr inbounds i8, ptr %0, i64 536
  %8 = load i32, ptr %7, align 8, !tbaa !34
  %9 = icmp eq i32 %8, 0
  br i1 %9, label %10, label %.thread

10:                                               ; preds = %6
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65546, ptr noundef nonnull @.str.30) #2
  br label %.thread18

11:                                               ; preds = %4
  %.not13 = icmp eq ptr %5, null
  br i1 %.not13, label %.thread18, label %.thread19

.thread19:                                        ; preds = %11
  %12 = getelementptr inbounds i8, ptr %5, i64 608
  %13 = load ptr, ptr %12, align 8, !tbaa !44
  tail call void %13(ptr noundef null) #2
  br label %.thread18

.thread:                                          ; preds = %6
  %.not1315 = icmp eq ptr %5, null
  br i1 %.not1315, label %.thread17, label %14

14:                                               ; preds = %.thread
  %15 = getelementptr inbounds i8, ptr %0, i64 540
  %16 = load i32, ptr %15, align 4, !tbaa !45
  %17 = getelementptr inbounds i8, ptr %5, i64 540
  %18 = load i32, ptr %17, align 4, !tbaa !45
  %.not14 = icmp eq i32 %16, %18
  br i1 %.not14, label %.thread17, label %19

19:                                               ; preds = %14
  %20 = getelementptr inbounds i8, ptr %5, i64 608
  %21 = load ptr, ptr %20, align 8, !tbaa !44
  tail call void %21(ptr noundef null) #2
  br label %.thread17

.thread17:                                        ; preds = %19, %14, %.thread
  %22 = getelementptr inbounds i8, ptr %0, i64 608
  %23 = load ptr, ptr %22, align 8, !tbaa !44
  tail call void %23(ptr noundef nonnull %0) #2
  br label %.thread18

.thread18:                                        ; preds = %11, %.thread19, %10, %.thread17, %3
  ret void
}

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 536}
!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 = !{!35, !11, i64 608}
!45 = !{!35, !7, i64 540}


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