; 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.Color = type { i8, i8, i8, i8 }

@_ZL8guiState = external hidden global i32, align 4
@_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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

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

declare i32 @GetColor(i32 noundef) #5

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

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

; Function Attrs: mustprogress uwtable
define dso_local float @GuiProgressBar(<2 x float> %0, <2 x float> %1, ptr noundef %2, ptr noundef %3, float noundef %4, float noundef %5, float noundef %6) #4 {
  %8 = alloca %struct.Rectangle, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca float, align 4
  %12 = alloca float, align 4
  %13 = alloca float, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.Rectangle, align 4
  %16 = alloca %struct.Rectangle, align 4
  %17 = alloca %struct.Color, align 1
  %18 = alloca %struct.Color, align 1
  %19 = alloca %struct.Color, align 1
  %20 = alloca %struct.Rectangle, align 4
  %21 = alloca %struct.Color, align 1
  %22 = alloca %struct.Color, align 1
  %23 = alloca %struct.Color, align 1
  %24 = alloca %struct.Rectangle, align 4
  %25 = alloca %struct.Color, align 1
  %26 = alloca %struct.Color, align 1
  %27 = alloca %struct.Color, align 1
  %28 = alloca %struct.Rectangle, align 4
  %29 = alloca %struct.Rectangle, align 4
  %30 = alloca %struct.Color, align 1
  %31 = alloca %struct.Color, align 1
  %32 = alloca %struct.Rectangle, align 4
  %33 = alloca %struct.Rectangle, align 4
  %34 = alloca %struct.Color, align 1
  %35 = alloca %struct.Color, align 1
  %36 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 0
  store <2 x float> %0, ptr %36, align 4
  %37 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %8, i32 0, i32 1
  store <2 x float> %1, ptr %37, align 4
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store float %4, ptr %11, align 4, !tbaa !9
  store float %5, ptr %12, align 4, !tbaa !9
  store float %6, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %38 = load i32, ptr @_ZL8guiState, align 4, !tbaa !11
  store i32 %38, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %39 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 0
  %40 = getelementptr inbounds %struct.Rectangle, ptr %8, i32 0, i32 0
  %41 = load float, ptr %40, align 4, !tbaa !13
  %42 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 12)
  %43 = sitofp i32 %42 to float
  %44 = fadd float %41, %43
  store float %44, ptr %39, align 4, !tbaa !13
  %45 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 1
  %46 = getelementptr inbounds %struct.Rectangle, ptr %8, i32 0, i32 1
  %47 = load float, ptr %46, align 4, !tbaa !15
  %48 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 12)
  %49 = sitofp i32 %48 to float
  %50 = fadd float %47, %49
  %51 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 16)
  %52 = sitofp i32 %51 to float
  %53 = fadd float %50, %52
  store float %53, ptr %45, align 4, !tbaa !15
  %54 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 2
  store float 0.000000e+00, ptr %54, align 4, !tbaa !16
  %55 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 3
  %56 = getelementptr inbounds %struct.Rectangle, ptr %8, i32 0, i32 3
  %57 = load float, ptr %56, align 4, !tbaa !17
  %58 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 12)
  %59 = mul nsw i32 2, %58
  %60 = sitofp i32 %59 to float
  %61 = fsub float %57, %60
  %62 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 16)
  %63 = mul nsw i32 2, %62
  %64 = sitofp i32 %63 to float
  %65 = fsub float %61, %64
  store float %65, ptr %55, align 4, !tbaa !17
  %66 = load i32, ptr %14, align 4, !tbaa !11
  %67 = icmp ne i32 %66, 3
  br i1 %67, label %68, label %82

68:                                               ; preds = %7
  %69 = load float, ptr %11, align 4, !tbaa !9
  %70 = load float, ptr %13, align 4, !tbaa !9
  %71 = load float, ptr %12, align 4, !tbaa !9
  %72 = fsub float %70, %71
  %73 = fdiv float %69, %72
  %74 = getelementptr inbounds %struct.Rectangle, ptr %8, i32 0, i32 2
  %75 = load float, ptr %74, align 4, !tbaa !16
  %76 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 12)
  %77 = mul nsw i32 2, %76
  %78 = sitofp i32 %77 to float
  %79 = fsub float %75, %78
  %80 = fmul float %73, %79
  %81 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 2
  store float %80, ptr %81, align 4, !tbaa !16
  br label %82

82:                                               ; preds = %68, %7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %8, i64 16, i1 false), !tbaa.struct !18
  %83 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 12)
  %84 = load i32, ptr %14, align 4, !tbaa !11
  %85 = mul nsw i32 %84, 3
  %86 = add nsw i32 0, %85
  %87 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef %86)
  %88 = call i32 @GetColor(i32 noundef %87)
  store i32 %88, ptr %18, align 1
  %89 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !9
  %90 = load i32, ptr %18, align 1
  %91 = call i32 @Fade(i32 %90, float noundef %89)
  store i32 %91, ptr %17, align 1
  %92 = getelementptr inbounds %struct.Color, ptr %19, i32 0, i32 0
  store i8 0, ptr %92, align 1, !tbaa !19
  %93 = getelementptr inbounds %struct.Color, ptr %19, i32 0, i32 1
  store i8 0, ptr %93, align 1, !tbaa !21
  %94 = getelementptr inbounds %struct.Color, ptr %19, i32 0, i32 2
  store i8 0, ptr %94, align 1, !tbaa !22
  %95 = getelementptr inbounds %struct.Color, ptr %19, i32 0, i32 3
  store i8 0, ptr %95, align 1, !tbaa !23
  %96 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %16, i32 0, i32 0
  %97 = load <2 x float>, ptr %96, align 4
  %98 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %16, i32 0, i32 1
  %99 = load <2 x float>, ptr %98, align 4
  %100 = load i32, ptr %17, align 1
  %101 = load i32, ptr %19, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %97, <2 x float> %99, i32 noundef %83, i32 %100, i32 %101)
  %102 = load i32, ptr %14, align 4, !tbaa !11
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %107, label %104

104:                                              ; preds = %82
  %105 = load i32, ptr %14, align 4, !tbaa !11
  %106 = icmp eq i32 %105, 2
  br i1 %106, label %107, label %123

107:                                              ; preds = %104, %82
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %15, i64 16, i1 false), !tbaa.struct !18
  %108 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 0
  store i8 0, ptr %108, align 1, !tbaa !19
  %109 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 1
  store i8 0, ptr %109, align 1, !tbaa !21
  %110 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 2
  store i8 0, ptr %110, align 1, !tbaa !22
  %111 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 3
  store i8 0, ptr %111, align 1, !tbaa !23
  %112 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 7)
  %113 = call i32 @GetColor(i32 noundef %112)
  store i32 %113, ptr %23, align 1
  %114 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !9
  %115 = load i32, ptr %23, align 1
  %116 = call i32 @Fade(i32 %115, float noundef %114)
  store i32 %116, ptr %22, align 1
  %117 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %20, i32 0, i32 0
  %118 = load <2 x float>, ptr %117, align 4
  %119 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %20, i32 0, i32 1
  %120 = load <2 x float>, ptr %119, align 4
  %121 = load i32, ptr %21, align 1
  %122 = load i32, ptr %22, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %118, <2 x float> %120, i32 noundef 0, i32 %121, i32 %122)
  br label %143

123:                                              ; preds = %104
  %124 = load i32, ptr %14, align 4, !tbaa !11
  %125 = icmp eq i32 %124, 1
  br i1 %125, label %126, label %142

