; LLVM IR from kala13x/libxutils :: tools (xtop)

; 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.XTopStats = type { i32, %struct.XSyncMutex, %struct.XCPUStats, %struct.XMemInfo, i32, %struct.XArray_, %struct.XTask, i32 }
%struct.XSyncMutex = type { %union.pthread_mutex_t, i8 }
%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.XCPUStats = type { [3 x i32], i16, %struct.XProcInfo, %struct.XCPUInfo, %struct.XArray_ }
%struct.XProcInfo = type { i32, i32, i64, i64, i64, i64, i64 }
%struct.XCPUInfo = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }
%struct.XMemInfo = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%struct.XArray_ = type { ptr, ptr, i32, ptr, i8, i8, i8, i64, i64 }
%struct.XTask = type { ptr, ptr, %struct.XThread, i32, i32, i32 }
%struct.XThread = type { ptr, ptr, i64, i32, i8, i8 }
%struct.xmon_args_ = type { ptr, i8, i8, i8, i8, [4096 x i8], [4096 x i8], [256 x i8], [256 x i8], [2048 x i8], [2048 x i8], i64, i16, i16, i16, i8, i32 }
%struct.xcli_wind_ = type { i32, %struct.xcli_size_, %struct.XArray_, i8 }
%struct.xcli_size_ = type { i64, i64 }
%struct.xcli_bar_ = type { %struct.xcli_size_, i64, i64, i32, i32, i8, i8, i8, i8, double, i32, i8, i8, i8, i8, i8, i8, [256 x i8], [256 x i8], [256 x i8] }

@g_nInterrupted = external hidden global i32, align 4
@.str.80 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.206 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.207 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.208 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.209 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @XTOPApp_SignalCallback(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @XTOPApp_DisplayUsage(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

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_ParseArgs(ptr noundef, i32 noundef, ptr noundef) #0

declare void @XLog_Display(i32 noundef, i8 noundef zeroext, ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_AddCPULoadBar(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_AddOverallBar(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_AddCPUExtra(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

declare i32 @XWindow_AddAligned(ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_AddNetworkInfo(ptr noundef, ptr noundef, ptr noundef) #0

declare void @XArray_Destroy(ptr noundef) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_GetRemoteStats(ptr noundef, ptr noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_ServerMode(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %struct.XTopStats, align 8
  %7 = alloca %struct.xmon_args_, align 8
  %8 = alloca i32, align 4
  %9 = alloca [2 x i32], align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.xcli_wind_, align 8
  %13 = alloca %struct.xcli_bar_, align 8
  %14 = alloca i8, align 1
  %15 = alloca %struct.XCPUStats, align 8
  %16 = alloca %struct.XMemInfo, align 8
  %17 = alloca %struct.XArray_, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @XLog_Init(ptr noundef @.str.205, i16 noundef zeroext 203, i8 noundef zeroext 0)
  call void @llvm.lifetime.start.p0(i64 504, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 12840, ptr %7) #4
  %18 = load i32, ptr %4, align 4, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !9
  %20 = call i32 @XTOPApp_ParseArgs(ptr noundef %7, i32 noundef %18, ptr noundef %19)
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %26, label %22

22:                                               ; preds = %2
  %23 = load ptr, ptr %5, align 8, !tbaa !9
  %24 = getelementptr inbounds ptr, ptr %23, i64 0
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  call void @XTOPApp_DisplayUsage(ptr noundef %25)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %156

26:                                               ; preds = %2
  %27 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 1
  %28 = load i8, ptr %27, align 8, !tbaa !11
  %29 = zext i8 %28 to i32
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %37

31:                                               ; preds = %26
  %32 = call i32 @XUtils_Daemonize(i32 noundef 1, i32 noundef 1)
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %34, label %37

34:                                               ; preds = %31
  %35 = call ptr @__errno_location() #5
  %36 = load i32, ptr %35, align 4, !tbaa !5
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 2, i8 noundef zeroext 1, ptr noundef @.str.206, i32 noundef %36)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %156

37:                                               ; preds = %31, %26
  %38 = call i32 @XMon_InitStats(ptr noundef %6)
  %39 = icmp slt i32 %38, 0
  br i1 %39, label %40, label %43

40:                                               ; preds = %37
  %41 = call ptr @__errno_location() #5
  %42 = load i32, ptr %41, align 4, !tbaa !5
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef @.str.207, i32 noundef %42)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %156

43:                                               ; preds = %37
  %44 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 1
  %45 = load i8, ptr %44, align 8, !tbaa !11
  %46 = icmp ne i8 %45, 0
  %47 = xor i1 %46, true
  %48 = zext i1 %47 to i32
  %49 = trunc i32 %48 to i8
  call void @XLog_ScreenLogSet(i8 noundef zeroext %49)
  call void @XLog_TimeFormatSet(i32 noundef 1)
  call void @XLog_IndentSet(i8 noundef zeroext 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %50 = getelementptr inbounds [2 x i32], ptr %9, i64 0, i64 0
  store i32 15, ptr %50, align 4, !tbaa !5
  %51 = getelementptr inbounds [2 x i32], ptr %9, i64 0, i64 1
  store i32 2, ptr %51, align 4, !tbaa !5
  %52 = getelementptr inbounds [2 x i32], ptr %9, i64 0, i64 0
  %53 = call i32 @XSig_Register(ptr noundef %52, i64 noundef 2, ptr noundef @XTOPApp_SignalCallback)
  %54 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 3
  %55 = load i8, ptr %54, align 2, !tbaa !15
  %56 = icmp ne i8 %55, 0
  br i1 %56, label %81, label %57

57:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %58 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 11
  %59 = load i64, ptr %58, align 8, !tbaa !16
  %60 = trunc i64 %59 to i32
  %61 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 16
  %62 = load i32, ptr %61, align 8, !tbaa !17
  %63 = call i32 @XMon_StartMonitoring(ptr noundef %6, i32 noundef %60, i32 noundef %62)
  store i32 %63, ptr %10, align 4, !tbaa !5
  %64 = load i32, ptr %10, align 4, !tbaa !5
  %65 = icmp slt i32 %64, 0
  br i1 %65, label %66, label %69

66:                                               ; preds = %57
  %67 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 16
  %68 = load i32, ptr %67, align 8, !tbaa !17
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef @.str.208, i32 noundef %68)
  call void @XMon_DestroyStats(ptr noundef %6)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %78

69:                                               ; preds = %57
  %70 = load i32, ptr %10, align 4, !tbaa !5
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %75, label %72

72:                                               ; preds = %69
  %73 = call ptr @__errno_location() #5
  %74 = load i32, ptr %73, align 4, !tbaa !5
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef @.str.209, i32 noundef %74)
  call void @XMon_DestroyStats(ptr noundef %6)
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %78

75:                                               ; preds = %69
  br label %76

76:                                               ; preds = %75
  %77 = call i32 @XMon_WaitLoad(ptr noundef %6, i32 noundef 1000)
  store i32 0, ptr %8, align 4
  br label %78

78:                                               ; preds = %76, %72, %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %79 = load i32, ptr %8, align 4
  switch i32 %79, label %155 [
    i32 0, label %80
  ]

80:                                               ; preds = %78
  br label %81

81:                                               ; preds = %80, %43
  %82 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 2
  %83 = load i8, ptr %82, align 1, !tbaa !18
  %84 = icmp ne i8 %83, 0
  br i1 %84, label %85, label %90

85:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %86 = call i32 @XTOPApp_ServerMode(ptr noundef %7, ptr noundef %6)
  store i32 %86, ptr %11, align 4, !tbaa !5
  %87 = call i32 @XMon_StopMonitoring(ptr noundef %6, i32 noundef 1000)
  call void @XMon_DestroyStats(ptr noundef %6)
  %88 = call i32 @usleep(i32 noundef 10000)
  %89 = load i32, ptr %11, align 4, !tbaa !5
  store i32 %89, ptr %3, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %155

90:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 88, ptr %12) #4
  %91 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 4
  %92 = load i8, ptr %91, align 1, !tbaa !19
  %93 = icmp ne i8 %92, 0
  %94 = xor i1 %93, true
  %95 = zext i1 %94 to i32
  %96 = trunc i32 %95 to i8
  call void @XWindow_Init(ptr noundef %12, i8 noundef zeroext %96)
  call void @llvm.lifetime.start.p0(i64 840, ptr %13) #4
  call void @XProgBar_GetDefaults(ptr noundef %13)
  %97 = getelementptr inbounds %struct.xcli_bar_, ptr %13, i32 0, i32 5
  store i8 1, ptr %97, align 8, !tbaa !20
  %98 = getelementptr inbounds %struct.xcli_bar_, ptr %13, i32 0, i32 6
  store i8 1, ptr %98, align 1, !tbaa !24
  %99 = getelementptr inbounds %struct.xcli_bar_, ptr %13, i32 0, i32 13
  store i8 124, ptr %99, align 2, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #4
  store i8 1, ptr %14, align 1, !tbaa !26
  br label %100

100:                                              ; preds = %142, %90
  %101 = load i32, ptr @g_nInterrupted, align 4, !tbaa !5
  %102 = icmp ne i32 %101, 0
  %103 = xor i1 %102, true
  br i1 %103, label %104, label %147

104:                                              ; preds = %100
  %105 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 3
  %106 = load i8, ptr %105, align 2, !tbaa !15
  %107 = zext i8 %106 to i32
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %113

109:                                              ; preds = %104
  %110 = call i32 @XTOPApp_GetRemoteStats(ptr noundef %7, ptr noundef %6)
  %111 = icmp slt i32 %110, 0
  br i1 %111, label %112, label %113

112:                                              ; preds = %109
  br label %147

113:                                              ; preds = %109, %104
  %114 = call i32 @XWindow_AddAligned(ptr noundef %12, ptr noundef @.str.210, ptr noundef @.str.80, i8 noundef zeroext 0)
  %115 = call i32 @XWindow_AddEmptyLine(ptr noundef %12)
  call void @llvm.lifetime.start.p0(i64 216, ptr %15) #4
  %116 = call i32 @XMon_GetCPUStats(ptr noundef %6, ptr noundef %15)
  %117 = icmp sgt i32 %116, 0
  br i1 %117, label %118, label %132

118:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 96, ptr %16) #4
  %119 = call i32 @XMon_GetMemoryInfo(ptr noundef %6, ptr noundef %16)
  %120 = call i32 @XTOPApp_AddCPULoadBar(ptr noundef %12, ptr noundef %13, ptr noundef %15)
  %121 = call i32 @XTOPApp_AddOverallBar(ptr noundef %12, ptr noundef %13, ptr noundef %16, ptr noundef %15)
  %122 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 12
  %123 = load i16, ptr %122, align 8, !tbaa !27
  %124 = zext i16 %123 to i32
  %125 = icmp sgt i32 %124, 0
  br i1 %125, label %126, label %129

126:                                              ; preds = %118
  %127 = call i32 @XWindow_AddEmptyLine(ptr noundef %12)
  %128 = call i32 @XTOPApp_AddCPUExtra(ptr noundef %12, ptr noundef %7, ptr noundef %13, ptr noundef %16, ptr noundef %15)
  br label %129

129:                                              ; preds = %126, %118
  %130 = call i32 @XWindow_AddEmptyLine(ptr noundef %12)
  %131 = getelementptr inbounds %struct.XCPUStats, ptr %15, i32 0, i32 4
  call void @XArray_Destroy(ptr noundef %131)
  call void @llvm.lifetime.end.p0(i64 96, ptr %16) #4
  br label %132

132:                                              ; preds = %129, %113
  call void @llvm.lifetime.start.p0(i64 56, ptr %17) #4
  %133 = call i32 @XMon_GetNetworkStats(ptr noundef %6, ptr noundef %17)
  %134 = icmp sgt i32 %133, 0
  br i1 %134, label %135, label %137

135:                                              ; preds = %132
  %136 = call i32 @XTOPApp_AddNetworkInfo(ptr noundef %12, ptr noundef %7, ptr noundef %17)
  call void @XArray_Destroy(ptr noundef %17)
  br label %137

137:                                              ; preds = %135, %132
  %138 = load i8, ptr %14, align 1, !tbaa !26
  %139 = icmp ne i8 %138, 0
  br i1 %139, label %140, label %142

140:                                              ; preds = %137
  %141 = call i32 @XWindow_ClearScreen(i8 noundef zeroext 0)
  store i8 0, ptr %14, align 1, !tbaa !26
  br label %142

142:                                              ; preds = %140, %137
  %143 = call i32 @XWindow_Flush(ptr noundef %12)
  %144 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 11
  %145 = load i64, ptr %144, align 8, !tbaa !16
  %146 = trunc i64 %145 to i32
  call void @xusleep(i32 noundef %146)
  call void @llvm.lifetime.end.p0(i64 56, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 216, ptr %15) #4
  br label %100, !llvm.loop !28

147:                                              ; preds = %112, %100
  %148 = getelementptr inbounds %struct.xmon_args_, ptr %7, i32 0, i32 3
  %149 = load i8, ptr %148, align 2, !tbaa !15
  %150 = icmp ne i8 %149, 0
  br i1 %150, label %153, label %151

151:                                              ; preds = %147
  %152 = call i32 @XMon_StopMonitoring(ptr noundef %6, i32 noundef 1000)
  br label %153

153:                                              ; preds = %151, %147
  call void @XMon_DestroyStats(ptr noundef %6)
  call void @XWindow_Destroy(ptr noundef %12)
  %154 = call i32 @usleep(i32 noundef 10000)
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 840, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 88, ptr %12) #4
  br label %155

155:                                              ; preds = %153, %85, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %156

156:                                              ; preds = %155, %40, %34, %22
  call void @llvm.lifetime.end.p0(i64 12840, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 504, ptr %6) #4
  %157 = load i32, ptr %3, align 4
  ret i32 %157
}

declare void @XLog_Init(ptr noundef, i16 noundef zeroext, i8 noundef zeroext) #2

declare i32 @XUtils_Daemonize(i32 noundef, i32 noundef) #2

declare i32 @XMon_InitStats(ptr noundef) #2

declare void @XLog_ScreenLogSet(i8 noundef zeroext) #2

declare void @XLog_TimeFormatSet(i32 noundef) #2

declare void @XLog_IndentSet(i8 noundef zeroext) #2

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

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

declare void @XMon_DestroyStats(ptr noundef) #2

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

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

declare i32 @usleep(i32 noundef) #2

declare void @XWindow_Init(ptr noundef, i8 noundef zeroext) #2

declare void @XProgBar_GetDefaults(ptr noundef) #2

declare i32 @XWindow_AddEmptyLine(ptr noundef) #2

declare i32 @XWindow_ClearScreen(i8 noundef zeroext) #2

declare i32 @XWindow_Flush(ptr noundef) #2

declare void @xusleep(i32 noundef) #2

declare void @XWindow_Destroy(ptr noundef) #2

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 = { nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(none) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !7, i64 8}
!12 = !{!"xmon_args_", !10, i64 0, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 4108, !7, i64 8204, !7, i64 8460, !7, i64 8716, !7, i64 10764, !13, i64 12816, !14, i64 12824, !14, i64 12826, !14, i64 12828, !7, i64 12830, !6, i64 12832}
!13 = !{!"long", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!12, !7, i64 10}
!16 = !{!12, !13, i64 12816}
!17 = !{!12, !6, i64 12832}
!18 = !{!12, !7, i64 9}
!19 = !{!12, !7, i64 11}
!20 = !{!21, !7, i64 40}
!21 = !{!"xcli_bar_", !22, i64 0, !13, i64 16, !13, i64 24, !6, i64 32, !6, i64 36, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 43, !23, i64 48, !6, i64 56, !7, i64 60, !7, i64 61, !7, i64 62, !7, i64 63, !7, i64 64, !7, i64 65, !7, i64 66, !7, i64 322, !7, i64 578}
!22 = !{!"xcli_size_", !13, i64 0, !13, i64 8}
!23 = !{!"double", !7, i64 0}
!24 = !{!21, !7, i64 41}
!25 = !{!21, !7, i64 62}
!26 = !{!7, !7, i64 0}
!27 = !{!12, !14, i64 12824}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}


; 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.XTopStats = type { i32, %struct.XSyncMutex, %struct.XCPUStats, %struct.XMemInfo, i32, %struct.XArray_, %struct.XTask, i32 }
%struct.XSyncMutex = type { %union.pthread_mutex_t, i8 }
%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.XCPUStats = type { [3 x i32], i16, %struct.XProcInfo, %struct.XCPUInfo, %struct.XArray_ }
%struct.XProcInfo = type { i32, i32, i64, i64, i64, i64, i64 }
%struct.XCPUInfo = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }
%struct.XMemInfo = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%struct.XArray_ = type { ptr, ptr, i32, ptr, i8, i8, i8, i64, i64 }
%struct.XTask = type { ptr, ptr, %struct.XThread, i32, i32, i32 }
%struct.XThread = type { ptr, ptr, i64, i32, i8, i8 }
%struct.xmon_args_ = type { ptr, i8, i8, i8, i8, [4096 x i8], [4096 x i8], [256 x i8], [256 x i8], [2048 x i8], [2048 x i8], i64, i16, i16, i16, i8, i32 }
%struct.xcli_wind_ = type { i32, %struct.xcli_size_, %struct.XArray_, i8 }
%struct.xcli_size_ = type { i64, i64 }
%struct.xcli_bar_ = type { %struct.xcli_size_, i64, i64, i32, i32, i8, i8, i8, i8, double, i32, i8, i8, i8, i8, i8, i8, [256 x i8], [256 x i8], [256 x i8] }

@g_nInterrupted = external hidden local_unnamed_addr global i32, align 4
@.str.80 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.205 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.206 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.207 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.208 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.209 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.210 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @XTOPApp_SignalCallback(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @XTOPApp_DisplayUsage(ptr noundef) local_unnamed_addr #0

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_ParseArgs(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare void @XLog_Display(i32 noundef, i8 noundef zeroext, ptr noundef, ...) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_AddCPULoadBar(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_AddOverallBar(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_AddCPUExtra(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @XWindow_AddAligned(ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_AddNetworkInfo(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @XArray_Destroy(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_GetRemoteStats(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @XMon_GetMemoryInfo(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @XMon_GetNetworkStats(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @XMon_GetCPUStats(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_ServerMode(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca %struct.XTopStats, align 8
  %4 = alloca %struct.xmon_args_, align 8
  %5 = alloca [2 x i32], align 4
  %6 = alloca %struct.xcli_wind_, align 8
  %7 = alloca %struct.xcli_bar_, align 8
  %8 = alloca %struct.XCPUStats, align 8
  %9 = alloca %struct.XMemInfo, align 8
  %10 = alloca %struct.XArray_, align 8
  tail call void @XLog_Init(ptr noundef nonnull @.str.205, i16 noundef zeroext 203, i8 noundef zeroext 0) #4
  call void @llvm.lifetime.start.p0(i64 504, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 12840, ptr nonnull %4) #4
  %11 = call i32 @XTOPApp_ParseArgs(ptr noundef nonnull %4, i32 noundef %0, ptr noundef %1)
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %12, label %14

12:                                               ; preds = %2
  %13 = load ptr, ptr %1, align 8, !tbaa !5
  call void @XTOPApp_DisplayUsage(ptr noundef %13)
  br label %134

14:                                               ; preds = %2
  %15 = getelementptr inbounds i8, ptr %4, i64 8
  %16 = load i8, ptr %15, align 8, !tbaa !9
  %.not12 = icmp eq i8 %16, 0
  br i1 %.not12, label %23, label %17

17:                                               ; preds = %14
  %18 = call i32 @XUtils_Daemonize(i32 noundef 1, i32 noundef 1) #4
  %19 = icmp slt i32 %18, 0
  br i1 %19, label %20, label %23

20:                                               ; preds = %17
  %21 = tail call ptr @__errno_location() #5
  %22 = load i32, ptr %21, align 4, !tbaa !14
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 2, i8 noundef zeroext 1, ptr noundef nonnull @.str.206, i32 noundef %22) #4
  br label %134

23:                                               ; preds = %17, %14
  %24 = call i32 @XMon_InitStats(ptr noundef nonnull %3) #4
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %26, label %29

26:                                               ; preds = %23
  %27 = tail call ptr @__errno_location() #5
  %28 = load i32, ptr %27, align 4, !tbaa !14
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef nonnull @.str.207, i32 noundef %28) #4
  br label %134

29:                                               ; preds = %23
  %30 = load i8, ptr %15, align 8, !tbaa !9
  %.not13 = icmp eq i8 %30, 0
  %31 = zext i1 %.not13 to i8
  call void @XLog_ScreenLogSet(i8 noundef zeroext %31) #4
  call void @XLog_TimeFormatSet(i32 noundef 1) #4
  call void @XLog_IndentSet(i8 noundef zeroext 1) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  store i32 15, ptr %5, align 4, !tbaa !14
  %32 = getelementptr inbounds i8, ptr %5, i64 4
  store i32 2, ptr %32, align 4, !tbaa !14
  %33 = call i32 @XSig_Register(ptr noundef nonnull %5, i64 noundef 2, ptr noundef nonnull @XTOPApp_SignalCallback) #4
  %34 = getelementptr inbounds i8, ptr %4, i64 10
  %35 = load i8, ptr %34, align 2, !tbaa !15
  %.not14 = icmp eq i8 %35, 0
  br i1 %.not14, label %36, label %52

36:                                               ; preds = %29
  %37 = getelementptr inbounds i8, ptr %4, i64 12816
  %38 = load i64, ptr %37, align 8, !tbaa !16
  %39 = trunc i64 %38 to i32
  %40 = getelementptr inbounds i8, ptr %4, i64 12832
  %41 = load i32, ptr %40, align 8, !tbaa !17
  %42 = call i32 @XMon_StartMonitoring(ptr noundef nonnull %3, i32 noundef %39, i32 noundef %41) #4
  %43 = icmp slt i32 %42, 0
  br i1 %43, label %44, label %46

44:                                               ; preds = %36
  %45 = load i32, ptr %40, align 8, !tbaa !17
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef nonnull @.str.208, i32 noundef %45) #4
  call void @XMon_DestroyStats(ptr noundef nonnull %3) #4
  br label %.thread

46:                                               ; preds = %36
  %.not15 = icmp eq i32 %42, 0
  br i1 %.not15, label %47, label %50

47:                                               ; preds = %46
  %48 = tail call ptr @__errno_location() #5
  %49 = load i32, ptr %48, align 4, !tbaa !14
  call void (i32, i8, ptr, ...) @XLog_Display(i32 noundef 64, i8 noundef zeroext 1, ptr noundef nonnull @.str.209, i32 noundef %49) #4
  call void @XMon_DestroyStats(ptr noundef nonnull %3) #4
  br label %.thread

50:                                               ; preds = %46
  %51 = call i32 @XMon_WaitLoad(ptr noundef nonnull %3, i32 noundef 1000) #4
  br label %52

52:                                               ; preds = %50, %29
  %53 = getelementptr inbounds i8, ptr %4, i64 9
  %54 = load i8, ptr %53, align 1, !tbaa !18
  %.not16 = icmp eq i8 %54, 0
  br i1 %.not16, label %59, label %55

55:                                               ; preds = %52
  %56 = call i32 @XTOPApp_ServerMode(ptr noundef nonnull %4, ptr noundef nonnull %3)
  %57 = call i32 @XMon_StopMonitoring(ptr noundef nonnull %3, i32 noundef 1000) #4
  call void @XMon_DestroyStats(ptr noundef nonnull %3) #4
  %58 = call i32 @usleep(i32 noundef 10000) #4
  br label %.thread

59:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %6) #4
  %60 = getelementptr inbounds i8, ptr %4, i64 11
  %61 = load i8, ptr %60, align 1, !tbaa !19
  %.not17 = icmp eq i8 %61, 0
  %62 = zext i1 %.not17 to i8
  call void @XWindow_Init(ptr noundef nonnull %6, i8 noundef zeroext %62) #4
  call void @llvm.lifetime.start.p0(i64 840, ptr nonnull %7) #4
  call void @XProgBar_GetDefaults(ptr noundef nonnull %7) #4
  %63 = getelementptr inbounds i8, ptr %7, i64 40
  store i8 1, ptr %63, align 8, !tbaa !20
  %64 = getelementptr inbounds i8, ptr %7, i64 41
  store i8 1, ptr %64, align 1, !tbaa !24
  %65 = getelementptr inbounds i8, ptr %7, i64 62
  store i8 124, ptr %65, align 2, !tbaa !25
  %66 = load i32, ptr @g_nInterrupted, align 4, !tbaa !14
  %.not1825 = icmp eq i32 %66, 0
  br i1 %.not1825, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %59
  %67 = getelementptr inbounds i8, ptr %4, i64 12824
  %68 = getelementptr inbounds i8, ptr %8, i64 160
  %69 = getelementptr inbounds i8, ptr %4, i64 12816
  %70 = load i8, ptr %34, align 2, !tbaa !15
  %.not19.peel = icmp eq i8 %70, 0
  br i1 %.not19.peel, label %74, label %71

71:                                               ; preds = %.lr.ph
  %72 = call i32 @XTOPApp_GetRemoteStats(ptr noundef nonnull %4, ptr noundef nonnull %3)
  %73 = icmp slt i32 %72, 0
  br i1 %73, label %._crit_edge, label %74

74:                                               ; preds = %71, %.lr.ph
  %75 = call i32 @XWindow_AddAligned(ptr noundef nonnull %6, ptr noundef nonnull @.str.210, ptr noundef nonnull @.str.80, i8 noundef zeroext 0) #4
  %76 = call i32 @XWindow_AddEmptyLine(ptr noundef nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 216, ptr nonnull %8) #4
  %77 = call i32 @XMon_GetCPUStats(ptr noundef nonnull %3, ptr noundef nonnull %8) #4
  %78 = icmp sgt i32 %77, 0
  br i1 %78, label %79, label %89

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %9) #4
  %80 = call i32 @XMon_GetMemoryInfo(ptr noundef nonnull %3, ptr noundef nonnull %9) #4
  %81 = call i32 @XTOPApp_AddCPULoadBar(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %82 = call i32 @XTOPApp_AddOverallBar(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %8)
  %83 = load i16, ptr %67, align 8, !tbaa !26
  %.not20.peel = icmp eq i16 %83, 0
  br i1 %.not20.peel, label %87, label %84

84:                                               ; preds = %79
  %85 = call i32 @XWindow_AddEmptyLine(ptr noundef nonnull %6) #4
  %86 = call i32 @XTOPApp_AddCPUExtra(ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %8)
  br label %87

87:                                               ; preds = %84, %79
  %88 = call i32 @XWindow_AddEmptyLine(ptr noundef nonnull %6) #4
  call void @XArray_Destroy(ptr noundef nonnull %68) #4
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %9) #4
  br label %89

89:                                               ; preds = %87, %74
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) #4
  %90 = call i32 @XMon_GetNetworkStats(ptr noundef nonnull %3, ptr noundef nonnull %10) #4
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %92, label %94

92:                                               ; preds = %89
  %93 = call i32 @XTOPApp_AddNetworkInfo(ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %10)
  call void @XArray_Destroy(ptr noundef nonnull %10) #4
  br label %94

94:                                               ; preds = %92, %89
  %95 = call i32 @XWindow_ClearScreen(i8 noundef zeroext 0) #4
  %96 = call i32 @XWindow_Flush(ptr noundef nonnull %6) #4
  %97 = load i64, ptr %69, align 8, !tbaa !16
  %98 = trunc i64 %97 to i32
  call void @xusleep(i32 noundef %98) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 216, ptr nonnull %8) #4
  %99 = load i32, ptr @g_nInterrupted, align 4, !tbaa !14
  %.not18.peel = icmp eq i32 %99, 0
  br i1 %.not18.peel, label %.peel.next, label %._crit_edge

.peel.next:                                       ; preds = %94, %124
  %100 = load i8, ptr %34, align 2, !tbaa !15
  %.not19 = icmp eq i8 %100, 0
  br i1 %.not19, label %104, label %101

101:                                              ; preds = %.peel.next
  %102 = call i32 @XTOPApp_GetRemoteStats(ptr noundef nonnull %4, ptr noundef nonnull %3)
  %103 = icmp slt i32 %102, 0
  br i1 %103, label %._crit_edge, label %104

104:                                              ; preds = %101, %.peel.next
  %105 = call i32 @XWindow_AddAligned(ptr noundef nonnull %6, ptr noundef nonnull @.str.210, ptr noundef nonnull @.str.80, i8 noundef zeroext 0) #4
  %106 = call i32 @XWindow_AddEmptyLine(ptr noundef nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 216, ptr nonnull %8) #4
  %107 = call i32 @XMon_GetCPUStats(ptr noundef nonnull %3, ptr noundef nonnull %8) #4
  %108 = icmp sgt i32 %107, 0
  br i1 %108, label %109, label %119

109:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 96, ptr nonnull %9) #4
  %110 = call i32 @XMon_GetMemoryInfo(ptr noundef nonnull %3, ptr noundef nonnull %9) #4
  %111 = call i32 @XTOPApp_AddCPULoadBar(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %112 = call i32 @XTOPApp_AddOverallBar(ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %8)
  %113 = load i16, ptr %67, align 8, !tbaa !26
  %.not20 = icmp eq i16 %113, 0
  br i1 %.not20, label %117, label %114

114:                                              ; preds = %109
  %115 = call i32 @XWindow_AddEmptyLine(ptr noundef nonnull %6) #4
  %116 = call i32 @XTOPApp_AddCPUExtra(ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %7, ptr noundef nonnull %9, ptr noundef nonnull %8)
  br label %117

117:                                              ; preds = %114, %109
  %118 = call i32 @XWindow_AddEmptyLine(ptr noundef nonnull %6) #4
  call void @XArray_Destroy(ptr noundef nonnull %68) #4
  call void @llvm.lifetime.end.p0(i64 96, ptr nonnull %9) #4
  br label %119

119:                                              ; preds = %117, %104
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) #4
  %120 = call i32 @XMon_GetNetworkStats(ptr noundef nonnull %3, ptr noundef nonnull %10) #4
  %121 = icmp sgt i32 %120, 0
  br i1 %121, label %122, label %124

122:                                              ; preds = %119
  %123 = call i32 @XTOPApp_AddNetworkInfo(ptr noundef nonnull %6, ptr noundef nonnull %4, ptr noundef nonnull %10)
  call void @XArray_Destroy(ptr noundef nonnull %10) #4
  br label %124

124:                                              ; preds = %119, %122
  %125 = call i32 @XWindow_Flush(ptr noundef nonnull %6) #4
  %126 = load i64, ptr %69, align 8, !tbaa !16
  %127 = trunc i64 %126 to i32
  call void @xusleep(i32 noundef %127) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 216, ptr nonnull %8) #4
  %128 = load i32, ptr @g_nInterrupted, align 4, !tbaa !14
  %.not18 = icmp eq i32 %128, 0
  br i1 %.not18, label %.peel.next, label %._crit_edge, !llvm.loop !27

._crit_edge:                                      ; preds = %124, %101, %71, %94, %59
  %129 = load i8, ptr %34, align 2, !tbaa !15
  %.not22 = icmp eq i8 %129, 0
  br i1 %.not22, label %130, label %132

130:                                              ; preds = %._crit_edge
  %131 = call i32 @XMon_StopMonitoring(ptr noundef nonnull %3, i32 noundef 1000) #4
  br label %132

132:                                              ; preds = %130, %._crit_edge
  call void @XMon_DestroyStats(ptr noundef nonnull %3) #4
  call void @XWindow_Destroy(ptr noundef nonnull %6) #4
  %133 = call i32 @usleep(i32 noundef 10000) #4
  call void @llvm.lifetime.end.p0(i64 840, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %6) #4
  br label %.thread

.thread:                                          ; preds = %47, %44, %132, %55
  %.19 = phi i32 [ %56, %55 ], [ 0, %132 ], [ -1, %44 ], [ -1, %47 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br label %134

134:                                              ; preds = %.thread, %26, %20, %12
  %.2 = phi i32 [ -1, %20 ], [ -1, %26 ], [ %.19, %.thread ], [ -1, %12 ]
  call void @llvm.lifetime.end.p0(i64 12840, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 504, ptr nonnull %3) #4
  ret i32 %.2
}

declare void @XLog_Init(ptr noundef, i16 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #2

declare i32 @XUtils_Daemonize(i32 noundef, i32 noundef) local_unnamed_addr #2

declare i32 @XMon_InitStats(ptr noundef) local_unnamed_addr #2

declare void @XLog_ScreenLogSet(i8 noundef zeroext) local_unnamed_addr #2

declare void @XLog_TimeFormatSet(i32 noundef) local_unnamed_addr #2

declare void @XLog_IndentSet(i8 noundef zeroext) local_unnamed_addr #2

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

declare i32 @XMon_StartMonitoring(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

declare void @XMon_DestroyStats(ptr noundef) local_unnamed_addr #2

declare i32 @XMon_WaitLoad(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @XMon_StopMonitoring(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @usleep(i32 noundef) local_unnamed_addr #2

declare void @XWindow_Init(ptr noundef, i8 noundef zeroext) local_unnamed_addr #2

declare void @XProgBar_GetDefaults(ptr noundef) local_unnamed_addr #2

declare i32 @XWindow_AddEmptyLine(ptr noundef) local_unnamed_addr #2

declare i32 @XWindow_ClearScreen(i8 noundef zeroext) local_unnamed_addr #2

declare i32 @XWindow_Flush(ptr noundef) local_unnamed_addr #2

declare void @xusleep(i32 noundef) local_unnamed_addr #2

declare void @XWindow_Destroy(ptr noundef) local_unnamed_addr #2

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 nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(none) }

!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, !7, i64 8}
!10 = !{!"xmon_args_", !6, i64 0, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 4108, !7, i64 8204, !7, i64 8460, !7, i64 8716, !7, i64 10764, !11, i64 12816, !12, i64 12824, !12, i64 12826, !12, i64 12828, !7, i64 12830, !13, i64 12832}
!11 = !{!"long", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!10, !7, i64 10}
!16 = !{!10, !11, i64 12816}
!17 = !{!10, !13, i64 12832}
!18 = !{!10, !7, i64 9}
!19 = !{!10, !7, i64 11}
!20 = !{!21, !7, i64 40}
!21 = !{!"xcli_bar_", !22, i64 0, !11, i64 16, !11, i64 24, !13, i64 32, !13, i64 36, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 43, !23, i64 48, !13, i64 56, !7, i64 60, !7, i64 61, !7, i64 62, !7, i64 63, !7, i64 64, !7, i64 65, !7, i64 66, !7, i64 322, !7, i64 578}
!22 = !{!"xcli_size_", !11, i64 0, !11, i64 8}
!23 = !{!"double", !7, i64 0}
!24 = !{!21, !7, i64 41}
!25 = !{!21, !7, i64 62}
!26 = !{!10, !12, i64 12824}
!27 = distinct !{!27, !28, !29}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!"llvm.loop.peeled.count", i32 1}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass