; LLVM IR from danginsburg/opengles3-book :: Common/Source/LinuxX11 (esUtil_X11)

; 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.XSetWindowAttributes = type { i64, i64, i64, i64, i32, i32, i32, i64, i64, i32, i64, i64, i32, i64, i64 }
%struct.XWMHints = type { i64, i32, i32, i64, i64, i32, i32, i64, i64 }
%union._XEvent = type { [24 x i64] }
%struct.anon = type { ptr, ptr, i32, i32, i32, i32, ptr, i64, i64, i64, i32, ptr, i32, i32, i32, i32, i32, ptr, i32, i32, ptr, ptr, i32, i64, i64, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, i32, i32, ptr, i64, i64, i32, i32, ptr, ptr, i32, ptr }
%struct.Screen = type { ptr, ptr, i64, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, i64, i64, i64, i32, i32, i32, i32, i64 }
%struct.ESContext = type { ptr, ptr, i32, i32, ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.XClientMessageEvent = type { i32, i64, i32, ptr, i64, i64, i32, %union.anon }
%union.anon = type { [5 x i64] }

@x_display = external hidden global ptr, align 8
@.str = external hidden unnamed_addr constant [17 x i8], align 1
@s_wmDeleteMessage = external hidden global i64, align 8
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @WinCreate(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca %struct.XSetWindowAttributes, align 8
  %8 = alloca %struct.XSetWindowAttributes, align 8
  %9 = alloca i64, align 8
  %10 = alloca %struct.XWMHints, align 8
  %11 = alloca %union._XEvent, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 112, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 112, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 56, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 192, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %16 = call ptr @XOpenDisplay(ptr noundef null)
  store ptr %16, ptr @x_display, align 8, !tbaa !5
  %17 = load ptr, ptr @x_display, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %2
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %91

20:                                               ; preds = %2
  %21 = load ptr, ptr @x_display, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.anon, ptr %21, i32 0, i32 35
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = load ptr, ptr @x_display, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.anon, ptr %24, i32 0, i32 33
  %26 = load i32, ptr %25, align 8, !tbaa !13
  %27 = sext i32 %26 to i64
  %28 = getelementptr inbounds %struct.Screen, ptr %23, i64 %27
  %29 = getelementptr inbounds %struct.Screen, ptr %28, i32 0, i32 2
  %30 = load i64, ptr %29, align 8, !tbaa !14
  store i64 %30, ptr %6, align 8, !tbaa !16
  %31 = getelementptr inbounds %struct.XSetWindowAttributes, ptr %7, i32 0, i32 10
  store i64 32833, ptr %31, align 8, !tbaa !17
  %32 = load ptr, ptr @x_display, align 8, !tbaa !5
  %33 = load i64, ptr %6, align 8, !tbaa !16
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ESContext, ptr %34, i32 0, i32 2
  %36 = load i32, ptr %35, align 8, !tbaa !19
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ESContext, ptr %37, i32 0, i32 3
  %39 = load i32, ptr %38, align 4, !tbaa !21
  %40 = call i64 @XCreateWindow(ptr noundef %32, i64 noundef %33, i32 noundef 0, i32 noundef 0, i32 noundef %36, i32 noundef %39, i32 noundef 0, i32 noundef 0, i32 noundef 1, ptr noundef null, i64 noundef 2048, ptr noundef %7)
  store i64 %40, ptr %14, align 8, !tbaa !16
  %41 = load ptr, ptr @x_display, align 8, !tbaa !5
  %42 = call i64 @XInternAtom(ptr noundef %41, ptr noundef @.str, i32 noundef 0)
  store i64 %42, ptr @s_wmDeleteMessage, align 8, !tbaa !16
  %43 = load ptr, ptr @x_display, align 8, !tbaa !5
  %44 = load i64, ptr %14, align 8, !tbaa !16
  %45 = call i32 @XSetWMProtocols(ptr noundef %43, i64 noundef %44, ptr noundef @s_wmDeleteMessage, i32 noundef 1)
  %46 = getelementptr inbounds %struct.XSetWindowAttributes, ptr %8, i32 0, i32 12
  store i32 0, ptr %46, align 8, !tbaa !22
  %47 = load ptr, ptr @x_display, align 8, !tbaa !5
  %48 = load i64, ptr %14, align 8, !tbaa !16
  %49 = call i32 @XChangeWindowAttributes(ptr noundef %47, i64 noundef %48, i64 noundef 512, ptr noundef %8)
  %50 = getelementptr inbounds %struct.XWMHints, ptr %10, i32 0, i32 1
  store i32 1, ptr %50, align 8, !tbaa !23
  %51 = getelementptr inbounds %struct.XWMHints, ptr %10, i32 0, i32 0
  store i64 1, ptr %51, align 8, !tbaa !25
  %52 = load ptr, ptr @x_display, align 8, !tbaa !5
  %53 = load i64, ptr %14, align 8, !tbaa !16
  %54 = call i32 @XSetWMHints(ptr noundef %52, i64 noundef %53, ptr noundef %10)
  %55 = load ptr, ptr @x_display, align 8, !tbaa !5
  %56 = load i64, ptr %14, align 8, !tbaa !16
  %57 = call i32 @XMapWindow(ptr noundef %55, i64 noundef %56)
  %58 = load ptr, ptr @x_display, align 8, !tbaa !5
  %59 = load i64, ptr %14, align 8, !tbaa !16
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = call i32 @XStoreName(ptr noundef %58, i64 noundef %59, ptr noundef %60)
  %62 = load ptr, ptr @x_display, align 8, !tbaa !5
  %63 = call i64 @XInternAtom(ptr noundef %62, ptr noundef @.str.1, i32 noundef 0)
  store i64 %63, ptr %9, align 8, !tbaa !16
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 192, i1 false)
  store i32 33, ptr %11, align 8, !tbaa !26
  %64 = load i64, ptr %14, align 8, !tbaa !16
  %65 = getelementptr inbounds %struct.XClientMessageEvent, ptr %11, i32 0, i32 4
  store i64 %64, ptr %65, align 8, !tbaa !26
  %66 = load i64, ptr %9, align 8, !tbaa !16
  %67 = getelementptr inbounds %struct.XClientMessageEvent, ptr %11, i32 0, i32 5
  store i64 %66, ptr %67, align 8, !tbaa !26
  %68 = getelementptr inbounds %struct.XClientMessageEvent, ptr %11, i32 0, i32 6
  store i32 32, ptr %68, align 8, !tbaa !26
  %69 = getelementptr inbounds %struct.XClientMessageEvent, ptr %11, i32 0, i32 7
  %70 = getelementptr inbounds [5 x i64], ptr %69, i64 0, i64 0
  store i64 1, ptr %70, align 8, !tbaa !26
  %71 = getelementptr inbounds %struct.XClientMessageEvent, ptr %11, i32 0, i32 7
  %72 = getelementptr inbounds [5 x i64], ptr %71, i64 0, i64 1
  store i64 0, ptr %72, align 8, !tbaa !26
  %73 = load ptr, ptr @x_display, align 8, !tbaa !5
  %74 = load ptr, ptr @x_display, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.anon, ptr %74, i32 0, i32 35
  %76 = load ptr, ptr %75, align 8, !tbaa !9
  %77 = load ptr, ptr @x_display, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.anon, ptr %77, i32 0, i32 33
  %79 = load i32, ptr %78, align 8, !tbaa !13
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds %struct.Screen, ptr %76, i64 %80
  %82 = getelementptr inbounds %struct.Screen, ptr %81, i32 0, i32 2
  %83 = load i64, ptr %82, align 8, !tbaa !14
  %84 = call i32 @XSendEvent(ptr noundef %73, i64 noundef %83, i32 noundef 0, i64 noundef 524288, ptr noundef %11)
  %85 = load i64, ptr %14, align 8, !tbaa !16
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.ESContext, ptr %86, i32 0, i32 5
  store i64 %85, ptr %87, align 8, !tbaa !27
  %88 = load ptr, ptr @x_display, align 8, !tbaa !5
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ESContext, ptr %89, i32 0, i32 4
  store ptr %88, ptr %90, align 8, !tbaa !28
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %91

91:                                               ; preds = %20, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 192, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 112, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 112, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %92 = load i32, ptr %3, align 4
  ret i32 %92
}

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

declare ptr @XOpenDisplay(ptr noundef) #2

declare i64 @XCreateWindow(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i64 noundef, ptr noundef) #2

declare i64 @XInternAtom(ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @XSetWMProtocols(ptr noundef, i64 noundef, ptr noundef, i32 noundef) #2

declare i32 @XChangeWindowAttributes(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #2

declare i32 @XSetWMHints(ptr noundef, i64 noundef, ptr noundef) #2

declare i32 @XMapWindow(ptr noundef, i64 noundef) #2

declare i32 @XStoreName(ptr noundef, i64 noundef, ptr noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare i32 @XSendEvent(ptr noundef, i64 noundef, i32 noundef, i64 noundef, ptr noundef) #2

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

attributes #0 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 232}
!10 = !{!"", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !6, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !11, i64 64, !6, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !6, i64 120, !6, i64 128, !11, i64 136, !12, i64 144, !12, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !11, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !11, i64 228, !6, i64 232, !12, i64 240, !12, i64 248, !11, i64 256, !11, i64 260, !6, i64 264, !6, i64 272, !11, i64 280, !6, i64 288}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !11, i64 224}
!14 = !{!15, !12, i64 16}
!15 = !{!"", !6, i64 0, !6, i64 8, !12, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !6, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !12, i64 120}
!16 = !{!12, !12, i64 0}
!17 = !{!18, !12, i64 72}
!18 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !12, i64 48, !12, i64 56, !11, i64 64, !12, i64 72, !12, i64 80, !11, i64 88, !12, i64 96, !12, i64 104}
!19 = !{!20, !11, i64 16}
!20 = !{!"ESContext", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !12, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!21 = !{!20, !11, i64 20}
!22 = !{!18, !11, i64 88}
!23 = !{!24, !11, i64 8}
!24 = !{!"", !12, i64 0, !11, i64 8, !11, i64 12, !12, i64 16, !12, i64 24, !11, i64 32, !11, i64 36, !12, i64 40, !12, i64 48}
!25 = !{!24, !12, i64 0}
!26 = !{!7, !7, i64 0}
!27 = !{!20, !12, i64 32}
!28 = !{!20, !6, 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.XSetWindowAttributes = type { i64, i64, i64, i64, i32, i32, i32, i64, i64, i32, i64, i64, i32, i64, i64 }
%struct.XWMHints = type { i64, i32, i32, i64, i64, i32, i32, i64, i64 }
%union._XEvent = type { [24 x i64] }
%struct.Screen = type { ptr, ptr, i64, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, i64, i64, i64, i32, i32, i32, i32, i64 }

@x_display = external hidden local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [17 x i8], align 1
@s_wmDeleteMessage = external hidden global i64, align 8
@.str.1 = external hidden unnamed_addr constant [14 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @WinCreate(ptr nocapture noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.XSetWindowAttributes, align 8
  %4 = alloca %struct.XSetWindowAttributes, align 8
  %5 = alloca %struct.XWMHints, align 8
  %6 = alloca %union._XEvent, align 8
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %6) #4
  %7 = tail call ptr @XOpenDisplay(ptr noundef null) #4
  store ptr %7, ptr @x_display, align 8, !tbaa !5
  %8 = icmp eq ptr %7, null
  br i1 %8, label %55, label %9

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %7, i64 232
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %7, i64 224
  %13 = load i32, ptr %12, align 8, !tbaa !13
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds %struct.Screen, ptr %11, i64 %14, i32 2
  %16 = load i64, ptr %15, align 8, !tbaa !14
  %17 = getelementptr inbounds i8, ptr %3, i64 72
  store i64 32833, ptr %17, align 8, !tbaa !16
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = load i32, ptr %18, align 8, !tbaa !18
  %20 = getelementptr inbounds i8, ptr %0, i64 20
  %21 = load i32, ptr %20, align 4, !tbaa !20
  %22 = call i64 @XCreateWindow(ptr noundef nonnull %7, i64 noundef %16, i32 noundef 0, i32 noundef 0, i32 noundef %19, i32 noundef %21, i32 noundef 0, i32 noundef 0, i32 noundef 1, ptr noundef null, i64 noundef 2048, ptr noundef nonnull %3) #4
  %23 = load ptr, ptr @x_display, align 8, !tbaa !5
  %24 = call i64 @XInternAtom(ptr noundef %23, ptr noundef nonnull @.str, i32 noundef 0) #4
  store i64 %24, ptr @s_wmDeleteMessage, align 8, !tbaa !21
  %25 = load ptr, ptr @x_display, align 8, !tbaa !5
  %26 = call i32 @XSetWMProtocols(ptr noundef %25, i64 noundef %22, ptr noundef nonnull @s_wmDeleteMessage, i32 noundef 1) #4
  %27 = getelementptr inbounds i8, ptr %4, i64 88
  store i32 0, ptr %27, align 8, !tbaa !22
  %28 = load ptr, ptr @x_display, align 8, !tbaa !5
  %29 = call i32 @XChangeWindowAttributes(ptr noundef %28, i64 noundef %22, i64 noundef 512, ptr noundef nonnull %4) #4
  %30 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 1, ptr %30, align 8, !tbaa !23
  store i64 1, ptr %5, align 8, !tbaa !25
  %31 = load ptr, ptr @x_display, align 8, !tbaa !5
  %32 = call i32 @XSetWMHints(ptr noundef %31, i64 noundef %22, ptr noundef nonnull %5) #4
  %33 = load ptr, ptr @x_display, align 8, !tbaa !5
  %34 = call i32 @XMapWindow(ptr noundef %33, i64 noundef %22) #4
  %35 = load ptr, ptr @x_display, align 8, !tbaa !5
  %36 = call i32 @XStoreName(ptr noundef %35, i64 noundef %22, ptr noundef %1) #4
  %37 = load ptr, ptr @x_display, align 8, !tbaa !5
  %38 = call i64 @XInternAtom(ptr noundef %37, ptr noundef nonnull @.str.1, i32 noundef 0) #4
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(192) %6, i8 0, i64 192, i1 false)
  store i32 33, ptr %6, align 8, !tbaa !26
  %39 = getelementptr inbounds i8, ptr %6, i64 32
  store i64 %22, ptr %39, align 8, !tbaa !26
  %40 = getelementptr inbounds i8, ptr %6, i64 40
  store i64 %38, ptr %40, align 8, !tbaa !26
  %41 = getelementptr inbounds i8, ptr %6, i64 48
  store i32 32, ptr %41, align 8, !tbaa !26
  %42 = getelementptr inbounds i8, ptr %6, i64 56
  store i64 1, ptr %42, align 8, !tbaa !26
  %43 = load ptr, ptr @x_display, align 8, !tbaa !5
  %44 = getelementptr inbounds i8, ptr %43, i64 232
  %45 = load ptr, ptr %44, align 8, !tbaa !9
  %46 = getelementptr inbounds i8, ptr %43, i64 224
  %47 = load i32, ptr %46, align 8, !tbaa !13
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds %struct.Screen, ptr %45, i64 %48, i32 2
  %50 = load i64, ptr %49, align 8, !tbaa !14
  %51 = call i32 @XSendEvent(ptr noundef %43, i64 noundef %50, i32 noundef 0, i64 noundef 524288, ptr noundef nonnull %6) #4
  %52 = getelementptr inbounds i8, ptr %0, i64 32
  store i64 %22, ptr %52, align 8, !tbaa !27
  %53 = load ptr, ptr @x_display, align 8, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %53, ptr %54, align 8, !tbaa !28
  br label %55

55:                                               ; preds = %2, %9
  %.0 = phi i32 [ 1, %9 ], [ 0, %2 ]
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %3) #4
  ret i32 %.0
}

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

declare ptr @XOpenDisplay(ptr noundef) local_unnamed_addr #2

declare i64 @XCreateWindow(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare i64 @XInternAtom(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @XSetWMProtocols(ptr noundef, i64 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @XChangeWindowAttributes(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @XSetWMHints(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare i32 @XMapWindow(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @XStoreName(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

declare i32 @XSendEvent(ptr noundef, i64 noundef, i32 noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

attributes #0 = { 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 #1 = { mustprogress 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 232}
!10 = !{!"", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !6, i64 32, !12, i64 40, !12, i64 48, !12, i64 56, !11, i64 64, !6, i64 72, !11, i64 80, !11, i64 84, !11, i64 88, !11, i64 92, !11, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !6, i64 120, !6, i64 128, !11, i64 136, !12, i64 144, !12, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !11, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !11, i64 228, !6, i64 232, !12, i64 240, !12, i64 248, !11, i64 256, !11, i64 260, !6, i64 264, !6, i64 272, !11, i64 280, !6, i64 288}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !11, i64 224}
!14 = !{!15, !12, i64 16}
!15 = !{!"", !6, i64 0, !6, i64 8, !12, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !6, i64 48, !11, i64 56, !6, i64 64, !6, i64 72, !12, i64 80, !12, i64 88, !12, i64 96, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !12, i64 120}
!16 = !{!17, !12, i64 72}
!17 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !12, i64 48, !12, i64 56, !11, i64 64, !12, i64 72, !12, i64 80, !11, i64 88, !12, i64 96, !12, i64 104}
!18 = !{!19, !11, i64 16}
!19 = !{!"ESContext", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !6, i64 24, !12, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!20 = !{!19, !11, i64 20}
!21 = !{!12, !12, i64 0}
!22 = !{!17, !11, i64 88}
!23 = !{!24, !11, i64 8}
!24 = !{!"", !12, i64 0, !11, i64 8, !11, i64 12, !12, i64 16, !12, i64 24, !11, i64 32, !11, i64 36, !12, i64 40, !12, i64 48}
!25 = !{!24, !12, i64 0}
!26 = !{!7, !7, i64 0}
!27 = !{!19, !12, i64 32}
!28 = !{!19, !6, i64 24}


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