; LLVM IR from DarrenSweeney/3D-Physics-Engine :: Physics Engine/Imgui/imgui.ll (ZN5ImGui13ListBoxHeaderEPKcRK6ImVec2)

; 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.ImVec2 = type { float, float }
%struct.ImGuiAabb = type { %struct.ImVec2, %struct.ImVec2 }
%struct.ImGuiStyle = type { float, %struct.ImVec2, %struct.ImVec2, float, float, %struct.ImVec2, float, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, float, float, [39 x %struct.ImVec4] }
%struct.ImVec4 = type { float, float, float, float }
%struct.ImGuiWindow = type { ptr, i32, i32, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, i8, i8, i8, i8, i8, i32, i8, i32, i32, i32, %struct.ImGuiDrawContext, %class.ImVector.11, %class.ImVector.12, %struct.ImGuiAabb, i32, float, %struct.ImGuiStorage, float, ptr, ptr, i32, i32, i32, i32, i32, i32 }
%struct.ImGuiDrawContext = type { %struct.ImVec2, %struct.ImVec2, %struct.ImVec2, float, float, float, i32, i32, %struct.ImGuiAabb, i8, %class.ImVector.1, %class.ImVector.9, %class.ImVector.10, %class.ImVector.10, i32, ptr, float, float, i32, i32, %struct.ImVec2, float, float, i8, i32, %class.ImVector.10 }
%class.ImVector.1 = type { i64, i64, ptr }
%class.ImVector.9 = type { i64, i64, ptr }
%class.ImVector.10 = type { i64, i64, ptr }
%class.ImVector.11 = type { i64, i64, ptr }
%class.ImVector.12 = type { i64, i64, ptr }
%struct.ImGuiStorage = type { %class.ImVector.6 }
%class.ImVector.6 = type { i64, i64, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #0 align 2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL16GetCurrentWindowv() #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(712) ptr @_ZN5ImGui8GetStyleEv() #0

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #5

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef, ptr noundef, i1 noundef zeroext, float noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9ImGuiAabbC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL5ImMaxff(float noundef, float noundef) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui15BeginChildFrameEjRK6ImVec2(i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) #7

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK9ImGuiAabb7GetSizeEv(ptr noundef nonnull align 4 dereferenceable(16)) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN5ImGui13CalcItemWidthEv() #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN5ImGui28GetTextLineHeightWithSpacingEv() #7

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL10RenderText6ImVec2PKcS1_b(<2 x float>, ptr noundef, ptr noundef, i1 noundef zeroext) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5ImGui5GetIDEPKc(ptr noundef) #7

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5ImGui13ListBoxHeaderEPKcRK6ImVec2(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(8) %1) #6 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.ImVec2, align 4
  %9 = alloca %struct.ImVec2, align 4
  %10 = alloca %struct.ImVec2, align 4
  %11 = alloca %struct.ImGuiAabb, align 4
  %12 = alloca %struct.ImVec2, align 4
  %13 = alloca %struct.ImGuiAabb, align 4
  %14 = alloca %struct.ImVec2, align 4
  %15 = alloca %struct.ImVec2, align 4
  %16 = alloca %struct.ImVec2, align 4
  %17 = alloca %struct.ImVec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %18 = call noundef ptr @_ZL16GetCurrentWindowv()
  store ptr %18, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %19 = call noundef nonnull align 4 dereferenceable(712) ptr @_ZN5ImGui8GetStyleEv()
  store ptr %19, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #8
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = call noundef i32 @_ZN5ImGui5GetIDEPKc(ptr noundef %20)
  store i32 %21, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = call <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef %22, ptr noundef null, i1 noundef zeroext true, float noundef -1.000000e+00)
  store <2 x float> %23, ptr %8, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %9)
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.ImVec2, ptr %24, i32 0, i32 0
  %26 = load float, ptr %25, align 4, !tbaa !11
  %27 = fcmp une float %26, 0.000000e+00
  br i1 %27, label %28, label %32

28:                                               ; preds = %2
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.ImVec2, ptr %29, i32 0, i32 0
  %31 = load float, ptr %30, align 4, !tbaa !11
  br label %39

32:                                               ; preds = %2
  %33 = call noundef float @_ZN5ImGui13CalcItemWidthEv()
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ImGuiStyle, ptr %34, i32 0, i32 5
  %36 = getelementptr inbounds %struct.ImVec2, ptr %35, i32 0, i32 0
  %37 = load float, ptr %36, align 4, !tbaa !14
  %38 = call float @llvm.fmuladd.f32(float %37, float 2.000000e+00, float %33)
  br label %39

39:                                               ; preds = %32, %28
  %40 = phi float [ %31, %28 ], [ %38, %32 ]
  %41 = getelementptr inbounds %struct.ImVec2, ptr %9, i32 0, i32 0
  store float %40, ptr %41, align 4, !tbaa !11
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.ImVec2, ptr %42, i32 0, i32 1
  %44 = load float, ptr %43, align 4, !tbaa !16
  %45 = fcmp une float %44, 0.000000e+00
  br i1 %45, label %46, label %50

46:                                               ; preds = %39
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ImVec2, ptr %47, i32 0, i32 1
  %49 = load float, ptr %48, align 4, !tbaa !16
  br label %57

50:                                               ; preds = %39
  %51 = call noundef float @_ZN5ImGui28GetTextLineHeightWithSpacingEv()
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.ImGuiStyle, ptr %52, i32 0, i32 7
  %54 = getelementptr inbounds %struct.ImVec2, ptr %53, i32 0, i32 1
  %55 = load float, ptr %54, align 4, !tbaa !17
  %56 = call float @llvm.fmuladd.f32(float %51, float 0x401D9999A0000000, float %55)
  br label %57

57:                                               ; preds = %50, %46
  %58 = phi float [ %49, %46 ], [ %56, %50 ]
  %59 = getelementptr inbounds %struct.ImVec2, ptr %9, i32 0, i32 1
  store float %58, ptr %59, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %60 = getelementptr inbounds %struct.ImVec2, ptr %9, i32 0, i32 0
  %61 = load float, ptr %60, align 4, !tbaa !11
  %62 = getelementptr inbounds %struct.ImVec2, ptr %9, i32 0, i32 1
  %63 = load float, ptr %62, align 4, !tbaa !16
  %64 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 1
  %65 = load float, ptr %64, align 4, !tbaa !16
  %66 = call noundef float @_ZL5ImMaxff(float noundef %63, float noundef %65)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef %61, float noundef %66)
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #8
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.ImGuiWindow, ptr %67, i32 0, i32 20
  %69 = getelementptr inbounds %struct.ImGuiDrawContext, ptr %68, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.ImGuiWindow, ptr %70, i32 0, i32 20
  %72 = getelementptr inbounds %struct.ImGuiDrawContext, ptr %71, i32 0, i32 0
  %73 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %72, ptr noundef nonnull align 4 dereferenceable(8) %10)
  store <2 x float> %73, ptr %12, align 4
  call void @_ZN9ImGuiAabbC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(8) %69, ptr noundef nonnull align 4 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #8
  %74 = getelementptr inbounds %struct.ImGuiAabb, ptr %11, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %75 = getelementptr inbounds %struct.ImGuiAabb, ptr %11, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %76 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  %77 = load float, ptr %76, align 4, !tbaa !11
  %78 = fcmp ogt float %77, 0.000000e+00
  br i1 %78, label %79, label %87

79:                                               ; preds = %57
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ImGuiStyle, ptr %80, i32 0, i32 8
  %82 = getelementptr inbounds %struct.ImVec2, ptr %81, i32 0, i32 0
  %83 = load float, ptr %82, align 4, !tbaa !18
  %84 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  %85 = load float, ptr %84, align 4, !tbaa !11
  %86 = fadd float %83, %85
  br label %88

87:                                               ; preds = %57
  br label %88

88:                                               ; preds = %87, %79
  %89 = phi float [ %86, %79 ], [ 0.000000e+00, %87 ]
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %15, float noundef %89, float noundef 0.000000e+00)
  %90 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %75, ptr noundef nonnull align 4 dereferenceable(8) %15)
  store <2 x float> %90, ptr %14, align 4
  call void @_ZN9ImGuiAabbC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(8) %74, ptr noundef nonnull align 4 dereferenceable(8) %14)
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ImGuiWindow, ptr %91, i32 0, i32 20
  %93 = getelementptr inbounds %struct.ImGuiDrawContext, ptr %92, i32 0, i32 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %93, ptr align 4 %13, i64 16, i1 false), !tbaa.struct !19
  %94 = getelementptr inbounds %struct.ImVec2, ptr %8, i32 0, i32 0
  %95 = load float, ptr %94, align 4, !tbaa !11
  %96 = fcmp ogt float %95, 0.000000e+00
  br i1 %96, label %97, label %116

97:                                               ; preds = %88
  %98 = getelementptr inbounds %struct.ImGuiAabb, ptr %11, i32 0, i32 1
  %99 = getelementptr inbounds %struct.ImVec2, ptr %98, i32 0, i32 0
  %100 = load float, ptr %99, align 4, !tbaa !21
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.ImGuiStyle, ptr %101, i32 0, i32 8
  %103 = getelementptr inbounds %struct.ImVec2, ptr %102, i32 0, i32 0
  %104 = load float, ptr %103, align 4, !tbaa !18
  %105 = fadd float %100, %104
  %106 = getelementptr inbounds %struct.ImGuiAabb, ptr %11, i32 0, i32 0
  %107 = getelementptr inbounds %struct.ImVec2, ptr %106, i32 0, i32 1
  %108 = load float, ptr %107, align 4, !tbaa !23
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ImGuiStyle, ptr %109, i32 0, i32 5
  %111 = getelementptr inbounds %struct.ImVec2, ptr %110, i32 0, i32 1
  %112 = load float, ptr %111, align 4, !tbaa !24
  %113 = fadd float %108, %112
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %16, float noundef %105, float noundef %113)
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = load <2 x float>, ptr %16, align 4
  call void @_ZL10RenderText6ImVec2PKcS1_b(<2 x float> %115, ptr noundef %114, ptr noundef null, i1 noundef zeroext true)
  br label %116

116:                                              ; preds = %97, %88
  %117 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %118 = call <2 x float> @_ZNK9ImGuiAabb7GetSizeEv(ptr noundef nonnull align 4 dereferenceable(16) %11)
  store <2 x float> %118, ptr %17, align 4
  call void @_ZN5ImGui15BeginChildFrameEjRK6ImVec2(i32 noundef %117, ptr noundef nonnull align 4 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  ret i1 true
}

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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 #6 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #7 = { 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 #8 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!15, !13, i64 28}
!15 = !{!"_ZTS10ImGuiStyle", !13, i64 0, !12, i64 4, !12, i64 12, !13, i64 20, !13, i64 24, !12, i64 28, !13, i64 36, !12, i64 40, !12, i64 48, !12, i64 56, !12, i64 64, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !7, i64 88}
!16 = !{!12, !13, i64 4}
!17 = !{!15, !13, i64 44}
!18 = !{!15, !13, i64 48}
!19 = !{i64 0, i64 4, !20, i64 4, i64 4, !20, i64 8, i64 4, !20, i64 12, i64 4, !20}
!20 = !{!13, !13, i64 0}
!21 = !{!22, !13, i64 8}
!22 = !{!"_ZTS9ImGuiAabb", !12, i64 0, !12, i64 8}
!23 = !{!22, !13, i64 4}
!24 = !{!15, !13, i64 32}


; 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.ImVec2 = type { float, float }
%struct.ImGuiAabb = type { %struct.ImVec2, %struct.ImVec2 }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL16GetCurrentWindowv() local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(712) ptr @_ZN5ImGui8GetStyleEv() local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare hidden <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef, ptr noundef, i1 noundef zeroext, float noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9ImGuiAabbC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) unnamed_addr #7 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef float @_ZL5ImMaxff(float noundef, float noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5ImGui15BeginChildFrameEjRK6ImVec2(i32 noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local <2 x float> @_ZNK9ImGuiAabb7GetSizeEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN5ImGui13CalcItemWidthEv() local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN5ImGui28GetTextLineHeightWithSpacingEv() local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL10RenderText6ImVec2PKcS1_b(<2 x float>, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN5ImGui5GetIDEPKc(ptr noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5ImGui13ListBoxHeaderEPKcRK6ImVec2(ptr noundef %0, ptr nocapture noundef nonnull readonly align 4 dereferenceable(8) %1) local_unnamed_addr #6 {
  %3 = alloca %struct.ImVec2, align 4
  %4 = alloca %struct.ImVec2, align 4
  %5 = alloca %struct.ImGuiAabb, align 4
  %6 = alloca %struct.ImVec2, align 8
  %7 = alloca %struct.ImGuiAabb, align 4
  %8 = alloca %struct.ImVec2, align 8
  %9 = alloca %struct.ImVec2, align 4
  %10 = alloca %struct.ImVec2, align 8
  %11 = alloca %struct.ImVec2, align 8
  %12 = tail call noundef ptr @_ZL16GetCurrentWindowv()
  %13 = tail call noundef nonnull align 4 dereferenceable(712) ptr @_ZN5ImGui8GetStyleEv()
  %14 = tail call noundef i32 @_ZN5ImGui5GetIDEPKc(ptr noundef %0)
  %15 = tail call <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef %0, ptr noundef null, i1 noundef zeroext true, float noundef -1.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  call void @_ZN6ImVec2C2Ev(ptr noundef nonnull align 4 dereferenceable(8) %3)
  %16 = load float, ptr %1, align 4, !tbaa !5
  %17 = fcmp une float %16, 0.000000e+00
  br i1 %17, label %23, label %18

18:                                               ; preds = %2
  %19 = call noundef float @_ZN5ImGui13CalcItemWidthEv()
  %20 = getelementptr inbounds i8, ptr %13, i64 28
  %21 = load float, ptr %20, align 4, !tbaa !10
  %22 = call float @llvm.fmuladd.f32(float %21, float 2.000000e+00, float %19)
  br label %23

23:                                               ; preds = %2, %18
  %24 = phi float [ %22, %18 ], [ %16, %2 ]
  store float %24, ptr %3, align 4, !tbaa !5
  %25 = getelementptr inbounds i8, ptr %1, i64 4
  %26 = load float, ptr %25, align 4, !tbaa !12
  %27 = fcmp une float %26, 0.000000e+00
  br i1 %27, label %33, label %28

28:                                               ; preds = %23
  %29 = call noundef float @_ZN5ImGui28GetTextLineHeightWithSpacingEv()
  %30 = getelementptr inbounds i8, ptr %13, i64 44
  %31 = load float, ptr %30, align 4, !tbaa !13
  %32 = call float @llvm.fmuladd.f32(float %29, float 0x401D9999A0000000, float %31)
  %.pre = load float, ptr %3, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %23, %28
  %34 = phi float [ %.pre, %28 ], [ %24, %23 ]
  %35 = phi float [ %32, %28 ], [ %26, %23 ]
  %36 = getelementptr inbounds i8, ptr %3, i64 4
  store float %35, ptr %36, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %.sroa.0.4.vec.extract = extractelement <2 x float> %15, i64 1
  %37 = call noundef float @_ZL5ImMaxff(float noundef %35, float noundef %.sroa.0.4.vec.extract)
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef %34, float noundef %37)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #8
  %38 = getelementptr inbounds i8, ptr %12, i64 96
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  %39 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %38, ptr noundef nonnull align 4 dereferenceable(8) %4)
  store <2 x float> %39, ptr %6, align 8
  call void @_ZN9ImGuiAabbC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %5, ptr noundef nonnull align 4 dereferenceable(8) %38, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %40 = getelementptr inbounds i8, ptr %5, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %.sroa.0.0.vec.extract = extractelement <2 x float> %15, i64 0
  %41 = fcmp ogt float %.sroa.0.0.vec.extract, 0.000000e+00
  %42 = getelementptr inbounds i8, ptr %13, i64 48
  %43 = load float, ptr %42, align 4
  %44 = fadd float %.sroa.0.0.vec.extract, %43
  %45 = select i1 %41, float %44, float 0.000000e+00
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef %45, float noundef 0.000000e+00)
  %46 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %40, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %46, ptr %8, align 8
  call void @_ZN9ImGuiAabbC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  %47 = getelementptr inbounds i8, ptr %12, i64 140
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %47, ptr noundef nonnull align 4 dereferenceable(16) %7, i64 16, i1 false), !tbaa.struct !14
  br i1 %41, label %48, label %58

48:                                               ; preds = %33
  %49 = load float, ptr %40, align 4, !tbaa !16
  %50 = load float, ptr %42, align 4, !tbaa !18
  %51 = fadd float %49, %50
  %52 = getelementptr inbounds i8, ptr %5, i64 4
  %53 = load float, ptr %52, align 4, !tbaa !19
  %54 = getelementptr inbounds i8, ptr %13, i64 32
  %55 = load float, ptr %54, align 4, !tbaa !20
  %56 = fadd float %53, %55
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef %51, float noundef %56)
  %57 = load <2 x float>, ptr %10, align 8
  call void @_ZL10RenderText6ImVec2PKcS1_b(<2 x float> %57, ptr noundef %0, ptr noundef null, i1 noundef zeroext true)
  br label %58

58:                                               ; preds = %48, %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %59 = call <2 x float> @_ZNK9ImGuiAabb7GetSizeEv(ptr noundef nonnull align 4 dereferenceable(16) %5)
  store <2 x float> %59, ptr %11, align 8
  call void @_ZN5ImGui15BeginChildFrameEjRK6ImVec2(i32 noundef %14, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  ret i1 true
}

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { inlinehint mustprogress uwtable "min-legal-vector-width"="64" "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 #6 = { mustprogress uwtable "min-legal-vector-width"="64" "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 #7 = { 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 #8 = { 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 0}
!6 = !{!"_ZTS6ImVec2", !7, i64 0, !7, i64 4}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !7, i64 28}
!11 = !{!"_ZTS10ImGuiStyle", !7, i64 0, !6, i64 4, !6, i64 12, !7, i64 20, !7, i64 24, !6, i64 28, !7, i64 36, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !7, i64 72, !7, i64 76, !7, i64 80, !7, i64 84, !8, i64 88}
!12 = !{!6, !7, i64 4}
!13 = !{!11, !7, i64 44}
!14 = !{i64 0, i64 4, !15, i64 4, i64 4, !15, i64 8, i64 4, !15, i64 12, i64 4, !15}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !7, i64 8}
!17 = !{!"_ZTS9ImGuiAabb", !6, i64 0, !6, i64 8}
!18 = !{!11, !7, i64 48}
!19 = !{!17, !7, i64 4}
!20 = !{!11, !7, i64 32}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass