; LLVM IR from VTIvanov20/eight-ball-pool :: src (main)

; 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.Vector2 = type { float, float }
%struct.Rectangle = type { float, float, float, float }
%struct.Color = type { i8, i8, i8, i8 }

@_ZL8guiState = external hidden global i32, align 4
@_ZL9guiLocked = external hidden global i8, align 1
@__const.GuiGrid.currentCell = external hidden unnamed_addr constant %struct.Vector2, align 4

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; 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 i32 @GuiGetStyle(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float>, <2 x float>, i32 noundef, i32, i32) #3

declare i32 @Fade(i32, float noundef) #4

declare i32 @GetColor(i32 noundef) #4

declare <2 x float> @GetMousePosition() #4

declare zeroext i1 @CheckCollisionPointRec(<2 x float>, <2 x float>, <2 x float>) #4

; Function Attrs: mustprogress uwtable
define dso_local <2 x float> @GuiGrid(<2 x float> %0, <2 x float> %1, float noundef %2, i32 noundef %3) #3 {
  %5 = alloca %struct.Vector2, align 4
  %6 = alloca %struct.Rectangle, align 4
  %7 = alloca float, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.Vector2, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.Vector2, align 4
  %14 = alloca %struct.Rectangle, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.Rectangle, align 4
  %17 = alloca %struct.Rectangle, align 4
  %18 = alloca %struct.Color, align 1
  %19 = alloca %struct.Color, align 1
  %20 = alloca %struct.Color, align 1
  %21 = alloca %struct.Color, align 1
  %22 = alloca i32, align 4
  %23 = alloca %struct.Rectangle, align 4
  %24 = alloca %struct.Rectangle, align 4
  %25 = alloca %struct.Color, align 1
  %26 = alloca %struct.Color, align 1
  %27 = alloca %struct.Color, align 1
  %28 = alloca %struct.Color, align 1
  %29 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 0
  store <2 x float> %0, ptr %29, align 4
  %30 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 1
  store <2 x float> %1, ptr %30, align 4
  store float %2, ptr %7, align 4, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %31 = load i32, ptr @_ZL8guiState, align 4, !tbaa !11
  store i32 %31, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %32 = call <2 x float> @GetMousePosition()
  store <2 x float> %32, ptr %10, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 @__const.GuiGrid.currentCell, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %33 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 2
  %34 = load float, ptr %33, align 4, !tbaa !13
  %35 = load float, ptr %7, align 4, !tbaa !5
  %36 = fdiv float %34, %35
  %37 = fptosi float %36 to i32
  %38 = load i32, ptr %8, align 4, !tbaa !9
  %39 = mul nsw i32 %37, %38
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %41 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 3
  %42 = load float, ptr %41, align 4, !tbaa !15
  %43 = load float, ptr %7, align 4, !tbaa !5
  %44 = fdiv float %42, %43
  %45 = fptosi float %44 to i32
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = mul nsw i32 %45, %46
  %48 = add nsw i32 %47, 1
  store i32 %48, ptr %12, align 4, !tbaa !9
  %49 = load i32, ptr %9, align 4, !tbaa !11
  %50 = icmp ne i32 %49, 3
  br i1 %50, label %51, label %79

51:                                               ; preds = %4
  %52 = load i8, ptr @_ZL9guiLocked, align 1, !tbaa !16, !range !18, !noundef !19
  %53 = trunc i8 %52 to i1
  br i1 %53, label %79, label %54

54:                                               ; preds = %51
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %13, ptr align 4 %10, i64 8, i1 false), !tbaa.struct !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %14, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !21
  %55 = load <2 x float>, ptr %13, align 4
  %56 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %14, i32 0, i32 0
  %57 = load <2 x float>, ptr %56, align 4
  %58 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %14, i32 0, i32 1
  %59 = load <2 x float>, ptr %58, align 4
  %60 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %55, <2 x float> %57, <2 x float> %59)
  br i1 %60, label %61, label %78

61:                                               ; preds = %54
  %62 = getelementptr inbounds %struct.Vector2, ptr %10, i32 0, i32 0
  %63 = load float, ptr %62, align 4, !tbaa !22
  %64 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 0
  %65 = load float, ptr %64, align 4, !tbaa !24
  %66 = fsub float %63, %65
  %67 = load float, ptr %7, align 4, !tbaa !5
  %68 = fdiv float %66, %67
  %69 = getelementptr inbounds %struct.Vector2, ptr %5, i32 0, i32 0
  store float %68, ptr %69, align 4, !tbaa !22
  %70 = getelementptr inbounds %struct.Vector2, ptr %10, i32 0, i32 1
  %71 = load float, ptr %70, align 4, !tbaa !25
  %72 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 1
  %73 = load float, ptr %72, align 4, !tbaa !26
  %74 = fsub float %71, %73
  %75 = load float, ptr %7, align 4, !tbaa !5
  %76 = fdiv float %74, %75
  %77 = getelementptr inbounds %struct.Vector2, ptr %5, i32 0, i32 1
  store float %76, ptr %77, align 4, !tbaa !25
  br label %78

78:                                               ; preds = %61, %54
  br label %79

79:                                               ; preds = %78, %51, %4
  %80 = load i32, ptr %9, align 4, !tbaa !11
  switch i32 %80, label %192 [
    i32 0, label %81
  ]

81:                                               ; preds = %79
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %84, label %191

84:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %134, %84
  %86 = load i32, ptr %15, align 4, !tbaa !9
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %137

90:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %91 = getelementptr inbounds %struct.Rectangle, ptr %16, i32 0, i32 0
  %92 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 0
  %93 = load float, ptr %92, align 4, !tbaa !24
  %94 = load float, ptr %7, align 4, !tbaa !5
  %95 = load i32, ptr %15, align 4, !tbaa !9
  %96 = sitofp i32 %95 to float
  %97 = fmul float %94, %96
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = sitofp i32 %98 to float
  %100 = fdiv float %97, %99
  %101 = fadd float %93, %100
  store float %101, ptr %91, align 4, !tbaa !24
  %102 = getelementptr inbounds %struct.Rectangle, ptr %16, i32 0, i32 1
  %103 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 1
  %104 = load float, ptr %103, align 4, !tbaa !26
  store float %104, ptr %102, align 4, !tbaa !26
  %105 = getelementptr inbounds %struct.Rectangle, ptr %16, i32 0, i32 2
  store float 1.000000e+00, ptr %105, align 4, !tbaa !13
  %106 = getelementptr inbounds %struct.Rectangle, ptr %16, i32 0, i32 3
  %107 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 3
  %108 = load float, ptr %107, align 4, !tbaa !15
  store float %108, ptr %106, align 4, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %16, i64 16, i1 false), !tbaa.struct !21
  %109 = getelementptr inbounds %struct.Color, ptr %18, i32 0, i32 0
  store i8 0, ptr %109, align 1, !tbaa !27
  %110 = getelementptr inbounds %struct.Color, ptr %18, i32 0, i32 1
  store i8 0, ptr %110, align 1, !tbaa !29
  %111 = getelementptr inbounds %struct.Color, ptr %18, i32 0, i32 2
  store i8 0, ptr %111, align 1, !tbaa !30
  %112 = getelementptr inbounds %struct.Color, ptr %18, i32 0, i32 3
  store i8 0, ptr %112, align 1, !tbaa !31
  %113 = load i32, ptr %15, align 4, !tbaa !9
  %114 = load i32, ptr %8, align 4, !tbaa !9
  %115 = srem i32 %113, %114
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %122

117:                                              ; preds = %90
  %118 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %119 = call i32 @GetColor(i32 noundef %118)
  store i32 %119, ptr %20, align 1
  %120 = load i32, ptr %20, align 1
  %121 = call i32 @Fade(i32 %120, float noundef 0x3FE3333340000000)
  store i32 %121, ptr %19, align 1
  br label %127

122:                                              ; preds = %90
  %123 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %124 = call i32 @GetColor(i32 noundef %123)
  store i32 %124, ptr %21, align 1
  %125 = load i32, ptr %21, align 1
  %126 = call i32 @Fade(i32 %125, float noundef 0x3FC3333340000000)
  store i32 %126, ptr %19, align 1
  br label %127

127:                                              ; preds = %122, %117
  %128 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 0
  %129 = load <2 x float>, ptr %128, align 4
  %130 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 1
  %131 = load <2 x float>, ptr %130, align 4
  %132 = load i32, ptr %18, align 1
  %133 = load i32, ptr %19, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %129, <2 x float> %131, i32 noundef 0, i32 %132, i32 %133)
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br label %134

134:                                              ; preds = %127
  %135 = load i32, ptr %15, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %15, align 4, !tbaa !9
  br label %85, !llvm.loop !32

137:                                              ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %187, %137
  %139 = load i32, ptr %22, align 4, !tbaa !9
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = icmp slt i32 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %190

143:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  %144 = getelementptr inbounds %struct.Rectangle, ptr %23, i32 0, i32 0
  %145 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 0
  %146 = load float, ptr %145, align 4, !tbaa !24
  store float %146, ptr %144, align 4, !tbaa !24
  %147 = getelementptr inbounds %struct.Rectangle, ptr %23, i32 0, i32 1
  %148 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 1
  %149 = load float, ptr %148, align 4, !tbaa !26
  %150 = load float, ptr %7, align 4, !tbaa !5
  %151 = load i32, ptr %22, align 4, !tbaa !9
  %152 = sitofp i32 %151 to float
  %153 = fmul float %150, %152
  %154 = load i32, ptr %8, align 4, !tbaa !9
  %155 = sitofp i32 %154 to float
  %156 = fdiv float %153, %155
  %157 = fadd float %149, %156
  store float %157, ptr %147, align 4, !tbaa !26
  %158 = getelementptr inbounds %struct.Rectangle, ptr %23, i32 0, i32 2
  %159 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 2
  %160 = load float, ptr %159, align 4, !tbaa !13
  store float %160, ptr %158, align 4, !tbaa !13
  %161 = getelementptr inbounds %struct.Rectangle, ptr %23, i32 0, i32 3
  store float 1.000000e+00, ptr %161, align 4, !tbaa !15
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %23, i64 16, i1 false), !tbaa.struct !21
  %162 = getelementptr inbounds %struct.Color, ptr %25, i32 0, i32 0
  store i8 0, ptr %162, align 1, !tbaa !27
  %163 = getelementptr inbounds %struct.Color, ptr %25, i32 0, i32 1
  store i8 0, ptr %163, align 1, !tbaa !29
  %164 = getelementptr inbounds %struct.Color, ptr %25, i32 0, i32 2
  store i8 0, ptr %164, align 1, !tbaa !30
  %165 = getelementptr inbounds %struct.Color, ptr %25, i32 0, i32 3
  store i8 0, ptr %165, align 1, !tbaa !31
  %166 = load i32, ptr %22, align 4, !tbaa !9
  %167 = load i32, ptr %8, align 4, !tbaa !9
  %168 = srem i32 %166, %167
  %169 = icmp eq i32 %168, 0
  br i1 %169, label %170, label %175

170:                                              ; preds = %143
  %171 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %172 = call i32 @GetColor(i32 noundef %171)
  store i32 %172, ptr %27, align 1
  %173 = load i32, ptr %27, align 1
  %174 = call i32 @Fade(i32 %173, float noundef 0x3FE3333340000000)
  store i32 %174, ptr %26, align 1
  br label %180

175:                                              ; preds = %143
  %176 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %177 = call i32 @GetColor(i32 noundef %176)
  store i32 %177, ptr %28, align 1
  %178 = load i32, ptr %28, align 1
  %179 = call i32 @Fade(i32 %178, float noundef 0x3FC3333340000000)
  store i32 %179, ptr %26, align 1
  br label %180

180:                                              ; preds = %175, %170
  %181 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %24, i32 0, i32 0
  %182 = load <2 x float>, ptr %181, align 4
  %183 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %24, i32 0, i32 1
  %184 = load <2 x float>, ptr %183, align 4
  %185 = load i32, ptr %25, align 1
  %186 = load i32, ptr %26, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %182, <2 x float> %184, i32 noundef 0, i32 %185, i32 %186)
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  br label %187

187:                                              ; preds = %180
  %188 = load i32, ptr %22, align 4, !tbaa !9
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %22, align 4, !tbaa !9
  br label %138, !llvm.loop !34

190:                                              ; preds = %142
  br label %191

191:                                              ; preds = %190, %81
  br label %193

192:                                              ; preds = %79
  br label %193

193:                                              ; preds = %192, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  %194 = load <2 x float>, ptr %5, align 4
  ret <2 x float> %194
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 = { 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 = { "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 = { 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 = !{!"float", !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, !12, i64 0}
!12 = !{!"_ZTS15GuiControlState", !7, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTS9Rectangle", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!15 = !{!14, !6, i64 12}
!16 = !{!17, !17, i64 0}
!17 = !{!"bool", !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{i64 0, i64 4, !5, i64 4, i64 4, !5}
!21 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5, i64 12, i64 4, !5}
!22 = !{!23, !6, i64 0}
!23 = !{!"_ZTS7Vector2", !6, i64 0, !6, i64 4}
!24 = !{!14, !6, i64 0}
!25 = !{!23, !6, i64 4}
!26 = !{!14, !6, i64 4}
!27 = !{!28, !7, i64 0}
!28 = !{!"_ZTS5Color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!29 = !{!28, !7, i64 1}
!30 = !{!28, !7, i64 2}
!31 = !{!28, !7, i64 3}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = distinct !{!34, !33}


; 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.Vector2 = type { float, float }

@_ZL8guiState = external hidden local_unnamed_addr global i32, align 4
@_ZL9guiLocked = external hidden local_unnamed_addr global i8, align 1
@__const.GuiGrid.currentCell = external hidden unnamed_addr constant %struct.Vector2, align 4

; Function Attrs: mustprogress uwtable
declare dso_local i32 @GuiGetStyle(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float>, <2 x float>, i32 noundef, i32, i32) local_unnamed_addr #1

declare i32 @Fade(i32, float noundef) local_unnamed_addr #2

declare i32 @GetColor(i32 noundef) local_unnamed_addr #2

declare <2 x float> @GetMousePosition() local_unnamed_addr #2

declare zeroext i1 @CheckCollisionPointRec(<2 x float>, <2 x float>, <2 x float>) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local <2 x float> @GuiGrid(<2 x float> %0, <2 x float> %1, float noundef %2, i32 noundef %3) local_unnamed_addr #1 {
  %5 = load i32, ptr @_ZL8guiState, align 4, !tbaa !5
  %6 = tail call <2 x float> @GetMousePosition()
  %.sroa.066.0.copyload = load <2 x float>, ptr @__const.GuiGrid.currentCell, align 4
  %.sroa.8.8.vec.extract = extractelement <2 x float> %1, i64 0
  %7 = fdiv float %.sroa.8.8.vec.extract, %2
  %8 = fptosi float %7 to i32
  %9 = mul i32 %8, %3
  %.sroa.8.12.vec.extract = extractelement <2 x float> %1, i64 1
  %10 = fdiv float %.sroa.8.12.vec.extract, %2
  %11 = fptosi float %10 to i32
  %12 = mul i32 %11, %3
  %.not = icmp eq i32 %5, 3
  br i1 %.not, label %.thread, label %13

13:                                               ; preds = %4
  %14 = load i8, ptr @_ZL9guiLocked, align 1, !tbaa !9, !range !11, !noundef !12
  %15 = trunc nuw i8 %14 to i1
  br i1 %15, label %23, label %16

16:                                               ; preds = %13
  %17 = tail call zeroext i1 @CheckCollisionPointRec(<2 x float> %6, <2 x float> %0, <2 x float> %1)
  br i1 %17, label %18, label %23

18:                                               ; preds = %16
  %19 = fsub <2 x float> %6, %0
  %20 = insertelement <2 x float> poison, float %2, i64 0
  %21 = shufflevector <2 x float> %20, <2 x float> poison, <2 x i32> zeroinitializer
  %22 = fdiv <2 x float> %19, %21
  br label %23

23:                                               ; preds = %16, %18, %13
  %.sroa.066.0 = phi <2 x float> [ %.sroa.066.0.copyload, %13 ], [ %22, %18 ], [ %.sroa.066.0.copyload, %16 ]
  %cond = icmp eq i32 %5, 0
  %24 = icmp sgt i32 %3, 0
  %or.cond = and i1 %24, %cond
  br i1 %or.cond, label %.preheader77, label %.thread

.preheader77:                                     ; preds = %23
  %.not7078 = icmp slt i32 %9, 0
  br i1 %.not7078, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader77
  %.sroa.051.0.vec.extract54 = extractelement <2 x float> %0, i64 0
  %25 = uitofp nneg i32 %3 to float
  %.sroa.524.12.vec.insert72 = insertelement <2 x float> %1, float 1.000000e+00, i64 0
  br label %27

.preheader:                                       ; preds = %27, %.preheader77
  %.not7180 = icmp slt i32 %12, 0
  br i1 %.not7180, label %.thread, label %.lr.ph82

.lr.ph82:                                         ; preds = %.preheader
  %.sroa.051.4.vec.extract60 = extractelement <2 x float> %0, i64 1
  %26 = uitofp nneg i32 %3 to float
  %.sroa.5.12.vec.insert = insertelement <2 x float> %1, float 1.000000e+00, i64 1
  br label %38

27:                                               ; preds = %.lr.ph, %27
  %.079 = phi i32 [ 0, %.lr.ph ], [ %37, %27 ]
  %28 = uitofp nneg i32 %.079 to float
  %29 = fmul float %28, %2
  %30 = fdiv float %29, %25
  %31 = fadd float %.sroa.051.0.vec.extract54, %30
  %.sroa.022.4.vec.insert = insertelement <2 x float> %0, float %31, i64 0
  %32 = urem i32 %.079, %3
  %33 = icmp eq i32 %32, 0
  %34 = tail call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %35 = tail call i32 @GetColor(i32 noundef %34)
  %. = select i1 %33, float 0x3FE3333340000000, float 0x3FC3333340000000
  %36 = tail call i32 @Fade(i32 %35, float noundef %.)
  tail call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %.sroa.022.4.vec.insert, <2 x float> %.sroa.524.12.vec.insert72, i32 noundef 0, i32 0, i32 %36)
  %37 = add nuw i32 %.079, 1
  %exitcond.not = icmp eq i32 %.079, %9
  br i1 %exitcond.not, label %.preheader, label %27, !llvm.loop !13

38:                                               ; preds = %.lr.ph82, %38
  %.06881 = phi i32 [ 0, %.lr.ph82 ], [ %48, %38 ]
  %39 = uitofp nneg i32 %.06881 to float
  %40 = fmul float %39, %2
  %41 = fdiv float %40, %26
  %42 = fadd float %.sroa.051.4.vec.extract60, %41
  %.sroa.07.4.vec.insert = insertelement <2 x float> %0, float %42, i64 1
  %43 = urem i32 %.06881, %3
  %44 = icmp eq i32 %43, 0
  %45 = tail call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %46 = tail call i32 @GetColor(i32 noundef %45)
  %.85 = select i1 %44, float 0x3FE3333340000000, float 0x3FC3333340000000
  %47 = tail call i32 @Fade(i32 %46, float noundef %.85)
  tail call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %.sroa.07.4.vec.insert, <2 x float> %.sroa.5.12.vec.insert, i32 noundef 0, i32 0, i32 %47)
  %48 = add nuw i32 %.06881, 1
  %exitcond83.not = icmp eq i32 %.06881, %12
  br i1 %exitcond83.not, label %.thread, label %38, !llvm.loop !15

.thread:                                          ; preds = %38, %.preheader, %4, %23
  %.sroa.066.076 = phi <2 x float> [ %.sroa.066.0, %23 ], [ %.sroa.066.0.copyload, %4 ], [ %.sroa.066.0, %.preheader ], [ %.sroa.066.0, %38 ]
  ret <2 x float> %.sroa.066.076
}

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"_ZTS15GuiControlState", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass