; LLVM IR from Samson-Mano/EM_Propogation_simulation :: EM_Propogation_simulation/src/ImGui (imgui_tables)

; 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.35, %struct.ImSpan.36, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i16, i16, 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, %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.37, %struct.ImGuiTableColumnSortSpecs, [4 x i8], %struct.ImVector.38, %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, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, [5 x i8] }>
%struct.ImSpan = type { ptr, ptr }
%struct.ImSpan.35 = type { ptr, ptr }
%struct.ImSpan.36 = type { ptr, ptr }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImVec2 = type { float, float }
%struct.ImGuiTextBuffer = type { %struct.ImVector.24 }
%struct.ImVector.24 = type { i32, i32, ptr }
%struct.ImGuiTableInstanceData = type { i32, float, float, float }
%struct.ImVector.37 = type { i32, i32, ptr }
%struct.ImGuiTableColumnSortSpecs = type <{ i32, i16, i16, i8, [3 x i8] }>
%struct.ImVector.38 = type { i32, i32, ptr }
%struct.ImGuiTableSortSpecs = type <{ ptr, i32, i8, [3 x i8] }>
%struct.ImGuiTableColumn = type <{ i32, 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 [124 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [42 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui19TableSortSpecsBuildEP10ImGuiTable = external hidden unnamed_addr constant [46 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(111) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui19TableSortSpecsBuildEP10ImGuiTable(ptr noundef %0) #3 {
  %2 = alloca ptr, align 8
  %3 = alloca i8, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #5
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.ImGuiTable, ptr %9, i32 0, i32 91
  %11 = load i8, ptr %10, align 1, !tbaa !9, !range !27, !noundef !28
  %12 = trunc i8 %11 to i1
  %13 = zext i1 %12 to i8
  store i8 %13, ptr %3, align 1, !tbaa !29
  %14 = load i8, ptr %3, align 1, !tbaa !29, !range !27, !noundef !28
  %15 = trunc i8 %14 to i1
  br i1 %15, label %16, label %38

16:                                               ; preds = %1
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable(ptr noundef %17)
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.ImGuiTable, ptr %18, i32 0, i32 61
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.ImGuiTable, ptr %20, i32 0, i32 63
  %22 = load i16, ptr %21, align 8, !tbaa !30
  %23 = sext i16 %22 to i32
  %24 = icmp sle i32 %23, 1
  br i1 %24, label %25, label %26

25:                                               ; preds = %16
  br label %31

26:                                               ; preds = %16
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ImGuiTable, ptr %27, i32 0, i32 63
  %29 = load i16, ptr %28, align 8, !tbaa !30
  %30 = sext i16 %29 to i32
  br label %31

31:                                               ; preds = %26, %25
  %32 = phi i32 [ 0, %25 ], [ %30, %26 ]
  call void @_ZN8ImVectorI25ImGuiTableColumnSortSpecsE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %19, i32 noundef %32)
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.ImGuiTable, ptr %33, i32 0, i32 62
  %35 = getelementptr inbounds %struct.ImGuiTableSortSpecs, ptr %34, i32 0, i32 2
  store i8 1, ptr %35, align 4, !tbaa !31
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ImGuiTable, ptr %36, i32 0, i32 91
  store i8 0, ptr %37, align 1, !tbaa !9
  br label %38

38:                                               ; preds = %31, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.ImGuiTable, ptr %39, i32 0, i32 63
  %41 = load i16, ptr %40, align 8, !tbaa !30
  %42 = sext i16 %41 to i32
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %45

44:                                               ; preds = %38
  br label %61

45:                                               ; preds = %38
  %46 = load ptr, ptr %2, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.ImGuiTable, ptr %46, i32 0, i32 63
  %48 = load i16, ptr %47, align 8, !tbaa !30
  %49 = sext i16 %48 to i32
  %50 = icmp eq i32 %49, 1
  br i1 %50, label %51, label %54

51:                                               ; preds = %45
  %52 = load ptr, ptr %2, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ImGuiTable, ptr %52, i32 0, i32 59
  br label %59

54:                                               ; preds = %45
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.ImGuiTable, ptr %55, i32 0, i32 61
  %57 = getelementptr inbounds %struct.ImVector.38, ptr %56, i32 0, i32 2
  %58 = load ptr, ptr %57, align 8, !tbaa !32
  br label %59

59:                                               ; preds = %54, %51
  %60 = phi ptr [ %53, %51 ], [ %58, %54 ]
  br label %61

61:                                               ; preds = %59, %44
  %62 = phi ptr [ null, %44 ], [ %60, %59 ]
  store ptr %62, ptr %4, align 8, !tbaa !5
  %63 = load i8, ptr %3, align 1, !tbaa !29, !range !27, !noundef !28
  %64 = trunc i8 %63 to i1
  br i1 %64, label %65, label %136

65:                                               ; preds = %61
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %136

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #5
  store i32 0, ptr %5, align 4, !tbaa !33
  br label %69

69:                                               ; preds = %132, %68
  %70 = load i32, ptr %5, align 4, !tbaa !33
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ImGuiTable, ptr %71, i32 0, i32 13
  %73 = load i32, ptr %72, align 4, !tbaa !34
  %74 = icmp slt i32 %70, %73
  br i1 %74, label %76, label %75

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

76:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.ImGuiTable, ptr %77, i32 0, i32 4
  %79 = load i32, ptr %5, align 4, !tbaa !33
  %80 = call noundef nonnull align 4 dereferenceable(111) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %78, i32 noundef %79)
  store ptr %80, ptr %7, align 8, !tbaa !5
  %81 = load ptr, ptr %7, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %81, i32 0, i32 22
  %83 = load i16, ptr %82, align 2, !tbaa !35
  %84 = sext i16 %83 to i32
  %85 = icmp eq i32 %84, -1
  br i1 %85, label %86, label %87

86:                                               ; preds = %76
  store i32 4, ptr %6, align 4
  br label %129

87:                                               ; preds = %76
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %88, i32 0, i32 22
  %90 = load i16, ptr %89, align 2, !tbaa !35
  %91 = sext i16 %90 to i32
  %92 = load ptr, ptr %2, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ImGuiTable, ptr %92, i32 0, i32 63
  %94 = load i16, ptr %93, align 8, !tbaa !30
  %95 = sext i16 %94 to i32
  %96 = icmp slt i32 %91, %95
  br i1 %96, label %97, label %98

97:                                               ; preds = %87
  br label %100

98:                                               ; preds = %87
  call void @__assert_fail(ptr noundef @.str.72, ptr noundef @.str.1, i32 noundef 2827, ptr noundef @__PRETTY_FUNCTION__._ZN5ImGui19TableSortSpecsBuildEP10ImGuiTable) #6
  unreachable

99:                                               ; No predecessors!
  br label %100

100:                                              ; preds = %99, %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %102, i32 0, i32 22
  %104 = load i16, ptr %103, align 2, !tbaa !35
  %105 = sext i16 %104 to i64
  %106 = getelementptr inbounds %struct.ImGuiTableColumnSortSpecs, ptr %101, i64 %105
  store ptr %106, ptr %8, align 8, !tbaa !5
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %107, i32 0, i32 9
  %109 = load i32, ptr %108, align 4, !tbaa !37
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ImGuiTableColumnSortSpecs, ptr %110, i32 0, i32 0
  store i32 %109, ptr %111, align 4, !tbaa !38
  %112 = load i32, ptr %5, align 4, !tbaa !33
  %113 = trunc i32 %112 to i16
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ImGuiTableColumnSortSpecs, ptr %114, i32 0, i32 1
  store i16 %113, ptr %115, align 4, !tbaa !39
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %116, i32 0, i32 22
  %118 = load i16, ptr %117, align 2, !tbaa !35
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.ImGuiTableColumnSortSpecs, ptr %119, i32 0, i32 2
  store i16 %118, ptr %120, align 2, !tbaa !40
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ImGuiTableColumn, ptr %121, i32 0, i32 37
  %123 = load i8, ptr %122, align 1
  %124 = and i8 %123, 3
  %125 = zext i8 %124 to i32
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.ImGuiTableColumnSortSpecs, ptr %126, i32 0, i32 3
  %128 = trunc i32 %125 to i8
  store i8 %128, ptr %127, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  store i32 0, ptr %6, align 4
  br label %129

129:                                              ; preds = %100, %86
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  %130 = load i32, ptr %6, align 4
  switch i32 %130, label %148 [
    i32 0, label %131
    i32 4, label %132
  ]

131:                                              ; preds = %129
  br label %132

132:                                              ; preds = %131, %129
  %133 = load i32, ptr %5, align 4, !tbaa !33
  %134 = add nsw i32 %133, 1
  store i32 %134, ptr %5, align 4, !tbaa !33
  br label %69, !llvm.loop !41

135:                                              ; preds = %75
  br label %136

136:                                              ; preds = %135, %65, %61
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = load ptr, ptr %2, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.ImGuiTable, ptr %138, i32 0, i32 62
  %140 = getelementptr inbounds %struct.ImGuiTableSortSpecs, ptr %139, i32 0, i32 0
  store ptr %137, ptr %140, align 8, !tbaa !43
  %141 = load ptr, ptr %2, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.ImGuiTable, ptr %141, i32 0, i32 63
  %143 = load i16, ptr %142, align 8, !tbaa !30
  %144 = sext i16 %143 to i32
  %145 = load ptr, ptr %2, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.ImGuiTable, ptr %145, i32 0, i32 62
  %147 = getelementptr inbounds %struct.ImGuiTableSortSpecs, ptr %146, i32 0, i32 1
  store i32 %144, ptr %147, align 8, !tbaa !44
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #5
  ret void

148:                                              ; preds = %129
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable(ptr noundef) #3

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

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 = { inlinehint 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 #5 = { nounwind }
attributes #6 = { 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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !26, i64 549}
!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, !11, i64 144, !11, i64 146, !11, i64 148, !7, i64 152, !11, i64 160, !11, i64 164, !16, 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, !17, i64 232, !17, i64 248, !17, i64 264, !17, i64 280, !17, i64 296, !17, i64 312, !17, i64 328, !17, i64 344, !17, i64 360, !6, i64 376, !6, i64 384, !19, i64 392, !6, i64 408, !21, i64 416, !22, i64 432, !23, i64 448, !24, i64 464, !25, i64 480, !15, i64 496, !15, i64 498, !15, i64 500, !15, i64 502, !15, i64 504, !15, i64 506, !15, i64 508, !15, i64 510, !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, !26, i64 546, !26, i64 547, !26, i64 548, !26, i64 549, !26, i64 550, !26, i64 551, !26, i64 552, !26, i64 553, !26, i64 554, !26, i64 555, !26, i64 556, !26, i64 557, !26, i64 558, !26, i64 559, !26, i64 560, !26, i64 561, !26, i64 562}
!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}
!22 = !{!"_ZTS8ImVectorI22ImGuiTableInstanceDataE", !11, i64 0, !11, i64 4, !6, i64 8}
!23 = !{!"_ZTS25ImGuiTableColumnSortSpecs", !11, i64 0, !15, i64 4, !15, i64 6, !11, i64 8}
!24 = !{!"_ZTS8ImVectorI25ImGuiTableColumnSortSpecsE", !11, i64 0, !11, i64 4, !6, i64 8}
!25 = !{!"_ZTS19ImGuiTableSortSpecs", !6, i64 0, !11, i64 8, !26, i64 12}
!26 = !{!"bool", !7, i64 0}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!26, !26, i64 0}
!30 = !{!10, !15, i64 496}
!31 = !{!10, !26, i64 492}
!32 = !{!10, !6, i64 472}
!33 = !{!11, !11, i64 0}
!34 = !{!10, !11, i64 108}
!35 = !{!36, !15, i64 90}
!36 = !{!"_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, !17, i64 32, !11, i64 48, !16, i64 52, !16, i64 56, !16, i64 60, !16, i64 64, !16, i64 68, !16, i64 72, !16, i64 76, !15, i64 80, !15, i64 82, !15, i64 84, !15, i64 86, !15, i64 88, !15, i64 90, !15, i64 92, !15, i64 94, !15, i64 96, !26, i64 98, !26, i64 99, !26, i64 100, !26, i64 101, !26, i64 102, !26, i64 103, !26, i64 104, !26, i64 105, !7, i64 106, !7, i64 107, !7, i64 108, !7, i64 109, !7, i64 109, !7, i64 109, !7, i64 110}
!37 = !{!36, !11, i64 48}
!38 = !{!23, !11, i64 0}
!39 = !{!23, !15, i64 4}
!40 = !{!23, !15, i64 6}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!10, !6, i64 480}
!44 = !{!10, !11, i64 488}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ImGuiTableColumnSortSpecs = type <{ i32, i16, i16, i8, [3 x i8] }>

@.str.1 = external hidden unnamed_addr constant [124 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [42 x i8], align 1
@__PRETTY_FUNCTION__._ZN5ImGui19TableSortSpecsBuildEP10ImGuiTable = external hidden unnamed_addr constant [46 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(111) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui19TableSortSpecsBuildEP10ImGuiTable(ptr noundef %0) local_unnamed_addr #2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 549
  %3 = load i8, ptr %2, align 1, !tbaa !5, !range !26, !noundef !27
  %4 = trunc nuw i8 %3 to i1
  br i1 %4, label %5, label %11

5:                                                ; preds = %1
  tail call void @_ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable(ptr noundef nonnull %0)
  %6 = getelementptr inbounds i8, ptr %0, i64 464
  %7 = getelementptr inbounds i8, ptr %0, i64 496
  %8 = load i16, ptr %7, align 8, !tbaa !28
  %9 = icmp slt i16 %8, 2
  %narrow = select i1 %9, i16 0, i16 %8
  %spec.select = sext i16 %narrow to i32
  tail call void @_ZN8ImVectorI25ImGuiTableColumnSortSpecsE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %spec.select)
  %10 = getelementptr inbounds i8, ptr %0, i64 492
  store i8 1, ptr %10, align 4, !tbaa !29
  store i8 0, ptr %2, align 1, !tbaa !5
  br label %11

11:                                               ; preds = %5, %1
  %12 = getelementptr inbounds i8, ptr %0, i64 496
  %13 = load i16, ptr %12, align 8, !tbaa !28
  switch i16 %13, label %16 [
    i16 0, label %.thread
    i16 1, label %14
  ]

14:                                               ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 448
  br label %19

16:                                               ; preds = %11
  %17 = getelementptr inbounds i8, ptr %0, i64 472
  %18 = load ptr, ptr %17, align 8, !tbaa !30
  br label %19

19:                                               ; preds = %14, %16
  %20 = phi ptr [ %15, %14 ], [ %18, %16 ]
  %21 = icmp ne ptr %20, null
  %or.cond = select i1 %4, i1 %21, i1 false
  br i1 %or.cond, label %.preheader, label %.thread

.preheader:                                       ; preds = %19
  %22 = getelementptr inbounds i8, ptr %0, i64 108
  %23 = load i32, ptr %22, align 4, !tbaa !31
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph, label %.thread

.lr.ph:                                           ; preds = %.preheader
  %25 = getelementptr inbounds i8, ptr %0, i64 24
  br label %26

26:                                               ; preds = %.lr.ph, %47
  %.041 = phi i32 [ 0, %.lr.ph ], [ %48, %47 ]
  %27 = tail call noundef nonnull align 4 dereferenceable(111) ptr @_ZN6ImSpanI16ImGuiTableColumnEixEi(ptr noundef nonnull align 8 dereferenceable(16) %25, i32 noundef %.041)
  %28 = getelementptr inbounds i8, ptr %27, i64 90
  %29 = load i16, ptr %28, align 2, !tbaa !32
  %30 = icmp eq i16 %29, -1
  br i1 %30, label %47, label %31

31:                                               ; preds = %26
  %32 = load i16, ptr %12, align 8, !tbaa !28
  %33 = icmp slt i16 %29, %32
  br i1 %33, label %35, label %34

34:                                               ; preds = %31
  tail call void @__assert_fail(ptr noundef nonnull @.str.72, ptr noundef nonnull @.str.1, i32 noundef 2827, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN5ImGui19TableSortSpecsBuildEP10ImGuiTable) #4
  unreachable

35:                                               ; preds = %31
  %36 = sext i16 %29 to i64
  %37 = getelementptr inbounds %struct.ImGuiTableColumnSortSpecs, ptr %20, i64 %36
  %38 = getelementptr inbounds i8, ptr %27, i64 48
  %39 = load i32, ptr %38, align 4, !tbaa !34
  store i32 %39, ptr %37, align 4, !tbaa !35
  %40 = trunc i32 %.041 to i16
  %41 = getelementptr inbounds i8, ptr %37, i64 4
  store i16 %40, ptr %41, align 4, !tbaa !36
  %42 = getelementptr inbounds i8, ptr %37, i64 6
  store i16 %29, ptr %42, align 2, !tbaa !37
  %43 = getelementptr inbounds i8, ptr %27, i64 109
  %44 = load i8, ptr %43, align 1
  %45 = and i8 %44, 3
  %46 = getelementptr inbounds i8, ptr %37, i64 8
  store i8 %45, ptr %46, align 4
  br label %47

47:                                               ; preds = %26, %35
  %48 = add nuw nsw i32 %.041, 1
  %49 = load i32, ptr %22, align 4, !tbaa !31
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %26, label %.thread.loopexit, !llvm.loop !38

.thread.loopexit:                                 ; preds = %47
  %.pre = load i16, ptr %12, align 8, !tbaa !28
  br label %.thread

.thread:                                          ; preds = %.thread.loopexit, %.preheader, %11, %19
  %51 = phi i16 [ %13, %19 ], [ %13, %11 ], [ %13, %.preheader ], [ %.pre, %.thread.loopexit ]
  %52 = phi ptr [ %20, %19 ], [ null, %11 ], [ %20, %.preheader ], [ %20, %.thread.loopexit ]
  %53 = getelementptr inbounds i8, ptr %0, i64 480
  store ptr %52, ptr %53, align 8, !tbaa !40
  %54 = sext i16 %51 to i32
  %55 = getelementptr inbounds i8, ptr %0, i64 488
  store i32 %54, ptr %55, align 8, !tbaa !41
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui22TableSortSpecsSanitizeEP10ImGuiTable(ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8ImVectorI25ImGuiTableColumnSortSpecsE6resizeEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #3 align 2

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 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 = { inlinehint 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 }

!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, !25, i64 549}
!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, !7, i64 144, !7, i64 146, !7, i64 148, !8, i64 152, !7, i64 160, !7, i64 164, !15, 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, !16, i64 232, !16, i64 248, !16, i64 264, !16, i64 280, !16, i64 296, !16, i64 312, !16, i64 328, !16, i64 344, !16, i64 360, !10, i64 376, !10, i64 384, !18, i64 392, !10, i64 408, !20, i64 416, !21, i64 432, !22, i64 448, !23, i64 464, !24, i64 480, !14, i64 496, !14, i64 498, !14, i64 500, !14, i64 502, !14, i64 504, !14, i64 506, !14, i64 508, !14, i64 510, !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, !25, i64 546, !25, i64 547, !25, i64 548, !25, i64 549, !25, i64 550, !25, i64 551, !25, i64 552, !25, i64 553, !25, i64 554, !25, i64 555, !25, i64 556, !25, i64 557, !25, i64 558, !25, i64 559, !25, i64 560, !25, i64 561, !25, i64 562}
!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}
!21 = !{!"_ZTS8ImVectorI22ImGuiTableInstanceDataE", !7, i64 0, !7, i64 4, !10, i64 8}
!22 = !{!"_ZTS25ImGuiTableColumnSortSpecs", !7, i64 0, !14, i64 4, !14, i64 6, !7, i64 8}
!23 = !{!"_ZTS8ImVectorI25ImGuiTableColumnSortSpecsE", !7, i64 0, !7, i64 4, !10, i64 8}
!24 = !{!"_ZTS19ImGuiTableSortSpecs", !10, i64 0, !7, i64 8, !25, i64 12}
!25 = !{!"bool", !8, i64 0}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!6, !14, i64 496}
!29 = !{!6, !25, i64 492}
!30 = !{!6, !10, i64 472}
!31 = !{!6, !7, i64 108}
!32 = !{!33, !14, i64 90}
!33 = !{!"_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, !16, i64 32, !7, i64 48, !15, i64 52, !15, i64 56, !15, i64 60, !15, i64 64, !15, i64 68, !15, i64 72, !15, i64 76, !14, i64 80, !14, i64 82, !14, i64 84, !14, i64 86, !14, i64 88, !14, i64 90, !14, i64 92, !14, i64 94, !14, i64 96, !25, i64 98, !25, i64 99, !25, i64 100, !25, i64 101, !25, i64 102, !25, i64 103, !25, i64 104, !25, i64 105, !8, i64 106, !8, i64 107, !8, i64 108, !8, i64 109, !8, i64 109, !8, i64 109, !8, i64 110}
!34 = !{!33, !7, i64 48}
!35 = !{!22, !7, i64 0}
!36 = !{!22, !14, i64 4}
!37 = !{!22, !14, i64 6}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!6, !10, i64 480}
!41 = !{!6, !7, i64 488}


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