; LLVM IR from NotManyIdeasDev/double-pendulum-sim :: double-pendulum-sim/Libraries/raygui-2.8/examples/controls_test_suite (GuiColorBarAlpha)

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

@guiState = external hidden global i32, align 4
@guiLocked = external hidden global i8, align 1
@guiAlpha = 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @GuiGetStyle(i32 noundef, i32 noundef) #1

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

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

declare i32 @GetColor(i32 noundef) #3

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

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

declare zeroext i1 @IsMouseButtonDown(i32 noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

declare void @DrawRectangleGradientEx(<2 x float>, <2 x float>, i32, i32, i32, i32) #3

; Function Attrs: nounwind uwtable
define dso_local float @GuiColorBarAlpha(<2 x float> %0, <2 x float> %1, float noundef %2) #2 {
  %4 = alloca %struct.Rectangle, align 4
  %5 = alloca float, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.Rectangle, align 4
  %8 = alloca %struct.Vector2, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.Rectangle, align 4
  %15 = alloca %struct.Color, align 1
  %16 = alloca %struct.Color, align 1
  %17 = alloca %struct.Color, align 1
  %18 = alloca %struct.Color, align 1
  %19 = alloca %struct.Color, align 1
  %20 = alloca %struct.Color, align 1
  %21 = alloca %struct.Color, align 1
  %22 = alloca %struct.Color, align 1
  %23 = alloca %struct.Color, align 1
  %24 = alloca %struct.Color, align 1
  %25 = alloca %struct.Color, align 1
  %26 = alloca %struct.Color, align 1
  %27 = alloca %struct.Color, align 1
  %28 = alloca %struct.Color, align 1
  %29 = alloca %struct.Color, align 1
  %30 = alloca %struct.Color, align 1
  %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.Color, align 1
  %36 = alloca %struct.Color, align 1
  %37 = alloca %struct.Color, align 1
  %38 = alloca %struct.Color, align 1
  %39 = alloca %struct.Color, align 1
  %40 = alloca %struct.Color, align 1
  %41 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 0
  store <2 x float> %0, ptr %41, align 4
  %42 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 1
  store <2 x float> %1, ptr %42, align 4
  store float %2, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %43 = load i32, ptr @guiState, align 4, !tbaa !9
  store i32 %43, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  %44 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 0
  %45 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 0
  %46 = load float, ptr %45, align 4, !tbaa !11
  %47 = load float, ptr %5, align 4, !tbaa !5
  %48 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 2
  %49 = load float, ptr %48, align 4, !tbaa !13
  %50 = call float @llvm.fmuladd.f32(float %47, float %49, float %46)
  %51 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 20)
  %52 = sitofp i32 %51 to float
  %53 = fsub float %50, %52
  store float %53, ptr %44, align 4, !tbaa !11
  %54 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 1
  %55 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 1
  %56 = load float, ptr %55, align 4, !tbaa !14
  %57 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 20)
  %58 = sitofp i32 %57 to float
  %59 = fsub float %56, %58
  store float %59, ptr %54, align 4, !tbaa !14
  %60 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 2
  %61 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 19)
  %62 = sitofp i32 %61 to float
  store float %62, ptr %60, align 4, !tbaa !13
  %63 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 3
  %64 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 3
  %65 = load float, ptr %64, align 4, !tbaa !15
  %66 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 20)
  %67 = mul nsw i32 %66, 2
  %68 = sitofp i32 %67 to float
  %69 = fadd float %65, %68
  store float %69, ptr %63, align 4, !tbaa !15
  %70 = load i32, ptr %6, align 4, !tbaa !9
  %71 = icmp ne i32 %70, 3
  br i1 %71, label %72, label %119

72:                                               ; preds = %3
  %73 = load i8, ptr @guiLocked, align 1, !tbaa !16, !range !18, !noundef !19
  %74 = trunc i8 %73 to i1
  br i1 %74, label %119, label %75

75:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %76 = call <2 x float> @GetMousePosition()
  store <2 x float> %76, ptr %8, align 4
  %77 = load <2 x float>, ptr %8, align 4
  %78 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 0
  %79 = load <2 x float>, ptr %78, align 4
  %80 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 1
  %81 = load <2 x float>, ptr %80, align 4
  %82 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %77, <2 x float> %79, <2 x float> %81)
  br i1 %82, label %90, label %83

83:                                               ; preds = %75
  %84 = load <2 x float>, ptr %8, align 4
  %85 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 0
  %86 = load <2 x float>, ptr %85, align 4
  %87 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 1
  %88 = load <2 x float>, ptr %87, align 4
  %89 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %84, <2 x float> %86, <2 x float> %88)
  br i1 %89, label %90, label %118

90:                                               ; preds = %83, %75
  %91 = call zeroext i1 @IsMouseButtonDown(i32 noundef 0)
  br i1 %91, label %92, label %116

92:                                               ; preds = %90
  store i32 2, ptr %6, align 4, !tbaa !9
  %93 = getelementptr inbounds %struct.Vector2, ptr %8, i32 0, i32 0
  %94 = load float, ptr %93, align 4, !tbaa !20
  %95 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 2
  %96 = load float, ptr %95, align 4, !tbaa !13
  %97 = fdiv float %96, 2.000000e+00
  %98 = fsub float %94, %97
  %99 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 0
  store float %98, ptr %99, align 4, !tbaa !11
  %100 = getelementptr inbounds %struct.Vector2, ptr %8, i32 0, i32 0
  %101 = load float, ptr %100, align 4, !tbaa !20
  %102 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 0
  %103 = load float, ptr %102, align 4, !tbaa !11
  %104 = fsub float %101, %103
  %105 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 2
  %106 = load float, ptr %105, align 4, !tbaa !13
  %107 = fdiv float %104, %106
  store float %107, ptr %5, align 4, !tbaa !5
  %108 = load float, ptr %5, align 4, !tbaa !5
  %109 = fcmp ole float %108, 0.000000e+00
  br i1 %109, label %110, label %111

110:                                              ; preds = %92
  store float 0.000000e+00, ptr %5, align 4, !tbaa !5
  br label %111

111:                                              ; preds = %110, %92
  %112 = load float, ptr %5, align 4, !tbaa !5
  %113 = fcmp oge float %112, 1.000000e+00
  br i1 %113, label %114, label %115

114:                                              ; preds = %111
  store float 1.000000e+00, ptr %5, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %114, %111
  br label %117

116:                                              ; preds = %90
  store i32 1, ptr %6, align 4, !tbaa !9
  br label %117

117:                                              ; preds = %116, %115
  br label %118

118:                                              ; preds = %117, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %119

119:                                              ; preds = %118, %72, %3
  %120 = load i32, ptr %6, align 4, !tbaa !9
  %121 = icmp ne i32 %120, 3
  br i1 %121, label %122, label %229

122:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %123 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 2
  %124 = load float, ptr %123, align 4, !tbaa !13
  %125 = fdiv float %124, 1.000000e+01
  %126 = fptosi float %125 to i32
  store i32 %126, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %127 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 3
  %128 = load float, ptr %127, align 4, !tbaa !15
  %129 = fdiv float %128, 1.000000e+01
  %130 = fptosi float %129 to i32
  store i32 %130, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %195, %122
  %132 = load i32, ptr %11, align 4, !tbaa !9
  %133 = load i32, ptr %9, align 4, !tbaa !9
  %134 = icmp slt i32 %132, %133
  br i1 %134, label %136, label %135

135:                                              ; preds = %131
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %198

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

137:                                              ; preds = %191, %136
  %138 = load i32, ptr %13, align 4, !tbaa !9
  %139 = load i32, ptr %10, align 4, !tbaa !9
  %140 = icmp slt i32 %138, %139
  br i1 %140, label %142, label %141

141:                                              ; preds = %137
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %194

142:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %143 = getelementptr inbounds %struct.Rectangle, ptr %14, i32 0, i32 0
  %144 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 0
  %145 = load float, ptr %144, align 4, !tbaa !11
  %146 = load i32, ptr %11, align 4, !tbaa !9
  %147 = mul nsw i32 %146, 10
  %148 = sitofp i32 %147 to float
  %149 = fadd float %145, %148
  store float %149, ptr %143, align 4, !tbaa !11
  %150 = getelementptr inbounds %struct.Rectangle, ptr %14, i32 0, i32 1
  %151 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 1
  %152 = load float, ptr %151, align 4, !tbaa !14
  %153 = load i32, ptr %13, align 4, !tbaa !9
  %154 = mul nsw i32 %153, 10
  %155 = sitofp i32 %154 to float
  %156 = fadd float %152, %155
  store float %156, ptr %150, align 4, !tbaa !14
  %157 = getelementptr inbounds %struct.Rectangle, ptr %14, i32 0, i32 2
  store float 1.000000e+01, ptr %157, align 4, !tbaa !13
  %158 = getelementptr inbounds %struct.Rectangle, ptr %14, i32 0, i32 3
  store float 1.000000e+01, ptr %158, align 4, !tbaa !15
  %159 = getelementptr inbounds %struct.Color, ptr %15, i32 0, i32 0
  store i8 0, ptr %159, align 1, !tbaa !22
  %160 = getelementptr inbounds %struct.Color, ptr %15, i32 0, i32 1
  store i8 0, ptr %160, align 1, !tbaa !24
  %161 = getelementptr inbounds %struct.Color, ptr %15, i32 0, i32 2
  store i8 0, ptr %161, align 1, !tbaa !25
  %162 = getelementptr inbounds %struct.Color, ptr %15, i32 0, i32 3
  store i8 0, ptr %162, align 1, !tbaa !26
  %163 = load i32, ptr %11, align 4, !tbaa !9
  %164 = load i32, ptr %13, align 4, !tbaa !9
  %165 = add nsw i32 %163, %164
  %166 = srem i32 %165, 2
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %176

168:                                              ; preds = %142
  %169 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 9)
  %170 = call i32 @GetColor(i32 noundef %169)
  store i32 %170, ptr %18, align 1
  %171 = load i32, ptr %18, align 1
  %172 = call i32 @Fade(i32 %171, float noundef 0x3FD99999A0000000)
  store i32 %172, ptr %17, align 1
  %173 = load float, ptr @guiAlpha, align 4, !tbaa !5
  %174 = load i32, ptr %17, align 1
  %175 = call i32 @Fade(i32 %174, float noundef %173)
  store i32 %175, ptr %16, align 1
  br label %184

176:                                              ; preds = %142
  %177 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 10)
  %178 = call i32 @GetColor(i32 noundef %177)
  store i32 %178, ptr %20, align 1
  %179 = load i32, ptr %20, align 1
  %180 = call i32 @Fade(i32 %179, float noundef 0x3FD99999A0000000)
  store i32 %180, ptr %19, align 1
  %181 = load float, ptr @guiAlpha, align 4, !tbaa !5
  %182 = load i32, ptr %19, align 1
  %183 = call i32 @Fade(i32 %182, float noundef %181)
  store i32 %183, ptr %16, align 1
  br label %184

184:                                              ; preds = %176, %168
  %185 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %14, i32 0, i32 0
  %186 = load <2 x float>, ptr %185, align 4
  %187 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %14, i32 0, i32 1
  %188 = load <2 x float>, ptr %187, align 4
  %189 = load i32, ptr %15, align 1
  %190 = load i32, ptr %16, align 1
  call void @GuiDrawRectangle(<2 x float> %186, <2 x float> %188, i32 noundef 0, i32 %189, i32 %190)
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br label %191

191:                                              ; preds = %184
  %192 = load i32, ptr %13, align 4, !tbaa !9
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %13, align 4, !tbaa !9
  br label %137, !llvm.loop !27

194:                                              ; preds = %141
  br label %195

195:                                              ; preds = %194
  %196 = load i32, ptr %11, align 4, !tbaa !9
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %11, align 4, !tbaa !9
  br label %131, !llvm.loop !29

198:                                              ; preds = %135
  %199 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 0
  store i8 -1, ptr %199, align 1, !tbaa !22
  %200 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 1
  store i8 -1, ptr %200, align 1, !tbaa !24
  %201 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 2
  store i8 -1, ptr %201, align 1, !tbaa !25
  %202 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 3
  store i8 0, ptr %202, align 1, !tbaa !26
  %203 = getelementptr inbounds %struct.Color, ptr %22, i32 0, i32 0
  store i8 -1, ptr %203, align 1, !tbaa !22
  %204 = getelementptr inbounds %struct.Color, ptr %22, i32 0, i32 1
  store i8 -1, ptr %204, align 1, !tbaa !24
  %205 = getelementptr inbounds %struct.Color, ptr %22, i32 0, i32 2
  store i8 -1, ptr %205, align 1, !tbaa !25
  %206 = getelementptr inbounds %struct.Color, ptr %22, i32 0, i32 3
  store i8 0, ptr %206, align 1, !tbaa !26
  %207 = getelementptr inbounds %struct.Color, ptr %24, i32 0, i32 0
  store i8 0, ptr %207, align 1, !tbaa !22
  %208 = getelementptr inbounds %struct.Color, ptr %24, i32 0, i32 1
  store i8 0, ptr %208, align 1, !tbaa !24
  %209 = getelementptr inbounds %struct.Color, ptr %24, i32 0, i32 2
  store i8 0, ptr %209, align 1, !tbaa !25
  %210 = getelementptr inbounds %struct.Color, ptr %24, i32 0, i32 3
  store i8 -1, ptr %210, align 1, !tbaa !26
  %211 = load float, ptr @guiAlpha, align 4, !tbaa !5
  %212 = load i32, ptr %24, align 1
  %213 = call i32 @Fade(i32 %212, float noundef %211)
  store i32 %213, ptr %23, align 1
  %214 = getelementptr inbounds %struct.Color, ptr %26, i32 0, i32 0
  store i8 0, ptr %214, align 1, !tbaa !22
  %215 = getelementptr inbounds %struct.Color, ptr %26, i32 0, i32 1
  store i8 0, ptr %215, align 1, !tbaa !24
  %216 = getelementptr inbounds %struct.Color, ptr %26, i32 0, i32 2
  store i8 0, ptr %216, align 1, !tbaa !25
  %217 = getelementptr inbounds %struct.Color, ptr %26, i32 0, i32 3
  store i8 -1, ptr %217, align 1, !tbaa !26
  %218 = load float, ptr @guiAlpha, align 4, !tbaa !5
  %219 = load i32, ptr %26, align 1
  %220 = call i32 @Fade(i32 %219, float noundef %218)
  store i32 %220, ptr %25, align 1
  %221 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 0
  %222 = load <2 x float>, ptr %221, align 4
  %223 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 1
  %224 = load <2 x float>, ptr %223, align 4
  %225 = load i32, ptr %21, align 1
  %226 = load i32, ptr %22, align 1
  %227 = load i32, ptr %23, align 1
  %228 = load i32, ptr %25, align 1
  call void @DrawRectangleGradientEx(<2 x float> %222, <2 x float> %224, i32 %225, i32 %226, i32 %227, i32 %228)
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %256

229:                                              ; preds = %119
  %230 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 10)
  %231 = call i32 @GetColor(i32 noundef %230)
  store i32 %231, ptr %28, align 1
  %232 = load i32, ptr %28, align 1
  %233 = call i32 @Fade(i32 %232, float noundef 0x3FB99999A0000000)
  store i32 %233, ptr %27, align 1
  %234 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 10)
  %235 = call i32 @GetColor(i32 noundef %234)
  store i32 %235, ptr %30, align 1
  %236 = load i32, ptr %30, align 1
  %237 = call i32 @Fade(i32 %236, float noundef 0x3FB99999A0000000)
  store i32 %237, ptr %29, align 1
  %238 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 9)
  %239 = call i32 @GetColor(i32 noundef %238)
  store i32 %239, ptr %32, align 1
  %240 = load float, ptr @guiAlpha, align 4, !tbaa !5
  %241 = load i32, ptr %32, align 1
  %242 = call i32 @Fade(i32 %241, float noundef %240)
  store i32 %242, ptr %31, align 1
  %243 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 9)
  %244 = call i32 @GetColor(i32 noundef %243)
  store i32 %244, ptr %34, align 1
  %245 = load float, ptr @guiAlpha, align 4, !tbaa !5
  %246 = load i32, ptr %34, align 1
  %247 = call i32 @Fade(i32 %246, float noundef %245)
  store i32 %247, ptr %33, align 1
  %248 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 0
  %249 = load <2 x float>, ptr %248, align 4
  %250 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 1
  %251 = load <2 x float>, ptr %250, align 4
  %252 = load i32, ptr %27, align 1
  %253 = load i32, ptr %29, align 1
  %254 = load i32, ptr %31, align 1
  %255 = load i32, ptr %33, align 1
  call void @DrawRectangleGradientEx(<2 x float> %249, <2 x float> %251, i32 %252, i32 %253, i32 %254, i32 %255)
  br label %256

256:                                              ; preds = %229, %198
  %257 = load i32, ptr %6, align 4, !tbaa !9
  %258 = mul i32 %257, 3
  %259 = add i32 0, %258
  %260 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef %259)
  %261 = call i32 @GetColor(i32 noundef %260)
  store i32 %261, ptr %36, align 1
  %262 = load float, ptr @guiAlpha, align 4, !tbaa !5
  %263 = load i32, ptr %36, align 1
  %264 = call i32 @Fade(i32 %263, float noundef %262)
  store i32 %264, ptr %35, align 1
  %265 = getelementptr inbounds %struct.Color, ptr %37, i32 0, i32 0
  store i8 0, ptr %265, align 1, !tbaa !22
  %266 = getelementptr inbounds %struct.Color, ptr %37, i32 0, i32 1
  store i8 0, ptr %266, align 1, !tbaa !24
  %267 = getelementptr inbounds %struct.Color, ptr %37, i32 0, i32 2
  store i8 0, ptr %267, align 1, !tbaa !25
  %268 = getelementptr inbounds %struct.Color, ptr %37, i32 0, i32 3
  store i8 0, ptr %268, align 1, !tbaa !26
  %269 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 0
  %270 = load <2 x float>, ptr %269, align 4
  %271 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 1
  %272 = load <2 x float>, ptr %271, align 4
  %273 = load i32, ptr %35, align 1
  %274 = load i32, ptr %37, align 1
  call void @GuiDrawRectangle(<2 x float> %270, <2 x float> %272, i32 noundef 1, i32 %273, i32 %274)
  %275 = getelementptr inbounds %struct.Color, ptr %38, i32 0, i32 0
  store i8 0, ptr %275, align 1, !tbaa !22
  %276 = getelementptr inbounds %struct.Color, ptr %38, i32 0, i32 1
  store i8 0, ptr %276, align 1, !tbaa !24
  %277 = getelementptr inbounds %struct.Color, ptr %38, i32 0, i32 2
  store i8 0, ptr %277, align 1, !tbaa !25
  %278 = getelementptr inbounds %struct.Color, ptr %38, i32 0, i32 3
  store i8 0, ptr %278, align 1, !tbaa !26
  %279 = load i32, ptr %6, align 4, !tbaa !9
  %280 = mul i32 %279, 3
  %281 = add i32 0, %280
  %282 = call i32 @GuiGetStyle(i32 noundef 13, i32 noundef %281)
  %283 = call i32 @GetColor(i32 noundef %282)
  store i32 %283, ptr %40, align 1
  %284 = load float, ptr @guiAlpha, align 4, !tbaa !5
  %285 = load i32, ptr %40, align 1
  %286 = call i32 @Fade(i32 %285, float noundef %284)
  store i32 %286, ptr %39, align 1
  %287 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 0
  %288 = load <2 x float>, ptr %287, align 4
  %289 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 1
  %290 = load <2 x float>, ptr %289, align 4
  %291 = load i32, ptr %38, align 1
  %292 = load i32, ptr %39, align 1
  call void @GuiDrawRectangle(<2 x float> %288, <2 x float> %290, i32 noundef 0, i32 %291, i32 %292)
  %293 = load float, ptr %5, align 4, !tbaa !5
  store i32 1, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  ret float %293
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nounwind 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind }

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

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


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

@guiState = external hidden local_unnamed_addr global i32, align 4
@guiLocked = external hidden local_unnamed_addr global i8, align 1
@guiAlpha = external hidden local_unnamed_addr global float, align 4

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

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

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

declare i32 @GetColor(i32 noundef) local_unnamed_addr #2

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

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

declare zeroext i1 @IsMouseButtonDown(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #3

declare void @DrawRectangleGradientEx(<2 x float>, <2 x float>, i32, i32, i32, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local float @GuiColorBarAlpha(<2 x float> %0, <2 x float> %1, float noundef %2) local_unnamed_addr #1 {
  %4 = extractelement <2 x float> %1, i64 1
  %5 = extractelement <2 x float> %1, i64 0
  %6 = load i32, ptr @guiState, align 4, !tbaa !5
  %.sroa.076.0.vec.extract = extractelement <2 x float> %0, i64 0
  %7 = tail call float @llvm.fmuladd.f32(float %2, float %5, float %.sroa.076.0.vec.extract)
  %8 = tail call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 20)
  %.sroa.076.4.vec.extract = extractelement <2 x float> %0, i64 1
  %9 = tail call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 20)
  %10 = insertelement <2 x i32> poison, i32 %8, i64 0
  %11 = insertelement <2 x i32> %10, i32 %9, i64 1
  %12 = sitofp <2 x i32> %11 to <2 x float>
  %13 = insertelement <2 x float> %0, float %7, i64 0
  %14 = fsub <2 x float> %13, %12
  %15 = tail call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 19)
  %16 = sitofp i32 %15 to float
  %.sroa.7.8.vec.insert = insertelement <2 x float> poison, float %16, i64 0
  %17 = tail call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 20)
  %18 = shl nsw i32 %17, 1
  %19 = sitofp i32 %18 to float
  %20 = fadd float %4, %19
  %.sroa.7.12.vec.insert = insertelement <2 x float> %.sroa.7.8.vec.insert, float %20, i64 1
  %.not = icmp eq i32 %6, 3
  br i1 %.not, label %68, label %21

21:                                               ; preds = %3
  %22 = load i8, ptr @guiLocked, align 1, !tbaa !9, !range !11, !noundef !12
  %23 = trunc nuw i8 %22 to i1
  br i1 %23, label %39, label %24

24:                                               ; preds = %21
  %25 = tail call <2 x float> @GetMousePosition() #4
  %26 = tail call zeroext i1 @CheckCollisionPointRec(<2 x float> %25, <2 x float> %0, <2 x float> %1) #4
  br i1 %26, label %29, label %27

27:                                               ; preds = %24
  %28 = tail call zeroext i1 @CheckCollisionPointRec(<2 x float> %25, <2 x float> %14, <2 x float> %.sroa.7.12.vec.insert) #4
  br i1 %28, label %29, label %39

29:                                               ; preds = %27, %24
  %30 = tail call zeroext i1 @IsMouseButtonDown(i32 noundef 0) #4
  br i1 %30, label %31, label %39

31:                                               ; preds = %29
  %.sroa.056.0.vec.extract = extractelement <2 x float> %25, i64 0
  %32 = fmul float %16, 5.000000e-01
  %33 = fsub float %.sroa.056.0.vec.extract, %32
  %.sroa.061.0.vec.insert65 = insertelement <2 x float> %14, float %33, i64 0
  %34 = fsub <2 x float> %25, %0
  %35 = extractelement <2 x float> %34, i64 0
  %36 = fdiv float %35, %5
  %.inv = fcmp ole float %36, 0.000000e+00
  %.0 = select i1 %.inv, float 0.000000e+00, float %36
  %37 = fcmp ult float %.0, 1.000000e+00
  br i1 %37, label %39, label %38

38:                                               ; preds = %31
  br label %39

39:                                               ; preds = %21, %38, %31, %27, %29
  %.sroa.061.1.ph = phi <2 x float> [ %14, %29 ], [ %14, %27 ], [ %.sroa.061.0.vec.insert65, %31 ], [ %.sroa.061.0.vec.insert65, %38 ], [ %14, %21 ]
  %.198.ph = phi i32 [ 1, %29 ], [ %6, %27 ], [ 2, %31 ], [ 2, %38 ], [ %6, %21 ]
  %.2.ph = phi float [ %2, %29 ], [ %2, %27 ], [ %.0, %31 ], [ 1.000000e+00, %38 ], [ %2, %21 ]
  %40 = fdiv <2 x float> %1, <float 1.000000e+01, float 1.000000e+01>
  %41 = fptosi <2 x float> %40 to <2 x i32>
  %42 = icmp sgt <2 x i32> %41, zeroinitializer
  %43 = extractelement <2 x i1> %42, i64 0
  %44 = extractelement <2 x i1> %42, i64 1
  %or.cond = select i1 %43, i1 %44, i1 false
  br i1 %or.cond, label %.preheader.us.preheader, label %._crit_edge118

.preheader.us.preheader:                          ; preds = %39
  %45 = extractelement <2 x i32> %41, i64 1
  %46 = extractelement <2 x i32> %41, i64 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us
  %.099117.us = phi i32 [ %62, %._crit_edge.us ], [ 0, %.preheader.us.preheader ]
  %47 = mul nuw nsw i32 %.099117.us, 10
  %48 = uitofp nneg i32 %47 to float
  %49 = fadd float %.sroa.076.0.vec.extract, %48
  %.sroa.044.0.vec.insert.us = insertelement <2 x float> poison, float %49, i64 0
  br label %50

50:                                               ; preds = %.preheader.us, %50
  %.0100116.us = phi i32 [ 0, %.preheader.us ], [ %61, %50 ]
  %51 = mul nuw nsw i32 %.0100116.us, 10
  %52 = uitofp nneg i32 %51 to float
  %53 = fadd float %.sroa.076.4.vec.extract, %52
  %.sroa.044.4.vec.insert.us = insertelement <2 x float> %.sroa.044.0.vec.insert.us, float %53, i64 1
  %54 = add nuw nsw i32 %.0100116.us, %.099117.us
  %55 = and i32 %54, 1
  %.not105.us = icmp eq i32 %55, 0
  %. = select i1 %.not105.us, i32 10, i32 9
  %56 = tail call i32 @GuiGetStyle(i32 noundef 13, i32 noundef %.)
  %57 = tail call i32 @GetColor(i32 noundef %56) #4
  %58 = tail call i32 @Fade(i32 %57, float noundef 0x3FD99999A0000000) #4
  %59 = load float, ptr @guiAlpha, align 4, !tbaa !13
  %60 = tail call i32 @Fade(i32 %58, float noundef %59) #4
  tail call void @GuiDrawRectangle(<2 x float> %.sroa.044.4.vec.insert.us, <2 x float> <float 1.000000e+01, float 1.000000e+01>, i32 noundef 0, i32 0, i32 %60)
  %61 = add nuw nsw i32 %.0100116.us, 1
  %exitcond.not = icmp eq i32 %61, %45
  br i1 %exitcond.not, label %._crit_edge.us, label %50, !llvm.loop !15

._crit_edge.us:                                   ; preds = %50
  %62 = add nuw nsw i32 %.099117.us, 1
  %exitcond120.not = icmp eq i32 %62, %46
  br i1 %exitcond120.not, label %._crit_edge118, label %.preheader.us, !llvm.loop !17

._crit_edge118:                                   ; preds = %._crit_edge.us, %39
  %63 = load float, ptr @guiAlpha, align 4, !tbaa !13
  %64 = tail call i32 @Fade(i32 -16777216, float noundef %63) #4
  %65 = load float, ptr @guiAlpha, align 4, !tbaa !13
  %66 = tail call i32 @Fade(i32 -16777216, float noundef %65) #4
  tail call void @DrawRectangleGradientEx(<2 x float> %0, <2 x float> %1, i32 16777215, i32 16777215, i32 %64, i32 %66) #4
  %67 = mul i32 %.198.ph, 3
  br label %83

68:                                               ; preds = %3
  %69 = tail call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 10)
  %70 = tail call i32 @GetColor(i32 noundef %69) #4
  %71 = tail call i32 @Fade(i32 %70, float noundef 0x3FB99999A0000000) #4
  %72 = tail call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 10)
  %73 = tail call i32 @GetColor(i32 noundef %72) #4
  %74 = tail call i32 @Fade(i32 %73, float noundef 0x3FB99999A0000000) #4
  %75 = tail call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 9)
  %76 = tail call i32 @GetColor(i32 noundef %75) #4
  %77 = load float, ptr @guiAlpha, align 4, !tbaa !13
  %78 = tail call i32 @Fade(i32 %76, float noundef %77) #4
  %79 = tail call i32 @GuiGetStyle(i32 noundef 13, i32 noundef 9)
  %80 = tail call i32 @GetColor(i32 noundef %79) #4
  %81 = load float, ptr @guiAlpha, align 4, !tbaa !13
  %82 = tail call i32 @Fade(i32 %80, float noundef %81) #4
  tail call void @DrawRectangleGradientEx(<2 x float> %0, <2 x float> %1, i32 %71, i32 %74, i32 %78, i32 %82) #4
  br label %83

83:                                               ; preds = %68, %._crit_edge118
  %.2114 = phi float [ %2, %68 ], [ %.2.ph, %._crit_edge118 ]
  %.198112 = phi i32 [ 9, %68 ], [ %67, %._crit_edge118 ]
  %.sroa.061.1110 = phi <2 x float> [ %14, %68 ], [ %.sroa.061.1.ph, %._crit_edge118 ]
  %84 = tail call i32 @GuiGetStyle(i32 noundef 13, i32 noundef %.198112)
  %85 = tail call i32 @GetColor(i32 noundef %84) #4
  %86 = load float, ptr @guiAlpha, align 4, !tbaa !13
  %87 = tail call i32 @Fade(i32 %85, float noundef %86) #4
  tail call void @GuiDrawRectangle(<2 x float> %0, <2 x float> %1, i32 noundef 1, i32 %87, i32 0)
  %88 = tail call i32 @GuiGetStyle(i32 noundef 13, i32 noundef %.198112)
  %89 = tail call i32 @GetColor(i32 noundef %88) #4
  %90 = load float, ptr @guiAlpha, align 4, !tbaa !13
  %91 = tail call i32 @Fade(i32 %89, float noundef %90) #4
  tail call void @GuiDrawRectangle(<2 x float> %.sroa.061.1110, <2 x float> %.sroa.7.12.vec.insert, i32 noundef 0, i32 0, i32 %91)
  ret float %.2114
}

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind 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" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_Bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


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