; 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.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.XArray_ = type { ptr, ptr, i32, ptr, i8, i8, i8, i64, i64 }
%struct.XNetIface = type { i64, i64, i64, i64, i16, i64, i64, i64, i64, i64, i32, i8, [256 x i8], [64 x i8], [64 x i8], [128 x [256 x i8]] }
%struct.xcli_wind_ = type { i32, %struct.xcli_size_, %struct.XArray_, i8 }
%struct.xcli_size_ = type { i64, i64 }

@.str.63 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [6 x i8], align 1

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #1

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

declare zeroext i8 @xstrused(ptr noundef) #2

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

declare i64 @xstrnfill(ptr noundef, i64 noundef, i64 noundef, i8 noundef signext) #2

declare ptr @XArray_GetData(ptr noundef, i64 noundef) #2

declare i64 @xstrnlcpyf(ptr noundef, i64 noundef, i64 noundef, i8 noundef signext, ptr noundef, ...) #2

declare i64 @xstrncat(ptr noundef, i64 noundef, ptr noundef, ...) #2

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

declare void @XArray_Sort(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_AddInterface(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @XTOPApp_GetIfaceSpacePadding(ptr noundef, i8 noundef zeroext) #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @XTOPApp_IsNarrowInterface(ptr noundef) #3

declare i64 @XBytesToUnit(ptr noundef, i64 noundef, i64 noundef, i8 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @XTOPApp_GetAddrSpacePadding(ptr noundef, i64 noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strncmp(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @XTOPApp_AddNetworkInfo(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca [2048 x i8], align 16
  %19 = alloca [256 x i8], align 16
  %20 = alloca [256 x i8], align 16
  %21 = alloca i64, align 8
  %22 = alloca i8, align 1
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i8, align 1
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.xmon_args_, ptr %26, i32 0, i32 15
  %28 = load i8, ptr %27, align 2, !tbaa !9
  %29 = icmp ne i8 %28, 0
  br i1 %29, label %30, label %33

30:                                               ; preds = %3
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  call void @XArray_Sort(ptr noundef %31, ptr noundef @XTOPApp_CompareIFaces, ptr noundef %32)
  br label %33

33:                                               ; preds = %30, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.xmon_args_, ptr %34, i32 0, i32 7
  %36 = getelementptr inbounds [256 x i8], ptr %35, i64 0, i64 0
  %37 = call i64 @strlen(ptr noundef %36) #5
  store i64 %37, ptr %7, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 -1, ptr %10, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  store i64 0, ptr %13, align 8, !tbaa !14
  store i64 0, ptr %13, align 8, !tbaa !14
  store i64 0, ptr %12, align 8, !tbaa !14
  store i64 0, ptr %11, align 8, !tbaa !14
  store i64 0, ptr %8, align 8, !tbaa !14
  br label %38

38:                                               ; preds = %133, %33
  %39 = load i64, ptr %8, align 8, !tbaa !14
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.XArray_, ptr %40, i32 0, i32 8
  %42 = load i64, ptr %41, align 8, !tbaa !16
  %43 = icmp ult i64 %39, %42
  br i1 %43, label %44, label %136

44:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = load i64, ptr %8, align 8, !tbaa !14
  %47 = call ptr @XArray_GetData(ptr noundef %45, i64 noundef %46)
  store ptr %47, ptr %14, align 8, !tbaa !5
  %48 = load ptr, ptr %14, align 8, !tbaa !5
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %51

50:                                               ; preds = %44
  store i32 4, ptr %15, align 4
  br label %130

51:                                               ; preds = %44
  %52 = load ptr, ptr %14, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.XNetIface, ptr %52, i32 0, i32 1
  %54 = load i64, ptr %53, align 8, !tbaa !18
  %55 = load i64, ptr %11, align 8, !tbaa !14
  %56 = add i64 %55, %54
  store i64 %56, ptr %11, align 8, !tbaa !14
  %57 = load ptr, ptr %14, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.XNetIface, ptr %57, i32 0, i32 3
  %59 = load i64, ptr %58, align 8, !tbaa !20
  %60 = load i64, ptr %12, align 8, !tbaa !14
  %61 = add i64 %60, %59
  store i64 %61, ptr %12, align 8, !tbaa !14
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.XNetIface, ptr %62, i32 0, i32 12
  %64 = getelementptr inbounds [256 x i8], ptr %63, i64 0, i64 0
  %65 = call zeroext i8 @xstrused(ptr noundef %64)
  %66 = zext i8 %65 to i32
  %67 = icmp eq i32 %66, 1
  br i1 %67, label %68, label %87

68:                                               ; preds = %51
  %69 = load i64, ptr %7, align 8, !tbaa !14
  %70 = icmp ugt i64 %69, 0
  br i1 %70, label %71, label %87

71:                                               ; preds = %68
  %72 = load i32, ptr %10, align 4, !tbaa !15
  %73 = icmp slt i32 %72, 0
  br i1 %73, label %74, label %87

74:                                               ; preds = %71
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.xmon_args_, ptr %75, i32 0, i32 7
  %77 = getelementptr inbounds [256 x i8], ptr %76, i64 0, i64 0
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.XNetIface, ptr %78, i32 0, i32 12
  %80 = getelementptr inbounds [256 x i8], ptr %79, i64 0, i64 0
  %81 = load i64, ptr %7, align 8, !tbaa !14
  %82 = call i32 @strncmp(ptr noundef %77, ptr noundef %80, i64 noundef %81) #5
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %87, label %84

84:                                               ; preds = %74
  %85 = load i64, ptr %8, align 8, !tbaa !14
  %86 = trunc i64 %85 to i32
  store i32 %86, ptr %10, align 4, !tbaa !15
  br label %87

87:                                               ; preds = %84, %74, %71, %68, %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.XNetIface, ptr %88, i32 0, i32 14
  %90 = getelementptr inbounds [64 x i8], ptr %89, i64 0, i64 0
  %91 = call i64 @strnlen(ptr noundef %90, i64 noundef 64) #5
  store i64 %91, ptr %16, align 8, !tbaa !14
  %92 = load i64, ptr %16, align 8, !tbaa !14
  %93 = load i64, ptr %13, align 8, !tbaa !14
  %94 = icmp ugt i64 %92, %93
  br i1 %94, label %95, label %97

95:                                               ; preds = %87
  %96 = load i64, ptr %16, align 8, !tbaa !14
  store i64 %96, ptr %13, align 8, !tbaa !14
  br label %97

97:                                               ; preds = %95, %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.XNetIface, ptr %98, i32 0, i32 12
  %100 = getelementptr inbounds [256 x i8], ptr %99, i64 0, i64 0
  %101 = call i64 @strnlen(ptr noundef %100, i64 noundef 256) #5
  store i64 %101, ptr %17, align 8, !tbaa !14
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.xcli_wind_, ptr %102, i32 0, i32 1
  %104 = getelementptr inbounds %struct.xcli_size_, ptr %103, i32 0, i32 0
  %105 = load i64, ptr %104, align 8, !tbaa !21
  %106 = icmp ult i64 %105, 132
  br i1 %106, label %107, label %123

107:                                              ; preds = %97
  %108 = load i64, ptr %17, align 8, !tbaa !14
  %109 = icmp ugt i64 %108, 12
  br i1 %109, label %110, label %123

110:                                              ; preds = %107
  store i64 12, ptr %17, align 8, !tbaa !14
  %111 = load ptr, ptr %14, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.XNetIface, ptr %111, i32 0, i32 12
  %113 = getelementptr inbounds [256 x i8], ptr %112, i64 0, i64 9
  store i8 46, ptr %113, align 1, !tbaa !24
  %114 = load ptr, ptr %14, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.XNetIface, ptr %114, i32 0, i32 12
  %116 = getelementptr inbounds [256 x i8], ptr %115, i64 0, i64 10
  store i8 46, ptr %116, align 1, !tbaa !24
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.XNetIface, ptr %117, i32 0, i32 12
  %119 = getelementptr inbounds [256 x i8], ptr %118, i64 0, i64 11
  store i8 46, ptr %119, align 1, !tbaa !24
  %120 = load ptr, ptr %14, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.XNetIface, ptr %120, i32 0, i32 12
  %122 = getelementptr inbounds [256 x i8], ptr %121, i64 0, i64 12
  store i8 0, ptr %122, align 1, !tbaa !24
  br label %123

123:                                              ; preds = %110, %107, %97
  %124 = load i64, ptr %17, align 8, !tbaa !14
  %125 = load i64, ptr %9, align 8, !tbaa !14
  %126 = icmp ugt i64 %124, %125
  br i1 %126, label %127, label %129

127:                                              ; preds = %123
  %128 = load i64, ptr %17, align 8, !tbaa !14
  store i64 %128, ptr %9, align 8, !tbaa !14
  br label %129

129:                                              ; preds = %127, %123
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  store i32 0, ptr %15, align 4
  br label %130

130:                                              ; preds = %129, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  %131 = load i32, ptr %15, align 4
  switch i32 %131, label %309 [
    i32 0, label %132
    i32 4, label %133
  ]

132:                                              ; preds = %130
  br label %133

133:                                              ; preds = %132, %130
  %134 = load i64, ptr %8, align 8, !tbaa !14
  %135 = add i64 %134, 1
  store i64 %135, ptr %8, align 8, !tbaa !14
  br label %38, !llvm.loop !25

136:                                              ; preds = %38
  %137 = load i64, ptr %9, align 8, !tbaa !14
  %138 = icmp ult i64 %137, 5
  br i1 %138, label %139, label %140

139:                                              ; preds = %136
  store i64 5, ptr %9, align 8, !tbaa !14
  br label %140

140:                                              ; preds = %139, %136
  call void @llvm.lifetime.start.p0(i64 2048, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 256, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %141 = load i64, ptr %9, align 8, !tbaa !14
  %142 = icmp ugt i64 %141, 4
  br i1 %142, label %143, label %146

143:                                              ; preds = %140
  %144 = load i64, ptr %9, align 8, !tbaa !14
  %145 = sub i64 %144, 4
  br label %148

146:                                              ; preds = %140
  %147 = load i64, ptr %9, align 8, !tbaa !14
  br label %148

148:                                              ; preds = %146, %143
  %149 = phi i64 [ %145, %143 ], [ %147, %146 ]
  store i64 %149, ptr %21, align 8, !tbaa !14
  %150 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %151 = load i64, ptr %21, align 8, !tbaa !14
  %152 = call i64 @xstrnfill(ptr noundef %150, i64 noundef 2048, i64 noundef %151, i8 noundef signext 32)
  %153 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %154 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef %153, i64 noundef 2048, ptr noundef @.str.63, ptr noundef @.str.84)
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #4
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = call zeroext i8 @XTOPApp_GetIfaceSpacePadding(ptr noundef %155, i8 noundef zeroext 1)
  store i8 %156, ptr %22, align 1, !tbaa !24
  %157 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %158 = load i8, ptr %22, align 1, !tbaa !24
  %159 = zext i8 %158 to i64
  %160 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef %157, i64 noundef 256, i64 noundef %159, i8 noundef signext 32, ptr noundef @.str.63, ptr noundef @.str.85)
  %161 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %162 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %163 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef %161, i64 noundef 2048, ptr noundef @.str.63, ptr noundef %162)
  %164 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %165 = load i8, ptr %22, align 1, !tbaa !24
  %166 = zext i8 %165 to i64
  %167 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef %164, i64 noundef 256, i64 noundef %166, i8 noundef signext 32, ptr noundef @.str.63, ptr noundef @.str.86)
  %168 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %169 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %170 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef %168, i64 noundef 2048, ptr noundef @.str.63, ptr noundef %169)
  %171 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %172 = load i8, ptr %22, align 1, !tbaa !24
  %173 = zext i8 %172 to i64
  %174 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef %171, i64 noundef 256, i64 noundef %173, i8 noundef signext 32, ptr noundef @.str.63, ptr noundef @.str.87)
  %175 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %176 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %177 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef %175, i64 noundef 2048, ptr noundef @.str.63, ptr noundef %176)
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = load i64, ptr %13, align 8, !tbaa !14
  %180 = call zeroext i8 @XTOPApp_GetAddrSpacePadding(ptr noundef %178, i64 noundef %179)
  %181 = zext i8 %180 to i32
  %182 = add nsw i32 %181, 10
  %183 = trunc i32 %182 to i8
  store i8 %183, ptr %22, align 1, !tbaa !24
  %184 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %185 = load i8, ptr %22, align 1, !tbaa !24
  %186 = zext i8 %185 to i64
  %187 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef %184, i64 noundef 256, i64 noundef %186, i8 noundef signext 32, ptr noundef @.str.63, ptr noundef @.str.88)
  %188 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %189 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %190 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef %188, i64 noundef 2048, ptr noundef @.str.63, ptr noundef %189)
  %191 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %192 = load i8, ptr %22, align 1, !tbaa !24
  %193 = zext i8 %192 to i32
  %194 = sub nsw i32 %193, 1
  %195 = sext i32 %194 to i64
  %196 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef %191, i64 noundef 256, i64 noundef %195, i8 noundef signext 32, ptr noundef @.str.63, ptr noundef @.str.89)
  %197 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %198 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %199 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef %197, i64 noundef 2048, ptr noundef @.str.63, ptr noundef %198)
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %202 = call i32 @XWindow_AddAligned(ptr noundef %200, ptr noundef %201, ptr noundef @.str.80, i8 noundef zeroext 2)
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.xmon_args_, ptr %203, i32 0, i32 13
  store i16 0, ptr %204, align 2, !tbaa !27
  %205 = load i32, ptr %10, align 4, !tbaa !15
  %206 = icmp sge i32 %205, 0
  br i1 %206, label %207, label %222

207:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = load i32, ptr %10, align 4, !tbaa !15
  %210 = sext i32 %209 to i64
  %211 = call ptr @XArray_GetData(ptr noundef %208, i64 noundef %210)
  store ptr %211, ptr %23, align 8, !tbaa !5
  %212 = load ptr, ptr %23, align 8, !tbaa !5
  %213 = icmp ne ptr %212, null
  br i1 %213, label %214, label %221

214:                                              ; preds = %207
  %215 = load ptr, ptr %4, align 8, !tbaa !5
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = load i64, ptr %13, align 8, !tbaa !14
  %218 = load ptr, ptr %23, align 8, !tbaa !5
  %219 = load i64, ptr %9, align 8, !tbaa !14
  %220 = call i32 @XTOPApp_AddInterface(ptr noundef %215, ptr noundef %216, i64 noundef %217, ptr noundef %218, i64 noundef %219)
  br label %221

221:                                              ; preds = %214, %207
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br label %222

222:                                              ; preds = %221, %148
  store i64 0, ptr %8, align 8, !tbaa !14
  br label %223

223:                                              ; preds = %256, %222
  %224 = load i64, ptr %8, align 8, !tbaa !14
  %225 = load ptr, ptr %6, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.XArray_, ptr %225, i32 0, i32 8
  %227 = load i64, ptr %226, align 8, !tbaa !16
  %228 = icmp ult i64 %224, %227
  br i1 %228, label %229, label %259

229:                                              ; preds = %223
  %230 = load i32, ptr %10, align 4, !tbaa !15
  %231 = icmp sge i32 %230, 0
  br i1 %231, label %232, label %238

232:                                              ; preds = %229
  %233 = load i64, ptr %8, align 8, !tbaa !14
  %234 = load i32, ptr %10, align 4, !tbaa !15
  %235 = sext i32 %234 to i64
  %236 = icmp eq i64 %233, %235
  br i1 %236, label %237, label %238

237:                                              ; preds = %232
  br label %256

238:                                              ; preds = %232, %229
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %239 = load ptr, ptr %6, align 8, !tbaa !5
  %240 = load i64, ptr %8, align 8, !tbaa !14
  %241 = call ptr @XArray_GetData(ptr noundef %239, i64 noundef %240)
  store ptr %241, ptr %24, align 8, !tbaa !5
  %242 = load ptr, ptr %24, align 8, !tbaa !5
  %243 = icmp ne ptr %242, null
  br i1 %243, label %244, label %255

244:                                              ; preds = %238
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  %246 = load ptr, ptr %5, align 8, !tbaa !5
  %247 = load i64, ptr %13, align 8, !tbaa !14
  %248 = load ptr, ptr %24, align 8, !tbaa !5
  %249 = load i64, ptr %9, align 8, !tbaa !14
  %250 = call i32 @XTOPApp_AddInterface(ptr noundef %245, ptr noundef %246, i64 noundef %247, ptr noundef %248, i64 noundef %249)
  %251 = load ptr, ptr %5, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.xmon_args_, ptr %251, i32 0, i32 13
  %253 = load i16, ptr %252, align 2, !tbaa !27
  %254 = add i16 %253, 1
  store i16 %254, ptr %252, align 2, !tbaa !27
  br label %255

255:                                              ; preds = %244, %238
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  br label %256

256:                                              ; preds = %255, %237
  %257 = load i64, ptr %8, align 8, !tbaa !14
  %258 = add i64 %257, 1
  store i64 %258, ptr %8, align 8, !tbaa !14
  br label %223, !llvm.loop !28

259:                                              ; preds = %223
  %260 = load ptr, ptr %4, align 8, !tbaa !5
  %261 = call zeroext i8 @XTOPApp_GetIfaceSpacePadding(ptr noundef %260, i8 noundef zeroext 0)
  store i8 %261, ptr %22, align 1, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 1, ptr %25) #4
  %262 = load ptr, ptr %4, align 8, !tbaa !5
  %263 = call zeroext i8 @XTOPApp_IsNarrowInterface(ptr noundef %262)
  store i8 %263, ptr %25, align 1, !tbaa !24
  %264 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %265 = load i64, ptr %9, align 8, !tbaa !14
  %266 = add i64 %265, 1
  %267 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef %264, i64 noundef 2048, i64 noundef %266, i8 noundef signext 32, ptr noundef @.str.63, ptr noundef @.str.90)
  %268 = getelementptr inbounds [256 x i8], ptr %20, i64 0, i64 0
  %269 = load i64, ptr %11, align 8, !tbaa !14
  %270 = load i8, ptr %25, align 1, !tbaa !24
  %271 = call i64 @XBytesToUnit(ptr noundef %268, i64 noundef 256, i64 noundef %269, i8 noundef zeroext %270)
  %272 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %273 = load i8, ptr %22, align 1, !tbaa !24
  %274 = zext i8 %273 to i64
  %275 = getelementptr inbounds [256 x i8], ptr %20, i64 0, i64 0
  %276 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef %272, i64 noundef 256, i64 noundef %274, i8 noundef signext 32, ptr noundef @.str.63, ptr noundef %275)
  %277 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %278 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %279 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef %277, i64 noundef 2048, ptr noundef @.str.81, ptr noundef %278)
  %280 = getelementptr inbounds [256 x i8], ptr %20, i64 0, i64 0
  %281 = load i64, ptr %12, align 8, !tbaa !14
  %282 = load i8, ptr %25, align 1, !tbaa !24
  %283 = call i64 @XBytesToUnit(ptr noundef %280, i64 noundef 256, i64 noundef %281, i8 noundef zeroext %282)
  %284 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %285 = load i8, ptr %22, align 1, !tbaa !24
  %286 = zext i8 %285 to i64
  %287 = getelementptr inbounds [256 x i8], ptr %20, i64 0, i64 0
  %288 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef %284, i64 noundef 256, i64 noundef %286, i8 noundef signext 32, ptr noundef @.str.63, ptr noundef %287)
  %289 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %290 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %291 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef %289, i64 noundef 2048, ptr noundef @.str.81, ptr noundef %290)
  %292 = getelementptr inbounds [256 x i8], ptr %20, i64 0, i64 0
  %293 = load i64, ptr %11, align 8, !tbaa !14
  %294 = load i64, ptr %12, align 8, !tbaa !14
  %295 = add i64 %293, %294
  %296 = load i8, ptr %25, align 1, !tbaa !24
  %297 = call i64 @XBytesToUnit(ptr noundef %292, i64 noundef 256, i64 noundef %295, i8 noundef zeroext %296)
  %298 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %299 = load i8, ptr %22, align 1, !tbaa !24
  %300 = zext i8 %299 to i64
  %301 = getelementptr inbounds [256 x i8], ptr %20, i64 0, i64 0
  %302 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef %298, i64 noundef 256, i64 noundef %300, i8 noundef signext 32, ptr noundef @.str.63, ptr noundef %301)
  %303 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %304 = getelementptr inbounds [256 x i8], ptr %19, i64 0, i64 0
  %305 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef %303, i64 noundef 2048, ptr noundef @.str.81, ptr noundef %304)
  %306 = load ptr, ptr %4, align 8, !tbaa !5
  %307 = getelementptr inbounds [2048 x i8], ptr %18, i64 0, i64 0
  %308 = call i32 @XWindow_AddAligned(ptr noundef %306, ptr noundef %307, ptr noundef @.str.71, i8 noundef zeroext 2)
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 256, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 2048, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret i32 %308

309:                                              ; preds = %130
  unreachable
}

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strnlen(ptr noundef, i64 noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(read) "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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 12830}
!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 = !{!11, !11, i64 0}
!15 = !{!13, !13, i64 0}
!16 = !{!17, !11, i64 48}
!17 = !{!"XArray_", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 24, !7, i64 32, !7, i64 33, !7, i64 34, !11, i64 40, !11, i64 48}
!18 = !{!19, !11, i64 8}
!19 = !{!"XNetIface", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !13, i64 80, !7, i64 84, !7, i64 85, !7, i64 341, !7, i64 405, !7, i64 469}
!20 = !{!19, !11, i64 24}
!21 = !{!22, !11, i64 8}
!22 = !{!"xcli_wind_", !13, i64 0, !23, i64 8, !17, i64 24, !7, i64 80}
!23 = !{!"xcli_size_", !11, i64 0, !11, i64 8}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!10, !12, i64 12826}
!28 = distinct !{!28, !26}


; 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"

@.str.63 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.71 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.84 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.85 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.86 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.87 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [6 x i8], align 1

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #1

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

declare zeroext i8 @xstrused(ptr noundef) local_unnamed_addr #2

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

declare i64 @xstrnfill(ptr noundef, i64 noundef, i64 noundef, i8 noundef signext) local_unnamed_addr #2

declare ptr @XArray_GetData(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i64 @xstrnlcpyf(ptr noundef, i64 noundef, i64 noundef, i8 noundef signext, ptr noundef, ...) local_unnamed_addr #2

declare i64 @xstrncat(ptr noundef, i64 noundef, ptr noundef, ...) local_unnamed_addr #2

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

declare void @XArray_Sort(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @XTOPApp_AddInterface(ptr noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @XTOPApp_GetIfaceSpacePadding(ptr noundef, i8 noundef zeroext) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @XTOPApp_IsNarrowInterface(ptr noundef) local_unnamed_addr #3

declare i64 @XBytesToUnit(ptr noundef, i64 noundef, i64 noundef, i8 noundef zeroext) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @XTOPApp_GetAddrSpacePadding(ptr noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @XTOPApp_AddNetworkInfo(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #3 {
  %4 = alloca [2048 x i8], align 16
  %5 = alloca [256 x i8], align 16
  %6 = alloca [256 x i8], align 16
  %7 = getelementptr inbounds i8, ptr %1, i64 12830
  %8 = load i8, ptr %7, align 2, !tbaa !5
  %.not = icmp eq i8 %8, 0
  br i1 %.not, label %10, label %9

9:                                                ; preds = %3
  tail call void @XArray_Sort(ptr noundef %2, ptr noundef nonnull @XTOPApp_CompareIFaces, ptr noundef nonnull %1) #5
  br label %10

10:                                               ; preds = %9, %3
  %11 = getelementptr inbounds i8, ptr %1, i64 8204
  %12 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %11) #6
  %.fr136 = freeze i64 %12
  %13 = getelementptr inbounds i8, ptr %2, i64 48
  %14 = load i64, ptr %13, align 8, !tbaa !13
  %.not135 = icmp eq i64 %14, 0
  br i1 %.not135, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %10
  %.not137 = icmp eq i64 %.fr136, 0
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  br i1 %.not137, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %36
  %.0122.us = phi i64 [ %37, %36 ], [ 0, %.lr.ph ]
  %.092121.us = phi i64 [ %.2.us, %36 ], [ 0, %.lr.ph ]
  %.097119.us = phi i64 [ %.198.us, %36 ], [ 0, %.lr.ph ]
  %.0100118.us = phi i64 [ %.1101.us, %36 ], [ 0, %.lr.ph ]
  %.0102117.us = phi i64 [ %.2104.us, %36 ], [ 0, %.lr.ph ]
  %16 = tail call ptr @XArray_GetData(ptr noundef nonnull %2, i64 noundef %.0122.us) #5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %36, label %18

18:                                               ; preds = %.lr.ph.split.us
  %19 = getelementptr inbounds i8, ptr %16, i64 8
  %20 = load i64, ptr %19, align 8, !tbaa !15
  %21 = add i64 %20, %.097119.us
  %22 = getelementptr inbounds i8, ptr %16, i64 24
  %23 = load i64, ptr %22, align 8, !tbaa !17
  %24 = add i64 %23, %.0100118.us
  %25 = getelementptr inbounds i8, ptr %16, i64 85
  %26 = tail call zeroext i8 @xstrused(ptr noundef nonnull %25) #5
  %27 = getelementptr inbounds i8, ptr %16, i64 405
  %28 = tail call i64 @strnlen(ptr noundef nonnull dereferenceable(1) %27, i64 noundef 64) #6
  %spec.select113.us = tail call i64 @llvm.umax.i64(i64 %28, i64 %.0102117.us)
  %29 = tail call i64 @strnlen(ptr noundef nonnull dereferenceable(1) %25, i64 noundef 256) #6
  %30 = load i64, ptr %15, align 8, !tbaa !18
  %31 = icmp ult i64 %30, 132
  %32 = icmp ugt i64 %29, 12
  %or.cond5.us = select i1 %31, i1 %32, i1 false
  br i1 %or.cond5.us, label %33, label %35

33:                                               ; preds = %18
  %34 = getelementptr inbounds i8, ptr %16, i64 94
  store <4 x i8> <i8 46, i8 46, i8 46, i8 0>, ptr %34, align 1, !tbaa !21
  br label %35

35:                                               ; preds = %33, %18
  %.099.us = phi i64 [ 12, %33 ], [ %29, %18 ]
  %spec.select114.us = tail call i64 @llvm.umax.i64(i64 %.099.us, i64 %.092121.us)
  br label %36

36:                                               ; preds = %35, %.lr.ph.split.us
  %.2104.us = phi i64 [ %spec.select113.us, %35 ], [ %.0102117.us, %.lr.ph.split.us ]
  %.1101.us = phi i64 [ %24, %35 ], [ %.0100118.us, %.lr.ph.split.us ]
  %.198.us = phi i64 [ %21, %35 ], [ %.097119.us, %.lr.ph.split.us ]
  %.2.us = phi i64 [ %spec.select114.us, %35 ], [ %.092121.us, %.lr.ph.split.us ]
  %37 = add nuw i64 %.0122.us, 1
  %38 = load i64, ptr %13, align 8, !tbaa !13
  %39 = icmp ult i64 %37, %38
  br i1 %39, label %.lr.ph.split.us, label %._crit_edge, !llvm.loop !22

.lr.ph.split:                                     ; preds = %.lr.ph, %66
  %.0122 = phi i64 [ %67, %66 ], [ 0, %.lr.ph ]
  %.092121 = phi i64 [ %.2, %66 ], [ 0, %.lr.ph ]
  %.094120 = phi i32 [ %.296, %66 ], [ -1, %.lr.ph ]
  %.097119 = phi i64 [ %.198, %66 ], [ 0, %.lr.ph ]
  %.0100118 = phi i64 [ %.1101, %66 ], [ 0, %.lr.ph ]
  %.0102117 = phi i64 [ %.2104, %66 ], [ 0, %.lr.ph ]
  %40 = tail call ptr @XArray_GetData(ptr noundef nonnull %2, i64 noundef %.0122) #5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %66, label %42

42:                                               ; preds = %.lr.ph.split
  %43 = getelementptr inbounds i8, ptr %40, i64 8
  %44 = load i64, ptr %43, align 8, !tbaa !15
  %45 = add i64 %44, %.097119
  %46 = getelementptr inbounds i8, ptr %40, i64 24
  %47 = load i64, ptr %46, align 8, !tbaa !17
  %48 = add i64 %47, %.0100118
  %49 = getelementptr inbounds i8, ptr %40, i64 85
  %50 = tail call zeroext i8 @xstrused(ptr noundef nonnull %49) #5
  %51 = icmp eq i8 %50, 1
  %52 = icmp slt i32 %.094120, 0
  %or.cond3 = select i1 %51, i1 %52, i1 false
  br i1 %or.cond3, label %53, label %56

53:                                               ; preds = %42
  %54 = tail call i32 @strncmp(ptr noundef nonnull %11, ptr noundef nonnull %49, i64 noundef %.fr136) #6
  %.not112 = icmp eq i32 %54, 0
  %55 = trunc i64 %.0122 to i32
  %spec.select = select i1 %.not112, i32 %55, i32 %.094120
  br label %56

56:                                               ; preds = %53, %42
  %.195 = phi i32 [ %.094120, %42 ], [ %spec.select, %53 ]
  %57 = getelementptr inbounds i8, ptr %40, i64 405
  %58 = tail call i64 @strnlen(ptr noundef nonnull dereferenceable(1) %57, i64 noundef 64) #6
  %spec.select113 = tail call i64 @llvm.umax.i64(i64 %58, i64 %.0102117)
  %59 = tail call i64 @strnlen(ptr noundef nonnull dereferenceable(1) %49, i64 noundef 256) #6
  %60 = load i64, ptr %15, align 8, !tbaa !18
  %61 = icmp ult i64 %60, 132
  %62 = icmp ugt i64 %59, 12
  %or.cond5 = select i1 %61, i1 %62, i1 false
  br i1 %or.cond5, label %63, label %65

63:                                               ; preds = %56
  %64 = getelementptr inbounds i8, ptr %40, i64 94
  store <4 x i8> <i8 46, i8 46, i8 46, i8 0>, ptr %64, align 1, !tbaa !21
  br label %65

65:                                               ; preds = %63, %56
  %.099 = phi i64 [ 12, %63 ], [ %59, %56 ]
  %spec.select114 = tail call i64 @llvm.umax.i64(i64 %.099, i64 %.092121)
  br label %66

66:                                               ; preds = %.lr.ph.split, %65
  %.2104 = phi i64 [ %spec.select113, %65 ], [ %.0102117, %.lr.ph.split ]
  %.1101 = phi i64 [ %48, %65 ], [ %.0100118, %.lr.ph.split ]
  %.198 = phi i64 [ %45, %65 ], [ %.097119, %.lr.ph.split ]
  %.296 = phi i32 [ %.195, %65 ], [ %.094120, %.lr.ph.split ]
  %.2 = phi i64 [ %spec.select114, %65 ], [ %.092121, %.lr.ph.split ]
  %67 = add nuw i64 %.0122, 1
  %68 = load i64, ptr %13, align 8, !tbaa !13
  %69 = icmp ult i64 %67, %68
  br i1 %69, label %.lr.ph.split, label %._crit_edge, !llvm.loop !22

._crit_edge:                                      ; preds = %66, %36, %10
  %.0102.lcssa = phi i64 [ 0, %10 ], [ %.2104.us, %36 ], [ %.2104, %66 ]
  %.0100.lcssa = phi i64 [ 0, %10 ], [ %.1101.us, %36 ], [ %.1101, %66 ]
  %.097.lcssa = phi i64 [ 0, %10 ], [ %.198.us, %36 ], [ %.198, %66 ]
  %.094.lcssa = phi i32 [ -1, %10 ], [ -1, %36 ], [ %.296, %66 ]
  %.092.lcssa = phi i64 [ 0, %10 ], [ %.2.us, %36 ], [ %.2, %66 ]
  %spec.store.select = tail call i64 @llvm.umax.i64(i64 %.092.lcssa, i64 5)
  call void @llvm.lifetime.start.p0(i64 2048, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %6) #5
  %70 = add i64 %spec.store.select, -4
  %71 = call i64 @xstrnfill(ptr noundef nonnull %4, i64 noundef 2048, i64 noundef %70, i8 noundef signext 32) #5
  %72 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef nonnull %4, i64 noundef 2048, ptr noundef nonnull @.str.63, ptr noundef nonnull @.str.84) #5
  %73 = call zeroext i8 @XTOPApp_GetIfaceSpacePadding(ptr noundef %0, i8 noundef zeroext 1)
  %74 = zext i8 %73 to i64
  %75 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef nonnull %5, i64 noundef 256, i64 noundef %74, i8 noundef signext 32, ptr noundef nonnull @.str.63, ptr noundef nonnull @.str.85) #5
  %76 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef nonnull %4, i64 noundef 2048, ptr noundef nonnull @.str.63, ptr noundef nonnull %5) #5
  %77 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef nonnull %5, i64 noundef 256, i64 noundef %74, i8 noundef signext 32, ptr noundef nonnull @.str.63, ptr noundef nonnull @.str.86) #5
  %78 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef nonnull %4, i64 noundef 2048, ptr noundef nonnull @.str.63, ptr noundef nonnull %5) #5
  %79 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef nonnull %5, i64 noundef 256, i64 noundef %74, i8 noundef signext 32, ptr noundef nonnull @.str.63, ptr noundef nonnull @.str.87) #5
  %80 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef nonnull %4, i64 noundef 2048, ptr noundef nonnull @.str.63, ptr noundef nonnull %5) #5
  %81 = call zeroext i8 @XTOPApp_GetAddrSpacePadding(ptr noundef %0, i64 noundef %.0102.lcssa)
  %82 = add i8 %81, 10
  %83 = zext i8 %82 to i64
  %84 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef nonnull %5, i64 noundef 256, i64 noundef %83, i8 noundef signext 32, ptr noundef nonnull @.str.63, ptr noundef nonnull @.str.88) #5
  %85 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef nonnull %4, i64 noundef 2048, ptr noundef nonnull @.str.63, ptr noundef nonnull %5) #5
  %86 = add nsw i64 %83, -1
  %87 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef nonnull %5, i64 noundef 256, i64 noundef %86, i8 noundef signext 32, ptr noundef nonnull @.str.63, ptr noundef nonnull @.str.89) #5
  %88 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef nonnull %4, i64 noundef 2048, ptr noundef nonnull @.str.63, ptr noundef nonnull %5) #5
  %89 = call i32 @XWindow_AddAligned(ptr noundef %0, ptr noundef nonnull %4, ptr noundef nonnull @.str.80, i8 noundef zeroext 2) #5
  %90 = getelementptr inbounds i8, ptr %1, i64 12826
  store i16 0, ptr %90, align 2, !tbaa !24
  %91 = icmp sgt i32 %.094.lcssa, -1
  br i1 %91, label %92, label %.thread

92:                                               ; preds = %._crit_edge
  %93 = zext nneg i32 %.094.lcssa to i64
  %94 = call ptr @XArray_GetData(ptr noundef nonnull %2, i64 noundef %93) #5
  %.not110 = icmp eq ptr %94, null
  br i1 %.not110, label %97, label %95

95:                                               ; preds = %92
  %96 = call i32 @XTOPApp_AddInterface(ptr noundef %0, ptr noundef nonnull %1, i64 noundef %.0102.lcssa, ptr noundef nonnull %94, i64 noundef %spec.store.select)
  br label %97

97:                                               ; preds = %92, %95
  %98 = load i64, ptr %13, align 8, !tbaa !13
  %.not138 = icmp eq i64 %98, 0
  br i1 %.not138, label %._crit_edge134, label %.lr.ph133

.thread:                                          ; preds = %._crit_edge
  %99 = load i64, ptr %13, align 8, !tbaa !13
  %.not138141 = icmp eq i64 %99, 0
  br i1 %.not138141, label %._crit_edge134, label %.lr.ph133.split.us.preheader

.lr.ph133:                                        ; preds = %97
  %100 = zext nneg i32 %.094.lcssa to i64
  br i1 %91, label %.lr.ph133.split, label %.lr.ph133.split.us.preheader

.lr.ph133.split.us.preheader:                     ; preds = %.thread, %.lr.ph133
  br label %.lr.ph133.split.us

.lr.ph133.split.us:                               ; preds = %.lr.ph133.split.us.preheader, %106
  %.1131.us = phi i64 [ %107, %106 ], [ 0, %.lr.ph133.split.us.preheader ]
  %101 = call ptr @XArray_GetData(ptr noundef nonnull %2, i64 noundef %.1131.us) #5
  %.not111.us = icmp eq ptr %101, null
  br i1 %.not111.us, label %106, label %102

102:                                              ; preds = %.lr.ph133.split.us
  %103 = call i32 @XTOPApp_AddInterface(ptr noundef %0, ptr noundef %1, i64 noundef %.0102.lcssa, ptr noundef nonnull %101, i64 noundef %spec.store.select)
  %104 = load i16, ptr %90, align 2, !tbaa !24
  %105 = add i16 %104, 1
  store i16 %105, ptr %90, align 2, !tbaa !24
  br label %106

106:                                              ; preds = %102, %.lr.ph133.split.us
  %107 = add nuw i64 %.1131.us, 1
  %108 = load i64, ptr %13, align 8, !tbaa !13
  %109 = icmp ult i64 %107, %108
  br i1 %109, label %.lr.ph133.split.us, label %._crit_edge134, !llvm.loop !25

.lr.ph133.split:                                  ; preds = %.lr.ph133, %117
  %.1131 = phi i64 [ %118, %117 ], [ 0, %.lr.ph133 ]
  %110 = icmp eq i64 %.1131, %100
  br i1 %110, label %117, label %111

111:                                              ; preds = %.lr.ph133.split
  %112 = call ptr @XArray_GetData(ptr noundef nonnull %2, i64 noundef %.1131) #5
  %.not111 = icmp eq ptr %112, null
  br i1 %.not111, label %117, label %113

113:                                              ; preds = %111
  %114 = call i32 @XTOPApp_AddInterface(ptr noundef %0, ptr noundef %1, i64 noundef %.0102.lcssa, ptr noundef nonnull %112, i64 noundef %spec.store.select)
  %115 = load i16, ptr %90, align 2, !tbaa !24
  %116 = add i16 %115, 1
  store i16 %116, ptr %90, align 2, !tbaa !24
  br label %117

117:                                              ; preds = %111, %113, %.lr.ph133.split
  %118 = add nuw i64 %.1131, 1
  %119 = load i64, ptr %13, align 8, !tbaa !13
  %120 = icmp ult i64 %118, %119
  br i1 %120, label %.lr.ph133.split, label %._crit_edge134, !llvm.loop !25

._crit_edge134:                                   ; preds = %106, %117, %.thread, %97
  %121 = call zeroext i8 @XTOPApp_GetIfaceSpacePadding(ptr noundef %0, i8 noundef zeroext 0)
  %122 = call zeroext i8 @XTOPApp_IsNarrowInterface(ptr noundef %0)
  %123 = add i64 %spec.store.select, 1
  %124 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef nonnull %4, i64 noundef 2048, i64 noundef %123, i8 noundef signext 32, ptr noundef nonnull @.str.63, ptr noundef nonnull @.str.90) #5
  %125 = call i64 @XBytesToUnit(ptr noundef nonnull %6, i64 noundef 256, i64 noundef %.097.lcssa, i8 noundef zeroext %122) #5
  %126 = zext i8 %121 to i64
  %127 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef nonnull %5, i64 noundef 256, i64 noundef %126, i8 noundef signext 32, ptr noundef nonnull @.str.63, ptr noundef nonnull %6) #5
  %128 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef nonnull %4, i64 noundef 2048, ptr noundef nonnull @.str.81, ptr noundef nonnull %5) #5
  %129 = call i64 @XBytesToUnit(ptr noundef nonnull %6, i64 noundef 256, i64 noundef %.0100.lcssa, i8 noundef zeroext %122) #5
  %130 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef nonnull %5, i64 noundef 256, i64 noundef %126, i8 noundef signext 32, ptr noundef nonnull @.str.63, ptr noundef nonnull %6) #5
  %131 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef nonnull %4, i64 noundef 2048, ptr noundef nonnull @.str.81, ptr noundef nonnull %5) #5
  %132 = add i64 %.097.lcssa, %.0100.lcssa
  %133 = call i64 @XBytesToUnit(ptr noundef nonnull %6, i64 noundef 256, i64 noundef %132, i8 noundef zeroext %122) #5
  %134 = call i64 (ptr, i64, i64, i8, ptr, ...) @xstrnlcpyf(ptr noundef nonnull %5, i64 noundef 256, i64 noundef %126, i8 noundef signext 32, ptr noundef nonnull @.str.63, ptr noundef nonnull %6) #5
  %135 = call i64 (ptr, i64, ptr, ...) @xstrncat(ptr noundef nonnull %4, i64 noundef 2048, ptr noundef nonnull @.str.81, ptr noundef nonnull %5) #5
  %136 = call i32 @XWindow_AddAligned(ptr noundef %0, ptr noundef nonnull %4, ptr noundef nonnull @.str.71, i8 noundef zeroext 2) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 2048, ptr nonnull %4) #5
  ret i32 %136
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strnlen(ptr nocapture noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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, !8, i64 12830}
!6 = !{!"xmon_args_", !7, i64 0, !8, i64 8, !8, i64 9, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 4108, !8, i64 8204, !8, i64 8460, !8, i64 8716, !8, i64 10764, !10, i64 12816, !11, i64 12824, !11, i64 12826, !11, i64 12828, !8, i64 12830, !12, i64 12832}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"short", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!14, !10, i64 48}
!14 = !{!"XArray_", !7, i64 0, !7, i64 8, !12, i64 16, !7, i64 24, !8, i64 32, !8, i64 33, !8, i64 34, !10, i64 40, !10, i64 48}
!15 = !{!16, !10, i64 8}
!16 = !{!"XNetIface", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !12, i64 80, !8, i64 84, !8, i64 85, !8, i64 341, !8, i64 405, !8, i64 469}
!17 = !{!16, !10, i64 24}
!18 = !{!19, !10, i64 8}
!19 = !{!"xcli_wind_", !12, i64 0, !20, i64 8, !14, i64 24, !8, i64 80}
!20 = !{!"xcli_size_", !10, i64 0, !10, i64 8}
!21 = !{!8, !8, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!6, !11, i64 12826}
!25 = distinct !{!25, !23}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass