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

@_ZL8guiState = external hidden global i32, align 4
@_ZL9guiLocked = external hidden global i8, align 1
@_ZL8guiAlpha = external hidden global float, align 4
@.str.18 = external hidden unnamed_addr constant [6 x i8], align 1

; 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 dso_local void @GuiPanel(<2 x float>, <2 x float>) #3

; 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
declare hidden void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef, <2 x float>, <2 x float>, i32 noundef, i32) #3

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

declare zeroext i1 @IsMouseButtonReleased(i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL12GuiTextSplitPKcPiS1_(ptr noundef, ptr noundef, ptr noundef) #5

declare zeroext i1 @IsMouseButtonPressed(i32 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @GuiDropdownBox(<2 x float> %0, <2 x float> %1, ptr noundef %2, ptr noundef %3, i1 noundef zeroext %4) #3 {
  %6 = alloca %struct.Rectangle, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %struct.Rectangle, align 4
  %16 = alloca %struct.Rectangle, align 4
  %17 = alloca i8, align 1
  %18 = alloca %struct.Vector2, align 4
  %19 = alloca %struct.Vector2, align 4
  %20 = alloca %struct.Rectangle, align 4
  %21 = alloca %struct.Vector2, align 4
  %22 = alloca %struct.Rectangle, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %struct.Vector2, align 4
  %26 = alloca %struct.Rectangle, align 4
  %27 = alloca %struct.Vector2, align 4
  %28 = alloca %struct.Rectangle, align 4
  %29 = alloca %struct.Rectangle, align 4
  %30 = alloca %struct.Rectangle, align 4
  %31 = alloca %struct.Color, align 1
  %32 = alloca %struct.Color, align 1
  %33 = alloca %struct.Color, align 1
  %34 = alloca %struct.Color, align 1
  %35 = alloca %struct.Rectangle, align 4
  %36 = alloca %struct.Rectangle, align 4
  %37 = alloca %struct.Color, align 1
  %38 = alloca %struct.Color, align 1
  %39 = alloca i32, align 4
  %40 = alloca %struct.Rectangle, align 4
  %41 = alloca %struct.Color, align 1
  %42 = alloca %struct.Color, align 1
  %43 = alloca %struct.Color, align 1
  %44 = alloca %struct.Color, align 1
  %45 = alloca %struct.Rectangle, align 4
  %46 = alloca %struct.Rectangle, align 4
  %47 = alloca %struct.Color, align 1
  %48 = alloca %struct.Color, align 1
  %49 = alloca %struct.Rectangle, align 4
  %50 = alloca %struct.Color, align 1
  %51 = alloca %struct.Color, align 1
  %52 = alloca %struct.Color, align 1
  %53 = alloca %struct.Color, align 1
  %54 = alloca %struct.Rectangle, align 4
  %55 = alloca %struct.Rectangle, align 4
  %56 = alloca %struct.Color, align 1
  %57 = alloca %struct.Color, align 1
  %58 = alloca %struct.Rectangle, align 4
  %59 = alloca %struct.Rectangle, align 4
  %60 = alloca %struct.Color, align 1
  %61 = alloca %struct.Color, align 1
  %62 = alloca %struct.Rectangle, align 4
  %63 = alloca %struct.Color, align 1
  %64 = alloca %struct.Color, align 1
  %65 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 0
  store <2 x float> %0, ptr %65, align 4
  %66 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 1
  store <2 x float> %1, ptr %66, align 4
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %67 = zext i1 %4 to i8
  store i8 %67, ptr %9, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %68 = load i32, ptr @_ZL8guiState, align 4, !tbaa !11
  store i32 %68, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = load i32, ptr %69, align 4, !tbaa !13
  store i32 %70, ptr %11, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 -1, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = call noundef ptr @_ZL12GuiTextSplitPKcPiS1_(ptr noundef %71, ptr noundef %13, ptr noundef null)
  store ptr %72, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %15, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !15
  %73 = load i32, ptr %13, align 4, !tbaa !13
  %74 = add nsw i32 %73, 1
  %75 = sitofp i32 %74 to float
  %76 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 3
  %77 = load float, ptr %76, align 4, !tbaa !18
  %78 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 17)
  %79 = sitofp i32 %78 to float
  %80 = fadd float %77, %79
  %81 = fmul float %75, %80
  %82 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 3
  store float %81, ptr %82, align 4, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  store i8 0, ptr %17, align 1, !tbaa !9
  %83 = load i32, ptr %10, align 4, !tbaa !11
  %84 = icmp ne i32 %83, 3
  br i1 %84, label %85, label %168

85:                                               ; preds = %5
  %86 = load i8, ptr %9, align 1, !tbaa !9, !range !20, !noundef !21
  %87 = trunc i8 %86 to i1
  br i1 %87, label %91, label %88

88:                                               ; preds = %85
  %89 = load i8, ptr @_ZL9guiLocked, align 1, !tbaa !9, !range !20, !noundef !21
  %90 = trunc i8 %89 to i1
  br i1 %90, label %168, label %91

91:                                               ; preds = %88, %85
  %92 = load i32, ptr %13, align 4, !tbaa !13
  %93 = icmp sgt i32 %92, 1
  br i1 %93, label %94, label %168

94:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %95 = call <2 x float> @GetMousePosition()
  store <2 x float> %95, ptr %18, align 4
  %96 = load i8, ptr %9, align 1, !tbaa !9, !range !20, !noundef !21
  %97 = trunc i8 %96 to i1
  br i1 %97, label %98, label %154

98:                                               ; preds = %94
  store i32 2, ptr %10, align 4, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %15, i64 16, i1 false), !tbaa.struct !15
  %99 = load <2 x float>, ptr %19, align 4
  %100 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %20, i32 0, i32 0
  %101 = load <2 x float>, ptr %100, align 4
  %102 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %20, i32 0, i32 1
  %103 = load <2 x float>, ptr %102, align 4
  %104 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %99, <2 x float> %101, <2 x float> %103)
  br i1 %104, label %111, label %105

105:                                              ; preds = %98
  %106 = call zeroext i1 @IsMouseButtonPressed(i32 noundef 0)
  br i1 %106, label %109, label %107

107:                                              ; preds = %105
  %108 = call zeroext i1 @IsMouseButtonReleased(i32 noundef 0)
  br i1 %108, label %109, label %110

109:                                              ; preds = %107, %105
  store i8 1, ptr %17, align 1, !tbaa !9
  br label %110

110:                                              ; preds = %109, %107
  br label %111

111:                                              ; preds = %110, %98
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !15
  %112 = load <2 x float>, ptr %21, align 4
  %113 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %22, i32 0, i32 0
  %114 = load <2 x float>, ptr %113, align 4
  %115 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %22, i32 0, i32 1
  %116 = load <2 x float>, ptr %115, align 4
  %117 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %112, <2 x float> %114, <2 x float> %116)
  br i1 %117, label %118, label %121

118:                                              ; preds = %111
  %119 = call zeroext i1 @IsMouseButtonPressed(i32 noundef 0)
  br i1 %119, label %120, label %121

120:                                              ; preds = %118
  store i8 1, ptr %17, align 1, !tbaa !9
  br label %121

121:                                              ; preds = %120, %118, %111
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !13
  br label %122

122:                                              ; preds = %149, %121
  %123 = load i32, ptr %23, align 4, !tbaa !13
  %124 = load i32, ptr %13, align 4, !tbaa !13
  %125 = icmp slt i32 %123, %124
  br i1 %125, label %127, label %126

126:                                              ; preds = %122
  store i32 2, ptr %24, align 4
  br label %152

127:                                              ; preds = %122
  %128 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 3
  %129 = load float, ptr %128, align 4, !tbaa !18
  %130 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 17)
  %131 = sitofp i32 %130 to float
  %132 = fadd float %129, %131
  %133 = getelementptr inbounds %struct.Rectangle, ptr %16, i32 0, i32 1
  %134 = load float, ptr %133, align 4, !tbaa !23
  %135 = fadd float %134, %132
  store float %135, ptr %133, align 4, !tbaa !23
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %26, ptr align 4 %16, i64 16, i1 false), !tbaa.struct !15
  %136 = load <2 x float>, ptr %25, align 4
  %137 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %26, i32 0, i32 0
  %138 = load <2 x float>, ptr %137, align 4
  %139 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %26, i32 0, i32 1
  %140 = load <2 x float>, ptr %139, align 4
  %141 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %136, <2 x float> %138, <2 x float> %140)
  br i1 %141, label %142, label %148

142:                                              ; preds = %127
  %143 = load i32, ptr %23, align 4, !tbaa !13
  store i32 %143, ptr %12, align 4, !tbaa !13
  %144 = call zeroext i1 @IsMouseButtonReleased(i32 noundef 0)
  br i1 %144, label %145, label %147

145:                                              ; preds = %142
  %146 = load i32, ptr %23, align 4, !tbaa !13
  store i32 %146, ptr %11, align 4, !tbaa !13
  store i8 1, ptr %17, align 1, !tbaa !9
  br label %147

147:                                              ; preds = %145, %142
  store i32 2, ptr %24, align 4
  br label %152

148:                                              ; preds = %127
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %23, align 4, !tbaa !13
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %23, align 4, !tbaa !13
  br label %122, !llvm.loop !24

152:                                              ; preds = %147, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %153

153:                                              ; preds = %152
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !15
  br label %167

154:                                              ; preds = %94
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %27, ptr align 4 %18, i64 8, i1 false), !tbaa.struct !22
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %28, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !15
  %155 = load <2 x float>, ptr %27, align 4
  %156 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %28, i32 0, i32 0
  %157 = load <2 x float>, ptr %156, align 4
  %158 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %28, i32 0, i32 1
  %159 = load <2 x float>, ptr %158, align 4
  %160 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %155, <2 x float> %157, <2 x float> %159)
  br i1 %160, label %161, label %166

161:                                              ; preds = %154
  %162 = call zeroext i1 @IsMouseButtonPressed(i32 noundef 0)
  br i1 %162, label %163, label %164

163:                                              ; preds = %161
  store i8 1, ptr %17, align 1, !tbaa !9
  store i32 2, ptr %10, align 4, !tbaa !11
  br label %165

164:                                              ; preds = %161
  store i32 1, ptr %10, align 4, !tbaa !11
  br label %165

165:                                              ; preds = %164, %163
  br label %166

166:                                              ; preds = %165, %154
  br label %167

167:                                              ; preds = %166, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br label %168

168:                                              ; preds = %167, %91, %88, %5
  %169 = load i8, ptr %9, align 1, !tbaa !9, !range !20, !noundef !21
  %170 = trunc i8 %169 to i1
  br i1 %170, label %171, label %176

171:                                              ; preds = %168
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %15, i64 16, i1 false), !tbaa.struct !15
  %172 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %29, i32 0, i32 0
  %173 = load <2 x float>, ptr %172, align 4
  %174 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %29, i32 0, i32 1
  %175 = load <2 x float>, ptr %174, align 4
  call void @GuiPanel(<2 x float> %173, <2 x float> %175)
  br label %176

176:                                              ; preds = %171, %168
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !15
  %177 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 12)
  %178 = load i32, ptr %10, align 4, !tbaa !11
  %179 = mul nsw i32 %178, 3
  %180 = add nsw i32 0, %179
  %181 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef %180)
  %182 = call i32 @GetColor(i32 noundef %181)
  store i32 %182, ptr %32, align 1
  %183 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !16
  %184 = load i32, ptr %32, align 1
  %185 = call i32 @Fade(i32 %184, float noundef %183)
  store i32 %185, ptr %31, align 1
  %186 = load i32, ptr %10, align 4, !tbaa !11
  %187 = mul nsw i32 %186, 3
  %188 = add nsw i32 1, %187
  %189 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef %188)
  %190 = call i32 @GetColor(i32 noundef %189)
  store i32 %190, ptr %34, align 1
  %191 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !16
  %192 = load i32, ptr %34, align 1
  %193 = call i32 @Fade(i32 %192, float noundef %191)
  store i32 %193, ptr %33, align 1
  %194 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %30, i32 0, i32 0
  %195 = load <2 x float>, ptr %194, align 4
  %196 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %30, i32 0, i32 1
  %197 = load <2 x float>, ptr %196, align 4
  %198 = load i32, ptr %31, align 1
  %199 = load i32, ptr %33, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %195, <2 x float> %197, i32 noundef %177, i32 %198, i32 %199)
  %200 = load ptr, ptr %14, align 8, !tbaa !5
  %201 = load i32, ptr %11, align 4, !tbaa !13
  %202 = sext i32 %201 to i64
  %203 = getelementptr inbounds ptr, ptr %200, i64 %202
  %204 = load ptr, ptr %203, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %36, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !15
  %205 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %36, i32 0, i32 0
  %206 = load <2 x float>, ptr %205, align 4
  %207 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %36, i32 0, i32 1
  %208 = load <2 x float>, ptr %207, align 4
  %209 = call { <2 x float>, <2 x float> } @_ZL13GetTextBoundsi9Rectangle(i32 noundef 0, <2 x float> %206, <2 x float> %208)
  %210 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %35, i32 0, i32 0
  %211 = extractvalue { <2 x float>, <2 x float> } %209, 0
  store <2 x float> %211, ptr %210, align 4
  %212 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %35, i32 0, i32 1
  %213 = extractvalue { <2 x float>, <2 x float> } %209, 1
  store <2 x float> %213, ptr %212, align 4
  %214 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 14)
  %215 = load i32, ptr %10, align 4, !tbaa !11
  %216 = mul nsw i32 %215, 3
  %217 = add nsw i32 2, %216
  %218 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef %217)
  %219 = call i32 @GetColor(i32 noundef %218)
  store i32 %219, ptr %38, align 1
  %220 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !16
  %221 = load i32, ptr %38, align 1
  %222 = call i32 @Fade(i32 %221, float noundef %220)
  store i32 %222, ptr %37, align 1
  %223 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %35, i32 0, i32 0
  %224 = load <2 x float>, ptr %223, align 4
  %225 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %35, i32 0, i32 1
  %226 = load <2 x float>, ptr %225, align 4
  %227 = load i32, ptr %37, align 1
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef %204, <2 x float> %224, <2 x float> %226, i32 noundef %214, i32 %227)
  %228 = load i8, ptr %9, align 1, !tbaa !9, !range !20, !noundef !21
  %229 = trunc i8 %228 to i1
  br i1 %229, label %230, label %370

230:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 4, ptr %39) #6
  store i32 0, ptr %39, align 4, !tbaa !13
  br label %231

231:                                              ; preds = %366, %230
  %232 = load i32, ptr %39, align 4, !tbaa !13
  %233 = load i32, ptr %13, align 4, !tbaa !13
  %234 = icmp slt i32 %232, %233
  br i1 %234, label %236, label %235

235:                                              ; preds = %231
  store i32 5, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %39) #6
  br label %369

236:                                              ; preds = %231
  %237 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 3
  %238 = load float, ptr %237, align 4, !tbaa !18
  %239 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 17)
  %240 = sitofp i32 %239 to float
  %241 = fadd float %238, %240
  %242 = getelementptr inbounds %struct.Rectangle, ptr %16, i32 0, i32 1
  %243 = load float, ptr %242, align 4, !tbaa !23
  %244 = fadd float %243, %241
  store float %244, ptr %242, align 4, !tbaa !23
  %245 = load i32, ptr %39, align 4, !tbaa !13
  %246 = load i32, ptr %11, align 4, !tbaa !13
  %247 = icmp eq i32 %245, %246
  br i1 %247, label %248, label %291

248:                                              ; preds = %236
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %16, i64 16, i1 false), !tbaa.struct !15
  %249 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 12)
  %250 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 6)
  %251 = call i32 @GetColor(i32 noundef %250)
  store i32 %251, ptr %42, align 1
  %252 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !16
  %253 = load i32, ptr %42, align 1
  %254 = call i32 @Fade(i32 %253, float noundef %252)
  store i32 %254, ptr %41, align 1
  %255 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 7)
  %256 = call i32 @GetColor(i32 noundef %255)
  store i32 %256, ptr %44, align 1
  %257 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !16
  %258 = load i32, ptr %44, align 1
  %259 = call i32 @Fade(i32 %258, float noundef %257)
  store i32 %259, ptr %43, align 1
  %260 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %40, i32 0, i32 0
  %261 = load <2 x float>, ptr %260, align 4
  %262 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %40, i32 0, i32 1
  %263 = load <2 x float>, ptr %262, align 4
  %264 = load i32, ptr %41, align 1
  %265 = load i32, ptr %43, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %261, <2 x float> %263, i32 noundef %249, i32 %264, i32 %265)
  %266 = load ptr, ptr %14, align 8, !tbaa !5
  %267 = load i32, ptr %39, align 4, !tbaa !13
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds ptr, ptr %266, i64 %268
  %270 = load ptr, ptr %269, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %46, ptr align 4 %16, i64 16, i1 false), !tbaa.struct !15
  %271 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %46, i32 0, i32 0
  %272 = load <2 x float>, ptr %271, align 4
  %273 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %46, i32 0, i32 1
  %274 = load <2 x float>, ptr %273, align 4
  %275 = call { <2 x float>, <2 x float> } @_ZL13GetTextBoundsi9Rectangle(i32 noundef 0, <2 x float> %272, <2 x float> %274)
  %276 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %45, i32 0, i32 0
  %277 = extractvalue { <2 x float>, <2 x float> } %275, 0
  store <2 x float> %277, ptr %276, align 4
  %278 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %45, i32 0, i32 1
  %279 = extractvalue { <2 x float>, <2 x float> } %275, 1
  store <2 x float> %279, ptr %278, align 4
  %280 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 14)
  %281 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 8)
  %282 = call i32 @GetColor(i32 noundef %281)
  store i32 %282, ptr %48, align 1
  %283 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !16
  %284 = load i32, ptr %48, align 1
  %285 = call i32 @Fade(i32 %284, float noundef %283)
  store i32 %285, ptr %47, align 1
  %286 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %45, i32 0, i32 0
  %287 = load <2 x float>, ptr %286, align 4
  %288 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %45, i32 0, i32 1
  %289 = load <2 x float>, ptr %288, align 4
  %290 = load i32, ptr %47, align 1
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef %270, <2 x float> %287, <2 x float> %289, i32 noundef %280, i32 %290)
  br label %365

291:                                              ; preds = %236
  %292 = load i32, ptr %39, align 4, !tbaa !13
  %293 = load i32, ptr %12, align 4, !tbaa !13
  %294 = icmp eq i32 %292, %293
  br i1 %294, label %295, label %338

295:                                              ; preds = %291
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %49, ptr align 4 %16, i64 16, i1 false), !tbaa.struct !15
  %296 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 12)
  %297 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 3)
  %298 = call i32 @GetColor(i32 noundef %297)
  store i32 %298, ptr %51, align 1
  %299 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !16
  %300 = load i32, ptr %51, align 1
  %301 = call i32 @Fade(i32 %300, float noundef %299)
  store i32 %301, ptr %50, align 1
  %302 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 4)
  %303 = call i32 @GetColor(i32 noundef %302)
  store i32 %303, ptr %53, align 1
  %304 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !16
  %305 = load i32, ptr %53, align 1
  %306 = call i32 @Fade(i32 %305, float noundef %304)
  store i32 %306, ptr %52, align 1
  %307 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %49, i32 0, i32 0
  %308 = load <2 x float>, ptr %307, align 4
  %309 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %49, i32 0, i32 1
  %310 = load <2 x float>, ptr %309, align 4
  %311 = load i32, ptr %50, align 1
  %312 = load i32, ptr %52, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %308, <2 x float> %310, i32 noundef %296, i32 %311, i32 %312)
  %313 = load ptr, ptr %14, align 8, !tbaa !5
  %314 = load i32, ptr %39, align 4, !tbaa !13
  %315 = sext i32 %314 to i64
  %316 = getelementptr inbounds ptr, ptr %313, i64 %315
  %317 = load ptr, ptr %316, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %55, ptr align 4 %16, i64 16, i1 false), !tbaa.struct !15
  %318 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %55, i32 0, i32 0
  %319 = load <2 x float>, ptr %318, align 4
  %320 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %55, i32 0, i32 1
  %321 = load <2 x float>, ptr %320, align 4
  %322 = call { <2 x float>, <2 x float> } @_ZL13GetTextBoundsi9Rectangle(i32 noundef 0, <2 x float> %319, <2 x float> %321)
  %323 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %54, i32 0, i32 0
  %324 = extractvalue { <2 x float>, <2 x float> } %322, 0
  store <2 x float> %324, ptr %323, align 4
  %325 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %54, i32 0, i32 1
  %326 = extractvalue { <2 x float>, <2 x float> } %322, 1
  store <2 x float> %326, ptr %325, align 4
  %327 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 14)
  %328 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 5)
  %329 = call i32 @GetColor(i32 noundef %328)
  store i32 %329, ptr %57, align 1
  %330 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !16
  %331 = load i32, ptr %57, align 1
  %332 = call i32 @Fade(i32 %331, float noundef %330)
  store i32 %332, ptr %56, align 1
  %333 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %54, i32 0, i32 0
  %334 = load <2 x float>, ptr %333, align 4
  %335 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %54, i32 0, i32 1
  %336 = load <2 x float>, ptr %335, align 4
  %337 = load i32, ptr %56, align 1
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef %317, <2 x float> %334, <2 x float> %336, i32 noundef %327, i32 %337)
  br label %364

338:                                              ; preds = %291
  %339 = load ptr, ptr %14, align 8, !tbaa !5
  %340 = load i32, ptr %39, align 4, !tbaa !13
  %341 = sext i32 %340 to i64
  %342 = getelementptr inbounds ptr, ptr %339, i64 %341
  %343 = load ptr, ptr %342, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %59, ptr align 4 %16, i64 16, i1 false), !tbaa.struct !15
  %344 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %59, i32 0, i32 0
  %345 = load <2 x float>, ptr %344, align 4
  %346 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %59, i32 0, i32 1
  %347 = load <2 x float>, ptr %346, align 4
  %348 = call { <2 x float>, <2 x float> } @_ZL13GetTextBoundsi9Rectangle(i32 noundef 0, <2 x float> %345, <2 x float> %347)
  %349 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %58, i32 0, i32 0
  %350 = extractvalue { <2 x float>, <2 x float> } %348, 0
  store <2 x float> %350, ptr %349, align 4
  %351 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %58, i32 0, i32 1
  %352 = extractvalue { <2 x float>, <2 x float> } %348, 1
  store <2 x float> %352, ptr %351, align 4
  %353 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 14)
  %354 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 2)
  %355 = call i32 @GetColor(i32 noundef %354)
  store i32 %355, ptr %61, align 1
  %356 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !16
  %357 = load i32, ptr %61, align 1
  %358 = call i32 @Fade(i32 %357, float noundef %356)
  store i32 %358, ptr %60, align 1
  %359 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %58, i32 0, i32 0
  %360 = load <2 x float>, ptr %359, align 4
  %361 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %58, i32 0, i32 1
  %362 = load <2 x float>, ptr %361, align 4
  %363 = load i32, ptr %60, align 1
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef %343, <2 x float> %360, <2 x float> %362, i32 noundef %353, i32 %363)
  br label %364

364:                                              ; preds = %338, %295
  br label %365

365:                                              ; preds = %364, %248
  br label %366

366:                                              ; preds = %365
  %367 = load i32, ptr %39, align 4, !tbaa !13
  %368 = add nsw i32 %367, 1
  store i32 %368, ptr %39, align 4, !tbaa !13
  br label %231, !llvm.loop !26

369:                                              ; preds = %235
  br label %370

370:                                              ; preds = %369, %176
  %371 = getelementptr inbounds %struct.Rectangle, ptr %62, i32 0, i32 0
  %372 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 0
  %373 = load float, ptr %372, align 4, !tbaa !27
  %374 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 2
  %375 = load float, ptr %374, align 4, !tbaa !28
  %376 = fadd float %373, %375
  %377 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 16)
  %378 = sitofp i32 %377 to float
  %379 = fsub float %376, %378
  store float %379, ptr %371, align 4, !tbaa !27
  %380 = getelementptr inbounds %struct.Rectangle, ptr %62, i32 0, i32 1
  %381 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 1
  %382 = load float, ptr %381, align 4, !tbaa !23
  %383 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 3
  %384 = load float, ptr %383, align 4, !tbaa !18
  %385 = fdiv float %384, 2.000000e+00
  %386 = fadd float %382, %385
  %387 = fsub float %386, 6.000000e+00
  store float %387, ptr %380, align 4, !tbaa !23
  %388 = getelementptr inbounds %struct.Rectangle, ptr %62, i32 0, i32 2
  store float 1.000000e+01, ptr %388, align 4, !tbaa !28
  %389 = getelementptr inbounds %struct.Rectangle, ptr %62, i32 0, i32 3
  store float 1.000000e+01, ptr %389, align 4, !tbaa !18
  %390 = load i32, ptr %10, align 4, !tbaa !11
  %391 = mul nsw i32 %390, 3
  %392 = add nsw i32 2, %391
  %393 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef %392)
  %394 = call i32 @GetColor(i32 noundef %393)
  store i32 %394, ptr %64, align 1
  %395 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !16
  %396 = load i32, ptr %64, align 1
  %397 = call i32 @Fade(i32 %396, float noundef %395)
  store i32 %397, ptr %63, align 1
  %398 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %62, i32 0, i32 0
  %399 = load <2 x float>, ptr %398, align 4
  %400 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %62, i32 0, i32 1
  %401 = load <2 x float>, ptr %400, align 4
  %402 = load i32, ptr %63, align 1
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef @.str.18, <2 x float> %399, <2 x float> %401, i32 noundef 1, i32 %402)
  %403 = load i32, ptr %11, align 4, !tbaa !13
  %404 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %403, ptr %404, align 4, !tbaa !13
  %405 = load i8, ptr %17, align 1, !tbaa !9, !range !20, !noundef !21
  %406 = trunc i8 %405 to i1
  store i32 1, ptr %24, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  ret i1 %406
}

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 = { 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 #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, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS15GuiControlState", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{i64 0, i64 4, !16, i64 4, i64 4, !16, i64 8, i64 4, !16, i64 12, i64 4, !16}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!19, !17, i64 12}
!19 = !{!"_ZTS9Rectangle", !17, i64 0, !17, i64 4, !17, i64 8, !17, i64 12}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{i64 0, i64 4, !16, i64 4, i64 4, !16}
!23 = !{!19, !17, i64 4}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = !{!19, !17, i64 0}
!28 = !{!19, !17, i64 8}


; 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"

@_ZL8guiState = external hidden local_unnamed_addr global i32, align 4
@_ZL9guiLocked = external hidden local_unnamed_addr global i8, align 1
@_ZL8guiAlpha = external hidden local_unnamed_addr global float, align 4
@.str.18 = external hidden unnamed_addr constant [6 x i8], align 1

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

; Function Attrs: mustprogress uwtable
declare dso_local void @GuiPanel(<2 x float>, <2 x float>) local_unnamed_addr #2

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

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

declare i32 @GetColor(i32 noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden { <2 x float>, <2 x float> } @_ZL13GetTextBoundsi9Rectangle(i32 noundef, <2 x float>, <2 x float>) local_unnamed_addr #2

declare zeroext i1 @IsMouseButtonReleased(i32 noundef) local_unnamed_addr #3

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

declare zeroext i1 @IsMouseButtonPressed(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @GuiDropdownBox(<2 x float> %0, <2 x float> %1, ptr noundef %2, ptr nocapture noundef %3, i1 noundef zeroext %4) local_unnamed_addr #2 {
  %6 = alloca i32, align 4
  %7 = load i32, ptr @_ZL8guiState, align 4, !tbaa !5
  %8 = load i32, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 0, ptr %6, align 4, !tbaa !9
  %9 = call noundef ptr @_ZL12GuiTextSplitPKcPiS1_(ptr noundef %2, ptr noundef nonnull %6, ptr noundef null)
  %10 = load i32, ptr %6, align 4, !tbaa !9
  %11 = add nsw i32 %10, 1
  %12 = sitofp i32 %11 to float
  %.sroa.10.12.vec.extract = extractelement <2 x float> %1, i64 1
  %13 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 17)
  %14 = sitofp i32 %13 to float
  %15 = fadd float %.sroa.10.12.vec.extract, %14
  %16 = fmul float %15, %12
  %.sroa.5.12.vec.insert = insertelement <2 x float> %1, float %16, i64 1
  %.not151 = icmp eq i32 %7, 3
  br i1 %.not151, label %.loopexit174, label %17

17:                                               ; preds = %5
  br i1 %4, label %23, label %18

18:                                               ; preds = %17
  %19 = load i8, ptr @_ZL9guiLocked, align 1, !tbaa !11, !range !13, !noundef !14
  %20 = trunc nuw i8 %19 to i1
  %21 = load i32, ptr %6, align 4
  %22 = icmp slt i32 %21, 2
  %or.cond.not = select i1 %20, i1 true, i1 %22
  br i1 %or.cond.not, label %.thread156, label %50

23:                                               ; preds = %17
  %.old = load i32, ptr %6, align 4, !tbaa !9
  %.old1 = icmp sgt i32 %.old, 1
  br i1 %.old1, label %24, label %.thread165

24:                                               ; preds = %23
  %25 = call <2 x float> @GetMousePosition()
  %26 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %25, <2 x float> %0, <2 x float> %.sroa.5.12.vec.insert)
  br i1 %26, label %32, label %27

27:                                               ; preds = %24
  %28 = call zeroext i1 @IsMouseButtonPressed(i32 noundef 0)
  br i1 %28, label %31, label %29

29:                                               ; preds = %27
  %30 = call zeroext i1 @IsMouseButtonReleased(i32 noundef 0)
  br i1 %30, label %31, label %32

31:                                               ; preds = %29, %27
  br label %32

32:                                               ; preds = %29, %31, %24
  %.0143 = phi i1 [ false, %24 ], [ true, %31 ], [ false, %29 ]
  %33 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %25, <2 x float> %0, <2 x float> %1)
  br i1 %33, label %34, label %36

34:                                               ; preds = %32
  %35 = call zeroext i1 @IsMouseButtonPressed(i32 noundef 0)
  %spec.select = or i1 %35, %.0143
  br label %36

36:                                               ; preds = %34, %32
  %.1144 = phi i1 [ %.0143, %32 ], [ %spec.select, %34 ]
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = icmp sgt i32 %37, 0
  br i1 %38, label %.lr.ph, label %.thread165

.lr.ph:                                           ; preds = %36, %46
  %.sroa.076.0177 = phi <2 x float> [ %.sroa.076.4.vec.insert, %46 ], [ %0, %36 ]
  %.0147176 = phi i32 [ %47, %46 ], [ 0, %36 ]
  %39 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 17)
  %40 = sitofp i32 %39 to float
  %41 = fadd float %.sroa.10.12.vec.extract, %40
  %.sroa.076.4.vec.extract = extractelement <2 x float> %.sroa.076.0177, i64 1
  %42 = fadd float %.sroa.076.4.vec.extract, %41
  %.sroa.076.4.vec.insert = insertelement <2 x float> %.sroa.076.0177, float %42, i64 1
  %43 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %25, <2 x float> %.sroa.076.4.vec.insert, <2 x float> %1)
  br i1 %43, label %44, label %46

44:                                               ; preds = %.lr.ph
  %45 = call zeroext i1 @IsMouseButtonReleased(i32 noundef 0)
  %spec.select153 = select i1 %45, i1 true, i1 %.1144
  %spec.select154 = select i1 %45, i32 %.0147176, i32 %8
  br label %.loopexit174

46:                                               ; preds = %.lr.ph
  %47 = add nuw nsw i32 %.0147176, 1
  %48 = load i32, ptr %6, align 4, !tbaa !9
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %.lr.ph, label %.loopexit174, !llvm.loop !15

50:                                               ; preds = %18
  %51 = call <2 x float> @GetMousePosition()
  %52 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %51, <2 x float> %0, <2 x float> %1)
  br i1 %52, label %53, label %.thread156

53:                                               ; preds = %50
  %54 = call zeroext i1 @IsMouseButtonPressed(i32 noundef 0)
  %.155 = select i1 %54, i32 2, i32 1
  br label %.thread156

.loopexit174:                                     ; preds = %46, %44, %5
  %.5 = phi i1 [ false, %5 ], [ %spec.select153, %44 ], [ %.1144, %46 ]
  %.2142 = phi i32 [ -1, %5 ], [ %.0147176, %44 ], [ -1, %46 ]
  %.3 = phi i32 [ %8, %5 ], [ %spec.select154, %44 ], [ %8, %46 ]
  %.1 = phi i32 [ 3, %5 ], [ 2, %44 ], [ 2, %46 ]
  br i1 %4, label %.thread165, label %.thread156

.thread165:                                       ; preds = %36, %23, %.loopexit174
  %.1173 = phi i32 [ %.1, %.loopexit174 ], [ %7, %23 ], [ 2, %36 ]
  %.3172 = phi i32 [ %.3, %.loopexit174 ], [ %8, %23 ], [ %8, %36 ]
  %.2142171 = phi i32 [ %.2142, %.loopexit174 ], [ -1, %23 ], [ -1, %36 ]
  %.5170 = phi i1 [ %.5, %.loopexit174 ], [ false, %23 ], [ %.1144, %36 ]
  call void @GuiPanel(<2 x float> %0, <2 x float> %.sroa.5.12.vec.insert)
  br label %.thread156

.thread156:                                       ; preds = %18, %53, %50, %.thread165, %.loopexit174
  %.1164 = phi i32 [ %.1173, %.thread165 ], [ %.1, %.loopexit174 ], [ %.155, %53 ], [ %7, %50 ], [ %7, %18 ]
  %.3163 = phi i32 [ %.3172, %.thread165 ], [ %.3, %.loopexit174 ], [ %8, %53 ], [ %8, %50 ], [ %8, %18 ]
  %.2142162 = phi i32 [ %.2142171, %.thread165 ], [ %.2142, %.loopexit174 ], [ -1, %53 ], [ -1, %50 ], [ -1, %18 ]
  %.5161 = phi i1 [ %.5170, %.thread165 ], [ %.5, %.loopexit174 ], [ %54, %53 ], [ false, %50 ], [ false, %18 ]
  %55 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 12)
  %56 = mul nsw i32 %.1164, 3
  %57 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef %56)
  %58 = call i32 @GetColor(i32 noundef %57)
  %59 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !17
  %60 = call i32 @Fade(i32 %58, float noundef %59)
  %61 = add nsw i32 %56, 1
  %62 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef %61)
  %63 = call i32 @GetColor(i32 noundef %62)
  %64 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !17
  %65 = call i32 @Fade(i32 %63, float noundef %64)
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %0, <2 x float> %1, i32 noundef %55, i32 %60, i32 %65)
  %66 = sext i32 %.3163 to i64
  %67 = getelementptr inbounds ptr, ptr %9, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !19
  %69 = call { <2 x float>, <2 x float> } @_ZL13GetTextBoundsi9Rectangle(i32 noundef 0, <2 x float> %0, <2 x float> %1)
  %70 = extractvalue { <2 x float>, <2 x float> } %69, 0
  %71 = extractvalue { <2 x float>, <2 x float> } %69, 1
  %72 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 14)
  %73 = add nsw i32 %56, 2
  %74 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef %73)
  %75 = call i32 @GetColor(i32 noundef %74)
  %76 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !17
  %77 = call i32 @Fade(i32 %75, float noundef %76)
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef %68, <2 x float> %70, <2 x float> %71, i32 noundef %72, i32 %77)
  %78 = load i32, ptr %6, align 4
  %79 = icmp sgt i32 %78, 0
  %or.cond = select i1 %4, i1 %79, i1 false
  br i1 %or.cond, label %.lr.ph180.preheader, label %.loopexit

.lr.ph180.preheader:                              ; preds = %.thread156
  %80 = zext i32 %.2142162 to i64
  %81 = zext i32 %.3163 to i64
  %82 = getelementptr inbounds ptr, ptr %9, i64 %80
  %83 = getelementptr inbounds ptr, ptr %9, i64 %81
  br label %.lr.ph180

.lr.ph180:                                        ; preds = %.lr.ph180.preheader, %113
  %indvars.iv = phi i64 [ 0, %.lr.ph180.preheader ], [ %indvars.iv.next, %113 ]
  %.sroa.076.3179 = phi <2 x float> [ %0, %.lr.ph180.preheader ], [ %.sroa.076.4.vec.insert87, %113 ]
  %84 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 17)
  %85 = sitofp i32 %84 to float
  %86 = fadd float %.sroa.10.12.vec.extract, %85
  %.sroa.076.4.vec.extract85 = extractelement <2 x float> %.sroa.076.3179, i64 1
  %87 = fadd float %.sroa.076.4.vec.extract85, %86
  %.sroa.076.4.vec.insert87 = insertelement <2 x float> %.sroa.076.3179, float %87, i64 1
  %88 = icmp eq i64 %indvars.iv, %81
  br i1 %88, label %89, label %99

89:                                               ; preds = %.lr.ph180
  %90 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 12)
  %91 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 6)
  %92 = call i32 @GetColor(i32 noundef %91)
  %93 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !17
  %94 = call i32 @Fade(i32 %92, float noundef %93)
  %95 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 7)
  %96 = call i32 @GetColor(i32 noundef %95)
  %97 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !17
  %98 = call i32 @Fade(i32 %96, float noundef %97)
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %.sroa.076.4.vec.insert87, <2 x float> %1, i32 noundef %90, i32 %94, i32 %98)
  br label %113

99:                                               ; preds = %.lr.ph180
  %100 = icmp eq i64 %indvars.iv, %80
  br i1 %100, label %101, label %111

101:                                              ; preds = %99
  %102 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 12)
  %103 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 3)
  %104 = call i32 @GetColor(i32 noundef %103)
  %105 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !17
  %106 = call i32 @Fade(i32 %104, float noundef %105)
  %107 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 4)
  %108 = call i32 @GetColor(i32 noundef %107)
  %109 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !17
  %110 = call i32 @Fade(i32 %108, float noundef %109)
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %.sroa.076.4.vec.insert87, <2 x float> %1, i32 noundef %102, i32 %106, i32 %110)
  br label %113

111:                                              ; preds = %99
  %112 = getelementptr inbounds ptr, ptr %9, i64 %indvars.iv
  br label %113

113:                                              ; preds = %89, %111, %101
  %.sink200 = phi ptr [ %83, %89 ], [ %112, %111 ], [ %82, %101 ]
  %.sink197 = phi i32 [ 8, %89 ], [ 2, %111 ], [ 5, %101 ]
  %114 = load ptr, ptr %.sink200, align 8, !tbaa !19
  %115 = call { <2 x float>, <2 x float> } @_ZL13GetTextBoundsi9Rectangle(i32 noundef 0, <2 x float> %.sroa.076.4.vec.insert87, <2 x float> %1)
  %116 = extractvalue { <2 x float>, <2 x float> } %115, 0
  %117 = extractvalue { <2 x float>, <2 x float> } %115, 1
  %118 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 14)
  %119 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef %.sink197)
  %120 = call i32 @GetColor(i32 noundef %119)
  %121 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !17
  %122 = call i32 @Fade(i32 %120, float noundef %121)
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef %114, <2 x float> %116, <2 x float> %117, i32 noundef %118, i32 %122)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %123 = load i32, ptr %6, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  %125 = icmp slt i64 %indvars.iv.next, %124
  br i1 %125, label %.lr.ph180, label %.loopexit, !llvm.loop !21

.loopexit:                                        ; preds = %113, %.thread156
  %126 = fadd <2 x float> %0, %1
  %127 = extractelement <2 x float> %126, i64 0
  %128 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef 16)
  %129 = sitofp i32 %128 to float
  %130 = fsub float %127, %129
  %.sroa.03.0.vec.insert = insertelement <2 x float> poison, float %130, i64 0
  %.sroa.0117.4.vec.extract = extractelement <2 x float> %0, i64 1
  %131 = fmul float %.sroa.10.12.vec.extract, 5.000000e-01
  %132 = fadd float %.sroa.0117.4.vec.extract, %131
  %133 = fadd float %132, -6.000000e+00
  %.sroa.03.4.vec.insert = insertelement <2 x float> %.sroa.03.0.vec.insert, float %133, i64 1
  %134 = call i32 @GuiGetStyle(i32 noundef 8, i32 noundef %73)
  %135 = call i32 @GetColor(i32 noundef %134)
  %136 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !17
  %137 = call i32 @Fade(i32 %135, float noundef %136)
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef nonnull @.str.18, <2 x float> %.sroa.03.4.vec.insert, <2 x float> <float 1.000000e+01, float 1.000000e+01>, i32 noundef 1, i32 %137)
  store i32 %.3163, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  ret i1 %.5161
}

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 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 #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 = { 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 = { 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 = !{!"_ZTS15GuiControlState", !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 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"any pointer", !7, i64 0}
!21 = distinct !{!21, !16}


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,VectorCombinePass