; 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

; 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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL12GetTextWidthPKc(ptr noundef) #3

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 @IsMouseButtonPressed(i32 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @GuiTextBox(<2 x float> %0, <2 x float> %1, ptr noundef %2, i32 noundef %3, i1 noundef zeroext %4) #3 {
  %6 = alloca %struct.Rectangle, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca %struct.Rectangle, align 4
  %13 = alloca %struct.Vector2, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca %struct.Vector2, align 4
  %21 = alloca %struct.Rectangle, align 4
  %22 = alloca i32, align 4
  %23 = alloca %struct.Vector2, align 4
  %24 = alloca %struct.Rectangle, align 4
  %25 = alloca %struct.Rectangle, align 4
  %26 = alloca %struct.Color, align 1
  %27 = alloca %struct.Color, align 1
  %28 = alloca %struct.Color, align 1
  %29 = alloca %struct.Color, align 1
  %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.Color, align 1
  %37 = alloca %struct.Color, align 1
  %38 = alloca %struct.Color, align 1
  %39 = alloca %struct.Rectangle, align 4
  %40 = alloca %struct.Rectangle, align 4
  %41 = alloca %struct.Color, align 1
  %42 = alloca %struct.Color, align 1
  %43 = alloca %struct.Rectangle, align 4
  %44 = alloca %struct.Color, align 1
  %45 = alloca %struct.Color, align 1
  %46 = alloca %struct.Color, align 1
  %47 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 0
  store <2 x float> %0, ptr %47, align 4
  %48 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 1
  store <2 x float> %1, ptr %48, align 4
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  %49 = zext i1 %4 to i8
  store i8 %49, ptr %9, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %50 = load i32, ptr @_ZL8guiState, align 4, !tbaa !13
  store i32 %50, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #6
  store i8 0, ptr %11, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  %51 = getelementptr inbounds %struct.Rectangle, ptr %12, i32 0, i32 0
  %52 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 0
  %53 = load float, ptr %52, align 4, !tbaa !15
  %54 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 13)
  %55 = sitofp i32 %54 to float
  %56 = fadd float %53, %55
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = call noundef i32 @_ZL12GetTextWidthPKc(ptr noundef %57)
  %59 = sitofp i32 %58 to float
  %60 = fadd float %56, %59
  %61 = fadd float %60, 2.000000e+00
  store float %61, ptr %51, align 4, !tbaa !15
  %62 = getelementptr inbounds %struct.Rectangle, ptr %12, i32 0, i32 1
  %63 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 1
  %64 = load float, ptr %63, align 4, !tbaa !18
  %65 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 3
  %66 = load float, ptr %65, align 4, !tbaa !19
  %67 = fdiv float %66, 2.000000e+00
  %68 = fadd float %64, %67
  %69 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %70 = sitofp i32 %69 to float
  %71 = fsub float %68, %70
  store float %71, ptr %62, align 4, !tbaa !18
  %72 = getelementptr inbounds %struct.Rectangle, ptr %12, i32 0, i32 2
  store float 4.000000e+00, ptr %72, align 4, !tbaa !20
  %73 = getelementptr inbounds %struct.Rectangle, ptr %12, i32 0, i32 3
  %74 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %75 = sitofp i32 %74 to float
  %76 = fmul float %75, 2.000000e+00
  store float %76, ptr %73, align 4, !tbaa !19
  %77 = getelementptr inbounds %struct.Rectangle, ptr %12, i32 0, i32 3
  %78 = load float, ptr %77, align 4, !tbaa !19
  %79 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 3
  %80 = load float, ptr %79, align 4, !tbaa !19
  %81 = fcmp ogt float %78, %80
  br i1 %81, label %82, label %90

82:                                               ; preds = %5
  %83 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 3
  %84 = load float, ptr %83, align 4, !tbaa !19
  %85 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 12)
  %86 = mul nsw i32 %85, 2
  %87 = sitofp i32 %86 to float
  %88 = fsub float %84, %87
  %89 = getelementptr inbounds %struct.Rectangle, ptr %12, i32 0, i32 3
  store float %88, ptr %89, align 4, !tbaa !19
  br label %90

90:                                               ; preds = %82, %5
  %91 = load i32, ptr %10, align 4, !tbaa !13
  %92 = icmp ne i32 %91, 3
  br i1 %92, label %93, label %231

93:                                               ; preds = %90
  %94 = load i8, ptr @_ZL9guiLocked, align 1, !tbaa !11, !range !21, !noundef !22
  %95 = trunc i8 %94 to i1
  br i1 %95, label %231, label %96

96:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %97 = call <2 x float> @GetMousePosition()
  store <2 x float> %97, ptr %13, align 4
  %98 = load i8, ptr %9, align 1, !tbaa !11, !range !21, !noundef !22
  %99 = trunc i8 %98 to i1
  br i1 %99, label %100, label %218

100:                                              ; preds = %96
  store i32 2, ptr %10, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %101 = call i32 @GetCharPressed()
  store i32 %101, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = call i64 @strlen(ptr noundef %102) #7
  %104 = trunc i64 %103 to i32
  store i32 %104, ptr %15, align 4, !tbaa !9
  %105 = load i32, ptr %15, align 4, !tbaa !9
  %106 = load i32, ptr %8, align 4, !tbaa !9
  %107 = sub nsw i32 %106, 1
  %108 = icmp slt i32 %105, %107
  br i1 %108, label %109, label %156

109:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %110 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 2
  %111 = load float, ptr %110, align 4, !tbaa !20
  %112 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 16)
  %113 = mul nsw i32 %112, 2
  %114 = sitofp i32 %113 to float
  %115 = fsub float %111, %114
  store float %115, ptr %16, align 4, !tbaa !23
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = call noundef i32 @_ZL12GetTextWidthPKc(ptr noundef %116)
  %118 = sitofp i32 %117 to float
  %119 = load float, ptr %16, align 4, !tbaa !23
  %120 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %121 = sitofp i32 %120 to float
  %122 = fsub float %119, %121
  %123 = fcmp olt float %118, %122
  br i1 %123, label %124, label %155

124:                                              ; preds = %109
  %125 = load i32, ptr %14, align 4, !tbaa !9
  %126 = icmp sge i32 %125, 32
  br i1 %126, label %127, label %155

127:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %128 = load i32, ptr %14, align 4, !tbaa !9
  %129 = call ptr @CodepointToUTF8(i32 noundef %128, ptr noundef %17)
  store ptr %129, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %130

130:                                              ; preds = %147, %127
  %131 = load i32, ptr %19, align 4, !tbaa !9
  %132 = load i32, ptr %17, align 4, !tbaa !9
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %150

135:                                              ; preds = %130
  %136 = load ptr, ptr %18, align 8, !tbaa !5
  %137 = load i32, ptr %19, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds i8, ptr %136, i64 %138
  %140 = load i8, ptr %139, align 1, !tbaa !24
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = load i32, ptr %15, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds i8, ptr %141, i64 %143
  store i8 %140, ptr %144, align 1, !tbaa !24
  %145 = load i32, ptr %15, align 4, !tbaa !9
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %15, align 4, !tbaa !9
  br label %147

147:                                              ; preds = %135
  %148 = load i32, ptr %19, align 4, !tbaa !9
  %149 = add nsw i32 %148, 1
  store i32 %149, ptr %19, align 4, !tbaa !9
  br label %130, !llvm.loop !25

150:                                              ; preds = %134
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = load i32, ptr %15, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds i8, ptr %151, i64 %153
  store i8 0, ptr %154, align 1, !tbaa !24
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %155

155:                                              ; preds = %150, %124, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %156

156:                                              ; preds = %155, %100
  %157 = load i32, ptr %15, align 4, !tbaa !9
  %158 = icmp sgt i32 %157, 0
  br i1 %158, label %159, label %173

159:                                              ; preds = %156
  %160 = call zeroext i1 @IsKeyPressed(i32 noundef 259)
  br i1 %160, label %161, label %172

161:                                              ; preds = %159
  %162 = load i32, ptr %15, align 4, !tbaa !9
  %163 = add nsw i32 %162, -1
  store i32 %163, ptr %15, align 4, !tbaa !9
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  %165 = load i32, ptr %15, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = getelementptr inbounds i8, ptr %164, i64 %166
  store i8 0, ptr %167, align 1, !tbaa !24
  %168 = load i32, ptr %15, align 4, !tbaa !9
  %169 = icmp slt i32 %168, 0
  br i1 %169, label %170, label %171

170:                                              ; preds = %161
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %171

171:                                              ; preds = %170, %161
  br label %172

172:                                              ; preds = %171, %159
  br label %173

173:                                              ; preds = %172, %156
  %174 = call zeroext i1 @IsKeyPressed(i32 noundef 257)
  br i1 %174, label %184, label %175

175:                                              ; preds = %173
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %13, i64 8, i1 false), !tbaa.struct !27
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !28
  %176 = load <2 x float>, ptr %20, align 4
  %177 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %21, i32 0, i32 0
  %178 = load <2 x float>, ptr %177, align 4
  %179 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %21, i32 0, i32 1
  %180 = load <2 x float>, ptr %179, align 4
  %181 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %176, <2 x float> %178, <2 x float> %180)
  br i1 %181, label %185, label %182

182:                                              ; preds = %175
  %183 = call zeroext i1 @IsMouseButtonPressed(i32 noundef 0)
  br i1 %183, label %184, label %185

184:                                              ; preds = %182, %173
  store i8 1, ptr %11, align 1, !tbaa !11
  br label %185

185:                                              ; preds = %184, %182, %175
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %186 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 14)
  store i32 %186, ptr %22, align 4, !tbaa !9
  %187 = load i32, ptr %22, align 4, !tbaa !9
  %188 = icmp eq i32 %187, 1
  br i1 %188, label %189, label %203

189:                                              ; preds = %185
  %190 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 0
  %191 = load float, ptr %190, align 4, !tbaa !15
  %192 = load ptr, ptr %7, align 8, !tbaa !5
  %193 = call noundef i32 @_ZL12GetTextWidthPKc(ptr noundef %192)
  %194 = sdiv i32 %193, 2
  %195 = sitofp i32 %194 to float
  %196 = fadd float %191, %195
  %197 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 2
  %198 = load float, ptr %197, align 4, !tbaa !20
  %199 = fdiv float %198, 2.000000e+00
  %200 = fadd float %196, %199
  %201 = fadd float %200, 1.000000e+00
  %202 = getelementptr inbounds %struct.Rectangle, ptr %12, i32 0, i32 0
  store float %201, ptr %202, align 4, !tbaa !15
  br label %217

203:                                              ; preds = %185
  %204 = load i32, ptr %22, align 4, !tbaa !9
  %205 = icmp eq i32 %204, 2
  br i1 %205, label %206, label %216

206:                                              ; preds = %203
  %207 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 0
  %208 = load float, ptr %207, align 4, !tbaa !15
  %209 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 2
  %210 = load float, ptr %209, align 4, !tbaa !20
  %211 = fadd float %208, %210
  %212 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 16)
  %213 = sitofp i32 %212 to float
  %214 = fsub float %211, %213
  %215 = getelementptr inbounds %struct.Rectangle, ptr %12, i32 0, i32 0
  store float %214, ptr %215, align 4, !tbaa !15
  br label %216

216:                                              ; preds = %206, %203
  br label %217

217:                                              ; preds = %216, %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %230

218:                                              ; preds = %96
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %23, ptr align 4 %13, i64 8, i1 false), !tbaa.struct !27
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !28
  %219 = load <2 x float>, ptr %23, align 4
  %220 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %24, i32 0, i32 0
  %221 = load <2 x float>, ptr %220, align 4
  %222 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %24, i32 0, i32 1
  %223 = load <2 x float>, ptr %222, align 4
  %224 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %219, <2 x float> %221, <2 x float> %223)
  br i1 %224, label %225, label %229

225:                                              ; preds = %218
  store i32 1, ptr %10, align 4, !tbaa !13
  %226 = call zeroext i1 @IsMouseButtonPressed(i32 noundef 0)
  br i1 %226, label %227, label %228

227:                                              ; preds = %225
  store i8 1, ptr %11, align 1, !tbaa !11
  br label %228

228:                                              ; preds = %227, %225
  br label %229

229:                                              ; preds = %228, %218
  br label %230

230:                                              ; preds = %229, %217
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %231

231:                                              ; preds = %230, %93, %90
  %232 = load i32, ptr %10, align 4, !tbaa !13
  %233 = icmp eq i32 %232, 2
  br i1 %233, label %234, label %255

234:                                              ; preds = %231
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !28
  %235 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 12)
  %236 = load i32, ptr %10, align 4, !tbaa !13
  %237 = mul nsw i32 %236, 3
  %238 = add nsw i32 0, %237
  %239 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef %238)
  %240 = call i32 @GetColor(i32 noundef %239)
  store i32 %240, ptr %27, align 1
  %241 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %242 = load i32, ptr %27, align 1
  %243 = call i32 @Fade(i32 %242, float noundef %241)
  store i32 %243, ptr %26, align 1
  %244 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 7)
  %245 = call i32 @GetColor(i32 noundef %244)
  store i32 %245, ptr %29, align 1
  %246 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %247 = load i32, ptr %29, align 1
  %248 = call i32 @Fade(i32 %247, float noundef %246)
  store i32 %248, ptr %28, align 1
  %249 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %25, i32 0, i32 0
  %250 = load <2 x float>, ptr %249, align 4
  %251 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %25, i32 0, i32 1
  %252 = load <2 x float>, ptr %251, align 4
  %253 = load i32, ptr %26, align 1
  %254 = load i32, ptr %28, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %250, <2 x float> %252, i32 noundef %235, i32 %253, i32 %254)
  br label %299

255:                                              ; preds = %231
  %256 = load i32, ptr %10, align 4, !tbaa !13
  %257 = icmp eq i32 %256, 3
  br i1 %257, label %258, label %279

258:                                              ; preds = %255
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %30, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !28
  %259 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 12)
  %260 = load i32, ptr %10, align 4, !tbaa !13
  %261 = mul nsw i32 %260, 3
  %262 = add nsw i32 0, %261
  %263 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef %262)
  %264 = call i32 @GetColor(i32 noundef %263)
  store i32 %264, ptr %32, align 1
  %265 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %266 = load i32, ptr %32, align 1
  %267 = call i32 @Fade(i32 %266, float noundef %265)
  store i32 %267, ptr %31, align 1
  %268 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 10)
  %269 = call i32 @GetColor(i32 noundef %268)
  store i32 %269, ptr %34, align 1
  %270 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %271 = load i32, ptr %34, align 1
  %272 = call i32 @Fade(i32 %271, float noundef %270)
  store i32 %272, ptr %33, align 1
  %273 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %30, i32 0, i32 0
  %274 = load <2 x float>, ptr %273, align 4
  %275 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %30, i32 0, i32 1
  %276 = load <2 x float>, ptr %275, align 4
  %277 = load i32, ptr %31, align 1
  %278 = load i32, ptr %33, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %274, <2 x float> %276, i32 noundef %259, i32 %277, i32 %278)
  br label %298

279:                                              ; preds = %255
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %35, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !28
  %280 = load i32, ptr %10, align 4, !tbaa !13
  %281 = mul nsw i32 %280, 3
  %282 = add nsw i32 0, %281
  %283 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef %282)
  %284 = call i32 @GetColor(i32 noundef %283)
  store i32 %284, ptr %37, align 1
  %285 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %286 = load i32, ptr %37, align 1
  %287 = call i32 @Fade(i32 %286, float noundef %285)
  store i32 %287, ptr %36, align 1
  %288 = getelementptr inbounds %struct.Color, ptr %38, i32 0, i32 0
  store i8 0, ptr %288, align 1, !tbaa !29
  %289 = getelementptr inbounds %struct.Color, ptr %38, i32 0, i32 1
  store i8 0, ptr %289, align 1, !tbaa !31
  %290 = getelementptr inbounds %struct.Color, ptr %38, i32 0, i32 2
  store i8 0, ptr %290, align 1, !tbaa !32
  %291 = getelementptr inbounds %struct.Color, ptr %38, i32 0, i32 3
  store i8 0, ptr %291, align 1, !tbaa !33
  %292 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %35, i32 0, i32 0
  %293 = load <2 x float>, ptr %292, align 4
  %294 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %35, i32 0, i32 1
  %295 = load <2 x float>, ptr %294, align 4
  %296 = load i32, ptr %36, align 1
  %297 = load i32, ptr %38, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %293, <2 x float> %295, i32 noundef 1, i32 %296, i32 %297)
  br label %298

298:                                              ; preds = %279, %258
  br label %299

299:                                              ; preds = %298, %234
  %300 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %40, ptr align 4 %6, i64 16, i1 false), !tbaa.struct !28
  %301 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %40, i32 0, i32 0
  %302 = load <2 x float>, ptr %301, align 4
  %303 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %40, i32 0, i32 1
  %304 = load <2 x float>, ptr %303, align 4
  %305 = call { <2 x float>, <2 x float> } @_ZL13GetTextBoundsi9Rectangle(i32 noundef 9, <2 x float> %302, <2 x float> %304)
  %306 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %39, i32 0, i32 0
  %307 = extractvalue { <2 x float>, <2 x float> } %305, 0
  store <2 x float> %307, ptr %306, align 4
  %308 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %39, i32 0, i32 1
  %309 = extractvalue { <2 x float>, <2 x float> } %305, 1
  store <2 x float> %309, ptr %308, align 4
  %310 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 14)
  %311 = load i32, ptr %10, align 4, !tbaa !13
  %312 = mul nsw i32 %311, 3
  %313 = add nsw i32 2, %312
  %314 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef %313)
  %315 = call i32 @GetColor(i32 noundef %314)
  store i32 %315, ptr %42, align 1
  %316 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %317 = load i32, ptr %42, align 1
  %318 = call i32 @Fade(i32 %317, float noundef %316)
  store i32 %318, ptr %41, align 1
  %319 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %39, i32 0, i32 0
  %320 = load <2 x float>, ptr %319, align 4
  %321 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %39, i32 0, i32 1
  %322 = load <2 x float>, ptr %321, align 4
  %323 = load i32, ptr %41, align 1
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef %300, <2 x float> %320, <2 x float> %322, i32 noundef %310, i32 %323)
  %324 = load i8, ptr %9, align 1, !tbaa !11, !range !21, !noundef !22
  %325 = trunc i8 %324 to i1
  br i1 %325, label %326, label %342

326:                                              ; preds = %299
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %12, i64 16, i1 false), !tbaa.struct !28
  %327 = getelementptr inbounds %struct.Color, ptr %44, i32 0, i32 0
  store i8 0, ptr %327, align 1, !tbaa !29
  %328 = getelementptr inbounds %struct.Color, ptr %44, i32 0, i32 1
  store i8 0, ptr %328, align 1, !tbaa !31
  %329 = getelementptr inbounds %struct.Color, ptr %44, i32 0, i32 2
  store i8 0, ptr %329, align 1, !tbaa !32
  %330 = getelementptr inbounds %struct.Color, ptr %44, i32 0, i32 3
  store i8 0, ptr %330, align 1, !tbaa !33
  %331 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 6)
  %332 = call i32 @GetColor(i32 noundef %331)
  store i32 %332, ptr %46, align 1
  %333 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %334 = load i32, ptr %46, align 1
  %335 = call i32 @Fade(i32 %334, float noundef %333)
  store i32 %335, ptr %45, align 1
  %336 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %43, i32 0, i32 0
  %337 = load <2 x float>, ptr %336, align 4
  %338 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %43, i32 0, i32 1
  %339 = load <2 x float>, ptr %338, align 4
  %340 = load i32, ptr %44, align 1
  %341 = load i32, ptr %45, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %337, <2 x float> %339, i32 noundef 0, i32 %340, i32 %341)
  br label %342

342:                                              ; preds = %326, %299
  %343 = load i8, ptr %11, align 1, !tbaa !11, !range !21, !noundef !22
  %344 = trunc i8 %343 to i1
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  ret i1 %344
}

declare i32 @GetCharPressed() #4

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #5

declare ptr @CodepointToUTF8(i32 noundef, ptr noundef) #4

declare zeroext i1 @IsKeyPressed(i32 noundef) #4

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 willreturn memory(read) "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 }
attributes #7 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS15GuiControlState", !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTS9Rectangle", !17, i64 0, !17, i64 4, !17, i64 8, !17, i64 12}
!17 = !{!"float", !7, i64 0}
!18 = !{!16, !17, i64 4}
!19 = !{!16, !17, i64 12}
!20 = !{!16, !17, i64 8}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!17, !17, i64 0}
!24 = !{!7, !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{i64 0, i64 4, !23, i64 4, i64 4, !23}
!28 = !{i64 0, i64 4, !23, i64 4, i64 4, !23, i64 8, i64 4, !23, i64 12, i64 4, !23}
!29 = !{!30, !7, i64 0}
!30 = !{!"_ZTS5Color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!31 = !{!30, !7, i64 1}
!32 = !{!30, !7, i64 2}
!33 = !{!30, !7, i64 3}


; 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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZL12GetTextWidthPKc(ptr noundef) local_unnamed_addr #2

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 @IsMouseButtonPressed(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local zeroext i1 @GuiTextBox(<2 x float> %0, <2 x float> %1, ptr noundef %2, i32 noundef %3, i1 noundef zeroext %4) local_unnamed_addr #2 {
  %6 = ptrtoint ptr %2 to i64
  %7 = alloca i32, align 4
  %8 = load i32, ptr @_ZL8guiState, align 4, !tbaa !5
  %.sroa.084.0.vec.extract = extractelement <2 x float> %0, i64 0
  %9 = tail call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 13)
  %10 = sitofp i32 %9 to float
  %11 = fadd float %.sroa.084.0.vec.extract, %10
  %12 = tail call noundef i32 @_ZL12GetTextWidthPKc(ptr noundef %2)
  %13 = sitofp i32 %12 to float
  %14 = fadd float %11, %13
  %15 = fadd float %14, 2.000000e+00
  %.sroa.055.0.vec.insert = insertelement <2 x float> poison, float %15, i64 0
  %.sroa.084.4.vec.extract = extractelement <2 x float> %0, i64 1
  %.sroa.11.12.vec.extract = extractelement <2 x float> %1, i64 1
  %16 = fmul float %.sroa.11.12.vec.extract, 5.000000e-01
  %17 = fadd float %.sroa.084.4.vec.extract, %16
  %18 = tail call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %19 = sitofp i32 %18 to float
  %20 = fsub float %17, %19
  %.sroa.055.4.vec.insert = insertelement <2 x float> %.sroa.055.0.vec.insert, float %20, i64 1
  %21 = tail call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %22 = sitofp i32 %21 to float
  %23 = fmul float %22, 2.000000e+00
  %.sroa.7.12.vec.insert = insertelement <2 x float> <float 4.000000e+00, float poison>, float %23, i64 1
  %24 = fcmp ogt float %23, %.sroa.11.12.vec.extract
  br i1 %24, label %25, label %30

25:                                               ; preds = %5
  %26 = tail call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 12)
  %27 = shl nsw i32 %26, 1
  %28 = sitofp i32 %27 to float
  %29 = fsub float %.sroa.11.12.vec.extract, %28
  %.sroa.7.12.vec.insert64 = insertelement <2 x float> %.sroa.7.12.vec.insert, float %29, i64 1
  br label %30

30:                                               ; preds = %25, %5
  %.sroa.7.0 = phi <2 x float> [ %.sroa.7.12.vec.insert64, %25 ], [ %.sroa.7.12.vec.insert, %5 ]
  %.not = icmp eq i32 %8, 3
  br i1 %.not, label %.thread137, label %31

31:                                               ; preds = %30
  %32 = load i8, ptr @_ZL9guiLocked, align 1, !tbaa !9, !range !11, !noundef !12
  %33 = trunc nuw i8 %32 to i1
  br i1 %33, label %116, label %34

34:                                               ; preds = %31
  %35 = tail call <2 x float> @GetMousePosition()
  br i1 %4, label %36, label %113

36:                                               ; preds = %34
  %37 = tail call i32 @GetCharPressed()
  %38 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %2) #5
  %39 = trunc i64 %38 to i32
  %40 = add nsw i32 %3, -1
  %41 = icmp sgt i32 %40, %39
  br i1 %41, label %42, label %82

42:                                               ; preds = %36
  %.sroa.11.8.vec.extract = extractelement <2 x float> %1, i64 0
  %43 = tail call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 16)
  %44 = shl nsw i32 %43, 1
  %45 = sitofp i32 %44 to float
  %46 = fsub float %.sroa.11.8.vec.extract, %45
  %47 = tail call noundef i32 @_ZL12GetTextWidthPKc(ptr noundef %2)
  %48 = sitofp i32 %47 to float
  %49 = tail call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %50 = sitofp i32 %49 to float
  %51 = fsub float %46, %50
  %52 = fcmp ogt float %51, %48
  %53 = icmp sgt i32 %37, 31
  %or.cond = select i1 %52, i1 %53, i1 false
  br i1 %or.cond, label %54, label %82

54:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %7, align 4, !tbaa !13
  %55 = call ptr @CodepointToUTF8(i32 noundef %37, ptr noundef nonnull %7)
  %56 = ptrtoint ptr %55 to i64
  %57 = load i32, ptr %7, align 4, !tbaa !13
  %58 = icmp sgt i32 %57, 0
  br i1 %58, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %54
  %sext = shl i64 %38, 32
  %59 = ashr exact i64 %sext, 32
  %wide.trip.count = zext nneg i32 %57 to i64
  %min.iters.check = icmp ult i32 %57, 32
  br i1 %min.iters.check, label %.lr.ph.preheader153, label %vector.memcheck

.lr.ph.preheader153:                              ; preds = %middle.block, %vector.memcheck, %.lr.ph.preheader
  %indvars.iv146.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %indvars.iv.ph = phi i64 [ %59, %vector.memcheck ], [ %59, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %xtraiter = and i64 %wide.trip.count, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader153, %.lr.ph.prol
  %indvars.iv146.prol = phi i64 [ %indvars.iv.next147.prol, %.lr.ph.prol ], [ %indvars.iv146.ph, %.lr.ph.preheader153 ]
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %.lr.ph.prol ], [ %indvars.iv.ph, %.lr.ph.preheader153 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader153 ]
  %60 = getelementptr inbounds i8, ptr %55, i64 %indvars.iv146.prol
  %61 = load i8, ptr %60, align 1, !tbaa !15
  %62 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.prol
  store i8 %61, ptr %62, align 1, !tbaa !15
  %indvars.iv.next.prol = add nsw i64 %indvars.iv.prol, 1
  %indvars.iv.next147.prol = add nuw nsw i64 %indvars.iv146.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !16

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader153
  %indvars.iv.next.lcssa154.unr = phi i64 [ poison, %.lr.ph.preheader153 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %indvars.iv146.unr = phi i64 [ %indvars.iv146.ph, %.lr.ph.preheader153 ], [ %indvars.iv.next147.prol, %.lr.ph.prol ]
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %.lr.ph.preheader153 ], [ %indvars.iv.next.prol, %.lr.ph.prol ]
  %63 = sub nsw i64 %indvars.iv146.ph, %wide.trip.count
  %64 = icmp ugt i64 %63, -4
  br i1 %64, label %._crit_edge.loopexit, label %.lr.ph.preheader153.new

.lr.ph.preheader153.new:                          ; preds = %.lr.ph.prol.loopexit
  %invariant.gep = getelementptr i8, ptr %55, i64 1
  %invariant.gep155 = getelementptr i8, ptr %2, i64 1
  %invariant.gep157 = getelementptr i8, ptr %55, i64 2
  %invariant.gep159 = getelementptr i8, ptr %2, i64 2
  %invariant.gep161 = getelementptr i8, ptr %55, i64 3
  %invariant.gep163 = getelementptr i8, ptr %2, i64 3
  br label %.lr.ph

vector.memcheck:                                  ; preds = %.lr.ph.preheader
  %65 = add i64 %59, %6
  %66 = sub i64 %65, %56
  %diff.check = icmp ult i64 %66, 32
  br i1 %diff.check, label %.lr.ph.preheader153, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %wide.trip.count, 2147483616
  %ind.end = add nsw i64 %59, %n.vec
  %67 = getelementptr i8, ptr %2, i64 %59
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %68 = getelementptr inbounds i8, ptr %55, i64 %index
  %69 = getelementptr inbounds i8, ptr %68, i64 16
  %wide.load = load <16 x i8>, ptr %68, align 1, !tbaa !15
  %wide.load152 = load <16 x i8>, ptr %69, align 1, !tbaa !15
  %70 = getelementptr i8, ptr %67, i64 %index
  %71 = getelementptr inbounds i8, ptr %70, i64 16
  store <16 x i8> %wide.load, ptr %70, align 1, !tbaa !15
  store <16 x i8> %wide.load152, ptr %71, align 1, !tbaa !15
  %index.next = add nuw i64 %index, 32
  %72 = icmp eq i64 %index.next, %n.vec
  br i1 %72, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %._crit_edge.loopexit, label %.lr.ph.preheader153

._crit_edge.loopexit:                             ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block
  %indvars.iv.next.lcssa = phi i64 [ %ind.end, %middle.block ], [ %indvars.iv.next.lcssa154.unr, %.lr.ph.prol.loopexit ], [ %indvars.iv.next.3, %.lr.ph ]
  %73 = trunc nsw i64 %indvars.iv.next.lcssa to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %54
  %.0111.lcssa = phi i32 [ %39, %54 ], [ %73, %._crit_edge.loopexit ]
  %74 = sext i32 %.0111.lcssa to i64
  %75 = getelementptr inbounds i8, ptr %2, i64 %74
  store i8 0, ptr %75, align 1, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  br label %82

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader153.new
  %indvars.iv146 = phi i64 [ %indvars.iv146.unr, %.lr.ph.preheader153.new ], [ %indvars.iv.next147.3, %.lr.ph ]
  %indvars.iv = phi i64 [ %indvars.iv.unr, %.lr.ph.preheader153.new ], [ %indvars.iv.next.3, %.lr.ph ]
  %76 = getelementptr inbounds i8, ptr %55, i64 %indvars.iv146
  %77 = load i8, ptr %76, align 1, !tbaa !15
  %78 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv
  store i8 %77, ptr %78, align 1, !tbaa !15
  %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv146
  %79 = load i8, ptr %gep, align 1, !tbaa !15
  %gep156 = getelementptr i8, ptr %invariant.gep155, i64 %indvars.iv
  store i8 %79, ptr %gep156, align 1, !tbaa !15
  %gep158 = getelementptr i8, ptr %invariant.gep157, i64 %indvars.iv146
  %80 = load i8, ptr %gep158, align 1, !tbaa !15
  %gep160 = getelementptr i8, ptr %invariant.gep159, i64 %indvars.iv
  store i8 %80, ptr %gep160, align 1, !tbaa !15
  %gep162 = getelementptr i8, ptr %invariant.gep161, i64 %indvars.iv146
  %81 = load i8, ptr %gep162, align 1, !tbaa !15
  %gep164 = getelementptr i8, ptr %invariant.gep163, i64 %indvars.iv
  store i8 %81, ptr %gep164, align 1, !tbaa !15
  %indvars.iv.next.3 = add nsw i64 %indvars.iv, 4
  %indvars.iv.next147.3 = add nuw nsw i64 %indvars.iv146, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next147.3, %wide.trip.count
  br i1 %exitcond.not.3, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !22

82:                                               ; preds = %42, %._crit_edge, %36
  %.2113 = phi i32 [ %39, %36 ], [ %.0111.lcssa, %._crit_edge ], [ %39, %42 ]
  %83 = icmp sgt i32 %.2113, 0
  br i1 %83, label %84, label %90

84:                                               ; preds = %82
  %85 = call zeroext i1 @IsKeyPressed(i32 noundef 259)
  br i1 %85, label %86, label %90

86:                                               ; preds = %84
  %87 = zext nneg i32 %.2113 to i64
  %88 = getelementptr i8, ptr %2, i64 %87
  %89 = getelementptr i8, ptr %88, i64 -1
  store i8 0, ptr %89, align 1, !tbaa !15
  br label %90

90:                                               ; preds = %84, %86, %82
  %91 = call zeroext i1 @IsKeyPressed(i32 noundef 257)
  br i1 %91, label %96, label %92

92:                                               ; preds = %90
  %93 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %35, <2 x float> %0, <2 x float> %1)
  br i1 %93, label %97, label %94

94:                                               ; preds = %92
  %95 = call zeroext i1 @IsMouseButtonPressed(i32 noundef 0)
  br i1 %95, label %96, label %97

96:                                               ; preds = %94, %90
  br label %97

97:                                               ; preds = %96, %94, %92
  %.0109 = phi i1 [ true, %96 ], [ false, %92 ], [ false, %94 ]
  %98 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 14)
  switch i32 %98, label %.thread [
    i32 1, label %99
    i32 2, label %107
  ]

99:                                               ; preds = %97
  %100 = call noundef i32 @_ZL12GetTextWidthPKc(ptr noundef %2)
  %101 = sdiv i32 %100, 2
  %102 = sitofp i32 %101 to float
  %103 = fadd float %.sroa.084.0.vec.extract, %102
  %.sroa.11.8.vec.extract102 = extractelement <2 x float> %1, i64 0
  %104 = fmul float %.sroa.11.8.vec.extract102, 5.000000e-01
  %105 = fadd float %104, %103
  %106 = fadd float %105, 1.000000e+00
  %.sroa.055.0.vec.insert58 = insertelement <2 x float> %.sroa.055.4.vec.insert, float %106, i64 0
  br label %.thread

107:                                              ; preds = %97
  %108 = fadd <2 x float> %0, %1
  %109 = extractelement <2 x float> %108, i64 0
  %110 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 16)
  %111 = sitofp i32 %110 to float
  %112 = fsub float %109, %111
  %.sroa.055.0.vec.insert60 = insertelement <2 x float> %.sroa.055.4.vec.insert, float %112, i64 0
  br label %.thread

113:                                              ; preds = %34
  %114 = tail call zeroext i1 @CheckCollisionPointRec(<2 x float> %35, <2 x float> %0, <2 x float> %1)
  br i1 %114, label %.thread130, label %116

.thread130:                                       ; preds = %113
  %115 = tail call zeroext i1 @IsMouseButtonPressed(i32 noundef 0)
  br label %135

116:                                              ; preds = %113, %31
  %cond = icmp eq i32 %8, 2
  br i1 %cond, label %.thread, label %135

.thread:                                          ; preds = %116, %99, %107, %97
  %.2127 = phi i1 [ false, %116 ], [ %.0109, %97 ], [ %.0109, %107 ], [ %.0109, %99 ]
  %.sroa.055.2125 = phi <2 x float> [ %.sroa.055.4.vec.insert, %116 ], [ %.sroa.055.4.vec.insert, %97 ], [ %.sroa.055.0.vec.insert60, %107 ], [ %.sroa.055.0.vec.insert58, %99 ]
  %117 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 12)
  %118 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 6)
  %119 = call i32 @GetColor(i32 noundef %118)
  %120 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %121 = call i32 @Fade(i32 %119, float noundef %120)
  %122 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 7)
  %123 = call i32 @GetColor(i32 noundef %122)
  %124 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %125 = call i32 @Fade(i32 %123, float noundef %124)
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %0, <2 x float> %1, i32 noundef %117, i32 %121, i32 %125)
  br label %142

.thread137:                                       ; preds = %30
  %126 = tail call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 12)
  %127 = tail call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 9)
  %128 = tail call i32 @GetColor(i32 noundef %127)
  %129 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %130 = tail call i32 @Fade(i32 %128, float noundef %129)
  %131 = tail call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 10)
  %132 = tail call i32 @GetColor(i32 noundef %131)
  %133 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %134 = tail call i32 @Fade(i32 %132, float noundef %133)
  tail call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %0, <2 x float> %1, i32 noundef %126, i32 %130, i32 %134)
  br label %142

135:                                              ; preds = %116, %.thread130
  %.1136 = phi i32 [ 1, %.thread130 ], [ %8, %116 ]
  %.2135 = phi i1 [ %115, %.thread130 ], [ false, %116 ]
  %136 = mul nsw i32 %.1136, 3
  %137 = tail call i32 @GuiGetStyle(i32 noundef 9, i32 noundef %136)
  %138 = tail call i32 @GetColor(i32 noundef %137)
  %139 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %140 = tail call i32 @Fade(i32 %138, float noundef %139)
  tail call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %0, <2 x float> %1, i32 noundef 1, i32 %140, i32 0)
  %141 = add nsw i32 %136, 2
  br label %142

142:                                              ; preds = %.thread137, %135, %.thread
  %.1128 = phi i32 [ 11, %.thread137 ], [ %141, %135 ], [ 8, %.thread ]
  %.2126 = phi i1 [ false, %.thread137 ], [ %.2135, %135 ], [ %.2127, %.thread ]
  %.sroa.055.2124 = phi <2 x float> [ %.sroa.055.4.vec.insert, %.thread137 ], [ %.sroa.055.4.vec.insert, %135 ], [ %.sroa.055.2125, %.thread ]
  %143 = call { <2 x float>, <2 x float> } @_ZL13GetTextBoundsi9Rectangle(i32 noundef 9, <2 x float> %0, <2 x float> %1)
  %144 = extractvalue { <2 x float>, <2 x float> } %143, 0
  %145 = extractvalue { <2 x float>, <2 x float> } %143, 1
  %146 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 14)
  %147 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef %.1128)
  %148 = call i32 @GetColor(i32 noundef %147)
  %149 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %150 = call i32 @Fade(i32 %148, float noundef %149)
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef %2, <2 x float> %144, <2 x float> %145, i32 noundef %146, i32 %150)
  br i1 %4, label %151, label %156

151:                                              ; preds = %142
  %152 = call i32 @GuiGetStyle(i32 noundef 9, i32 noundef 6)
  %153 = call i32 @GetColor(i32 noundef %152)
  %154 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !23
  %155 = call i32 @Fade(i32 %153, float noundef %154)
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %.sroa.055.2124, <2 x float> %.sroa.7.0, i32 noundef 0, i32 0, i32 %155)
  br label %156

156:                                              ; preds = %151, %142
  ret i1 %.2126
}

declare i32 @GetCharPressed() local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4

declare ptr @CodepointToUTF8(i32 noundef, ptr noundef) local_unnamed_addr #3

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

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 nofree nounwind willreturn memory(argmem: read) "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 willreturn memory(read) }
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 = !{!"_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 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}
!18 = distinct !{!18, !19, !20, !21}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !19, !20}
!23 = !{!24, !24, i64 0}
!24 = !{!"float", !7, i64 0}


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