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

; 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.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 }
%struct.ImGuiState = type { i8, [7 x i8], %struct.ImGuiIO, %struct.ImGuiStyle, ptr, float, %struct.ImVec2, float, i32, i32, %class.ImVector.1, ptr, %class.ImVector.1, ptr, ptr, ptr, i32, i32, i32, i8, i8, ptr, float, %class.ImVector.2, %class.ImVector.3, %class.ImVector.4, %class.ImVector, %struct.ImVec2, i32, %struct.ImVec2, i32, i8, i32, i8, i8, i32, %class.ImVector.5, %class.ImVector.1, %struct.ImGuiTextEditState, i32, %struct.ImGuiStorage, i32, [1024 x i8], ptr, i8, ptr, ptr, i32, i32, [120 x float], i32, float }
%struct.ImGuiIO = type <{ %struct.ImVec2, float, float, ptr, ptr, float, float, [17 x i32], [4 x i8], ptr, ptr, float, i8, [3 x i8], %struct.ImVec2, %struct.ImVec2, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.ImVec2, [5 x i8], [3 x i8], float, i8, i8, i8, [512 x i8], i8, [17 x i16], i8, i8, float, %struct.ImVec2, %struct.ImVec2, [5 x i8], [3 x i8], [5 x %struct.ImVec2], [5 x float], [5 x i8], [5 x i8], [2 x i8], [5 x float], [512 x float], [4 x i8] }>
%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 }
%class.ImVector.2 = type { i64, i64, ptr }
%class.ImVector.3 = type { i64, i64, ptr }
%class.ImVector.4 = type { i64, i64, ptr }
%class.ImVector = type { i64, i64, ptr }
%class.ImVector.5 = type { i64, i64, ptr }
%struct.ImGuiTextEditState = type <{ i32, [1024 x i16], [3073 x i8], [3 x i8], i64, float, float, %struct.STB_TexteditState, float, %struct.ImVec2, i8, [7 x i8], ptr, float, [4 x i8] }>
%struct.STB_TexteditState = type { i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, float, %struct.StbUndoState }
%struct.StbUndoState = type { [99 x %struct.StbUndoRecord], [999 x i16], i16, i16, i16, i16 }
%struct.StbUndoRecord = type { i32, i16, i16, i16 }

@_ZL6GImGui = external hidden global ptr, align 8

; 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: 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: mustprogress uwtable
declare dso_local noundef i32 @_ZN11ImGuiWindow5GetIDEPKc(ptr noundef nonnull align 8 dereferenceable(480), ptr noundef) #3 align 2

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

; 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 #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL7ItemAddRK9ImGuiAabbPKj(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK11ImGuiWindow5ColorEif(ptr noundef nonnull align 8 dereferenceable(480), i32 noundef, float noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL15ButtonBehaviourRK9ImGuiAabbRKjPbS4_bbb(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) #3

; 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 hidden void @_ZL8ItemSizeRK9ImGuiAabbP6ImVec2(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef) #6

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5ImGui11SmallButtonEPKc(ptr noundef %0) #6 {
  %2 = alloca i1, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.ImVec2, align 4
  %10 = alloca %struct.ImGuiAabb, align 4
  %11 = alloca %struct.ImVec2, align 4
  %12 = alloca %struct.ImVec2, align 4
  %13 = alloca %struct.ImVec2, align 4
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i8, align 1
  %17 = alloca i32, align 4
  %18 = alloca %struct.ImVec2, align 4
  %19 = alloca %struct.ImVec2, align 4
  %20 = alloca %struct.ImVec2, align 4
  %21 = alloca %struct.ImVec2, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %22 = load ptr, ptr @_ZL6GImGui, align 8, !tbaa !5
  store ptr %22, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %23 = call noundef ptr @_ZL16GetCurrentWindowv()
  store ptr %23, ptr %5, align 8, !tbaa !5
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.ImGuiWindow, ptr %24, i32 0, i32 14
  %26 = load i8, ptr %25, align 4, !tbaa !9, !range !25, !noundef !26
  %27 = trunc i8 %26 to i1
  br i1 %27, label %28, label %29

28:                                               ; preds = %1
  store i1 false, ptr %2, align 1
  store i32 1, ptr %6, align 4
  br label %86

29:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.ImGuiState, ptr %30, i32 0, i32 3
  store ptr %31, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = call noundef i32 @_ZN11ImGuiWindow5GetIDEPKc(ptr noundef nonnull align 8 dereferenceable(480) %32, ptr noundef %33)
  store i32 %34, ptr %8, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = call <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef %35, ptr noundef null, i1 noundef zeroext true, float noundef -1.000000e+00)
  store <2 x float> %36, ptr %9, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #7
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ImGuiWindow, ptr %37, i32 0, i32 20
  %39 = getelementptr inbounds %struct.ImGuiDrawContext, ptr %38, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ImGuiWindow, ptr %40, i32 0, i32 20
  %42 = getelementptr inbounds %struct.ImGuiDrawContext, ptr %41, i32 0, i32 0
  %43 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %42, ptr noundef nonnull align 4 dereferenceable(8) %9)
  store <2 x float> %43, ptr %12, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.ImGuiStyle, ptr %44, i32 0, i32 5
  %46 = getelementptr inbounds %struct.ImVec2, ptr %45, i32 0, i32 0
  %47 = load float, ptr %46, align 4, !tbaa !28
  %48 = fmul float %47, 2.000000e+00
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef %48, float noundef 0.000000e+00)
  %49 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %13)
  store <2 x float> %49, ptr %11, align 4
  call void @_ZN9ImGuiAabbC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(8) %39, ptr noundef nonnull align 4 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @_ZL8ItemSizeRK9ImGuiAabbP6ImVec2(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef null)
  %50 = call noundef zeroext i1 @_ZL7ItemAddRK9ImGuiAabbPKj(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef %8)
  br i1 %50, label %52, label %51

51:                                               ; preds = %29
  store i1 false, ptr %2, align 1
  store i32 1, ptr %6, align 4
  br label %85

52:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  %53 = call noundef zeroext i1 @_ZL15ButtonBehaviourRK9ImGuiAabbRKjPbS4_bbb(ptr noundef nonnull align 4 dereferenceable(16) %10, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef %14, ptr noundef %15, i1 noundef zeroext true, i1 noundef zeroext false, i1 noundef zeroext false)
  %54 = zext i1 %53 to i8
  store i8 %54, ptr %16, align 1, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = load i8, ptr %14, align 1, !tbaa !30, !range !25, !noundef !26
  %57 = trunc i8 %56 to i1
  br i1 %57, label %58, label %62

58:                                               ; preds = %52
  %59 = load i8, ptr %15, align 1, !tbaa !30, !range !25, !noundef !26
  %60 = trunc i8 %59 to i1
  br i1 %60, label %61, label %62

61:                                               ; preds = %58
  br label %67

62:                                               ; preds = %58, %52
  %63 = load i8, ptr %14, align 1, !tbaa !30, !range !25, !noundef !26
  %64 = trunc i8 %63 to i1
  %65 = zext i1 %64 to i64
  %66 = select i1 %64, i32 19, i32 18
  br label %67

67:                                               ; preds = %62, %61
  %68 = phi i32 [ 20, %61 ], [ %66, %62 ]
  %69 = call noundef i32 @_ZNK11ImGuiWindow5ColorEif(ptr noundef nonnull align 8 dereferenceable(480) %55, i32 noundef %68, float noundef 1.000000e+00)
  store i32 %69, ptr %17, align 4, !tbaa !27
  %70 = getelementptr inbounds %struct.ImGuiAabb, ptr %10, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %70, i64 8, i1 false), !tbaa.struct !31
  %71 = getelementptr inbounds %struct.ImGuiAabb, ptr %10, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %71, i64 8, i1 false), !tbaa.struct !31
  %72 = load i32, ptr %17, align 4, !tbaa !27
  %73 = load <2 x float>, ptr %18, align 4
  %74 = load <2 x float>, ptr %19, align 4
  call void @_ZL11RenderFrame6ImVec2S_jbf(<2 x float> %73, <2 x float> %74, i32 noundef %72, i1 noundef zeroext true, float noundef 0.000000e+00)
  %75 = getelementptr inbounds %struct.ImGuiAabb, ptr %10, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ImGuiStyle, ptr %76, i32 0, i32 5
  %78 = getelementptr inbounds %struct.ImVec2, ptr %77, i32 0, i32 0
  %79 = load float, ptr %78, align 4, !tbaa !28
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %21, float noundef %79, float noundef 0.000000e+00)
  %80 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %75, ptr noundef nonnull align 4 dereferenceable(8) %21)
  store <2 x float> %80, ptr %20, align 4
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = load <2 x float>, ptr %20, align 4
  call void @_ZL10RenderText6ImVec2PKcS1_b(<2 x float> %82, ptr noundef %81, ptr noundef null, i1 noundef zeroext true)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  %83 = load i8, ptr %16, align 1, !tbaa !30, !range !25, !noundef !26
  %84 = trunc i8 %83 to i1
  store i1 %84, ptr %2, align 1
  store i32 1, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  br label %85

85:                                               ; preds = %67, %51
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %86

86:                                               ; preds = %85, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  %87 = load i1, ptr %2, align 1
  ret i1 %87
}

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 = { 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 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 = { 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, !14, i64 68}
!10 = !{!"_ZTS11ImGuiWindow", !6, i64 0, !11, i64 8, !11, i64 12, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !13, i64 56, !13, i64 60, !14, i64 64, !14, i64 65, !14, i64 66, !14, i64 67, !14, i64 68, !11, i64 72, !14, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !15, i64 96, !21, i64 336, !22, i64 360, !16, i64 384, !11, i64 400, !13, i64 404, !23, i64 408, !13, i64 432, !6, i64 440, !6, i64 448, !11, i64 456, !11, i64 460, !11, i64 464, !11, i64 468, !11, i64 472, !11, i64 476}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTS16ImGuiDrawContext", !12, i64 0, !12, i64 8, !12, i64 16, !13, i64 24, !13, i64 28, !13, i64 32, !11, i64 36, !11, i64 40, !16, i64 44, !14, i64 60, !17, i64 64, !19, i64 88, !20, i64 112, !20, i64 136, !11, i64 160, !6, i64 168, !13, i64 176, !13, i64 180, !11, i64 184, !11, i64 188, !12, i64 192, !13, i64 200, !13, i64 204, !14, i64 208, !11, i64 212, !20, i64 216}
!16 = !{!"_ZTS9ImGuiAabb", !12, i64 0, !12, i64 8}
!17 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !18, i64 0, !18, i64 8, !6, i64 16}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTS8ImVectorIbE", !18, i64 0, !18, i64 8, !6, i64 16}
!20 = !{!"_ZTS8ImVectorIfE", !18, i64 0, !18, i64 8, !6, i64 16}
!21 = !{!"_ZTS8ImVectorIjE", !18, i64 0, !18, i64 8, !6, i64 16}
!22 = !{!"_ZTS8ImVectorI6ImVec4E", !18, i64 0, !18, i64 8, !6, i64 16}
!23 = !{!"_ZTS12ImGuiStorage", !24, i64 0}
!24 = !{!"_ZTS8ImVectorIN12ImGuiStorage4PairEE", !18, i64 0, !18, i64 8, !6, i64 16}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!11, !11, i64 0}
!28 = !{!29, !13, i64 28}
!29 = !{!"_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}
!30 = !{!14, !14, i64 0}
!31 = !{i64 0, i64 4, !32, i64 4, i64 4, !32}
!32 = !{!13, !13, 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 }
%struct.ImGuiAabb = type { %struct.ImVec2, %struct.ImVec2 }

@_ZL6GImGui = external hidden local_unnamed_addr global ptr, align 8

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; 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 uwtable
declare dso_local noundef i32 @_ZN11ImGuiWindow5GetIDEPKc(ptr noundef nonnull align 8 dereferenceable(480), ptr noundef) local_unnamed_addr #2 align 2

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

; 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 #4

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

; 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 #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL7ItemAddRK9ImGuiAabbPKj(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK11ImGuiWindow5ColorEif(ptr noundef nonnull align 8 dereferenceable(480), i32 noundef, float noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL15ButtonBehaviourRK9ImGuiAabbRKjPbS4_bbb(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i1 noundef zeroext) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL8ItemSizeRK9ImGuiAabbP6ImVec2(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL11RenderFrame6ImVec2S_jbf(<2 x float>, <2 x float>, i32 noundef, i1 noundef zeroext, float noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN5ImGui11SmallButtonEPKc(ptr noundef %0) local_unnamed_addr #5 {
  %2 = alloca i32, align 4
  %3 = alloca %struct.ImVec2, align 8
  %4 = alloca %struct.ImGuiAabb, align 8
  %5 = alloca %struct.ImVec2, align 8
  %6 = alloca %struct.ImVec2, align 8
  %7 = alloca %struct.ImVec2, align 4
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  %10 = alloca %struct.ImVec2, align 4
  %11 = load ptr, ptr @_ZL6GImGui, align 8, !tbaa !5
  %12 = tail call noundef ptr @_ZL16GetCurrentWindowv()
  %13 = getelementptr inbounds i8, ptr %12, i64 68
  %14 = load i8, ptr %13, align 4, !tbaa !9, !range !25, !noundef !26
  %15 = trunc nuw i8 %14 to i1
  br i1 %15, label %38, label %16

16:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  %17 = tail call noundef i32 @_ZN11ImGuiWindow5GetIDEPKc(ptr noundef nonnull align 8 dereferenceable(480) %12, ptr noundef %0)
  store i32 %17, ptr %2, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %18 = tail call <2 x float> @_ZN5ImGui12CalcTextSizeEPKcS1_bf(ptr noundef %0, ptr noundef null, i1 noundef zeroext true, float noundef -1.000000e+00)
  store <2 x float> %18, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  %19 = getelementptr inbounds i8, ptr %12, i64 96
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %20 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %3)
  store <2 x float> %20, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %21 = getelementptr inbounds i8, ptr %11, i64 2988
  %22 = load float, ptr %21, align 4, !tbaa !28
  %23 = fmul float %22, 2.000000e+00
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %7, float noundef %23, float noundef 0.000000e+00)
  %24 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(8) %7)
  store <2 x float> %24, ptr %5, align 8
  call void @_ZN9ImGuiAabbC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  call void @_ZL8ItemSizeRK9ImGuiAabbP6ImVec2(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef null)
  %25 = call noundef zeroext i1 @_ZL7ItemAddRK9ImGuiAabbPKj(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull %2)
  br i1 %25, label %26, label %37

26:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  %27 = call noundef zeroext i1 @_ZL15ButtonBehaviourRK9ImGuiAabbRKjPbS4_bbb(ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull %8, ptr noundef nonnull %9, i1 noundef zeroext true, i1 noundef zeroext false, i1 noundef zeroext false)
  %28 = load i8, ptr %8, align 1, !tbaa !30, !range !25, !noundef !26
  %29 = trunc nuw i8 %28 to i1
  %30 = load i8, ptr %9, align 1, !range !25
  %31 = trunc nuw i8 %30 to i1
  %spec.select = select i1 %31, i32 20, i32 19
  %32 = select i1 %29, i32 %spec.select, i32 18
  %33 = call noundef i32 @_ZNK11ImGuiWindow5ColorEif(ptr noundef nonnull align 8 dereferenceable(480) %12, i32 noundef %32, float noundef 1.000000e+00)
  %.sroa.02.0.copyload = load <2 x float>, ptr %4, align 8
  %34 = getelementptr inbounds i8, ptr %4, i64 8
  %.sroa.01.0.copyload = load <2 x float>, ptr %34, align 8
  call void @_ZL11RenderFrame6ImVec2S_jbf(<2 x float> %.sroa.02.0.copyload, <2 x float> %.sroa.01.0.copyload, i32 noundef %33, i1 noundef zeroext true, float noundef 0.000000e+00)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %35 = load float, ptr %21, align 4, !tbaa !28
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %10, float noundef %35, float noundef 0.000000e+00)
  %36 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %4, ptr noundef nonnull align 4 dereferenceable(8) %10)
  call void @_ZL10RenderText6ImVec2PKcS1_b(<2 x float> %36, ptr noundef %0, ptr noundef null, i1 noundef zeroext true)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  br label %37

37:                                               ; preds = %16, %26
  %.0 = phi i1 [ %27, %26 ], [ false, %16 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  br label %38

38:                                               ; preds = %1, %37
  %.1 = phi i1 [ %.0, %37 ], [ false, %1 ]
  ret i1 %.1
}

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 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 = { 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 #5 = { 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 = { 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, !14, i64 68}
!10 = !{!"_ZTS11ImGuiWindow", !6, i64 0, !11, i64 8, !11, i64 12, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !13, i64 56, !13, i64 60, !14, i64 64, !14, i64 65, !14, i64 66, !14, i64 67, !14, i64 68, !11, i64 72, !14, i64 76, !11, i64 80, !11, i64 84, !11, i64 88, !15, i64 96, !21, i64 336, !22, i64 360, !16, i64 384, !11, i64 400, !13, i64 404, !23, i64 408, !13, i64 432, !6, i64 440, !6, i64 448, !11, i64 456, !11, i64 460, !11, i64 464, !11, i64 468, !11, i64 472, !11, i64 476}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTS6ImVec2", !13, i64 0, !13, i64 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTS16ImGuiDrawContext", !12, i64 0, !12, i64 8, !12, i64 16, !13, i64 24, !13, i64 28, !13, i64 32, !11, i64 36, !11, i64 40, !16, i64 44, !14, i64 60, !17, i64 64, !19, i64 88, !20, i64 112, !20, i64 136, !11, i64 160, !6, i64 168, !13, i64 176, !13, i64 180, !11, i64 184, !11, i64 188, !12, i64 192, !13, i64 200, !13, i64 204, !14, i64 208, !11, i64 212, !20, i64 216}
!16 = !{!"_ZTS9ImGuiAabb", !12, i64 0, !12, i64 8}
!17 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !18, i64 0, !18, i64 8, !6, i64 16}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTS8ImVectorIbE", !18, i64 0, !18, i64 8, !6, i64 16}
!20 = !{!"_ZTS8ImVectorIfE", !18, i64 0, !18, i64 8, !6, i64 16}
!21 = !{!"_ZTS8ImVectorIjE", !18, i64 0, !18, i64 8, !6, i64 16}
!22 = !{!"_ZTS8ImVectorI6ImVec4E", !18, i64 0, !18, i64 8, !6, i64 16}
!23 = !{!"_ZTS12ImGuiStorage", !24, i64 0}
!24 = !{!"_ZTS8ImVectorIN12ImGuiStorage4PairEE", !18, i64 0, !18, i64 8, !6, i64 16}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!11, !11, i64 0}
!28 = !{!29, !13, i64 28}
!29 = !{!"_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}
!30 = !{!14, !14, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass