; LLVM IR from xhub/reshop :: gui/external/imguial/imguial_term.ll (ZN7ImGuiAl3Log4drawERK6ImVec2)

; 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 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.1 = type { ptr }
%"class.ImGuiAl::Log" = type { %"class.ImGuiAl::Crt.base", i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i8, [3 x i8], %struct.ImGuiTextFilter }
%"class.ImGuiAl::Crt.base" = type <{ %"class.ImGuiAl::Fifo", i32, i32, i8 }>
%"class.ImGuiAl::Fifo" = type { ptr, i64, i64, i64, i64 }
%struct.ImGuiTextFilter = type <{ [256 x i8], %struct.ImVector, i32, [4 x i8] }>
%struct.ImVector = type { i32, i32, ptr }

; 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: mustprogress uwtable
declare dso_local void @_ZN7ImGuiAl3Crt4drawERK6ImVec2RKSt8functionIFbRKNS0_4InfoEPKcEE(ptr noundef nonnull align 8 dereferenceable(49), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7ImGuiAl3Log4drawERK6ImVec2(ptr noundef nonnull align 8 dereferenceable(456) %0, ptr noundef nonnull align 4 dereferenceable(8) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca i8, align 1
  %9 = alloca %struct.ImVec2, align 4
  %10 = alloca %struct.ImVec2, align 4
  %11 = alloca %struct.ImVec2, align 4
  %12 = alloca %struct.ImVec2, align 4
  %13 = alloca %"class.std::function", align 8
  %14 = alloca %class.anon.1, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  store i32 0, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %18

18:                                               ; preds = %49, %2
  %19 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 20
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = icmp ne ptr %20, null
  br i1 %21, label %22, label %30

22:                                               ; preds = %18
  %23 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 20
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = zext i32 %25 to i64
  %27 = getelementptr inbounds ptr, ptr %24, i64 %26
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br label %30

30:                                               ; preds = %22, %18
  %31 = phi i1 [ false, %18 ], [ %29, %22 ]
  br i1 %31, label %33, label %32

32:                                               ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %52

33:                                               ; preds = %30
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = icmp ne i32 %34, 0
  br i1 %35, label %36, label %37

36:                                               ; preds = %33
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  br label %37

37:                                               ; preds = %36, %33
  %38 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 20
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = load i32, ptr %6, align 4, !tbaa !9
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds ptr, ptr %39, i64 %41
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %44 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef %43, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br i1 %44, label %45, label %48

45:                                               ; preds = %37
  %46 = load i32, ptr %6, align 4, !tbaa !9
  %47 = add i32 %46, 1
  store i32 %47, ptr %5, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %45, %37
  br label %49

49:                                               ; preds = %48
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = add i32 %50, 1
  store i32 %51, ptr %6, align 4, !tbaa !9
  br label %18, !llvm.loop !20

52:                                               ; preds = %32
  %53 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 19
  %54 = load ptr, ptr %53, align 8, !tbaa !22
  %55 = icmp ne ptr %54, null
  br i1 %55, label %56, label %129

56:                                               ; preds = %52
  %57 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 19
  %58 = load ptr, ptr %57, align 8, !tbaa !22
  %59 = call noundef zeroext i1 @_ZN5ImGui16CollapsingHeaderEPKci(ptr noundef %58, i32 noundef 0)
  br i1 %59, label %60, label %129

60:                                               ; preds = %56
  %61 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 2
  %62 = load i32, ptr %61, align 8, !tbaa !23
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 21, i32 noundef %62)
  %63 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 3
  %64 = load i32, ptr %63, align 4, !tbaa !24
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 22, i32 noundef %64)
  %65 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !25
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 23, i32 noundef %66)
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #4
  %67 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 13
  %68 = load ptr, ptr %67, align 8, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %69 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef %68, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %70 = zext i1 %69 to i8
  store i8 %70, ptr %8, align 1, !tbaa !27
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 3)
  %71 = load i8, ptr %8, align 1, !tbaa !27, !range !28, !noundef !29
  %72 = trunc i8 %71 to i1
  br i1 %72, label %73, label %75

73:                                               ; preds = %60
  %74 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 21
  store i32 0, ptr %74, align 8, !tbaa !30
  call void @_ZN7ImGuiAl3Log14scrollToBottomEv(ptr noundef nonnull align 8 dereferenceable(456) %17)
  br label %75

75:                                               ; preds = %73, %60
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %76 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 5
  %77 = load i32, ptr %76, align 4, !tbaa !31
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 21, i32 noundef %77)
  %78 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 6
  %79 = load i32, ptr %78, align 8, !tbaa !32
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 22, i32 noundef %79)
  %80 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 4
  %81 = load i32, ptr %80, align 8, !tbaa !33
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 23, i32 noundef %81)
  %82 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 14
  %83 = load ptr, ptr %82, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %84 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef %83, ptr noundef nonnull align 4 dereferenceable(8) %10)
  %85 = zext i1 %84 to i8
  store i8 %85, ptr %8, align 1, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 3)
  %86 = load i8, ptr %8, align 1, !tbaa !27, !range !28, !noundef !29
  %87 = trunc i8 %86 to i1
  br i1 %87, label %88, label %90

88:                                               ; preds = %75
  %89 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 21
  store i32 1, ptr %89, align 8, !tbaa !30
  call void @_ZN7ImGuiAl3Log14scrollToBottomEv(ptr noundef nonnull align 8 dereferenceable(456) %17)
  br label %90

90:                                               ; preds = %88, %75
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %91 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 8
  %92 = load i32, ptr %91, align 8, !tbaa !35
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 21, i32 noundef %92)
  %93 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 9
  %94 = load i32, ptr %93, align 4, !tbaa !36
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 22, i32 noundef %94)
  %95 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 7
  %96 = load i32, ptr %95, align 4, !tbaa !37
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 23, i32 noundef %96)
  %97 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 15
  %98 = load ptr, ptr %97, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %99 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef %98, ptr noundef nonnull align 4 dereferenceable(8) %11)
  %100 = zext i1 %99 to i8
  store i8 %100, ptr %8, align 1, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 3)
  %101 = load i8, ptr %8, align 1, !tbaa !27, !range !28, !noundef !29
  %102 = trunc i8 %101 to i1
  br i1 %102, label %103, label %105

103:                                              ; preds = %90
  %104 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 21
  store i32 2, ptr %104, align 8, !tbaa !30
  call void @_ZN7ImGuiAl3Log14scrollToBottomEv(ptr noundef nonnull align 8 dereferenceable(456) %17)
  br label %105

105:                                              ; preds = %103, %90
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %106 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 11
  %107 = load i32, ptr %106, align 4, !tbaa !39
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 21, i32 noundef %107)
  %108 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 12
  %109 = load i32, ptr %108, align 8, !tbaa !40
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 22, i32 noundef %109)
  %110 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 10
  %111 = load i32, ptr %110, align 8, !tbaa !41
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 23, i32 noundef %111)
  %112 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 16
  %113 = load ptr, ptr %112, align 8, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %12, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %114 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef %113, ptr noundef nonnull align 4 dereferenceable(8) %12)
  %115 = zext i1 %114 to i8
  store i8 %115, ptr %8, align 1, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 3)
  %116 = load i8, ptr %8, align 1, !tbaa !27, !range !28, !noundef !29
  %117 = trunc i8 %116 to i1
  br i1 %117, label %118, label %120

118:                                              ; preds = %105
  %119 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 21
  store i32 3, ptr %119, align 8, !tbaa !30
  call void @_ZN7ImGuiAl3Log14scrollToBottomEv(ptr noundef nonnull align 8 dereferenceable(456) %17)
  br label %120

120:                                              ; preds = %118, %105
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %121 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 17
  %122 = load ptr, ptr %121, align 8, !tbaa !43
  %123 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 22
  %124 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef %122, ptr noundef %123)
  %125 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 24
  %126 = getelementptr inbounds %"class.ImGuiAl::Log", ptr %17, i32 0, i32 18
  %127 = load ptr, ptr %126, align 8, !tbaa !44
  %128 = call noundef zeroext i1 @_ZN15ImGuiTextFilter4DrawEPKcf(ptr noundef nonnull align 8 dereferenceable(276) %125, ptr noundef %127, float noundef 0.000000e+00)
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #4
  br label %129

129:                                              ; preds = %120, %56, %52
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %131 = getelementptr inbounds %class.anon.1, ptr %14, i32 0, i32 0
  store ptr %17, ptr %131, align 8, !tbaa !45
  call void @"_ZNSt8functionIFbRKN7ImGuiAl3Crt4InfoEPKcEEC2IZNS0_3Log4drawERK6ImVec2E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  invoke void @_ZN7ImGuiAl3Crt4drawERK6ImVec2RKSt8functionIFbRKNS0_4InfoEPKcEE(ptr noundef nonnull align 8 dereferenceable(49) %17, ptr noundef nonnull align 4 dereferenceable(8) %130, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %132 unwind label %134

132:                                              ; preds = %129
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  %133 = load i32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  ret i32 %133

134:                                              ; preds = %129
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %15, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %16, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  br label %138

138:                                              ; preds = %134
  %139 = load ptr, ptr %15, align 8
  %140 = load i32, ptr %16, align 4
  %141 = insertvalue { ptr, i32 } poison, ptr %139, 0
  %142 = insertvalue { ptr, i32 } %141, i32 %140, 1
  resume { ptr, i32 } %142
}

declare void @_ZN5ImGui8SameLineEff(float noundef, float noundef) #3

declare noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8)) #3

declare noundef zeroext i1 @_ZN5ImGui16CollapsingHeaderEPKci(ptr noundef, i32 noundef) #3

declare void @_ZN5ImGui14PushStyleColorEij(i32 noundef, i32 noundef) #3

declare void @_ZN5ImGui13PopStyleColorEi(i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7ImGuiAl3Log14scrollToBottomEv(ptr noundef nonnull align 8 dereferenceable(456)) #2 align 2

declare noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef, ptr noundef) #3

declare noundef zeroext i1 @_ZN15ImGuiTextFilter4DrawEPKcf(ptr noundef nonnull align 8 dereferenceable(276), ptr noundef, float noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN7ImGuiAl3Crt4InfoEPKcEEC2IZNS0_3Log4drawERK6ImVec2E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { "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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 160}
!12 = !{!"_ZTSN7ImGuiAl3LogE", !13, i64 0, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !17, i64 168, !16, i64 172, !18, i64 176}
!13 = !{!"_ZTSN7ImGuiAl3CrtE", !14, i64 0, !10, i64 40, !10, i64 44, !16, i64 48}
!14 = !{!"_ZTSN7ImGuiAl4FifoE", !6, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32}
!15 = !{!"long", !7, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"_ZTSN7ImGuiAl3Log5LevelE", !7, i64 0}
!18 = !{!"_ZTS15ImGuiTextFilter", !7, i64 0, !19, i64 256, !10, i64 272}
!19 = !{!"_ZTS8ImVectorIN15ImGuiTextFilter14ImGuiTextRangeEE", !10, i64 0, !10, i64 4, !6, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!12, !6, i64 152}
!23 = !{!12, !10, i64 56}
!24 = !{!12, !10, i64 60}
!25 = !{!12, !10, i64 52}
!26 = !{!12, !6, i64 104}
!27 = !{!16, !16, i64 0}
!28 = !{i8 0, i8 2}
!29 = !{}
!30 = !{!12, !17, i64 168}
!31 = !{!12, !10, i64 68}
!32 = !{!12, !10, i64 72}
!33 = !{!12, !10, i64 64}
!34 = !{!12, !6, i64 112}
!35 = !{!12, !10, i64 80}
!36 = !{!12, !10, i64 84}
!37 = !{!12, !10, i64 76}
!38 = !{!12, !6, i64 120}
!39 = !{!12, !10, i64 92}
!40 = !{!12, !10, i64 96}
!41 = !{!12, !10, i64 88}
!42 = !{!12, !6, i64 128}
!43 = !{!12, !6, i64 136}
!44 = !{!12, !6, i64 144}
!45 = !{!46, !6, i64 0}
!46 = !{!"_ZTSZN7ImGuiAl3Log4drawERK6ImVec2E3$_0", !6, i64 0}


; 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 }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%class.anon.1 = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7ImGuiAl3Crt4drawERK6ImVec2RKSt8functionIFbRKNS0_4InfoEPKcEE(ptr noundef nonnull align 8 dereferenceable(49), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN7ImGuiAl3Log4drawERK6ImVec2(ptr noundef nonnull align 8 dereferenceable(456) %0, ptr noundef nonnull align 4 dereferenceable(8) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %struct.ImVec2, align 4
  %4 = alloca %struct.ImVec2, align 4
  %5 = alloca %struct.ImVec2, align 4
  %6 = alloca %struct.ImVec2, align 4
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca %"class.std::function", align 8
  %9 = alloca %class.anon.1, align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 160
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %.not19 = icmp eq ptr %11, null
  br i1 %.not19, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %2, %20
  %12 = phi ptr [ %24, %20 ], [ %11, %2 ]
  %.021 = phi i32 [ %spec.select, %20 ], [ 0, %2 ]
  %.01320 = phi i32 [ %23, %20 ], [ 0, %2 ]
  %13 = zext i32 %.01320 to i64
  %14 = getelementptr inbounds ptr, ptr %12, i64 %13
  %15 = load ptr, ptr %14, align 8, !tbaa !18
  %.not16 = icmp eq ptr %15, null
  br i1 %.not16, label %.critedge, label %18

.critedge:                                        ; preds = %.lr.ph, %20, %2
  %.0.lcssa = phi i32 [ 0, %2 ], [ %spec.select, %20 ], [ %.021, %.lr.ph ]
  %16 = getelementptr inbounds i8, ptr %0, i64 152
  %17 = load ptr, ptr %16, align 8, !tbaa !19
  %.not17 = icmp eq ptr %17, null
  br i1 %.not17, label %84, label %25

18:                                               ; preds = %.lr.ph
  %.not18 = icmp eq i32 %.01320, 0
  br i1 %.not18, label %20, label %19

19:                                               ; preds = %18
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %.pre = load ptr, ptr %10, align 8, !tbaa !5
  %.phi.trans.insert = getelementptr inbounds ptr, ptr %.pre, i64 %13
  %.pre24 = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !18
  br label %20

20:                                               ; preds = %19, %18
  %21 = phi ptr [ %.pre24, %19 ], [ %15, %18 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %3, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %22 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef %21, ptr noundef nonnull align 4 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %23 = add i32 %.01320, 1
  %spec.select = select i1 %22, i32 %23, i32 %.021
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %.not = icmp eq ptr %24, null
  br i1 %.not, label %.critedge, label %.lr.ph, !llvm.loop !20

25:                                               ; preds = %.critedge
  %26 = call noundef zeroext i1 @_ZN5ImGui16CollapsingHeaderEPKci(ptr noundef nonnull %17, i32 noundef 0)
  br i1 %26, label %27, label %84

27:                                               ; preds = %25
  %28 = getelementptr inbounds i8, ptr %0, i64 56
  %29 = load i32, ptr %28, align 8, !tbaa !22
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 21, i32 noundef %29)
  %30 = getelementptr inbounds i8, ptr %0, i64 60
  %31 = load i32, ptr %30, align 4, !tbaa !23
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 22, i32 noundef %31)
  %32 = getelementptr inbounds i8, ptr %0, i64 52
  %33 = load i32, ptr %32, align 4, !tbaa !24
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 23, i32 noundef %33)
  %34 = getelementptr inbounds i8, ptr %0, i64 104
  %35 = load ptr, ptr %34, align 8, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %4, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %36 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef %35, ptr noundef nonnull align 4 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 3)
  br i1 %36, label %37, label %39

37:                                               ; preds = %27
  %38 = getelementptr inbounds i8, ptr %0, i64 168
  store i32 0, ptr %38, align 8, !tbaa !26
  call void @_ZN7ImGuiAl3Log14scrollToBottomEv(ptr noundef nonnull align 8 dereferenceable(456) %0)
  br label %39

39:                                               ; preds = %37, %27
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %40 = getelementptr inbounds i8, ptr %0, i64 68
  %41 = load i32, ptr %40, align 4, !tbaa !27
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 21, i32 noundef %41)
  %42 = getelementptr inbounds i8, ptr %0, i64 72
  %43 = load i32, ptr %42, align 8, !tbaa !28
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 22, i32 noundef %43)
  %44 = getelementptr inbounds i8, ptr %0, i64 64
  %45 = load i32, ptr %44, align 8, !tbaa !29
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 23, i32 noundef %45)
  %46 = getelementptr inbounds i8, ptr %0, i64 112
  %47 = load ptr, ptr %46, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %5, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %48 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef %47, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 3)
  br i1 %48, label %49, label %51

49:                                               ; preds = %39
  %50 = getelementptr inbounds i8, ptr %0, i64 168
  store i32 1, ptr %50, align 8, !tbaa !26
  call void @_ZN7ImGuiAl3Log14scrollToBottomEv(ptr noundef nonnull align 8 dereferenceable(456) %0)
  br label %51

51:                                               ; preds = %49, %39
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %52 = getelementptr inbounds i8, ptr %0, i64 80
  %53 = load i32, ptr %52, align 8, !tbaa !31
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 21, i32 noundef %53)
  %54 = getelementptr inbounds i8, ptr %0, i64 84
  %55 = load i32, ptr %54, align 4, !tbaa !32
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 22, i32 noundef %55)
  %56 = getelementptr inbounds i8, ptr %0, i64 76
  %57 = load i32, ptr %56, align 4, !tbaa !33
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 23, i32 noundef %57)
  %58 = getelementptr inbounds i8, ptr %0, i64 120
  %59 = load ptr, ptr %58, align 8, !tbaa !34
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %6, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %60 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef %59, ptr noundef nonnull align 4 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 3)
  br i1 %60, label %61, label %63

61:                                               ; preds = %51
  %62 = getelementptr inbounds i8, ptr %0, i64 168
  store i32 2, ptr %62, align 8, !tbaa !26
  call void @_ZN7ImGuiAl3Log14scrollToBottomEv(ptr noundef nonnull align 8 dereferenceable(456) %0)
  br label %63

63:                                               ; preds = %61, %51
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %64 = getelementptr inbounds i8, ptr %0, i64 92
  %65 = load i32, ptr %64, align 4, !tbaa !35
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 21, i32 noundef %65)
  %66 = getelementptr inbounds i8, ptr %0, i64 96
  %67 = load i32, ptr %66, align 8, !tbaa !36
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 22, i32 noundef %67)
  %68 = getelementptr inbounds i8, ptr %0, i64 88
  %69 = load i32, ptr %68, align 8, !tbaa !37
  call void @_ZN5ImGui14PushStyleColorEij(i32 noundef 23, i32 noundef %69)
  %70 = getelementptr inbounds i8, ptr %0, i64 128
  %71 = load ptr, ptr %70, align 8, !tbaa !38
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %72 = call noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef %71, ptr noundef nonnull align 4 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @_ZN5ImGui13PopStyleColorEi(i32 noundef 3)
  br i1 %72, label %73, label %75

73:                                               ; preds = %63
  %74 = getelementptr inbounds i8, ptr %0, i64 168
  store i32 3, ptr %74, align 8, !tbaa !26
  call void @_ZN7ImGuiAl3Log14scrollToBottomEv(ptr noundef nonnull align 8 dereferenceable(456) %0)
  br label %75

75:                                               ; preds = %73, %63
  call void @_ZN5ImGui8SameLineEff(float noundef 0.000000e+00, float noundef -1.000000e+00)
  %76 = getelementptr inbounds i8, ptr %0, i64 136
  %77 = load ptr, ptr %76, align 8, !tbaa !39
  %78 = getelementptr inbounds i8, ptr %0, i64 172
  %79 = call noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef %77, ptr noundef nonnull %78)
  %80 = getelementptr inbounds i8, ptr %0, i64 176
  %81 = getelementptr inbounds i8, ptr %0, i64 144
  %82 = load ptr, ptr %81, align 8, !tbaa !40
  %83 = call noundef zeroext i1 @_ZN15ImGuiTextFilter4DrawEPKcf(ptr noundef nonnull align 8 dereferenceable(276) %80, ptr noundef %82, float noundef 0.000000e+00)
  br label %84

84:                                               ; preds = %75, %25, %.critedge
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  store ptr %0, ptr %9, align 8, !tbaa !41
  call void @"_ZNSt8functionIFbRKN7ImGuiAl3Crt4InfoEPKcEEC2IZNS0_3Log4drawERK6ImVec2E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  invoke void @_ZN7ImGuiAl3Crt4drawERK6ImVec2RKSt8functionIFbRKNS0_4InfoEPKcEE(ptr noundef nonnull align 8 dereferenceable(49) %0, ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %85 unwind label %86

85:                                               ; preds = %84
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  ret i32 %.0.lcssa

86:                                               ; preds = %84
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  resume { ptr, i32 } %87
}

declare void @_ZN5ImGui8SameLineEff(float noundef, float noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN5ImGui6ButtonEPKcRK6ImVec2(ptr noundef, ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN5ImGui16CollapsingHeaderEPKci(ptr noundef, i32 noundef) local_unnamed_addr #3

declare void @_ZN5ImGui14PushStyleColorEij(i32 noundef, i32 noundef) local_unnamed_addr #3

declare void @_ZN5ImGui13PopStyleColorEi(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7ImGuiAl3Log14scrollToBottomEv(ptr noundef nonnull align 8 dereferenceable(456)) local_unnamed_addr #2 align 2

declare noundef zeroext i1 @_ZN5ImGui8CheckboxEPKcPb(ptr noundef, ptr noundef) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN15ImGuiTextFilter4DrawEPKcf(ptr noundef nonnull align 8 dereferenceable(276), ptr noundef, float noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @"_ZNSt8functionIFbRKN7ImGuiAl3Crt4InfoEPKcEEC2IZNS0_3Log4drawERK6ImVec2E3$_0vEEOT_"(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { "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, !9, i64 160}
!6 = !{!"_ZTSN7ImGuiAl3LogE", !7, i64 0, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !9, i64 104, !9, i64 112, !9, i64 120, !9, i64 128, !9, i64 136, !9, i64 144, !9, i64 152, !9, i64 160, !15, i64 168, !14, i64 172, !16, i64 176}
!7 = !{!"_ZTSN7ImGuiAl3CrtE", !8, i64 0, !13, i64 40, !13, i64 44, !14, i64 48}
!8 = !{!"_ZTSN7ImGuiAl4FifoE", !9, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"int", !10, i64 0}
!14 = !{!"bool", !10, i64 0}
!15 = !{!"_ZTSN7ImGuiAl3Log5LevelE", !10, i64 0}
!16 = !{!"_ZTS15ImGuiTextFilter", !10, i64 0, !17, i64 256, !13, i64 272}
!17 = !{!"_ZTS8ImVectorIN15ImGuiTextFilter14ImGuiTextRangeEE", !13, i64 0, !13, i64 4, !9, i64 8}
!18 = !{!9, !9, i64 0}
!19 = !{!6, !9, i64 152}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!6, !13, i64 56}
!23 = !{!6, !13, i64 60}
!24 = !{!6, !13, i64 52}
!25 = !{!6, !9, i64 104}
!26 = !{!6, !15, i64 168}
!27 = !{!6, !13, i64 68}
!28 = !{!6, !13, i64 72}
!29 = !{!6, !13, i64 64}
!30 = !{!6, !9, i64 112}
!31 = !{!6, !13, i64 80}
!32 = !{!6, !13, i64 84}
!33 = !{!6, !13, i64 76}
!34 = !{!6, !9, i64 120}
!35 = !{!6, !13, i64 92}
!36 = !{!6, !13, i64 96}
!37 = !{!6, !13, i64 88}
!38 = !{!6, !9, i64 128}
!39 = !{!6, !9, i64 136}
!40 = !{!6, !9, i64 144}
!41 = !{!42, !9, i64 0}
!42 = !{!"_ZTSZN7ImGuiAl3Log4drawERK6ImVec2E3$_0", !9, i64 0}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass