; LLVM IR from 0intro/wmii :: lib/libstuff/x11 (initdisplay)

; 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.Screen = type { i32, %struct.Window, ptr, i64, i64, ptr, ptr, %struct.Rectangle, i32, i32, ptr }
%struct.Window = type { i32, i64, ptr, ptr, ptr, i64, ptr, %struct.Rectangle, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.Ewmh, i64, ptr, ptr, i8, i32, i32 }
%struct.Ewmh = type { i64, i64, i64 }
%struct.Rectangle = type { %struct.Point, %struct.Point }
%struct.Point = type { i32, i32 }
%struct.Map = type { ptr, i32, i32 }
%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.XScreen = type { ptr, ptr, i64, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, i64, i64, i64, i32, i32, i32, i32, i64 }

@display = external global ptr, align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@scr = external global %struct.Screen, align 8
@wbucket = external hidden global [137 x ptr], align 16
@windowmap = external dso_local global %struct.Map, align 8
@abucket = external hidden global [137 x ptr], align 16
@atommap = external dso_local global %struct.Map, align 8
@anamebucket = external hidden global [137 x ptr], align 16
@atomnamemap = external dso_local global %struct.Map, align 8
@xlib_errorhandler = external dso_local global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local void @initdisplay() #0 {
  %1 = alloca %struct.Rectangle, align 4
  %2 = call ptr @XOpenDisplay(ptr noundef null)
  store ptr %2, ptr @display, align 8, !tbaa !5
  %3 = load ptr, ptr @display, align 8, !tbaa !5
  %4 = icmp eq ptr %3, null
  br i1 %4, label %5, label %6

5:                                                ; preds = %0
  call void (ptr, ...) @fatal(ptr noundef @.str)
  br label %6

6:                                                ; preds = %5, %0
  %7 = load ptr, ptr @display, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.anon, ptr %7, i32 0, i32 33
  %9 = load i32, ptr %8, align 8, !tbaa !9
  store i32 %9, ptr @scr, align 8, !tbaa !13
  %10 = load ptr, ptr @display, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.anon, ptr %10, i32 0, i32 35
  %12 = load ptr, ptr %11, align 8, !tbaa !20
  %13 = load i32, ptr @scr, align 8, !tbaa !13
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds %struct.XScreen, ptr %12, i64 %14
  %16 = getelementptr inbounds %struct.XScreen, ptr %15, i32 0, i32 12
  %17 = load i64, ptr %16, align 8, !tbaa !21
  store i64 %17, ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 3), align 8, !tbaa !23
  %18 = load ptr, ptr @display, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.anon, ptr %18, i32 0, i32 35
  %20 = load ptr, ptr %19, align 8, !tbaa !20
  %21 = load i32, ptr @scr, align 8, !tbaa !13
  %22 = sext i32 %21 to i64
  %23 = getelementptr inbounds %struct.XScreen, ptr %20, i64 %22
  %24 = getelementptr inbounds %struct.XScreen, ptr %23, i32 0, i32 10
  %25 = load ptr, ptr %24, align 8, !tbaa !24
  store ptr %25, ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 5), align 8, !tbaa !25
  %26 = load ptr, ptr @display, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.anon, ptr %26, i32 0, i32 35
  %28 = load ptr, ptr %27, align 8, !tbaa !20
  %29 = load i32, ptr @scr, align 8, !tbaa !13
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds %struct.XScreen, ptr %28, i64 %30
  %32 = getelementptr inbounds %struct.XScreen, ptr %31, i32 0, i32 11
  %33 = load ptr, ptr %32, align 8, !tbaa !26
  store ptr %33, ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 2), align 8, !tbaa !27
  %34 = load ptr, ptr @display, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.anon, ptr %34, i32 0, i32 35
  %36 = load ptr, ptr %35, align 8, !tbaa !20
  %37 = load i32, ptr @scr, align 8, !tbaa !13
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds %struct.XScreen, ptr %36, i64 %38
  %40 = getelementptr inbounds %struct.XScreen, ptr %39, i32 0, i32 9
  %41 = load i32, ptr %40, align 8, !tbaa !28
  store i32 %41, ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 8), align 8, !tbaa !29
  %42 = load ptr, ptr @display, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.anon, ptr %42, i32 0, i32 35
  %44 = load ptr, ptr %43, align 8, !tbaa !20
  %45 = load i32, ptr @scr, align 8, !tbaa !13
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds %struct.XScreen, ptr %44, i64 %46
  %48 = getelementptr inbounds %struct.XScreen, ptr %47, i32 0, i32 2
  %49 = load i64, ptr %48, align 8, !tbaa !30
  store i64 %49, ptr getelementptr inbounds (%struct.Window, ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 1), i32 0, i32 1), align 8, !tbaa !31
  %50 = load ptr, ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 5), align 8, !tbaa !25
  store ptr %50, ptr getelementptr inbounds (%struct.Window, ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 1), i32 0, i32 4), align 8, !tbaa !32
  %51 = getelementptr inbounds %struct.Rectangle, ptr %1, i32 0, i32 0
  %52 = getelementptr inbounds %struct.Point, ptr %51, i32 0, i32 0
  store i32 0, ptr %52, align 4, !tbaa !33
  %53 = getelementptr inbounds %struct.Point, ptr %51, i32 0, i32 1
  store i32 0, ptr %53, align 4, !tbaa !34
  %54 = getelementptr inbounds %struct.Rectangle, ptr %1, i32 0, i32 1
  %55 = getelementptr inbounds %struct.Point, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr @display, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.anon, ptr %56, i32 0, i32 35
  %58 = load ptr, ptr %57, align 8, !tbaa !20
  %59 = load i32, ptr @scr, align 8, !tbaa !13
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds %struct.XScreen, ptr %58, i64 %60
  %62 = getelementptr inbounds %struct.XScreen, ptr %61, i32 0, i32 3
  %63 = load i32, ptr %62, align 8, !tbaa !35
  store i32 %63, ptr %55, align 4, !tbaa !33
  %64 = getelementptr inbounds %struct.Point, ptr %54, i32 0, i32 1
  %65 = load ptr, ptr @display, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.anon, ptr %65, i32 0, i32 35
  %67 = load ptr, ptr %66, align 8, !tbaa !20
  %68 = load i32, ptr @scr, align 8, !tbaa !13
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds %struct.XScreen, ptr %67, i64 %69
  %71 = getelementptr inbounds %struct.XScreen, ptr %70, i32 0, i32 4
  %72 = load i32, ptr %71, align 4, !tbaa !36
  store i32 %72, ptr %64, align 4, !tbaa !34
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds (%struct.Window, ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 1), i32 0, i32 7), ptr align 4 %1, i64 16, i1 false), !tbaa.struct !37
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 7), ptr align 8 getelementptr inbounds (%struct.Window, ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 1), i32 0, i32 7), i64 16, i1 false), !tbaa.struct !37
  store ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 1), ptr getelementptr inbounds (%struct.Window, ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 1), i32 0, i32 9), align 8, !tbaa !39
  %73 = load ptr, ptr @display, align 8, !tbaa !5
  %74 = call ptr @XOpenIM(ptr noundef %73, ptr noundef null, ptr noundef null, ptr noundef null)
  store ptr %74, ptr getelementptr inbounds (%struct.Screen, ptr @scr, i32 0, i32 10), align 8, !tbaa !40
  store ptr @wbucket, ptr @windowmap, align 8, !tbaa !41
  store i32 137, ptr getelementptr inbounds (%struct.Map, ptr @windowmap, i32 0, i32 1), align 8, !tbaa !43
  store ptr @abucket, ptr @atommap, align 8, !tbaa !41
  store i32 137, ptr getelementptr inbounds (%struct.Map, ptr @atommap, i32 0, i32 1), align 8, !tbaa !43
  store ptr @anamebucket, ptr @atomnamemap, align 8, !tbaa !41
  store i32 137, ptr getelementptr inbounds (%struct.Map, ptr @atomnamemap, i32 0, i32 1), align 8, !tbaa !43
  %75 = call i32 @fmtinstall(i32 noundef 65, ptr noundef @Afmt)
  %76 = call i32 @fmtinstall(i32 noundef 76, ptr noundef @Lfmt)
  %77 = call i32 @fmtinstall(i32 noundef 82, ptr noundef @Rfmt)
  %78 = call i32 @fmtinstall(i32 noundef 80, ptr noundef @Pfmt)
  %79 = call i32 @fmtinstall(i32 noundef 87, ptr noundef @Wfmt)
  %80 = call ptr @XSetErrorHandler(ptr noundef @errorhandler)
  store ptr %80, ptr @xlib_errorhandler, align 8, !tbaa !5
  ret void
}

declare ptr @XOpenDisplay(ptr noundef) #1

declare void @fatal(ptr noundef, ...) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare ptr @XOpenIM(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @fmtinstall(i32 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden i32 @Afmt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @Lfmt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @Rfmt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @Pfmt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @Wfmt(ptr noundef) #0

declare ptr @XSetErrorHandler(ptr noundef) #1

declare i32 @errorhandler(ptr noundef, ptr noundef) #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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }

!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 224}
!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 = !{!14, !11, i64 0}
!14 = !{!"Screen", !11, i64 0, !15, i64 8, !6, i64 200, !12, i64 208, !12, i64 216, !6, i64 224, !6, i64 232, !16, i64 240, !11, i64 256, !11, i64 260, !6, i64 264}
!15 = !{!"Window", !11, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !6, i64 48, !16, i64 56, !11, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !18, i64 128, !12, i64 152, !6, i64 160, !6, i64 168, !19, i64 176, !11, i64 180, !11, i64 184}
!16 = !{!"Rectangle", !17, i64 0, !17, i64 8}
!17 = !{!"Point", !11, i64 0, !11, i64 4}
!18 = !{!"Ewmh", !12, i64 0, !12, i64 8, !12, i64 16}
!19 = !{!"_Bool", !7, i64 0}
!20 = !{!10, !6, i64 232}
!21 = !{!22, !12, i64 80}
!22 = !{!"", !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}
!23 = !{!14, !12, i64 208}
!24 = !{!22, !6, i64 64}
!25 = !{!14, !6, i64 224}
!26 = !{!22, !6, i64 72}
!27 = !{!14, !6, i64 200}
!28 = !{!22, !11, i64 56}
!29 = !{!14, !11, i64 256}
!30 = !{!22, !12, i64 16}
!31 = !{!14, !12, i64 16}
!32 = !{!14, !6, i64 40}
!33 = !{!17, !11, i64 0}
!34 = !{!17, !11, i64 4}
!35 = !{!22, !11, i64 24}
!36 = !{!22, !11, i64 28}
!37 = !{i64 0, i64 4, !38, i64 4, i64 4, !38, i64 8, i64 4, !38, i64 12, i64 4, !38}
!38 = !{!11, !11, i64 0}
!39 = !{!14, !6, i64 88}
!40 = !{!14, !6, i64 264}
!41 = !{!42, !6, i64 0}
!42 = !{!"Map", !6, i64 0, !11, i64 8, !11, i64 12}
!43 = !{!42, !11, i64 8}


; 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.Screen = type { i32, %struct.Window, ptr, i64, i64, ptr, ptr, %struct.Rectangle, i32, i32, ptr }
%struct.Window = type { i32, i64, ptr, ptr, ptr, i64, ptr, %struct.Rectangle, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.Ewmh, i64, ptr, ptr, i8, i32, i32 }
%struct.Ewmh = type { i64, i64, i64 }
%struct.Rectangle = type { %struct.Point, %struct.Point }
%struct.Point = type { i32, i32 }
%struct.Map = type { ptr, i32, i32 }
%struct.XScreen = type { ptr, ptr, i64, i32, i32, i32, i32, i32, ptr, i32, ptr, ptr, i64, i64, i64, i32, i32, i32, i32, i64 }

@display = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@scr = external global %struct.Screen, align 8
@wbucket = external hidden global [137 x ptr], align 16
@windowmap = external dso_local local_unnamed_addr global %struct.Map, align 8
@abucket = external hidden global [137 x ptr], align 16
@atommap = external dso_local local_unnamed_addr global %struct.Map, align 8
@anamebucket = external hidden global [137 x ptr], align 16
@atomnamemap = external dso_local local_unnamed_addr global %struct.Map, align 8
@xlib_errorhandler = external dso_local local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local void @initdisplay() local_unnamed_addr #0 {
  %1 = tail call ptr @XOpenDisplay(ptr noundef null) #3
  store ptr %1, ptr @display, align 8, !tbaa !5
  %2 = icmp eq ptr %1, null
  br i1 %2, label %3, label %4

3:                                                ; preds = %0
  tail call void (ptr, ...) @fatal(ptr noundef nonnull @.str) #3
  %.pre = load ptr, ptr @display, align 8, !tbaa !5
  br label %4

4:                                                ; preds = %3, %0
  %5 = phi ptr [ %.pre, %3 ], [ %1, %0 ]
  %6 = getelementptr inbounds i8, ptr %5, i64 224
  %7 = load i32, ptr %6, align 8, !tbaa !9
  store i32 %7, ptr @scr, align 8, !tbaa !13
  %8 = getelementptr inbounds i8, ptr %5, i64 232
  %9 = load ptr, ptr %8, align 8, !tbaa !20
  %10 = sext i32 %7 to i64
  %11 = getelementptr inbounds %struct.XScreen, ptr %9, i64 %10, i32 12
  %12 = load i64, ptr %11, align 8, !tbaa !21
  store i64 %12, ptr getelementptr inbounds (i8, ptr @scr, i64 208), align 8, !tbaa !23
  %13 = getelementptr inbounds %struct.XScreen, ptr %9, i64 %10, i32 10
  %14 = load ptr, ptr %13, align 8, !tbaa !24
  store ptr %14, ptr getelementptr inbounds (i8, ptr @scr, i64 224), align 8, !tbaa !25
  %15 = getelementptr inbounds %struct.XScreen, ptr %9, i64 %10, i32 11
  %16 = load ptr, ptr %15, align 8, !tbaa !26
  store ptr %16, ptr getelementptr inbounds (i8, ptr @scr, i64 200), align 8, !tbaa !27
  %17 = getelementptr inbounds %struct.XScreen, ptr %9, i64 %10, i32 9
  %18 = load i32, ptr %17, align 8, !tbaa !28
  store i32 %18, ptr getelementptr inbounds (i8, ptr @scr, i64 256), align 8, !tbaa !29
  %19 = getelementptr inbounds %struct.XScreen, ptr %9, i64 %10, i32 2
  %20 = load i64, ptr %19, align 8, !tbaa !30
  store i64 %20, ptr getelementptr inbounds (i8, ptr @scr, i64 16), align 8, !tbaa !31
  store ptr %14, ptr getelementptr inbounds (i8, ptr @scr, i64 40), align 8, !tbaa !32
  %21 = getelementptr inbounds %struct.XScreen, ptr %9, i64 %10, i32 3
  %22 = load <2 x i32>, ptr %21, align 8, !tbaa !33
  store i32 0, ptr getelementptr inbounds (i8, ptr @scr, i64 64), align 8, !tbaa !33
  store i32 0, ptr getelementptr inbounds (i8, ptr @scr, i64 68), align 4, !tbaa !33
  store <2 x i32> %22, ptr getelementptr inbounds (i8, ptr @scr, i64 72), align 8, !tbaa !33
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @scr, i64 240), ptr noundef nonnull align 8 dereferenceable(16) getelementptr inbounds (i8, ptr @scr, i64 64), i64 16, i1 false), !tbaa.struct !34
  store ptr getelementptr inbounds (i8, ptr @scr, i64 8), ptr getelementptr inbounds (i8, ptr @scr, i64 88), align 8, !tbaa !35
  %23 = tail call ptr @XOpenIM(ptr noundef %5, ptr noundef null, ptr noundef null, ptr noundef null) #3
  store ptr %23, ptr getelementptr inbounds (i8, ptr @scr, i64 264), align 8, !tbaa !36
  store ptr @wbucket, ptr @windowmap, align 8, !tbaa !37
  store i32 137, ptr getelementptr inbounds (i8, ptr @windowmap, i64 8), align 8, !tbaa !39
  store ptr @abucket, ptr @atommap, align 8, !tbaa !37
  store i32 137, ptr getelementptr inbounds (i8, ptr @atommap, i64 8), align 8, !tbaa !39
  store ptr @anamebucket, ptr @atomnamemap, align 8, !tbaa !37
  store i32 137, ptr getelementptr inbounds (i8, ptr @atomnamemap, i64 8), align 8, !tbaa !39
  %24 = tail call i32 @fmtinstall(i32 noundef 65, ptr noundef nonnull @Afmt) #3
  %25 = tail call i32 @fmtinstall(i32 noundef 76, ptr noundef nonnull @Lfmt) #3
  %26 = tail call i32 @fmtinstall(i32 noundef 82, ptr noundef nonnull @Rfmt) #3
  %27 = tail call i32 @fmtinstall(i32 noundef 80, ptr noundef nonnull @Pfmt) #3
  %28 = tail call i32 @fmtinstall(i32 noundef 87, ptr noundef nonnull @Wfmt) #3
  %29 = tail call ptr @XSetErrorHandler(ptr noundef nonnull @errorhandler) #3
  store ptr %29, ptr @xlib_errorhandler, align 8, !tbaa !5
  ret void
}

declare ptr @XOpenDisplay(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

declare ptr @XOpenIM(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare hidden i32 @Afmt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @Lfmt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @Rfmt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @Pfmt(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden i32 @Wfmt(ptr noundef) #0

declare ptr @XSetErrorHandler(ptr noundef) local_unnamed_addr #1

declare i32 @errorhandler(ptr noundef, ptr noundef) #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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 224}
!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 = !{!14, !11, i64 0}
!14 = !{!"Screen", !11, i64 0, !15, i64 8, !6, i64 200, !12, i64 208, !12, i64 216, !6, i64 224, !6, i64 232, !16, i64 240, !11, i64 256, !11, i64 260, !6, i64 264}
!15 = !{!"Window", !11, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !6, i64 48, !16, i64 56, !11, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !18, i64 128, !12, i64 152, !6, i64 160, !6, i64 168, !19, i64 176, !11, i64 180, !11, i64 184}
!16 = !{!"Rectangle", !17, i64 0, !17, i64 8}
!17 = !{!"Point", !11, i64 0, !11, i64 4}
!18 = !{!"Ewmh", !12, i64 0, !12, i64 8, !12, i64 16}
!19 = !{!"_Bool", !7, i64 0}
!20 = !{!10, !6, i64 232}
!21 = !{!22, !12, i64 80}
!22 = !{!"", !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}
!23 = !{!14, !12, i64 208}
!24 = !{!22, !6, i64 64}
!25 = !{!14, !6, i64 224}
!26 = !{!22, !6, i64 72}
!27 = !{!14, !6, i64 200}
!28 = !{!22, !11, i64 56}
!29 = !{!14, !11, i64 256}
!30 = !{!22, !12, i64 16}
!31 = !{!14, !12, i64 16}
!32 = !{!14, !6, i64 40}
!33 = !{!11, !11, i64 0}
!34 = !{i64 0, i64 4, !33, i64 4, i64 4, !33, i64 8, i64 4, !33, i64 12, i64 4, !33}
!35 = !{!14, !6, i64 88}
!36 = !{!14, !6, i64 264}
!37 = !{!38, !6, i64 0}
!38 = !{!"Map", !6, i64 0, !11, i64 8, !11, i64 12}
!39 = !{!38, !11, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass