; LLVM IR from erincatto/box2d-lite :: extern/glfw/src (monitor)

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

@_glfw = external global %struct._GLFWlibrary, align 8
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__.glfwSetGammaRamp = external hidden unnamed_addr constant [60 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1

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

; Function Attrs: nocallback nofree 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) #1

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

; Function Attrs: nounwind uwtable
define dso_local void @glfwSetGammaRamp(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %7, ptr %5, align 8, !tbaa !5
  %8 = load ptr, ptr %5, align 8, !tbaa !5
  %9 = icmp ne ptr %8, null
  br i1 %9, label %10, label %11

10:                                               ; preds = %2
  br label %12

11:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 492, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #5
  unreachable

12:                                               ; preds = %10
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %12
  br label %17

16:                                               ; preds = %12
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 493, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #5
  unreachable

17:                                               ; preds = %15
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.GLFWgammaramp, ptr %18, i32 0, i32 3
  %20 = load i32, ptr %19, align 8, !tbaa !9
  %21 = icmp ugt i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %17
  br label %24

23:                                               ; preds = %17
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.1, i32 noundef 494, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #5
  unreachable

24:                                               ; preds = %22
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.GLFWgammaramp, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !12
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %24
  br label %31

30:                                               ; preds = %24
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 495, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #5
  unreachable

31:                                               ; preds = %29
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.GLFWgammaramp, ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !13
  %35 = icmp ne ptr %34, null
  br i1 %35, label %36, label %37

36:                                               ; preds = %31
  br label %38

37:                                               ; preds = %31
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 496, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #5
  unreachable

38:                                               ; preds = %36
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.GLFWgammaramp, ptr %39, i32 0, i32 2
  %41 = load ptr, ptr %40, align 8, !tbaa !14
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %44

43:                                               ; preds = %38
  br label %45

44:                                               ; preds = %38
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 497, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #5
  unreachable

45:                                               ; preds = %43
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.GLFWgammaramp, ptr %46, i32 0, i32 3
  %48 = load i32, ptr %47, align 8, !tbaa !9
  %49 = icmp ule i32 %48, 0
  br i1 %49, label %50, label %54

50:                                               ; preds = %45
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.GLFWgammaramp, ptr %51, i32 0, i32 3
  %53 = load i32, ptr %52, align 8, !tbaa !9
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65540, ptr noundef @.str.12, i32 noundef %53)
  store i32 1, ptr %6, align 4
  br label %75

54:                                               ; preds = %45
  %55 = load i32, ptr @_glfw, align 8, !tbaa !15
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %58, label %57

57:                                               ; preds = %54
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65537, ptr noundef null)
  store i32 1, ptr %6, align 4
  br label %75

58:                                               ; preds = %54
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._GLFWmonitor, ptr %59, i32 0, i32 8
  %61 = getelementptr inbounds %struct.GLFWgammaramp, ptr %60, i32 0, i32 3
  %62 = load i32, ptr %61, align 8, !tbaa !52
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %72, label %64

64:                                               ; preds = %58
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._GLFWmonitor, ptr %66, i32 0, i32 8
  %68 = call i32 @_glfwPlatformGetGammaRamp(ptr noundef %65, ptr noundef %67)
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %71, label %70

70:                                               ; preds = %64
  store i32 1, ptr %6, align 4
  br label %75

71:                                               ; preds = %64
  br label %72

72:                                               ; preds = %71, %58
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_glfwPlatformSetGammaRamp(ptr noundef %73, ptr noundef %74)
  store i32 0, ptr %6, align 4
  br label %75

75:                                               ; preds = %72, %70, %57, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  %76 = load i32, ptr %6, align 4
  switch i32 %76, label %78 [
    i32 0, label %77
    i32 1, label %77
  ]

77:                                               ; preds = %75, %75
  ret void

78:                                               ; preds = %75
  unreachable
}

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

declare void @_glfwPlatformSetGammaRamp(ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 24}
!10 = !{!"GLFWgammaramp", !6, i64 0, !6, i64 8, !6, i64 16, !11, i64 24}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !6, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!10, !6, i64 16}
!15 = !{!16, !11, i64 0}
!16 = !{!"_GLFWlibrary", !11, i64 0, !17, 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, !27, i64 130580, !27, i64 130588, !29, i64 130600, !31, i64 130648, !33, i64 130672, !34, i64 130736, !35, i64 130752, !47, i64 132960, !48, i64 133184, !50, i64 133264, !51, i64 133440}
!17 = !{!"", !18, i64 0, !20, i64 16, !22, i64 88, !25, i64 920, !11, i64 976}
!18 = !{!"_GLFWinitconfig", !11, i64 0, !19, i64 4}
!19 = !{!"", !11, i64 0, !11, i64 4}
!20 = !{!"_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, !21, i64 64}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_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, !23, i64 56, !24, i64 316}
!23 = !{!"", !11, i64 0, !7, i64 4}
!24 = !{!"", !7, i64 0, !7, i64 256}
!25 = !{!"_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, !26, i64 48}
!26 = !{!"", !11, i64 0}
!27 = !{!"_GLFWtls", !28, i64 0}
!28 = !{!"_GLFWtlsPOSIX", !11, i64 0, !11, i64 4}
!29 = !{!"_GLFWmutex", !30, i64 0}
!30 = !{!"_GLFWmutexPOSIX", !11, i64 0, !7, i64 8}
!31 = !{!"", !21, i64 0, !32, i64 8}
!32 = !{!"_GLFWtimerPOSIX", !11, i64 0, !21, i64 8}
!33 = !{!"", !11, i64 0, !6, i64 8, !7, i64 16, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56}
!34 = !{!"", !6, i64 0, !6, i64 8}
!35 = !{!"_GLFWlibraryX11", !6, i64 0, !11, i64 8, !21, i64 16, !36, i64 24, !36, i64 28, !21, i64 32, !21, 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, !37, i64 1304, !37, i64 1312, !6, 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, !38, i64 1696, !39, i64 1872, !40, i64 1900, !41, i64 1920, !42, i64 1944, !43, i64 1976, !34, i64 2024, !44, i64 2040, !45, i64 2096, !46, i64 2152}
!36 = !{!"float", !7, i64 0}
!37 = !{!"double", !7, i64 0}
!38 = !{!"", !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}
!39 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24}
!40 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!41 = !{!"", !11, i64 0, !21, i64 8, !21, i64 16}
!42 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!43 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!44 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!45 = !{!"", !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}
!46 = !{!"", !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}
!47 = !{!"_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}
!48 = !{!"_GLFWlibraryLinux", !11, i64 0, !11, i64 4, !49, i64 8, !11, i64 72}
!49 = !{!"re_pattern_buffer", !6, i64 0, !21, i64 8, !21, i64 16, !21, i64 24, !6, i64 32, !6, i64 40, !21, i64 48, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56}
!50 = !{!"_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}
!51 = !{!"_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}
!52 = !{!53, !11, i64 96}
!53 = !{!"_GLFWmonitor", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !11, i64 40, !54, i64 44, !10, i64 72, !10, i64 104, !55, i64 136}
!54 = !{!"GLFWvidmode", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!55 = !{!"_GLFWmonitorX11", !21, i64 0, !21, i64 8, !21, i64 16, !11, i64 24}


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

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

@_glfw = external local_unnamed_addr global %struct._GLFWlibrary, align 8
@.str.1 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@__PRETTY_FUNCTION__.glfwSetGammaRamp = external hidden unnamed_addr constant [60 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @glfwSetGammaRamp(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %3, label %4

3:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 492, ptr noundef nonnull @__PRETTY_FUNCTION__.glfwSetGammaRamp) #3
  unreachable

4:                                                ; preds = %2
  %.not16 = icmp eq ptr %1, null
  br i1 %.not16, label %5, label %6

5:                                                ; preds = %4
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 493, ptr noundef nonnull @__PRETTY_FUNCTION__.glfwSetGammaRamp) #3
  unreachable

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

9:                                                ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.1, i32 noundef 494, ptr noundef nonnull @__PRETTY_FUNCTION__.glfwSetGammaRamp) #3
  unreachable

10:                                               ; preds = %6
  %11 = load ptr, ptr %1, align 8, !tbaa !11
  %.not18 = icmp eq ptr %11, null
  br i1 %.not18, label %12, label %13

12:                                               ; preds = %10
  tail call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.1, i32 noundef 495, ptr noundef nonnull @__PRETTY_FUNCTION__.glfwSetGammaRamp) #3
  unreachable

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !12
  %.not19 = icmp eq ptr %15, null
  br i1 %.not19, label %16, label %17

16:                                               ; preds = %13
  tail call void @__assert_fail(ptr noundef nonnull @.str.10, ptr noundef nonnull @.str.1, i32 noundef 496, ptr noundef nonnull @__PRETTY_FUNCTION__.glfwSetGammaRamp) #3
  unreachable

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %1, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !13
  %.not20 = icmp eq ptr %19, null
  br i1 %.not20, label %20, label %21

20:                                               ; preds = %17
  tail call void @__assert_fail(ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, i32 noundef 497, ptr noundef nonnull @__PRETTY_FUNCTION__.glfwSetGammaRamp) #3
  unreachable

21:                                               ; preds = %17
  %22 = load i32, ptr @_glfw, align 8, !tbaa !14
  %.not21 = icmp eq i32 %22, 0
  br i1 %.not21, label %23, label %24

23:                                               ; preds = %21
  tail call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65537, ptr noundef null) #4
  br label %31

24:                                               ; preds = %21
  %25 = getelementptr inbounds i8, ptr %0, i64 96
  %26 = load i32, ptr %25, align 8, !tbaa !51
  %.not22 = icmp eq i32 %26, 0
  br i1 %.not22, label %27, label %30

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %0, i64 72
  %29 = tail call i32 @_glfwPlatformGetGammaRamp(ptr noundef nonnull %0, ptr noundef nonnull %28) #4
  %.not23 = icmp eq i32 %29, 0
  br i1 %.not23, label %31, label %30

30:                                               ; preds = %27, %24
  tail call void @_glfwPlatformSetGammaRamp(ptr noundef nonnull %0, ptr noundef nonnull %1) #4
  br label %31

31:                                               ; preds = %27, %30, %23
  ret void
}

declare i32 @_glfwPlatformGetGammaRamp(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_glfwPlatformSetGammaRamp(ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { 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 #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 = { 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 = { noreturn nounwind }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 24}
!6 = !{!"GLFWgammaramp", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !7, i64 0}
!12 = !{!6, !7, i64 8}
!13 = !{!6, !7, i64 16}
!14 = !{!15, !10, i64 0}
!15 = !{!"_GLFWlibrary", !10, i64 0, !16, i64 8, !7, i64 992, !7, i64 1000, !7, i64 1008, !7, i64 1016, !10, i64 1024, !8, i64 1032, !7, i64 130568, !10, i64 130576, !26, i64 130580, !26, i64 130588, !28, i64 130600, !30, i64 130648, !32, i64 130672, !33, i64 130736, !34, i64 130752, !46, i64 132960, !47, i64 133184, !49, i64 133264, !50, i64 133440}
!16 = !{!"", !17, i64 0, !19, i64 16, !21, i64 88, !24, i64 920, !10, i64 976}
!17 = !{!"_GLFWinitconfig", !10, i64 0, !18, i64 4}
!18 = !{!"", !10, i64 0, !10, i64 4}
!19 = !{!"_GLFWfbconfig", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !20, i64 64}
!20 = !{!"long", !8, i64 0}
!21 = !{!"_GLFWwndconfig", !10, i64 0, !10, i64 4, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !22, i64 56, !23, i64 316}
!22 = !{!"", !10, i64 0, !8, i64 4}
!23 = !{!"", !8, i64 0, !8, i64 256}
!24 = !{!"_GLFWctxconfig", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !25, i64 48}
!25 = !{!"", !10, i64 0}
!26 = !{!"_GLFWtls", !27, i64 0}
!27 = !{!"_GLFWtlsPOSIX", !10, i64 0, !10, i64 4}
!28 = !{!"_GLFWmutex", !29, i64 0}
!29 = !{!"_GLFWmutexPOSIX", !10, i64 0, !8, i64 8}
!30 = !{!"", !20, i64 0, !31, i64 8}
!31 = !{!"_GLFWtimerPOSIX", !10, i64 0, !20, i64 8}
!32 = !{!"", !10, i64 0, !7, i64 8, !8, i64 16, !7, i64 32, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56}
!33 = !{!"", !7, i64 0, !7, i64 8}
!34 = !{!"_GLFWlibraryX11", !7, i64 0, !10, i64 8, !20, i64 16, !35, i64 24, !35, i64 28, !20, i64 32, !20, i64 40, !10, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !7, i64 80, !8, i64 88, !8, i64 94, !8, i64 606, !36, i64 1304, !36, i64 1312, !7, 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, !37, i64 1696, !38, i64 1872, !39, i64 1900, !40, i64 1920, !41, i64 1944, !42, i64 1976, !33, i64 2024, !43, i64 2040, !44, i64 2096, !45, i64 2152}
!35 = !{!"float", !8, i64 0}
!36 = !{!"double", !8, i64 0}
!37 = !{!"", !10, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168}
!38 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!39 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!40 = !{!"", !10, i64 0, !20, i64 8, !20, i64 16}
!41 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!42 = !{!"", !10, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !7, i64 40}
!43 = !{!"", !10, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!44 = !{!"", !10, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !7, i64 40, !7, i64 48}
!45 = !{!"", !10, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !7, i64 32, !7, i64 40, !7, i64 48}
!46 = !{!"_GLFWlibraryGLX", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !10, i64 196, !10, i64 200, !10, i64 204, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220}
!47 = !{!"_GLFWlibraryLinux", !10, i64 0, !10, i64 4, !48, i64 8, !10, i64 72}
!48 = !{!"re_pattern_buffer", !7, i64 0, !20, i64 8, !20, i64 16, !20, i64 24, !7, i64 32, !7, i64 40, !20, i64 48, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56}
!49 = !{!"_GLFWlibraryEGL", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168}
!50 = !{!"_GLFWlibraryOSMesa", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!51 = !{!52, !10, i64 96}
!52 = !{!"_GLFWmonitor", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !10, i64 40, !53, i64 44, !6, i64 72, !6, i64 104, !54, i64 136}
!53 = !{!"GLFWvidmode", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!54 = !{!"_GLFWmonitorX11", !20, i64 0, !20, i64 8, !20, i64 16, !10, i64 24}


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