; LLVM IR from unitreerobotics/kinect_teleoperate :: src/extern/glfw/src/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.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.GLFWgammaramp = type { ptr, ptr, ptr, i32 }
%struct._GLFWmonitor = type { [128 x i8], ptr, i32, i32, ptr, ptr, i32, %struct.GLFWvidmode, %struct.GLFWgammaramp, %struct.GLFWgammaramp, %struct._GLFWmonitorNull }
%struct.GLFWvidmode = type { i32, i32, i32, i32, i32, i32 }
%struct._GLFWmonitorNull = type { %struct.GLFWgammaramp }

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, 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 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
  %7 = load ptr, ptr %4, align 8, !tbaa !5
  %8 = icmp ne ptr %7, null
  br i1 %8, label %9, label %10

9:                                                ; preds = %2
  br label %11

10:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.1, i32 noundef 528, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #4
  unreachable

11:                                               ; preds = %9
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.GLFWgammaramp, ptr %12, i32 0, i32 3
  %14 = load i32, ptr %13, align 8, !tbaa !9
  %15 = icmp ugt i32 %14, 0
  br i1 %15, label %16, label %17

16:                                               ; preds = %11
  br label %18

17:                                               ; preds = %11
  call void @__assert_fail(ptr noundef @.str.10, ptr noundef @.str.1, i32 noundef 529, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #4
  unreachable

18:                                               ; preds = %16
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.GLFWgammaramp, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !12
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %18
  br label %25

24:                                               ; preds = %18
  call void @__assert_fail(ptr noundef @.str.11, ptr noundef @.str.1, i32 noundef 530, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #4
  unreachable

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

30:                                               ; preds = %25
  br label %32

31:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.1, i32 noundef 531, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #4
  unreachable

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

37:                                               ; preds = %32
  br label %39

38:                                               ; preds = %32
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.1, i32 noundef 532, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #4
  unreachable

39:                                               ; preds = %37
  %40 = load i32, ptr @_glfw, align 8, !tbaa !15
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %43, label %42

42:                                               ; preds = %39
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65537, ptr noundef null)
  br label %79

43:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %44, ptr %5, align 8, !tbaa !5
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %48

47:                                               ; preds = %43
  br label %49

48:                                               ; preds = %43
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 537, ptr noundef @__PRETTY_FUNCTION__.glfwSetGammaRamp) #4
  unreachable

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

54:                                               ; preds = %49
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.GLFWgammaramp, ptr %55, i32 0, i32 3
  %57 = load i32, ptr %56, align 8, !tbaa !9
  call void (i32, ptr, ...) @_glfwInputError(i32 noundef 65540, ptr noundef @.str.14, i32 noundef %57)
  store i32 1, ptr %6, align 4
  br label %77

58:                                               ; preds = %49
  %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 !40
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %73, label %64

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

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

72:                                               ; preds = %64
  br label %73

73:                                               ; preds = %72, %58
  %74 = load ptr, ptr getelementptr inbounds (%struct._GLFWplatform, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 2), i32 0, i32 28), align 8, !tbaa !45
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  call void %74(ptr noundef %75, ptr noundef %76)
  store i32 0, ptr %6, align 4
  br label %77

77:                                               ; preds = %73, %71, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %78 = load i32, ptr %6, align 4
  switch i32 %78, label %80 [
    i32 0, label %79
    i32 1, label %79
  ]

79:                                               ; preds = %77, %77, %42
  ret void

80:                                               ; preds = %77
  unreachable
}

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { noreturn nounwind }
attributes #5 = { 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, !18, i64 40, !19, 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, !29, i64 5788, !29, i64 5796, !31, i64 5808, !33, i64 5856, !35, i64 5880, !36, i64 6136, !37, i64 6200, !38, i64 6272, !39, i64 6288}
!17 = !{!"GLFWallocator", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!"_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}
!19 = !{!"", !20, i64 0, !23, i64 40, !25, i64 112, !28, i64 1216, !11, i64 1272}
!20 = !{!"_GLFWinitconfig", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !21, i64 24, !22, i64 32, !22, i64 36}
!21 = !{!"", !11, i64 0, !11, i64 4}
!22 = !{!"", !11, i64 0}
!23 = !{!"_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, !24, i64 64}
!24 = !{!"long", !7, i64 0}
!25 = !{!"_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, !26, i64 72, !27, i64 328, !21, i64 840, !26, i64 848}
!26 = !{!"", !7, i64 0}
!27 = !{!"", !7, i64 0, !7, i64 256}
!28 = !{!"_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, !22, i64 48}
!29 = !{!"_GLFWtls", !30, i64 0}
!30 = !{!"_GLFWtlsPOSIX", !11, i64 0, !11, i64 4}
!31 = !{!"_GLFWmutex", !32, i64 0}
!32 = !{!"_GLFWmutexPOSIX", !11, i64 0, !7, i64 8}
!33 = !{!"", !24, i64 0, !34, i64 8}
!34 = !{!"_GLFWtimerPOSIX", !11, i64 0, !24, i64 8}
!35 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !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}
!36 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!37 = !{!"", !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}
!38 = !{!"", !6, i64 0, !6, i64 8}
!39 = !{!"_GLFWlibraryNull", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !7, i64 24, !7, i64 266}
!40 = !{!41, !11, i64 216}
!41 = !{!"_GLFWmonitor", !7, i64 0, !6, i64 128, !11, i64 136, !11, i64 140, !6, i64 144, !6, i64 152, !11, i64 160, !42, i64 164, !10, i64 192, !10, i64 224, !43, i64 256}
!42 = !{!"GLFWvidmode", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!43 = !{!"_GLFWmonitorNull", !10, i64 0}
!44 = !{!16, !6, i64 256}
!45 = !{!16, !6, i64 264}


; 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] }

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [102 x i8], align 1
@_glfw = external local_unnamed_addr global %struct._GLFWlibrary, align 8
@.str.9 = external hidden unnamed_addr constant [13 x i8], align 1
@__PRETTY_FUNCTION__.glfwSetGammaRamp = external hidden unnamed_addr constant [60 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.13 = 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 %1, null
  br i1 %.not, label %3, label %4

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

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

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

8:                                                ; preds = %4
  %9 = load ptr, ptr %1, align 8, !tbaa !11
  %.not17 = icmp eq ptr %9, null
  br i1 %.not17, label %10, label %11

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

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

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

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

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

19:                                               ; preds = %15
  %20 = load i32, ptr @_glfw, align 8, !tbaa !14
  %.not20 = icmp eq i32 %20, 0
  br i1 %.not20, label %21, label %22

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

22:                                               ; preds = %19
  %.not21 = icmp eq ptr %0, null
  br i1 %.not21, label %23, label %24

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

24:                                               ; preds = %22
  %25 = getelementptr inbounds i8, ptr %0, i64 216
  %26 = load i32, ptr %25, align 8, !tbaa !39
  %.not22 = icmp eq i32 %26, 0
  br i1 %.not22, label %27, label %31

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %0, i64 192
  %29 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 256), align 8, !tbaa !43
  %30 = tail call i32 %29(ptr noundef nonnull %0, ptr noundef nonnull %28) #4
  %.not23 = icmp eq i32 %30, 0
  br i1 %.not23, label %33, label %31

31:                                               ; preds = %27, %24
  %32 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 264), align 8, !tbaa !44
  tail call void %32(ptr noundef nonnull %0, ptr noundef nonnull %1) #4
  br label %33

33:                                               ; preds = %31, %27, %21
  ret void
}

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, !17, i64 40, !18, i64 616, !7, i64 1896, !7, i64 1904, !7, i64 1912, !7, i64 1920, !10, i64 1928, !10, i64 1932, !8, i64 1936, !7, i64 5776, !10, i64 5784, !28, i64 5788, !28, i64 5796, !30, i64 5808, !32, i64 5856, !34, i64 5880, !35, i64 6136, !36, i64 6200, !37, i64 6272, !38, i64 6288}
!16 = !{!"GLFWallocator", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!17 = !{!"_GLFWplatform", !10, i64 0, !7, i64 8, !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, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !7, i64 432, !7, i64 440, !7, i64 448, !7, i64 456, !7, i64 464, !7, i64 472, !7, i64 480, !7, i64 488, !7, i64 496, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !7, i64 536, !7, i64 544, !7, i64 552, !7, i64 560, !7, i64 568}
!18 = !{!"", !19, i64 0, !22, i64 40, !24, i64 112, !27, i64 1216, !10, i64 1272}
!19 = !{!"_GLFWinitconfig", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 16, !20, i64 24, !21, i64 32, !21, i64 36}
!20 = !{!"", !10, i64 0, !10, i64 4}
!21 = !{!"", !10, i64 0}
!22 = !{!"_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, !23, i64 64}
!23 = !{!"long", !8, i64 0}
!24 = !{!"_GLFWwndconfig", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !25, i64 72, !26, i64 328, !20, i64 840, !25, i64 848}
!25 = !{!"", !8, i64 0}
!26 = !{!"", !8, i64 0, !8, i64 256}
!27 = !{!"_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, !21, i64 48}
!28 = !{!"_GLFWtls", !29, i64 0}
!29 = !{!"_GLFWtlsPOSIX", !10, i64 0, !10, i64 4}
!30 = !{!"_GLFWmutex", !31, i64 0}
!31 = !{!"_GLFWmutexPOSIX", !10, i64 0, !8, i64 8}
!32 = !{!"", !23, i64 0, !33, i64 8}
!33 = !{!"_GLFWtimerPOSIX", !10, i64 0, !23, i64 8}
!34 = !{!"", !10, i64 0, !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, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, 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, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, i64 240, !7, i64 248}
!35 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!36 = !{!"", !10, i64 0, !7, i64 8, !8, i64 16, !7, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68}
!37 = !{!"", !7, i64 0, !7, i64 8}
!38 = !{!"_GLFWlibraryNull", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 16, !8, i64 24, !8, i64 266}
!39 = !{!40, !10, i64 216}
!40 = !{!"_GLFWmonitor", !8, i64 0, !7, i64 128, !10, i64 136, !10, i64 140, !7, i64 144, !7, i64 152, !10, i64 160, !41, i64 164, !6, i64 192, !6, i64 224, !42, i64 256}
!41 = !{!"GLFWvidmode", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!42 = !{!"_GLFWmonitorNull", !6, i64 0}
!43 = !{!15, !7, i64 256}
!44 = !{!15, !7, i64 264}


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