126:                                              ; preds = %123
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %24, ptr align 4 %15, i64 16, i1 false), !tbaa.struct !18
  %127 = getelementptr inbounds %struct.Color, ptr %25, i32 0, i32 0
  store i8 0, ptr %127, align 1, !tbaa !19
  %128 = getelementptr inbounds %struct.Color, ptr %25, i32 0, i32 1
  store i8 0, ptr %128, align 1, !tbaa !21
  %129 = getelementptr inbounds %struct.Color, ptr %25, i32 0, i32 2
  store i8 0, ptr %129, align 1, !tbaa !22
  %130 = getelementptr inbounds %struct.Color, ptr %25, i32 0, i32 3
  store i8 0, ptr %130, align 1, !tbaa !23
  %131 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 5)
  %132 = call i32 @GetColor(i32 noundef %131)
  store i32 %132, ptr %27, align 1
  %133 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !9
  %134 = load i32, ptr %27, align 1
  %135 = call i32 @Fade(i32 %134, float noundef %133)
  store i32 %135, ptr %26, align 1
  %136 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %24, i32 0, i32 0
  %137 = load <2 x float>, ptr %136, align 4
  %138 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %24, i32 0, i32 1
  %139 = load <2 x float>, ptr %138, align 4
  %140 = load i32, ptr %25, align 1
  %141 = load i32, ptr %26, align 1
  call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %137, <2 x float> %139, i32 noundef 0, i32 %140, i32 %141)
  br label %142

142:                                              ; preds = %126, %123
  br label %143

143:                                              ; preds = %142, %107
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = icmp ne ptr %144, null
  br i1 %145, label %146, label %188

146:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #6
  call void @llvm.memset.p0.i64(ptr align 4 %28, i8 0, i64 16, i1 false)
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = call noundef i32 @_ZL12GetTextWidthPKc(ptr noundef %147)
  %149 = sitofp i32 %148 to float
  %150 = getelementptr inbounds %struct.Rectangle, ptr %28, i32 0, i32 2
  store float %149, ptr %150, align 4, !tbaa !16
  %151 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %152 = sitofp i32 %151 to float
  %153 = getelementptr inbounds %struct.Rectangle, ptr %28, i32 0, i32 3
  store float %152, ptr %153, align 4, !tbaa !17
  %154 = getelementptr inbounds %struct.Rectangle, ptr %8, i32 0, i32 0
  %155 = load float, ptr %154, align 4, !tbaa !13
  %156 = getelementptr inbounds %struct.Rectangle, ptr %28, i32 0, i32 2
  %157 = load float, ptr %156, align 4, !tbaa !16
  %158 = fsub float %155, %157
  %159 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 13)
  %160 = sitofp i32 %159 to float
  %161 = fsub float %158, %160
  %162 = getelementptr inbounds %struct.Rectangle, ptr %28, i32 0, i32 0
  store float %161, ptr %162, align 4, !tbaa !13
  %163 = getelementptr inbounds %struct.Rectangle, ptr %8, i32 0, i32 1
  %164 = load float, ptr %163, align 4, !tbaa !15
  %165 = getelementptr inbounds %struct.Rectangle, ptr %8, i32 0, i32 3
  %166 = load float, ptr %165, align 4, !tbaa !17
  %167 = fdiv float %166, 2.000000e+00
  %168 = fadd float %164, %167
  %169 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %170 = sdiv i32 %169, 2
  %171 = sitofp i32 %170 to float
  %172 = fsub float %168, %171
  %173 = getelementptr inbounds %struct.Rectangle, ptr %28, i32 0, i32 1
  store float %172, ptr %173, align 4, !tbaa !15
  %174 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %29, ptr align 4 %28, i64 16, i1 false), !tbaa.struct !18
  %175 = load i32, ptr %14, align 4, !tbaa !11
  %176 = mul nsw i32 %175, 3
  %177 = add nsw i32 2, %176
  %178 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef %177)
  %179 = call i32 @GetColor(i32 noundef %178)
  store i32 %179, ptr %31, align 1
  %180 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !9
  %181 = load i32, ptr %31, align 1
  %182 = call i32 @Fade(i32 %181, float noundef %180)
  store i32 %182, ptr %30, align 1
  %183 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %29, i32 0, i32 0
  %184 = load <2 x float>, ptr %183, align 4
  %185 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %29, i32 0, i32 1
  %186 = load <2 x float>, ptr %185, align 4
  %187 = load i32, ptr %30, align 1
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef %174, <2 x float> %184, <2 x float> %186, i32 noundef 2, i32 %187)
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #6
  br label %188

188:                                              ; preds = %146, %143
  %189 = load ptr, ptr %10, align 8, !tbaa !5
  %190 = icmp ne ptr %189, null
  br i1 %190, label %191, label %233

191:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #6
  call void @llvm.memset.p0.i64(ptr align 4 %32, i8 0, i64 16, i1 false)
  %192 = load ptr, ptr %10, align 8, !tbaa !5
  %193 = call noundef i32 @_ZL12GetTextWidthPKc(ptr noundef %192)
  %194 = sitofp i32 %193 to float
  %195 = getelementptr inbounds %struct.Rectangle, ptr %32, i32 0, i32 2
  store float %194, ptr %195, align 4, !tbaa !16
  %196 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %197 = sitofp i32 %196 to float
  %198 = getelementptr inbounds %struct.Rectangle, ptr %32, i32 0, i32 3
  store float %197, ptr %198, align 4, !tbaa !17
  %199 = getelementptr inbounds %struct.Rectangle, ptr %8, i32 0, i32 0
  %200 = load float, ptr %199, align 4, !tbaa !13
  %201 = getelementptr inbounds %struct.Rectangle, ptr %8, i32 0, i32 2
  %202 = load float, ptr %201, align 4, !tbaa !16
  %203 = fadd float %200, %202
  %204 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 13)
  %205 = sitofp i32 %204 to float
  %206 = fadd float %203, %205
  %207 = getelementptr inbounds %struct.Rectangle, ptr %32, i32 0, i32 0
  store float %206, ptr %207, align 4, !tbaa !13
  %208 = getelementptr inbounds %struct.Rectangle, ptr %8, i32 0, i32 1
  %209 = load float, ptr %208, align 4, !tbaa !15
  %210 = getelementptr inbounds %struct.Rectangle, ptr %8, i32 0, i32 3
  %211 = load float, ptr %210, align 4, !tbaa !17
  %212 = fdiv float %211, 2.000000e+00
  %213 = fadd float %209, %212
  %214 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %215 = sdiv i32 %214, 2
  %216 = sitofp i32 %215 to float
  %217 = fsub float %213, %216
  %218 = getelementptr inbounds %struct.Rectangle, ptr %32, i32 0, i32 1
  store float %217, ptr %218, align 4, !tbaa !15
  %219 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %33, ptr align 4 %32, i64 16, i1 false), !tbaa.struct !18
  %220 = load i32, ptr %14, align 4, !tbaa !11
  %221 = mul nsw i32 %220, 3
  %222 = add nsw i32 2, %221
  %223 = call i32 @GuiGetStyle(i32 noundef 5, i32 noundef %222)
  %224 = call i32 @GetColor(i32 noundef %223)
  store i32 %224, ptr %35, align 1
  %225 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !9
  %226 = load i32, ptr %35, align 1
  %227 = call i32 @Fade(i32 %226, float noundef %225)
  store i32 %227, ptr %34, align 1
  %228 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %33, i32 0, i32 0
  %229 = load <2 x float>, ptr %228, align 4
  %230 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %33, i32 0, i32 1
  %231 = load <2 x float>, ptr %230, align 4
  %232 = load i32, ptr %34, align 1
  call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef %219, <2 x float> %229, <2 x float> %231, i32 noundef 0, i32 %232)
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  br label %233

233:                                              ; preds = %191, %188
  %234 = load float, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  ret float %234
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS15GuiControlState", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS9Rectangle", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!15 = !{!14, !10, i64 4}
!16 = !{!14, !10, i64 8}
!17 = !{!14, !10, i64 12}
!18 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9}
!19 = !{!20, !7, i64 0}
!20 = !{!"_ZTS5Color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!21 = !{!20, !7, i64 1}
!22 = !{!20, !7, i64 2}
!23 = !{!20, !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
@_ZL8guiAlpha = external hidden local_unnamed_addr global float, align 4

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

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

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

declare i32 @GetColor(i32 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef float @GuiProgressBar(<2 x float> %0, <2 x float> %1, ptr noundef %2, ptr noundef %3, float noundef returned %4, float noundef %5, float noundef %6) local_unnamed_addr #1 {
  %8 = load i32, ptr @_ZL8guiState, align 4, !tbaa !5
  %9 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 12)
  %.sroa.061.4.vec.extract = extractelement <2 x float> %0, i64 1
  %10 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 12)
  %11 = sitofp i32 %10 to float
  %12 = fadd float %.sroa.061.4.vec.extract, %11
  %13 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 16)
  %14 = insertelement <2 x i32> poison, i32 %9, i64 0
  %15 = insertelement <2 x i32> %14, i32 %13, i64 1
  %16 = sitofp <2 x i32> %15 to <2 x float>
  %17 = insertelement <2 x float> %0, float %12, i64 1
  %18 = fadd <2 x float> %17, %16
  %.sroa.8.12.vec.extract = extractelement <2 x float> %1, i64 1
  %19 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 12)
  %20 = shl nsw i32 %19, 1
  %21 = sitofp i32 %20 to float
  %22 = fsub float %.sroa.8.12.vec.extract, %21
  %23 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 16)
  %24 = shl nsw i32 %23, 1
  %25 = sitofp i32 %24 to float
  %26 = fsub float %22, %25
  %.sroa.641.12.vec.insert = insertelement <2 x float> <float 0.000000e+00, float poison>, float %26, i64 1
  %.not = icmp eq i32 %8, 3
  br i1 %.not, label %35, label %27

27:                                               ; preds = %7
  %28 = fsub float %6, %5
  %29 = fdiv float %4, %28
  %.sroa.8.8.vec.extract = extractelement <2 x float> %1, i64 0
  %30 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 12)
  %31 = shl nsw i32 %30, 1
  %32 = sitofp i32 %31 to float
  %33 = fsub float %.sroa.8.8.vec.extract, %32
  %34 = fmul float %29, %33
  %.sroa.641.8.vec.insert45 = insertelement <2 x float> %.sroa.641.12.vec.insert, float %34, i64 0
  br label %35

35:                                               ; preds = %27, %7
  %.sroa.641.0 = phi <2 x float> [ %.sroa.641.8.vec.insert45, %27 ], [ %.sroa.641.12.vec.insert, %7 ]
  %36 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 12)
  %37 = mul nsw i32 %8, 3
  %38 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef %37)
  %39 = tail call i32 @GetColor(i32 noundef %38)
  %40 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !9
  %41 = tail call i32 @Fade(i32 %39, float noundef %40)
  tail call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %0, <2 x float> %1, i32 noundef %36, i32 %41, i32 0)
  %42 = and i32 %8, -3
  %or.cond = icmp eq i32 %42, 0
  br i1 %or.cond, label %.sink.split, label %43

43:                                               ; preds = %35
  %44 = icmp eq i32 %8, 1
  br i1 %44, label %.sink.split, label %49

.sink.split:                                      ; preds = %43, %35
  %.sink84 = phi i32 [ 7, %35 ], [ 5, %43 ]
  %45 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef %.sink84)
  %46 = tail call i32 @GetColor(i32 noundef %45)
  %47 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !9
  %48 = tail call i32 @Fade(i32 %46, float noundef %47)
  tail call void @_ZL16GuiDrawRectangle9Rectanglei5ColorS0_(<2 x float> %18, <2 x float> %.sroa.641.0, i32 noundef 0, i32 0, i32 %48)
  br label %49

49:                                               ; preds = %.sink.split, %43
  %.not80 = icmp eq ptr %2, null
  br i1 %.not80, label %72, label %50

50:                                               ; preds = %49
  %51 = tail call noundef i32 @_ZL12GetTextWidthPKc(ptr noundef nonnull %2)
  %52 = tail call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %53 = insertelement <2 x i32> poison, i32 %51, i64 0
  %54 = insertelement <2 x i32> %53, i32 %52, i64 1
  %55 = sitofp <2 x i32> %54 to <2 x float>
  %56 = fsub <2 x float> %0, %55
  %57 = extractelement <2 x float> %56, i64 0
  %58 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 13)
  %59 = sitofp i32 %58 to float
  %60 = fsub float %57, %59
  %.sroa.011.0.vec.insert = insertelement <2 x float> poison, float %60, i64 0
  %61 = fmul float %.sroa.8.12.vec.extract, 5.000000e-01
  %62 = fadd float %.sroa.061.4.vec.extract, %61
  %63 = tail call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %64 = sdiv i32 %63, 2
  %65 = sitofp i32 %64 to float
  %66 = fsub float %62, %65
  %.sroa.011.4.vec.insert = insertelement <2 x float> %.sroa.011.0.vec.insert, float %66, i64 1
  %67 = add nsw i32 %37, 2
  %68 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef %67)
  %69 = tail call i32 @GetColor(i32 noundef %68)
  %70 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !9
  %71 = tail call i32 @Fade(i32 %69, float noundef %70)
  tail call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef nonnull %2, <2 x float> %.sroa.011.4.vec.insert, <2 x float> %55, i32 noundef 2, i32 %71)
  br label %72

72:                                               ; preds = %50, %49
  %.not81 = icmp eq ptr %3, null
  br i1 %.not81, label %95, label %73

73:                                               ; preds = %72
  %74 = tail call noundef i32 @_ZL12GetTextWidthPKc(ptr noundef nonnull %3)
  %75 = tail call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %76 = insertelement <2 x i32> poison, i32 %74, i64 0
  %77 = insertelement <2 x i32> %76, i32 %75, i64 1
  %78 = sitofp <2 x i32> %77 to <2 x float>
  %79 = fadd <2 x float> %0, %1
  %80 = extractelement <2 x float> %79, i64 0
  %81 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef 13)
  %82 = sitofp i32 %81 to float
  %83 = fadd float %80, %82
  %.sroa.04.0.vec.insert = insertelement <2 x float> poison, float %83, i64 0
  %84 = fmul float %.sroa.8.12.vec.extract, 5.000000e-01
  %85 = fadd float %.sroa.061.4.vec.extract, %84
  %86 = tail call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %87 = sdiv i32 %86, 2
  %88 = sitofp i32 %87 to float
  %89 = fsub float %85, %88
  %.sroa.04.4.vec.insert = insertelement <2 x float> %.sroa.04.0.vec.insert, float %89, i64 1
  %90 = add nsw i32 %37, 2
  %91 = tail call i32 @GuiGetStyle(i32 noundef 5, i32 noundef %90)
  %92 = tail call i32 @GetColor(i32 noundef %91)
  %93 = load float, ptr @_ZL8guiAlpha, align 4, !tbaa !9
  %94 = tail call i32 @Fade(i32 %92, float noundef %93)
  tail call void @_ZL11GuiDrawTextPKc9Rectanglei5Color(ptr noundef nonnull %3, <2 x float> %.sroa.04.4.vec.insert, <2 x float> %78, i32 noundef 0, i32 %94)
  br label %95

95:                                               ; preds = %73, %72
  ret float %4
}

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="64" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass