; LLVM IR from hadryansalles/Luz :: deps/imgui/imgui.ll (ZN5ImGui16DebugNodeColumnsEP15ImGuiOldColumns)

; 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.ImGuiOldColumns = type { i32, i32, i8, i8, i32, i32, float, float, float, float, float, float, %struct.ImRect, %struct.ImRect, %struct.ImRect, %struct.ImVector.57, %struct.ImDrawListSplitter }
%struct.ImRect = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImVec2 = type { float, float }
%struct.ImVector.57 = type { i32, i32, ptr }
%struct.ImDrawListSplitter = type { i32, i32, %struct.ImVector.22 }
%struct.ImVector.22 = type { i32, i32, ptr }
%struct.ImGuiOldColumnData = type { float, float, i32, %struct.ImRect }

@.str.631 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.632 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.633 = external hidden unnamed_addr constant [41 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

declare void @_ZN5ImGui7TreePopEv() #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui16DebugNodeColumnsEP15ImGuiOldColumns(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8, !tbaa !5
  %8 = getelementptr inbounds %struct.ImGuiOldColumns, ptr %7, i32 0, i32 0
  %9 = load i32, ptr %8, align 8, !tbaa !9
  %10 = zext i32 %9 to i64
  %11 = inttoptr i64 %10 to ptr
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.ImGuiOldColumns, ptr %12, i32 0, i32 0
  %14 = load i32, ptr %13, align 8, !tbaa !9
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.ImGuiOldColumns, ptr %15, i32 0, i32 5
  %17 = load i32, ptr %16, align 8, !tbaa !19
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.ImGuiOldColumns, ptr %18, i32 0, i32 1
  %20 = load i32, ptr %19, align 4, !tbaa !20
  %21 = call noundef zeroext i1 (ptr, ptr, ...) @_ZN5ImGui8TreeNodeEPKvPKcz(ptr noundef %11, ptr noundef @.str.631, i32 noundef %14, i32 noundef %17, i32 noundef %20)
  br i1 %21, label %23, label %22

22:                                               ; preds = %1
  br label %71

23:                                               ; preds = %1
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.ImGuiOldColumns, ptr %24, i32 0, i32 7
  %26 = load float, ptr %25, align 8, !tbaa !21
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ImGuiOldColumns, ptr %27, i32 0, i32 6
  %29 = load float, ptr %28, align 4, !tbaa !22
  %30 = fsub float %26, %29
  %31 = fpext float %30 to double
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ImGuiOldColumns, ptr %32, i32 0, i32 6
  %34 = load float, ptr %33, align 4, !tbaa !22
  %35 = fpext float %34 to double
  %36 = load ptr, ptr %2, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ImGuiOldColumns, ptr %36, i32 0, i32 7
  %38 = load float, ptr %37, align 8, !tbaa !21
  %39 = fpext float %38 to double
  call void (ptr, ...) @_ZN5ImGui10BulletTextEPKcz(ptr noundef @.str.632, double noundef %31, double noundef %35, double noundef %39)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ImGuiOldColumns, ptr %40, i32 0, i32 15
  store ptr %41, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = call noundef ptr @_ZN8ImVectorI18ImGuiOldColumnDataE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %42)
  store ptr %43, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = call noundef ptr @_ZN8ImVectorI18ImGuiOldColumnDataE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %44)
  store ptr %45, ptr %5, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %67, %23
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = icmp ne ptr %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  br label %70

51:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %52, ptr %6, align 8, !tbaa !5
  %53 = load ptr, ptr %2, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ImGuiOldColumns, ptr %53, i32 0, i32 15
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = call noundef i32 @_ZNK8ImVectorI18ImGuiOldColumnDataE14index_from_ptrEPKS0_(ptr noundef nonnull align 8 dereferenceable(16) %54, ptr noundef %55)
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.ImGuiOldColumnData, ptr %57, i32 0, i32 0
  %59 = load float, ptr %58, align 4, !tbaa !23
  %60 = fpext float %59 to double
  %61 = load ptr, ptr %2, align 8, !tbaa !5
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.ImGuiOldColumnData, ptr %62, i32 0, i32 0
  %64 = load float, ptr %63, align 4, !tbaa !23
  %65 = call noundef float @_ZN5ImGui23GetColumnOffsetFromNormEPK15ImGuiOldColumnsf(ptr noundef %61, float noundef %64)
  %66 = fpext float %65 to double
  call void (ptr, ...) @_ZN5ImGui10BulletTextEPKcz(ptr noundef @.str.633, i32 noundef %56, double noundef %60, double noundef %66)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %67

67:                                               ; preds = %51
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.ImGuiOldColumnData, ptr %68, i32 1
  store ptr %69, ptr %4, align 8, !tbaa !5
  br label %46

70:                                               ; preds = %50
  call void @_ZN5ImGui7TreePopEv()
  br label %71

71:                                               ; preds = %70, %22
  ret void
}

declare noundef zeroext i1 @_ZN5ImGui8TreeNodeEPKvPKcz(ptr noundef, ptr noundef, ...) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8ImVectorI18ImGuiOldColumnDataE5beginEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8ImVectorI18ImGuiOldColumnDataE3endEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

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

declare noundef float @_ZN5ImGui23GetColumnOffsetFromNormEPK15ImGuiOldColumnsf(ptr noundef, float noundef) #1

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

!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 0}
!10 = !{!"_ZTS15ImGuiOldColumns", !11, i64 0, !11, i64 4, !12, i64 8, !12, i64 9, !11, i64 12, !11, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !14, i64 44, !14, i64 60, !14, i64 76, !16, i64 96, !17, i64 112}
!11 = !{!"int", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTS6ImRect", !15, i64 0, !15, i64 8}
!15 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!16 = !{!"_ZTS8ImVectorI18ImGuiOldColumnDataE", !11, i64 0, !11, i64 4, !6, i64 8}
!17 = !{!"_ZTS18ImDrawListSplitter", !11, i64 0, !11, i64 4, !18, i64 8}
!18 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !11, i64 0, !11, i64 4, !6, i64 8}
!19 = !{!10, !11, i64 16}
!20 = !{!10, !11, i64 4}
!21 = !{!10, !13, i64 24}
!22 = !{!10, !13, i64 20}
!23 = !{!24, !13, i64 0}
!24 = !{!"_ZTS18ImGuiOldColumnData", !13, i64 0, !13, i64 4, !11, i64 8, !14, i64 12}


; 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.631 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.632 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.633 = external hidden unnamed_addr constant [41 x i8], align 1

declare void @_ZN5ImGui7TreePopEv() local_unnamed_addr #0

declare void @_ZN5ImGui10BulletTextEPKcz(ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5ImGui16DebugNodeColumnsEP15ImGuiOldColumns(ptr noundef %0) local_unnamed_addr #1 {
  %2 = load i32, ptr %0, align 8, !tbaa !5
  %3 = zext i32 %2 to i64
  %4 = inttoptr i64 %3 to ptr
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = load i32, ptr %5, align 8, !tbaa !18
  %7 = getelementptr inbounds i8, ptr %0, i64 4
  %8 = load i32, ptr %7, align 4, !tbaa !19
  %9 = tail call noundef zeroext i1 (ptr, ptr, ...) @_ZN5ImGui8TreeNodeEPKvPKcz(ptr noundef %4, ptr noundef nonnull @.str.631, i32 noundef %2, i32 noundef %6, i32 noundef %8)
  br i1 %9, label %10, label %28

10:                                               ; preds = %1
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  %12 = load float, ptr %11, align 8, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %0, i64 20
  %14 = load float, ptr %13, align 4, !tbaa !21
  %15 = fsub float %12, %14
  %16 = fpext float %15 to double
  %17 = fpext float %14 to double
  %18 = fpext float %12 to double
  tail call void (ptr, ...) @_ZN5ImGui10BulletTextEPKcz(ptr noundef nonnull @.str.632, double noundef %16, double noundef %17, double noundef %18)
  %19 = getelementptr inbounds i8, ptr %0, i64 96
  %20 = tail call noundef ptr @_ZN8ImVectorI18ImGuiOldColumnDataE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
  %21 = tail call noundef ptr @_ZN8ImVectorI18ImGuiOldColumnDataE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
  %.not20 = icmp eq ptr %20, %21
  br i1 %.not20, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %10
  tail call void @_ZN5ImGui7TreePopEv()
  br label %28

.lr.ph:                                           ; preds = %10, %.lr.ph
  %.021 = phi ptr [ %27, %.lr.ph ], [ %20, %10 ]
  %22 = tail call noundef i32 @_ZNK8ImVectorI18ImGuiOldColumnDataE14index_from_ptrEPKS0_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef %.021)
  %23 = load float, ptr %.021, align 4, !tbaa !22
  %24 = fpext float %23 to double
  %25 = tail call noundef float @_ZN5ImGui23GetColumnOffsetFromNormEPK15ImGuiOldColumnsf(ptr noundef nonnull %0, float noundef %23)
  %26 = fpext float %25 to double
  tail call void (ptr, ...) @_ZN5ImGui10BulletTextEPKcz(ptr noundef nonnull @.str.633, i32 noundef %22, double noundef %24, double noundef %26)
  %27 = getelementptr inbounds i8, ptr %.021, i64 28
  %.not = icmp eq ptr %27, %21
  br i1 %.not, label %._crit_edge, label %.lr.ph

28:                                               ; preds = %1, %._crit_edge
  ret void
}

declare noundef zeroext i1 @_ZN5ImGui8TreeNodeEPKvPKcz(ptr noundef, ptr noundef, ...) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8ImVectorI18ImGuiOldColumnDataE5beginEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8ImVectorI18ImGuiOldColumnDataE3endEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

declare noundef float @_ZN5ImGui23GetColumnOffsetFromNormEPK15ImGuiOldColumnsf(ptr noundef, float noundef) local_unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { 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" }

!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 0}
!6 = !{!"_ZTS15ImGuiOldColumns", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 9, !7, i64 12, !7, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !12, i64 44, !12, i64 60, !12, i64 76, !14, i64 96, !16, i64 112}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!"_ZTS6ImRect", !13, i64 0, !13, i64 8}
!13 = !{!"_ZTS6ImVec2", !11, i64 0, !11, i64 4}
!14 = !{!"_ZTS8ImVectorI18ImGuiOldColumnDataE", !7, i64 0, !7, i64 4, !15, i64 8}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"_ZTS18ImDrawListSplitter", !7, i64 0, !7, i64 4, !17, i64 8}
!17 = !{!"_ZTS8ImVectorI13ImDrawChannelE", !7, i64 0, !7, i64 4, !15, i64 8}
!18 = !{!6, !7, i64 16}
!19 = !{!6, !7, i64 4}
!20 = !{!6, !11, i64 24}
!21 = !{!6, !11, i64 20}
!22 = !{!23, !11, i64 0}
!23 = !{!"_ZTS18ImGuiOldColumnData", !11, i64 0, !11, i64 4, !7, i64 8, !12, i64 12}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass