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

; 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._GLFWwindow = type { ptr, i32, i32, i32, i32, i32, i32, ptr, %struct.GLFWvidmode, ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [8 x i8], [349 x i8], double, double, %struct._GLFWcontext, %struct.anon.18, %struct._GLFWwindowX11 }
%struct.GLFWvidmode = type { i32, i32, i32, i32, i32, i32 }
%struct._GLFWcontext = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct._GLFWcontextGLX, %struct._GLFWcontextEGL, %struct._GLFWcontextOSMesa }
%struct._GLFWcontextGLX = type { ptr, i64 }
%struct._GLFWcontextEGL = type { ptr, ptr, ptr, ptr }
%struct._GLFWcontextOSMesa = type { ptr, i32, i32, ptr }
%struct.anon.18 = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._GLFWwindowX11 = type { i64, i64, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }

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

declare i32 @XFlush(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
define dso_local void @_glfwPlatformSetCursor(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %5 = load ptr, ptr %3, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct._GLFWwindow, ptr %5, i32 0, i32 20
  %7 = load i32, ptr %6, align 4, !tbaa !9
  %8 = icmp eq i32 %7, 212993
  br i1 %8, label %9, label %13

9:                                                ; preds = %2
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  call void @updateCursorImage(ptr noundef %10)
  %11 = load ptr, ptr getelementptr inbounds (%struct._GLFWlibrary, ptr @_glfw, i32 0, i32 16), align 8, !tbaa !21
  %12 = call i32 @XFlush(ptr noundef %11)
  br label %13

13:                                               ; preds = %9, %2
  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" }

!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 116}
!10 = !{!"_GLFWwindow", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !6, i64 32, !12, i64 40, !6, i64 64, !6, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !7, i64 120, !7, i64 128, !13, i64 480, !13, i64 488, !14, i64 496, !19, i64 688, !20, i64 824}
!11 = !{!"int", !7, i64 0}
!12 = !{!"GLFWvidmode", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!13 = !{!"double", !7, i64 0}
!14 = !{!"_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, !15, i64 120, !17, i64 136, !18, i64 168}
!15 = !{!"_GLFWcontextGLX", !6, i64 0, !16, i64 8}
!16 = !{!"long", !7, i64 0}
!17 = !{!"_GLFWcontextEGL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{!"_GLFWcontextOSMesa", !6, i64 0, !11, i64 8, !11, i64 12, !6, i64 16}
!19 = !{!"", !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}
!20 = !{!"_GLFWwindowX11", !16, i64 0, !16, i64 8, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !16, i64 72}
!21 = !{!22, !6, i64 130752}
!22 = !{!"_GLFWlibrary", !11, i64 0, !23, 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, !32, i64 130580, !32, i64 130588, !34, i64 130600, !36, i64 130648, !38, i64 130672, !39, i64 130736, !40, i64 130752, !51, i64 132960, !52, i64 133184, !54, i64 133264, !55, i64 133440}
!23 = !{!"", !24, i64 0, !26, i64 16, !27, i64 88, !30, i64 920, !11, i64 976}
!24 = !{!"_GLFWinitconfig", !11, i64 0, !25, i64 4}
!25 = !{!"", !11, i64 0, !11, i64 4}
!26 = !{!"_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, !16, i64 64}
!27 = !{!"_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, !28, i64 56, !29, i64 316}
!28 = !{!"", !11, i64 0, !7, i64 4}
!29 = !{!"", !7, i64 0, !7, i64 256}
!30 = !{!"_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, !31, i64 48}
!31 = !{!"", !11, i64 0}
!32 = !{!"_GLFWtls", !33, i64 0}
!33 = !{!"_GLFWtlsPOSIX", !11, i64 0, !11, i64 4}
!34 = !{!"_GLFWmutex", !35, i64 0}
!35 = !{!"_GLFWmutexPOSIX", !11, i64 0, !7, i64 8}
!36 = !{!"", !16, i64 0, !37, i64 8}
!37 = !{!"_GLFWtimerPOSIX", !11, i64 0, !16, i64 8}
!38 = !{!"", !11, i64 0, !6, i64 8, !7, i64 16, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 52, !11, i64 56}
!39 = !{!"", !6, i64 0, !6, i64 8}
!40 = !{!"_GLFWlibraryX11", !6, i64 0, !11, i64 8, !16, i64 16, !41, i64 24, !41, i64 28, !16, i64 32, !16, 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, !13, i64 1304, !13, i64 1312, !6, i64 1320, !16, i64 1328, !16, i64 1336, !16, i64 1344, !16, i64 1352, !16, i64 1360, !16, i64 1368, !16, i64 1376, !16, i64 1384, !16, i64 1392, !16, i64 1400, !16, i64 1408, !16, i64 1416, !16, i64 1424, !16, i64 1432, !16, i64 1440, !16, i64 1448, !16, i64 1456, !16, i64 1464, !16, i64 1472, !16, i64 1480, !16, i64 1488, !16, i64 1496, !16, i64 1504, !16, i64 1512, !16, i64 1520, !16, i64 1528, !16, i64 1536, !16, i64 1544, !16, i64 1552, !16, i64 1560, !16, i64 1568, !16, i64 1576, !16, i64 1584, !16, i64 1592, !16, i64 1600, !16, i64 1608, !16, i64 1616, !16, i64 1624, !16, i64 1632, !16, i64 1640, !16, i64 1648, !16, i64 1656, !16, i64 1664, !16, i64 1672, !16, i64 1680, !16, i64 1688, !42, i64 1696, !43, i64 1872, !44, i64 1900, !45, i64 1920, !46, i64 1944, !47, i64 1976, !39, i64 2024, !48, i64 2040, !49, i64 2096, !50, i64 2152}
!41 = !{!"float", !7, i64 0}
!42 = !{!"", !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}
!43 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24}
!44 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!45 = !{!"", !11, i64 0, !16, i64 8, !16, i64 16}
!46 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!47 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40}
!48 = !{!"", !11, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!49 = !{!"", !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}
!50 = !{!"", !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}
!51 = !{!"_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}
!52 = !{!"_GLFWlibraryLinux", !11, i64 0, !11, i64 4, !53, i64 8, !11, i64 72}
!53 = !{!"re_pattern_buffer", !6, i64 0, !16, i64 8, !16, i64 16, !16, i64 24, !6, i64 32, !6, i64 40, !16, i64 48, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56, !11, i64 56}
!54 = !{!"_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}
!55 = !{!"_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}


; 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

declare i32 @XFlush(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @_glfwPlatformSetCursor(ptr noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %0, i64 116
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = icmp eq i32 %4, 212993
  br i1 %5, label %6, label %9

6:                                                ; preds = %2
  tail call void @updateCursorImage(ptr noundef nonnull %0)
  %7 = load ptr, ptr getelementptr inbounds (i8, ptr @_glfw, i64 130752), align 8, !tbaa !20
  %8 = tail call i32 @XFlush(ptr noundef %7) #2
  br label %9

9:                                                ; preds = %6, %2
  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, !10, i64 116}
!6 = !{!"_GLFWwindow", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !7, i64 32, !11, i64 40, !7, i64 64, !7, i64 72, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !10, i64 112, !10, i64 116, !8, i64 120, !8, i64 128, !12, i64 480, !12, i64 488, !13, i64 496, !18, i64 688, !19, i64 824}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"GLFWvidmode", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!12 = !{!"double", !8, i64 0}
!13 = !{!"_GLFWcontext", !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, !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, !14, i64 120, !16, i64 136, !17, i64 168}
!14 = !{!"_GLFWcontextGLX", !7, i64 0, !15, i64 8}
!15 = !{!"long", !8, i64 0}
!16 = !{!"_GLFWcontextEGL", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!17 = !{!"_GLFWcontextOSMesa", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16}
!18 = !{!"", !7, 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}
!19 = !{!"_GLFWwindowX11", !15, i64 0, !15, i64 8, !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, !15, i64 72}
!20 = !{!21, !7, i64 130752}
!21 = !{!"_GLFWlibrary", !10, i64 0, !22, 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, !31, i64 130580, !31, i64 130588, !33, i64 130600, !35, i64 130648, !37, i64 130672, !38, i64 130736, !39, i64 130752, !50, i64 132960, !51, i64 133184, !53, i64 133264, !54, i64 133440}
!22 = !{!"", !23, i64 0, !25, i64 16, !26, i64 88, !29, i64 920, !10, i64 976}
!23 = !{!"_GLFWinitconfig", !10, i64 0, !24, i64 4}
!24 = !{!"", !10, i64 0, !10, i64 4}
!25 = !{!"_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, !15, i64 64}
!26 = !{!"_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, !27, i64 56, !28, i64 316}
!27 = !{!"", !10, i64 0, !8, i64 4}
!28 = !{!"", !8, i64 0, !8, i64 256}
!29 = !{!"_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, !30, i64 48}
!30 = !{!"", !10, i64 0}
!31 = !{!"_GLFWtls", !32, i64 0}
!32 = !{!"_GLFWtlsPOSIX", !10, i64 0, !10, i64 4}
!33 = !{!"_GLFWmutex", !34, i64 0}
!34 = !{!"_GLFWmutexPOSIX", !10, i64 0, !8, i64 8}
!35 = !{!"", !15, i64 0, !36, i64 8}
!36 = !{!"_GLFWtimerPOSIX", !10, i64 0, !15, i64 8}
!37 = !{!"", !10, i64 0, !7, i64 8, !8, i64 16, !7, i64 32, !7, i64 40, !10, i64 48, !10, i64 52, !10, i64 56}
!38 = !{!"", !7, i64 0, !7, i64 8}
!39 = !{!"_GLFWlibraryX11", !7, i64 0, !10, i64 8, !15, i64 16, !40, i64 24, !40, i64 28, !15, i64 32, !15, 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, !12, i64 1304, !12, i64 1312, !7, i64 1320, !15, i64 1328, !15, i64 1336, !15, i64 1344, !15, i64 1352, !15, i64 1360, !15, i64 1368, !15, i64 1376, !15, i64 1384, !15, i64 1392, !15, i64 1400, !15, i64 1408, !15, i64 1416, !15, i64 1424, !15, i64 1432, !15, i64 1440, !15, i64 1448, !15, i64 1456, !15, i64 1464, !15, i64 1472, !15, i64 1480, !15, i64 1488, !15, i64 1496, !15, i64 1504, !15, i64 1512, !15, i64 1520, !15, i64 1528, !15, i64 1536, !15, i64 1544, !15, i64 1552, !15, i64 1560, !15, i64 1568, !15, i64 1576, !15, i64 1584, !15, i64 1592, !15, i64 1600, !15, i64 1608, !15, i64 1616, !15, i64 1624, !15, i64 1632, !15, i64 1640, !15, i64 1648, !15, i64 1656, !15, i64 1664, !15, i64 1672, !15, i64 1680, !15, i64 1688, !41, i64 1696, !42, i64 1872, !43, i64 1900, !44, i64 1920, !45, i64 1944, !46, i64 1976, !38, i64 2024, !47, i64 2040, !48, i64 2096, !49, i64 2152}
!40 = !{!"float", !8, i64 0}
!41 = !{!"", !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}
!42 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24}
!43 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16}
!44 = !{!"", !10, i64 0, !15, i64 8, !15, i64 16}
!45 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!46 = !{!"", !10, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !7, i64 40}
!47 = !{!"", !10, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!48 = !{!"", !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}
!49 = !{!"", !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}
!50 = !{!"_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}
!51 = !{!"_GLFWlibraryLinux", !10, i64 0, !10, i64 4, !52, i64 8, !10, i64 72}
!52 = !{!"re_pattern_buffer", !7, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !7, i64 32, !7, i64 40, !15, i64 48, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56, !10, i64 56}
!53 = !{!"_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}
!54 = !{!"_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}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,TailCallElimPass