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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef nonnull align 4 dereferenceable(8) ptr @_ZpLR6ImVec2RKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #2

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

; 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)) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfi(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, float noundef, i32 noundef) #4 align 2

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

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

27:                                               ; preds = %6
  store i32 1, ptr %14, align 4
  br label %88

28:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %29 = load ptr, ptr %13, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.ImGuiWindow, ptr %29, i32 0, i32 20
  %31 = getelementptr inbounds %struct.ImGuiDrawContext, ptr %30, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.ImGuiWindow, ptr %32, i32 0, i32 20
  %34 = getelementptr inbounds %struct.ImGuiDrawContext, ptr %33, i32 0, i32 0
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %35)
  store <2 x float> %36, ptr %16, align 4
  call void @_ZN9ImGuiAabbC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %15, ptr noundef nonnull align 4 dereferenceable(8) %31, ptr noundef nonnull align 4 dereferenceable(8) %16)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.ImVec4, ptr %37, i32 0, i32 3
  %39 = load float, ptr %38, align 4, !tbaa !27
  %40 = fcmp ogt float %39, 0.000000e+00
  br i1 %40, label %41, label %44

41:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %17, float noundef 2.000000e+00, float noundef 2.000000e+00)
  %42 = getelementptr inbounds %struct.ImGuiAabb, ptr %15, i32 0, i32 1
  %43 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZpLR6ImVec2RKS_(ptr noundef nonnull align 4 dereferenceable(8) %42, ptr noundef nonnull align 4 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %44

44:                                               ; preds = %41, %28
  call void @_ZL8ItemSizeRK9ImGuiAabbP6ImVec2(ptr noundef nonnull align 4 dereferenceable(16) %15, ptr noundef null)
  %45 = call noundef zeroext i1 @_ZL7ItemAddRK9ImGuiAabbPKj(ptr noundef nonnull align 4 dereferenceable(16) %15, ptr noundef null)
  br i1 %45, label %47, label %46

46:                                               ; preds = %44
  store i32 1, ptr %14, align 4
  br label %87

47:                                               ; preds = %44
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ImVec4, ptr %48, i32 0, i32 3
  %50 = load float, ptr %49, align 4, !tbaa !27
  %51 = fcmp ogt float %50, 0.000000e+00
  br i1 %51, label %52, label %74

52:                                               ; preds = %47
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ImGuiWindow, ptr %53, i32 0, i32 28
  %55 = load ptr, ptr %54, align 8, !tbaa !29
  %56 = getelementptr inbounds %struct.ImGuiAabb, ptr %15, i32 0, i32 0
  %57 = getelementptr inbounds %struct.ImGuiAabb, ptr %15, i32 0, i32 1
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = call noundef i32 @_ZNK11ImGuiWindow5ColorERK6ImVec4(ptr noundef nonnull align 8 dereferenceable(480) %58, ptr noundef nonnull align 4 dereferenceable(16) %59)
  call void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfi(ptr noundef nonnull align 8 dereferenceable(104) %55, ptr noundef nonnull align 4 dereferenceable(8) %56, ptr noundef nonnull align 4 dereferenceable(8) %57, i32 noundef %60, float noundef 0.000000e+00, i32 noundef 15)
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.ImGuiWindow, ptr %61, i32 0, i32 28
  %63 = load ptr, ptr %62, align 8, !tbaa !29
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %65 = getelementptr inbounds %struct.ImGuiAabb, ptr %15, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %19, float noundef 1.000000e+00, float noundef 1.000000e+00)
  %66 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %65, ptr noundef nonnull align 4 dereferenceable(8) %19)
  store <2 x float> %66, ptr %18, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %67 = getelementptr inbounds %struct.ImGuiAabb, ptr %15, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %21, float noundef 1.000000e+00, float noundef 1.000000e+00)
  %68 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %67, ptr noundef nonnull align 4 dereferenceable(8) %21)
  store <2 x float> %68, ptr %20, align 4
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  %72 = load ptr, ptr %11, align 8, !tbaa !5
  %73 = call noundef i32 @_ZNK11ImGuiWindow5ColorERK6ImVec4(ptr noundef nonnull align 8 dereferenceable(480) %71, ptr noundef nonnull align 4 dereferenceable(16) %72)
  call void @_ZN10ImDrawList8AddImageEPvRK6ImVec2S3_S3_S3_j(ptr noundef nonnull align 8 dereferenceable(104) %63, ptr noundef %64, ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(8) %20, ptr noundef nonnull align 4 dereferenceable(8) %69, ptr noundef nonnull align 4 dereferenceable(8) %70, i32 noundef %73)
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %86

74:                                               ; preds = %47
  %75 = load ptr, ptr %13, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.ImGuiWindow, ptr %75, i32 0, i32 28
  %77 = load ptr, ptr %76, align 8, !tbaa !29
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.ImGuiAabb, ptr %15, i32 0, i32 0
  %80 = getelementptr inbounds %struct.ImGuiAabb, ptr %15, i32 0, i32 1
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = call noundef i32 @_ZNK11ImGuiWindow5ColorERK6ImVec4(ptr noundef nonnull align 8 dereferenceable(480) %83, ptr noundef nonnull align 4 dereferenceable(16) %84)
  call void @_ZN10ImDrawList8AddImageEPvRK6ImVec2S3_S3_S3_j(ptr noundef nonnull align 8 dereferenceable(104) %77, ptr noundef %78, ptr noundef nonnull align 4 dereferenceable(8) %79, ptr noundef nonnull align 4 dereferenceable(8) %80, ptr noundef nonnull align 4 dereferenceable(8) %81, ptr noundef nonnull align 4 dereferenceable(8) %82, i32 noundef %85)
  br label %86

86:                                               ; preds = %74, %52
  store i32 0, ptr %14, align 4
  br label %87

87:                                               ; preds = %86, %46
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br label %88

88:                                               ; preds = %87, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  %89 = load i32, ptr %14, align 4
  switch i32 %89, label %91 [
    i32 0, label %90
    i32 1, label %90
  ]

90:                                               ; preds = %88, %88
  ret void

91:                                               ; preds = %88
  unreachable
}

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

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!28, !13, i64 12}
!28 = !{!"_ZTS6ImVec4", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!29 = !{!10, !6, i64 440}


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

; 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: inlinehint mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL16GetCurrentWindowv() local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef nonnull align 4 dereferenceable(8) ptr @_ZpLR6ImVec2RKS_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfi(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), i32 noundef, float noundef, i32 noundef) local_unnamed_addr #4 align 2

; 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
define dso_local void @_ZN5ImGui5ImageEPvRK6ImVec2S3_S3_RK6ImVec4S6_(ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %3, ptr noundef nonnull align 4 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(16) %5) local_unnamed_addr #5 {
  %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 4
  %12 = alloca %struct.ImVec2, align 8
  %13 = alloca %struct.ImVec2, align 4
  %14 = tail call noundef ptr @_ZL16GetCurrentWindowv()
  %15 = getelementptr inbounds i8, ptr %14, i64 68
  %16 = load i8, ptr %15, align 4, !tbaa !5, !range !24, !noundef !25
  %17 = trunc nuw i8 %16 to i1
  br i1 %17, label %44, label %18

18:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  %19 = getelementptr inbounds i8, ptr %14, i64 96
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %20 = tail call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %1)
  store <2 x float> %20, ptr %8, align 8
  call void @_ZN9ImGuiAabbC2ERK6ImVec2S2_(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(8) %19, ptr noundef nonnull align 4 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  %21 = getelementptr inbounds i8, ptr %5, i64 12
  %22 = load float, ptr %21, align 4, !tbaa !26
  %23 = fcmp ogt float %22, 0.000000e+00
  br i1 %23, label %24, label %27

24:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef 2.000000e+00, float noundef 2.000000e+00)
  %25 = getelementptr inbounds i8, ptr %7, i64 8
  %26 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZpLR6ImVec2RKS_(ptr noundef nonnull align 4 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %27

27:                                               ; preds = %24, %18
  call void @_ZL8ItemSizeRK9ImGuiAabbP6ImVec2(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef null)
  %28 = call noundef zeroext i1 @_ZL7ItemAddRK9ImGuiAabbPKj(ptr noundef nonnull align 4 dereferenceable(16) %7, ptr noundef null)
  br i1 %28, label %29, label %43

29:                                               ; preds = %27
  %30 = load float, ptr %21, align 4, !tbaa !26
  %31 = fcmp ogt float %30, 0.000000e+00
  %32 = getelementptr inbounds i8, ptr %14, i64 440
  %33 = load ptr, ptr %32, align 8, !tbaa !28
  %34 = getelementptr inbounds i8, ptr %7, i64 8
  br i1 %31, label %35, label %41

35:                                               ; preds = %29
  %36 = call noundef i32 @_ZNK11ImGuiWindow5ColorERK6ImVec4(ptr noundef nonnull align 8 dereferenceable(480) %14, ptr noundef nonnull align 4 dereferenceable(16) %5)
  call void @_ZN10ImDrawList7AddRectERK6ImVec2S2_jfi(ptr noundef nonnull align 8 dereferenceable(104) %33, ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %34, i32 noundef %36, float noundef 0.000000e+00, i32 noundef 15)
  %37 = load ptr, ptr %32, align 8, !tbaa !28
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %11, float noundef 1.000000e+00, float noundef 1.000000e+00)
  %38 = call <2 x float> @_ZplRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %11)
  store <2 x float> %38, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  call void @_ZN6ImVec2C2Eff(ptr noundef nonnull align 4 dereferenceable(8) %13, float noundef 1.000000e+00, float noundef 1.000000e+00)
  %39 = call <2 x float> @_ZmiRK6ImVec2S1_(ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %13)
  store <2 x float> %39, ptr %12, align 8
  %40 = call noundef i32 @_ZNK11ImGuiWindow5ColorERK6ImVec4(ptr noundef nonnull align 8 dereferenceable(480) %14, ptr noundef nonnull align 4 dereferenceable(16) %4)
  call void @_ZN10ImDrawList8AddImageEPvRK6ImVec2S3_S3_S3_j(ptr noundef nonnull align 8 dereferenceable(104) %37, ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(8) %12, ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %3, i32 noundef %40)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br label %43

41:                                               ; preds = %29
  %42 = call noundef i32 @_ZNK11ImGuiWindow5ColorERK6ImVec4(ptr noundef nonnull align 8 dereferenceable(480) %14, ptr noundef nonnull align 4 dereferenceable(16) %4)
  call void @_ZN10ImDrawList8AddImageEPvRK6ImVec2S3_S3_S3_j(ptr noundef nonnull align 8 dereferenceable(104) %33, ptr noundef %0, ptr noundef nonnull align 4 dereferenceable(8) %7, ptr noundef nonnull align 4 dereferenceable(8) %34, ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(8) %3, i32 noundef %42)
  br label %43

43:                                               ; preds = %35, %41, %27
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  br label %44

44:                                               ; preds = %6, %43
  ret void
}

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

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !13, i64 68}
!6 = !{!"_ZTS11ImGuiWindow", !7, i64 0, !10, i64 8, !10, i64 12, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !12, i64 56, !12, i64 60, !13, i64 64, !13, i64 65, !13, i64 66, !13, i64 67, !13, i64 68, !10, i64 72, !13, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !14, i64 96, !20, i64 336, !21, i64 360, !15, i64 384, !10, i64 400, !12, i64 404, !22, i64 408, !12, i64 432, !7, i64 440, !7, i64 448, !10, i64 456, !10, i64 460, !10, i64 464, !10, i64 468, !10, i64 472, !10, i64 476}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"_ZTS6ImVec2", !12, i64 0, !12, i64 4}
!12 = !{!"float", !8, i64 0}
!13 = !{!"bool", !8, i64 0}
!14 = !{!"_ZTS16ImGuiDrawContext", !11, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !12, i64 28, !12, i64 32, !10, i64 36, !10, i64 40, !15, i64 44, !13, i64 60, !16, i64 64, !18, i64 88, !19, i64 112, !19, i64 136, !10, i64 160, !7, i64 168, !12, i64 176, !12, i64 180, !10, i64 184, !10, i64 188, !11, i64 192, !12, i64 200, !12, i64 204, !13, i64 208, !10, i64 212, !19, i64 216}
!15 = !{!"_ZTS9ImGuiAabb", !11, i64 0, !11, i64 8}
!16 = !{!"_ZTS8ImVectorIP11ImGuiWindowE", !17, i64 0, !17, i64 8, !7, i64 16}
!17 = !{!"long", !8, i64 0}
!18 = !{!"_ZTS8ImVectorIbE", !17, i64 0, !17, i64 8, !7, i64 16}
!19 = !{!"_ZTS8ImVectorIfE", !17, i64 0, !17, i64 8, !7, i64 16}
!20 = !{!"_ZTS8ImVectorIjE", !17, i64 0, !17, i64 8, !7, i64 16}
!21 = !{!"_ZTS8ImVectorI6ImVec4E", !17, i64 0, !17, i64 8, !7, i64 16}
!22 = !{!"_ZTS12ImGuiStorage", !23, i64 0}
!23 = !{!"_ZTS8ImVectorIN12ImGuiStorage4PairEE", !17, i64 0, !17, i64 8, !7, i64 16}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!27, !12, i64 12}
!27 = !{!"_ZTS6ImVec4", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!28 = !{!6, !7, i64 440}


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