; LLVM IR from xhub/reshop :: gui/external/imgui/imgui_tables.ll (ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable)

; 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.ImGuiTable = type <{ i32, i32, ptr, ptr, %struct.ImSpan, %struct.ImSpan.41, %struct.ImSpan.42, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i16, i16, float, float, float, float, float, float, i32, i32, [2 x i32], i32, i32, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImRect, ptr, ptr, %struct.ImGuiTextBuffer, ptr, %struct.ImGuiTableInstanceData, %struct.ImVector.43, %struct.ImGuiTableColumnSortSpecs, [4 x i8], %struct.ImVector.44, %struct.ImGuiTableSortSpecs, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, [6 x i8] }>
%struct.ImSpan = type { ptr, ptr }
%struct.ImSpan.41 = type { ptr, ptr }
%struct.ImSpan.42 = type { ptr, ptr }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImVec2 = type { float, float }
%struct.ImGuiTextBuffer = type { %struct.ImVector.28 }
%struct.ImVector.28 = type { i32, i32, ptr }
%struct.ImGuiTableInstanceData = type { i32, float, float, float, i32, i32 }
%struct.ImVector.43 = type { i32, i32, ptr }
%struct.ImGuiTableColumnSortSpecs = type <{ i32, i16, i16, i8, [3 x i8] }>
%struct.ImVector.44 = type { i32, i32, ptr }
%struct.ImGuiTableSortSpecs = type <{ ptr, i32, i8, [3 x i8] }>
%struct.ImGuiTableColumn = type <{ i32, float, float, float, float, float, float, float, float, %struct.ImRect, i32, float, float, float, float, float, float, float, i16, i16, i16, i16, i16, i16, i16, i16, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }>

@.str.1 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [40 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable = external hidden unnamed_addr constant [49 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [38 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i8 @_ZL32TableGetColumnAvailSortDirectionP16ImGuiTableColumni(ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.ImGuiTable, ptr %17, i32 0, i32 1
  %19 = load i32, ptr %18, align 4, !tbaa !9
  %20 = and i32 %19, 8
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %23

22:                                               ; preds = %1
  br label %25

23:                                               ; preds = %1
  call void @__assert_fail(ptr noundef @.str.67, ptr noundef @.str.1, i32 noundef 2905, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable) #4
  unreachable

24:                                               ; No predecessors!
  br label %25

25:                                               ; preds = %24, %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #5
  store i32 0, ptr %3, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  store i64 0, ptr %4, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !28
  br label %26

26:                                               ; preds = %78, %25
  %27 = load i32, ptr %5, align 4, !tbaa !28
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.ImGuiTable, ptr %28, i32 0, i32 13
  %30 = load i32, ptr %29, align 4, !tbaa !31
  %31 = icmp slt i32 %27, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %26
  store i32 2, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  br label %81

33:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %34 = load ptr, ptr %2, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ImGuiTable, ptr %34, i32 0, i32 4
  %36 = load i32, ptr %5, align 4, !tbaa !28
  %37 = call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %35, i32 noundef %36)
  store ptr %37, ptr %7, align 8, !tbaa !5
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %38, i32 0, i32 23
  %40 = load i16, ptr %39, align 2, !tbaa !32
  %41 = sext i16 %40 to i32
  %42 = icmp ne i32 %41, -1
  br i1 %42, label %43, label %51

43:                                               ; preds = %33
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %44, i32 0, i32 27
  %46 = load i8, ptr %45, align 2, !tbaa !34, !range !35, !noundef !36
  %47 = trunc i8 %46 to i1
  br i1 %47, label %51, label %48

48:                                               ; preds = %43
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %49, i32 0, i32 23
  store i16 -1, ptr %50, align 2, !tbaa !32
  br label %51

51:                                               ; preds = %48, %43, %33
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %52, i32 0, i32 23
  %54 = load i16, ptr %53, align 2, !tbaa !32
  %55 = sext i16 %54 to i32
  %56 = icmp eq i32 %55, -1
  br i1 %56, label %57, label %58

57:                                               ; preds = %51
  store i32 4, ptr %6, align 4
  br label %75

58:                                               ; preds = %51
  %59 = load i32, ptr %3, align 4, !tbaa !28
  %60 = add nsw i32 %59, 1
  store i32 %60, ptr %3, align 4, !tbaa !28
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %61, i32 0, i32 23
  %63 = load i16, ptr %62, align 2, !tbaa !32
  %64 = sext i16 %63 to i32
  %65 = zext i32 %64 to i64
  %66 = shl i64 1, %65
  %67 = load i64, ptr %4, align 8, !tbaa !29
  %68 = or i64 %67, %66
  store i64 %68, ptr %4, align 8, !tbaa !29
  %69 = load i32, ptr %3, align 4, !tbaa !28
  %70 = icmp slt i32 %69, 64
  br i1 %70, label %71, label %72

71:                                               ; preds = %58
  br label %74

72:                                               ; preds = %58
  call void @__assert_fail(ptr noundef @.str.68, ptr noundef @.str.1, i32 noundef 2919, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable) #4
  unreachable

73:                                               ; No predecessors!
  br label %74

74:                                               ; preds = %73, %71
  store i32 0, ptr %6, align 4
  br label %75

75:                                               ; preds = %74, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %76 = load i32, ptr %6, align 4
  switch i32 %76, label %272 [
    i32 0, label %77
    i32 4, label %78
  ]

77:                                               ; preds = %75
  br label %78

78:                                               ; preds = %77, %75
  %79 = load i32, ptr %5, align 4, !tbaa !28
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %5, align 4, !tbaa !28
  br label %26, !llvm.loop !37

81:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  %82 = load i32, ptr %3, align 4, !tbaa !28
  %83 = zext i32 %82 to i64
  %84 = shl i64 1, %83
  %85 = load i64, ptr %4, align 8, !tbaa !29
  %86 = add i64 %85, 1
  %87 = icmp ne i64 %84, %86
  %88 = zext i1 %87 to i8
  store i8 %88, ptr %8, align 1, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #5
  %89 = load i32, ptr %3, align 4, !tbaa !28
  %90 = icmp sgt i32 %89, 1
  br i1 %90, label %91, label %98

91:                                               ; preds = %81
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ImGuiTable, ptr %92, i32 0, i32 1
  %94 = load i32, ptr %93, align 4, !tbaa !9
  %95 = and i32 %94, 67108864
  %96 = icmp ne i32 %95, 0
  %97 = xor i1 %96, true
  br label %98

98:                                               ; preds = %91, %81
  %99 = phi i1 [ false, %81 ], [ %97, %91 ]
  %100 = zext i1 %99 to i8
  store i8 %100, ptr %9, align 1, !tbaa !39
  %101 = load i8, ptr %8, align 1, !tbaa !39, !range !35, !noundef !36
  %102 = trunc i8 %101 to i1
  br i1 %102, label %106, label %103

103:                                              ; preds = %98
  %104 = load i8, ptr %9, align 1, !tbaa !39, !range !35, !noundef !36
  %105 = trunc i8 %104 to i1
  br i1 %105, label %106, label %215

106:                                              ; preds = %103, %98
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store i64 0, ptr %10, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !28
  br label %107

107:                                              ; preds = %210, %106
  %108 = load i32, ptr %11, align 4, !tbaa !28
  %109 = load i32, ptr %3, align 4, !tbaa !28
  %110 = icmp slt i32 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  store i32 5, ptr %6, align 4
  br label %213

112:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 -1, ptr %12, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !28
  br label %113

113:                                              ; preds = %159, %112
  %114 = load i32, ptr %13, align 4, !tbaa !28
  %115 = load ptr, ptr %2, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.ImGuiTable, ptr %115, i32 0, i32 13
  %117 = load i32, ptr %116, align 4, !tbaa !31
  %118 = icmp slt i32 %114, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %113
  store i32 8, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %162

120:                                              ; preds = %113
  %121 = load i64, ptr %10, align 8, !tbaa !29
  %122 = load i32, ptr %13, align 4, !tbaa !28
  %123 = sext i32 %122 to i64
  %124 = shl i64 1, %123
  %125 = and i64 %121, %124
  %126 = icmp eq i64 %125, 0
  br i1 %126, label %127, label %158

127:                                              ; preds = %120
  %128 = load ptr, ptr %2, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ImGuiTable, ptr %128, i32 0, i32 4
  %130 = load i32, ptr %13, align 4, !tbaa !28
  %131 = call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %129, i32 noundef %130)
  %132 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %131, i32 0, i32 23
  %133 = load i16, ptr %132, align 2, !tbaa !32
  %134 = sext i16 %133 to i32
  %135 = icmp ne i32 %134, -1
  br i1 %135, label %136, label %158

136:                                              ; preds = %127
  %137 = load i32, ptr %12, align 4, !tbaa !28
  %138 = icmp eq i32 %137, -1
  br i1 %138, label %155, label %139

139:                                              ; preds = %136
  %140 = load ptr, ptr %2, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.ImGuiTable, ptr %140, i32 0, i32 4
  %142 = load i32, ptr %13, align 4, !tbaa !28
  %143 = call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %141, i32 noundef %142)
  %144 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %143, i32 0, i32 23
  %145 = load i16, ptr %144, align 2, !tbaa !32
  %146 = sext i16 %145 to i32
  %147 = load ptr, ptr %2, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.ImGuiTable, ptr %147, i32 0, i32 4
  %149 = load i32, ptr %12, align 4, !tbaa !28
  %150 = call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %148, i32 noundef %149)
  %151 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %150, i32 0, i32 23
  %152 = load i16, ptr %151, align 2, !tbaa !32
  %153 = sext i16 %152 to i32
  %154 = icmp slt i32 %146, %153
  br i1 %154, label %155, label %157

155:                                              ; preds = %139, %136
  %156 = load i32, ptr %13, align 4, !tbaa !28
  store i32 %156, ptr %12, align 4, !tbaa !28
  br label %157

157:                                              ; preds = %155, %139
  br label %158

158:                                              ; preds = %157, %127, %120
  br label %159

159:                                              ; preds = %158
  %160 = load i32, ptr %13, align 4, !tbaa !28
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %13, align 4, !tbaa !28
  br label %113, !llvm.loop !40

162:                                              ; preds = %119
  %163 = load i32, ptr %12, align 4, !tbaa !28
  %164 = icmp ne i32 %163, -1
  br i1 %164, label %165, label %166

165:                                              ; preds = %162
  br label %168

166:                                              ; preds = %162
  call void @__assert_fail(ptr noundef @.str.69, ptr noundef @.str.1, i32 noundef 2936, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable) #4
  unreachable

167:                                              ; No predecessors!
  br label %168

168:                                              ; preds = %167, %165
  %169 = load i32, ptr %12, align 4, !tbaa !28
  %170 = zext i32 %169 to i64
  %171 = shl i64 1, %170
  %172 = load i64, ptr %10, align 8, !tbaa !29
  %173 = or i64 %172, %171
  store i64 %173, ptr %10, align 8, !tbaa !29
  %174 = load i32, ptr %11, align 4, !tbaa !28
  %175 = trunc i32 %174 to i16
  %176 = load ptr, ptr %2, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.ImGuiTable, ptr %176, i32 0, i32 4
  %178 = load i32, ptr %12, align 4, !tbaa !28
  %179 = call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %177, i32 noundef %178)
  %180 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %179, i32 0, i32 23
  store i16 %175, ptr %180, align 2, !tbaa !32
  %181 = load i8, ptr %9, align 1, !tbaa !39, !range !35, !noundef !36
  %182 = trunc i8 %181 to i1
  br i1 %182, label %183, label %206

183:                                              ; preds = %168
  store i32 1, ptr %3, align 4, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !28
  br label %184

184:                                              ; preds = %202, %183
  %185 = load i32, ptr %14, align 4, !tbaa !28
  %186 = load ptr, ptr %2, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.ImGuiTable, ptr %186, i32 0, i32 13
  %188 = load i32, ptr %187, align 4, !tbaa !31
  %189 = icmp slt i32 %185, %188
  br i1 %189, label %191, label %190

190:                                              ; preds = %184
  store i32 11, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %205

191:                                              ; preds = %184
  %192 = load i32, ptr %14, align 4, !tbaa !28
  %193 = load i32, ptr %12, align 4, !tbaa !28
  %194 = icmp ne i32 %192, %193
  br i1 %194, label %195, label %201

195:                                              ; preds = %191
  %196 = load ptr, ptr %2, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.ImGuiTable, ptr %196, i32 0, i32 4
  %198 = load i32, ptr %14, align 4, !tbaa !28
  %199 = call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %197, i32 noundef %198)
  %200 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %199, i32 0, i32 23
  store i16 -1, ptr %200, align 2, !tbaa !32
  br label %201

201:                                              ; preds = %195, %191
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %14, align 4, !tbaa !28
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %14, align 4, !tbaa !28
  br label %184, !llvm.loop !41

205:                                              ; preds = %190
  store i32 5, ptr %6, align 4
  br label %207

206:                                              ; preds = %168
  store i32 0, ptr %6, align 4
  br label %207

207:                                              ; preds = %206, %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  %208 = load i32, ptr %6, align 4
  switch i32 %208, label %213 [
    i32 0, label %209
  ]

209:                                              ; preds = %207
  br label %210

210:                                              ; preds = %209
  %211 = load i32, ptr %11, align 4, !tbaa !28
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %11, align 4, !tbaa !28
  br label %107, !llvm.loop !42

213:                                              ; preds = %207, %111
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %214

214:                                              ; preds = %213
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %215

215:                                              ; preds = %214, %103
  %216 = load i32, ptr %3, align 4, !tbaa !28
  %217 = icmp eq i32 %216, 0
  br i1 %217, label %218, label %267

218:                                              ; preds = %215
  %219 = load ptr, ptr %2, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.ImGuiTable, ptr %219, i32 0, i32 1
  %221 = load i32, ptr %220, align 4, !tbaa !9
  %222 = and i32 %221, 134217728
  %223 = icmp ne i32 %222, 0
  br i1 %223, label %267, label %224

224:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !28
  br label %225

225:                                              ; preds = %262, %224
  %226 = load i32, ptr %15, align 4, !tbaa !28
  %227 = load ptr, ptr %2, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.ImGuiTable, ptr %227, i32 0, i32 13
  %229 = load i32, ptr %228, align 4, !tbaa !31
  %230 = icmp slt i32 %226, %229
  br i1 %230, label %232, label %231

231:                                              ; preds = %225
  store i32 14, ptr %6, align 4
  br label %265

232:                                              ; preds = %225
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %233 = load ptr, ptr %2, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.ImGuiTable, ptr %233, i32 0, i32 4
  %235 = load i32, ptr %15, align 4, !tbaa !28
  %236 = call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %234, i32 noundef %235)
  store ptr %236, ptr %16, align 8, !tbaa !5
  %237 = load ptr, ptr %16, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %237, i32 0, i32 27
  %239 = load i8, ptr %238, align 2, !tbaa !34, !range !35, !noundef !36
  %240 = trunc i8 %239 to i1
  br i1 %240, label %241, label %258

241:                                              ; preds = %232
  %242 = load ptr, ptr %16, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %242, i32 0, i32 0
  %244 = load i32, ptr %243, align 4, !tbaa !43
  %245 = and i32 %244, 512
  %246 = icmp ne i32 %245, 0
  br i1 %246, label %258, label %247

247:                                              ; preds = %241
  store i32 1, ptr %3, align 4, !tbaa !28
  %248 = load ptr, ptr %16, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %248, i32 0, i32 23
  store i16 0, ptr %249, align 2, !tbaa !32
  %250 = load ptr, ptr %16, align 8, !tbaa !5
  %251 = call noundef zeroext i8 @_ZL32TableGetColumnAvailSortDirectionP16ImGuiTableColumni(ptr noundef %250, i32 noundef 0)
  %252 = load ptr, ptr %16, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %252, i32 0, i32 38
  %254 = load i8, ptr %253, align 1
  %255 = and i8 %251, 3
  %256 = and i8 %254, -4
  %257 = or i8 %256, %255
  store i8 %257, ptr %253, align 1
  store i32 14, ptr %6, align 4
  br label %259

258:                                              ; preds = %241, %232
  store i32 0, ptr %6, align 4
  br label %259

259:                                              ; preds = %258, %247
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  %260 = load i32, ptr %6, align 4
  switch i32 %260, label %265 [
    i32 0, label %261
  ]

261:                                              ; preds = %259
  br label %262

262:                                              ; preds = %261
  %263 = load i32, ptr %15, align 4, !tbaa !28
  %264 = add nsw i32 %263, 1
  store i32 %264, ptr %15, align 4, !tbaa !28
  br label %225, !llvm.loop !44

265:                                              ; preds = %259, %231
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %266

266:                                              ; preds = %265
  br label %267

267:                                              ; preds = %266, %218, %215
  %268 = load i32, ptr %3, align 4, !tbaa !28
  %269 = trunc i32 %268 to i16
  %270 = load ptr, ptr %2, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.ImGuiTable, ptr %270, i32 0, i32 65
  store i16 %269, ptr %271, align 8, !tbaa !45
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #5
  ret void

272:                                              ; preds = %75
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn nounwind "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 = { inlinehint mustprogress 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 #3 = { mustprogress 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 = { noreturn nounwind }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 4}
!10 = !{!"_ZTS10ImGuiTable", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16, !12, i64 24, !13, i64 40, !14, i64 56, !6, i64 72, !6, i64 80, !6, i64 88, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !15, i64 120, !15, i64 122, !16, i64 124, !16, i64 128, !16, i64 132, !16, i64 136, !16, i64 140, !16, i64 144, !11, i64 148, !11, i64 150, !11, i64 152, !7, i64 156, !11, i64 164, !11, i64 168, !16, i64 172, !16, i64 176, !16, i64 180, !16, i64 184, !16, i64 188, !16, i64 192, !16, i64 196, !16, i64 200, !16, i64 204, !16, i64 208, !16, i64 212, !16, i64 216, !16, i64 220, !16, i64 224, !16, i64 228, !16, i64 232, !16, i64 236, !17, i64 240, !17, i64 256, !17, i64 272, !17, i64 288, !17, i64 304, !17, i64 320, !17, i64 336, !17, i64 352, !17, i64 368, !6, i64 384, !6, i64 392, !19, i64 400, !6, i64 416, !21, i64 424, !22, i64 448, !23, i64 464, !25, i64 480, !26, i64 496, !15, i64 512, !15, i64 514, !15, i64 516, !15, i64 518, !15, i64 520, !15, i64 522, !15, i64 524, !15, i64 526, !15, i64 528, !15, i64 530, !15, i64 532, !15, i64 534, !15, i64 536, !15, i64 538, !15, i64 540, !15, i64 542, !15, i64 544, !15, i64 546, !15, i64 548, !15, i64 550, !15, i64 552, !15, i64 554, !15, i64 556, !15, i64 558, !15, i64 560, !15, i64 562, !15, i64 564, !27, i64 566, !27, i64 567, !27, i64 568, !27, i64 569, !27, i64 570, !27, i64 571, !27, i64 572, !27, i64 573, !27, i64 574, !27, i64 575, !27, i64 576, !27, i64 577, !27, i64 578, !27, i64 579, !27, i64 580, !27, i64 581, !27, i64 582, !27, i64 583, !27, i64 584, !27, i64 585}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS6ImSpanI16ImGuiTableColumnE", !6, i64 0, !6, i64 8}
!13 = !{!"_ZTS6ImSpanIsE", !6, i64 0, !6, i64 8}
!14 = !{!"_ZTS6ImSpanI18ImGuiTableCellDataE", !6, i64 0, !6, i64 8}
!15 = !{!"short", !7, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTS6ImRect", !18, i64 0, !18, i64 8}
!18 = !{!"_ZTS6ImVec2", !16, i64 0, !16, i64 4}
!19 = !{!"_ZTS15ImGuiTextBuffer", !20, i64 0}
!20 = !{!"_ZTS8ImVectorIcE", !11, i64 0, !11, i64 4, !6, i64 8}
!21 = !{!"_ZTS22ImGuiTableInstanceData", !11, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !11, i64 16, !11, i64 20}
!22 = !{!"_ZTS8ImVectorI22ImGuiTableInstanceDataE", !11, i64 0, !11, i64 4, !6, i64 8}
!23 = !{!"_ZTS25ImGuiTableColumnSortSpecs", !11, i64 0, !15, i64 4, !15, i64 6, !24, i64 8}
!24 = !{!"_ZTS18ImGuiSortDirection", !7, i64 0}
!25 = !{!"_ZTS8ImVectorI25ImGuiTableColumnSortSpecsE", !11, i64 0, !11, i64 4, !6, i64 8}
!26 = !{!"_ZTS19ImGuiTableSortSpecs", !6, i64 0, !11, i64 8, !27, i64 12}
!27 = !{!"bool", !7, i64 0}
!28 = !{!11, !11, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"long long", !7, i64 0}
!31 = !{!10, !11, i64 108}
!32 = !{!33, !15, i64 94}
!33 = !{!"_ZTS16ImGuiTableColumn", !11, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !17, i64 36, !11, i64 52, !16, i64 56, !16, i64 60, !16, i64 64, !16, i64 68, !16, i64 72, !16, i64 76, !16, i64 80, !15, i64 84, !15, i64 86, !15, i64 88, !15, i64 90, !15, i64 92, !15, i64 94, !15, i64 96, !15, i64 98, !15, i64 100, !27, i64 102, !27, i64 103, !27, i64 104, !27, i64 105, !27, i64 106, !27, i64 107, !27, i64 108, !27, i64 109, !7, i64 110, !7, i64 111, !7, i64 112, !7, i64 113, !7, i64 113, !7, i64 113, !7, i64 114}
!34 = !{!33, !27, i64 102}
!35 = !{i8 0, i8 2}
!36 = !{}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!27, !27, i64 0}
!40 = distinct !{!40, !38}
!41 = distinct !{!41, !38}
!42 = distinct !{!42, !38}
!43 = !{!33, !11, i64 0}
!44 = distinct !{!44, !38}
!45 = !{!10, !15, i64 512}


; 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.1 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [40 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable = external hidden unnamed_addr constant [49 x i8], align 1
@.str.68 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.69 = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i8 @_ZL32TableGetColumnAvailSortDirectionP16ImGuiTableColumni(ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable(ptr noundef %0) local_unnamed_addr #2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 4
  %3 = load i32, ptr %2, align 4, !tbaa !5
  %4 = and i32 %3, 8
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %9, label %.preheader102

.preheader102:                                    ; preds = %1
  %5 = getelementptr inbounds i8, ptr %0, i64 108
  %6 = load i32, ptr %5, align 4, !tbaa !27
  %7 = icmp sgt i32 %6, 0
  br i1 %7, label %.lr.ph, label %.loopexit.thread

.lr.ph:                                           ; preds = %.preheader102
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  br label %14

9:                                                ; preds = %1
  tail call void @__assert_fail(ptr noundef nonnull @.str.67, ptr noundef nonnull @.str.1, i32 noundef 2905, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable) #3
  unreachable

._crit_edge:                                      ; preds = %.thread
  %10 = zext nneg i32 %.1 to i64
  %11 = shl nuw i64 1, %10
  %12 = add i64 %.174, 1
  %.not80 = icmp ne i64 %11, %12
  %13 = icmp sgt i32 %.1, 1
  br i1 %13, label %35, label %38

14:                                               ; preds = %.lr.ph, %.thread
  %.0111 = phi i32 [ 0, %.lr.ph ], [ %.1, %.thread ]
  %.073110 = phi i64 [ 0, %.lr.ph ], [ %.174, %.thread ]
  %.075109 = phi i32 [ 0, %.lr.ph ], [ %32, %.thread ]
  %15 = tail call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %8, i32 noundef %.075109)
  %16 = getelementptr inbounds i8, ptr %15, i64 94
  %17 = load i16, ptr %16, align 2, !tbaa !28
  %.not87 = icmp eq i16 %17, -1
  br i1 %.not87, label %.thread, label %18

18:                                               ; preds = %14
  %19 = getelementptr inbounds i8, ptr %15, i64 102
  %20 = load i8, ptr %19, align 2, !tbaa !30, !range !31, !noundef !32
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %23, label %22

22:                                               ; preds = %18
  store i16 -1, ptr %16, align 2, !tbaa !28
  br label %.thread

23:                                               ; preds = %18
  %24 = icmp slt i32 %.0111, 63
  br i1 %24, label %26, label %25

25:                                               ; preds = %23
  tail call void @__assert_fail(ptr noundef nonnull @.str.68, ptr noundef nonnull @.str.1, i32 noundef 2919, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable) #3
  unreachable

26:                                               ; preds = %23
  %27 = add nsw i32 %.0111, 1
  %28 = sext i16 %17 to i64
  %29 = and i64 %28, 4294967295
  %30 = shl nuw i64 1, %29
  %31 = or i64 %30, %.073110
  br label %.thread

.thread:                                          ; preds = %14, %22, %26
  %.174 = phi i64 [ %31, %26 ], [ %.073110, %22 ], [ %.073110, %14 ]
  %.1 = phi i32 [ %27, %26 ], [ %.0111, %22 ], [ %.0111, %14 ]
  %32 = add nuw nsw i32 %.075109, 1
  %33 = load i32, ptr %5, align 4, !tbaa !27
  %34 = icmp slt i32 %32, %33
  br i1 %34, label %14, label %._crit_edge, !llvm.loop !33

35:                                               ; preds = %._crit_edge
  %36 = load i32, ptr %2, align 4, !tbaa !5
  %.fr158 = freeze i32 %36
  %37 = and i32 %.fr158, 67108864
  %.not81 = icmp eq i32 %37, 0
  br label %38

38:                                               ; preds = %35, %._crit_edge
  %.fr = phi i1 [ false, %._crit_edge ], [ %.not81, %35 ]
  %brmerge = or i1 %.not80, %.fr
  %39 = icmp sgt i32 %.1, 0
  %or.cond = and i1 %brmerge, %39
  br i1 %or.cond, label %.preheader99.lr.ph, label %.loopexit

.preheader99.lr.ph:                               ; preds = %38
  %40 = getelementptr inbounds i8, ptr %0, i64 24
  br i1 %.fr, label %.preheader99.us, label %.preheader99

.preheader99.us:                                  ; preds = %.preheader99.lr.ph
  %41 = icmp sgt i32 %33, 0
  br i1 %41, label %.lr.ph115.us.preheader, label %.split.us

._crit_edge116.us:                                ; preds = %68
  %.not82.us = icmp eq i32 %.170.us, -1
  br i1 %.not82.us, label %.split.us, label %.preheader98.us

.preheader98.us:                                  ; preds = %._crit_edge116.us
  %42 = tail call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %40, i32 noundef %.170.us)
  %43 = getelementptr inbounds i8, ptr %42, i64 94
  store i16 0, ptr %43, align 2, !tbaa !28
  %44 = load i32, ptr %5, align 4, !tbaa !27
  %45 = icmp sgt i32 %44, 0
  br i1 %45, label %.lr.ph119.us, label %.thread91

.lr.ph119.us:                                     ; preds = %.preheader98.us, %50
  %46 = phi i32 [ %51, %50 ], [ %44, %.preheader98.us ]
  %.067118.us = phi i32 [ %52, %50 ], [ 0, %.preheader98.us ]
  %.not85.us = icmp eq i32 %.067118.us, %.170.us
  br i1 %.not85.us, label %50, label %47

47:                                               ; preds = %.lr.ph119.us
  %48 = tail call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %40, i32 noundef %.067118.us)
  %49 = getelementptr inbounds i8, ptr %48, i64 94
  store i16 -1, ptr %49, align 2, !tbaa !28
  %.pre = load i32, ptr %5, align 4, !tbaa !27
  br label %50

50:                                               ; preds = %47, %.lr.ph119.us
  %51 = phi i32 [ %.pre, %47 ], [ %46, %.lr.ph119.us ]
  %52 = add nuw nsw i32 %.067118.us, 1
  %53 = icmp slt i32 %52, %51
  br i1 %53, label %.lr.ph119.us, label %.thread91, !llvm.loop !35

.lr.ph115.us.preheader:                           ; preds = %.preheader99.us, %68
  %.068114.us = phi i32 [ %69, %68 ], [ 0, %.preheader99.us ]
  %.069113.us = phi i32 [ %.170.us, %68 ], [ -1, %.preheader99.us ]
  %54 = tail call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %40, i32 noundef %.068114.us)
  %55 = getelementptr inbounds i8, ptr %54, i64 94
  %56 = load i16, ptr %55, align 2, !tbaa !28
  %.not86.us = icmp eq i16 %56, -1
  br i1 %.not86.us, label %68, label %57

57:                                               ; preds = %.lr.ph115.us.preheader
  %58 = icmp eq i32 %.069113.us, -1
  br i1 %58, label %67, label %59

59:                                               ; preds = %57
  %60 = tail call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %40, i32 noundef %.068114.us)
  %61 = getelementptr inbounds i8, ptr %60, i64 94
  %62 = load i16, ptr %61, align 2, !tbaa !28
  %63 = tail call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %40, i32 noundef %.069113.us)
  %64 = getelementptr inbounds i8, ptr %63, i64 94
  %65 = load i16, ptr %64, align 2, !tbaa !28
  %66 = icmp slt i16 %62, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %59, %57
  br label %68

68:                                               ; preds = %67, %59, %.lr.ph115.us.preheader
  %.170.us = phi i32 [ %.068114.us, %67 ], [ %.069113.us, %59 ], [ %.069113.us, %.lr.ph115.us.preheader ]
  %69 = add nuw nsw i32 %.068114.us, 1
  %70 = load i32, ptr %5, align 4, !tbaa !27
  %71 = icmp slt i32 %69, %70
  br i1 %71, label %.lr.ph115.us.preheader, label %._crit_edge116.us, !llvm.loop !36

.preheader99:                                     ; preds = %.preheader99.lr.ph, %.thread88
  %.071122 = phi i32 [ %103, %.thread88 ], [ 0, %.preheader99.lr.ph ]
  %.072121 = phi i64 [ %99, %.thread88 ], [ 0, %.preheader99.lr.ph ]
  %72 = load i32, ptr %5, align 4, !tbaa !27
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %.lr.ph115, label %.split.us

._crit_edge116:                                   ; preds = %93
  %.not82 = icmp eq i32 %.170, -1
  br i1 %.not82, label %.split.us, label %.thread88

.lr.ph115:                                        ; preds = %.preheader99, %93
  %indvars.iv = phi i64 [ %indvars.iv.next, %93 ], [ 0, %.preheader99 ]
  %.069113 = phi i32 [ %.170, %93 ], [ -1, %.preheader99 ]
  %74 = shl nuw i64 1, %indvars.iv
  %75 = and i64 %74, %.072121
  %76 = icmp eq i64 %75, 0
  br i1 %76, label %77, label %93

77:                                               ; preds = %.lr.ph115
  %78 = trunc nuw nsw i64 %indvars.iv to i32
  %79 = tail call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %40, i32 noundef %78)
  %80 = getelementptr inbounds i8, ptr %79, i64 94
  %81 = load i16, ptr %80, align 2, !tbaa !28
  %.not86 = icmp eq i16 %81, -1
  br i1 %.not86, label %93, label %82

82:                                               ; preds = %77
  %83 = icmp eq i32 %.069113, -1
  br i1 %83, label %92, label %84

84:                                               ; preds = %82
  %85 = tail call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %40, i32 noundef %78)
  %86 = getelementptr inbounds i8, ptr %85, i64 94
  %87 = load i16, ptr %86, align 2, !tbaa !28
  %88 = tail call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %40, i32 noundef %.069113)
  %89 = getelementptr inbounds i8, ptr %88, i64 94
  %90 = load i16, ptr %89, align 2, !tbaa !28
  %91 = icmp slt i16 %87, %90
  br i1 %91, label %92, label %93

92:                                               ; preds = %84, %82
  br label %93

93:                                               ; preds = %.lr.ph115, %77, %92, %84
  %.170 = phi i32 [ %78, %92 ], [ %.069113, %84 ], [ %.069113, %77 ], [ %.069113, %.lr.ph115 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %94 = load i32, ptr %5, align 4, !tbaa !27
  %95 = sext i32 %94 to i64
  %96 = icmp slt i64 %indvars.iv.next, %95
  br i1 %96, label %.lr.ph115, label %._crit_edge116, !llvm.loop !36

.split.us:                                        ; preds = %.preheader99, %._crit_edge116, %.preheader99.us, %._crit_edge116.us
  tail call void @__assert_fail(ptr noundef nonnull @.str.69, ptr noundef nonnull @.str.1, i32 noundef 2936, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable) #3
  unreachable

.thread88:                                        ; preds = %._crit_edge116
  %97 = zext nneg i32 %.170 to i64
  %98 = shl nuw i64 1, %97
  %99 = or i64 %98, %.072121
  %100 = trunc i32 %.071122 to i16
  %101 = tail call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %40, i32 noundef %.170)
  %102 = getelementptr inbounds i8, ptr %101, i64 94
  store i16 %100, ptr %102, align 2, !tbaa !28
  %103 = add nuw nsw i32 %.071122, 1
  %exitcond.not = icmp eq i32 %103, %.1
  br i1 %exitcond.not, label %.thread91, label %.preheader99, !llvm.loop !37

.loopexit:                                        ; preds = %38
  %104 = icmp eq i32 %.1, 0
  br i1 %104, label %.loopexit.thread, label %.thread91

.loopexit.thread:                                 ; preds = %.preheader102, %.loopexit
  %105 = load i32, ptr %2, align 4, !tbaa !5
  %106 = and i32 %105, 134217728
  %.not83 = icmp eq i32 %106, 0
  br i1 %.not83, label %.preheader, label %.thread91

.preheader:                                       ; preds = %.loopexit.thread
  %107 = load i32, ptr %5, align 4, !tbaa !27
  %108 = icmp sgt i32 %107, 0
  br i1 %108, label %.lr.ph126, label %.thread91

.lr.ph126:                                        ; preds = %.preheader
  %109 = getelementptr inbounds i8, ptr %0, i64 24
  br label %110

110:                                              ; preds = %.lr.ph126, %126
  %.066125 = phi i32 [ 0, %.lr.ph126 ], [ %127, %126 ]
  %111 = tail call noundef nonnull align 4 dereferenceable(115) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %109, i32 noundef %.066125)
  %112 = getelementptr inbounds i8, ptr %111, i64 102
  %113 = load i8, ptr %112, align 2, !tbaa !30, !range !31, !noundef !32
  %114 = trunc nuw i8 %113 to i1
  br i1 %114, label %115, label %126

115:                                              ; preds = %110
  %116 = load i32, ptr %111, align 4, !tbaa !38
  %117 = and i32 %116, 512
  %.not84 = icmp eq i32 %117, 0
  br i1 %.not84, label %118, label %126

118:                                              ; preds = %115
  %119 = getelementptr inbounds i8, ptr %111, i64 94
  store i16 0, ptr %119, align 2, !tbaa !28
  %120 = tail call noundef zeroext i8 @_ZL32TableGetColumnAvailSortDirectionP16ImGuiTableColumni(ptr noundef nonnull %111, i32 noundef 0)
  %121 = getelementptr inbounds i8, ptr %111, i64 113
  %122 = load i8, ptr %121, align 1
  %123 = and i8 %120, 3
  %124 = and i8 %122, -4
  %125 = or disjoint i8 %124, %123
  store i8 %125, ptr %121, align 1
  br label %.thread91

126:                                              ; preds = %115, %110
  %127 = add nuw nsw i32 %.066125, 1
  %128 = load i32, ptr %5, align 4, !tbaa !27
  %129 = icmp slt i32 %127, %128
  br i1 %129, label %110, label %.thread91, !llvm.loop !39

.thread91:                                        ; preds = %126, %.thread88, %50, %.preheader98.us, %.preheader, %118, %.loopexit.thread, %.loopexit
  %.9 = phi i32 [ 0, %.loopexit.thread ], [ %.1, %.loopexit ], [ 1, %118 ], [ 0, %.preheader ], [ 1, %.preheader98.us ], [ 1, %50 ], [ %.1, %.thread88 ], [ 0, %126 ]
  %130 = trunc i32 %.9 to i16
  %131 = getelementptr inbounds i8, ptr %0, i64 512
  store i16 %130, ptr %131, align 8, !tbaa !40
  ret void
}

attributes #0 = { noreturn nounwind "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 4}
!6 = !{!"_ZTS10ImGuiTable", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 40, !13, i64 56, !10, i64 72, !10, i64 80, !10, i64 88, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !14, i64 120, !14, i64 122, !15, i64 124, !15, i64 128, !15, i64 132, !15, i64 136, !15, i64 140, !15, i64 144, !7, i64 148, !7, i64 150, !7, i64 152, !8, i64 156, !7, i64 164, !7, i64 168, !15, i64 172, !15, i64 176, !15, i64 180, !15, i64 184, !15, i64 188, !15, i64 192, !15, i64 196, !15, i64 200, !15, i64 204, !15, i64 208, !15, i64 212, !15, i64 216, !15, i64 220, !15, i64 224, !15, i64 228, !15, i64 232, !15, i64 236, !16, i64 240, !16, i64 256, !16, i64 272, !16, i64 288, !16, i64 304, !16, i64 320, !16, i64 336, !16, i64 352, !16, i64 368, !10, i64 384, !10, i64 392, !18, i64 400, !10, i64 416, !20, i64 424, !21, i64 448, !22, i64 464, !24, i64 480, !25, i64 496, !14, i64 512, !14, i64 514, !14, i64 516, !14, i64 518, !14, i64 520, !14, i64 522, !14, i64 524, !14, i64 526, !14, i64 528, !14, i64 530, !14, i64 532, !14, i64 534, !14, i64 536, !14, i64 538, !14, i64 540, !14, i64 542, !14, i64 544, !14, i64 546, !14, i64 548, !14, i64 550, !14, i64 552, !14, i64 554, !14, i64 556, !14, i64 558, !14, i64 560, !14, i64 562, !14, i64 564, !26, i64 566, !26, i64 567, !26, i64 568, !26, i64 569, !26, i64 570, !26, i64 571, !26, i64 572, !26, i64 573, !26, i64 574, !26, i64 575, !26, i64 576, !26, i64 577, !26, i64 578, !26, i64 579, !26, i64 580, !26, i64 581, !26, i64 582, !26, i64 583, !26, i64 584, !26, i64 585}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS6ImSpanI16ImGuiTableColumnE", !10, i64 0, !10, i64 8}
!12 = !{!"_ZTS6ImSpanIsE", !10, i64 0, !10, i64 8}
!13 = !{!"_ZTS6ImSpanI18ImGuiTableCellDataE", !10, i64 0, !10, i64 8}
!14 = !{!"short", !8, i64 0}
!15 = !{!"float", !8, i64 0}
!16 = !{!"_ZTS6ImRect", !17, i64 0, !17, i64 8}
!17 = !{!"_ZTS6ImVec2", !15, i64 0, !15, i64 4}
!18 = !{!"_ZTS15ImGuiTextBuffer", !19, i64 0}
!19 = !{!"_ZTS8ImVectorIcE", !7, i64 0, !7, i64 4, !10, i64 8}
!20 = !{!"_ZTS22ImGuiTableInstanceData", !7, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !7, i64 16, !7, i64 20}
!21 = !{!"_ZTS8ImVectorI22ImGuiTableInstanceDataE", !7, i64 0, !7, i64 4, !10, i64 8}
!22 = !{!"_ZTS25ImGuiTableColumnSortSpecs", !7, i64 0, !14, i64 4, !14, i64 6, !23, i64 8}
!23 = !{!"_ZTS18ImGuiSortDirection", !8, i64 0}
!24 = !{!"_ZTS8ImVectorI25ImGuiTableColumnSortSpecsE", !7, i64 0, !7, i64 4, !10, i64 8}
!25 = !{!"_ZTS19ImGuiTableSortSpecs", !10, i64 0, !7, i64 8, !26, i64 12}
!26 = !{!"bool", !8, i64 0}
!27 = !{!6, !7, i64 108}
!28 = !{!29, !14, i64 94}
!29 = !{!"_ZTS16ImGuiTableColumn", !7, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !16, i64 36, !7, i64 52, !15, i64 56, !15, i64 60, !15, i64 64, !15, i64 68, !15, i64 72, !15, i64 76, !15, i64 80, !14, i64 84, !14, i64 86, !14, i64 88, !14, i64 90, !14, i64 92, !14, i64 94, !14, i64 96, !14, i64 98, !14, i64 100, !26, i64 102, !26, i64 103, !26, i64 104, !26, i64 105, !26, i64 106, !26, i64 107, !26, i64 108, !26, i64 109, !8, i64 110, !8, i64 111, !8, i64 112, !8, i64 113, !8, i64 113, !8, i64 113, !8, i64 114}
!30 = !{!29, !26, i64 102}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = distinct !{!35, !34}
!36 = distinct !{!36, !34}
!37 = distinct !{!37, !34}
!38 = !{!29, !7, i64 0}
!39 = distinct !{!39, !34}
!40 = !{!6, !14, i64 512}


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