; LLVM IR from godofecht/GANN-Object-Avoidance :: Box2D/Testbed/Framework/imgui.ll (Z11imguiSliderPKcPiiiib)

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

@_ZL7s_state = external hidden global %struct.GuiState, align 4
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z6inRectiiiib(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) #0

declare void @_Z20AddGfxCmdRoundedRectfffffj(float noundef, float noundef, float noundef, float noundef, float noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) #0

declare void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL11buttonLogicjb(i32 noundef, i1 noundef zeroext) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z8isActivej(i32 noundef) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5isHotj(i32 noundef) #0

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

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

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z11imguiSliderPKcPiiiib(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i1 noundef zeroext %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca float, align 4
  %20 = alloca i32, align 4
  %21 = alloca i8, align 1
  %22 = alloca i8, align 1
  %23 = alloca i8, align 1
  %24 = alloca [128 x i8], align 16
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i32 %3, ptr %10, align 4, !tbaa !9
  store i32 %4, ptr %11, align 4, !tbaa !9
  %25 = zext i1 %5 to i8
  store i8 %25, ptr %12, align 1, !tbaa !11
  %26 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 20), align 4, !tbaa !13
  %27 = add i32 %26, 1
  store i32 %27, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 20), align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %28 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 19), align 4, !tbaa !16
  %29 = shl i32 %28, 16
  %30 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 20), align 4, !tbaa !13
  %31 = or i32 %29, %30
  store i32 %31, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %32 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 15), align 4, !tbaa !17
  store i32 %32, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %33 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 16), align 4, !tbaa !18
  %34 = sub nsw i32 %33, 20
  store i32 %34, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %35 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 17), align 4, !tbaa !19
  store i32 %35, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 20, ptr %17, align 4, !tbaa !9
  %36 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 16), align 4, !tbaa !18
  %37 = sub nsw i32 %36, 24
  store i32 %37, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 16), align 4, !tbaa !18
  %38 = load i32, ptr %14, align 4, !tbaa !9
  %39 = sitofp i32 %38 to float
  %40 = load i32, ptr %15, align 4, !tbaa !9
  %41 = sitofp i32 %40 to float
  %42 = load i32, ptr %16, align 4, !tbaa !9
  %43 = sitofp i32 %42 to float
  %44 = load i32, ptr %17, align 4, !tbaa !9
  %45 = sitofp i32 %44 to float
  %46 = call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext 0, i8 noundef zeroext 0, i8 noundef zeroext 0, i8 noundef zeroext -128)
  call void @_Z20AddGfxCmdRoundedRectfffffj(float noundef %39, float noundef %41, float noundef %43, float noundef %45, float noundef 4.000000e+00, i32 noundef %46)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %47 = load i32, ptr %16, align 4, !tbaa !9
  %48 = sub nsw i32 %47, 10
  store i32 %48, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = sub nsw i32 %50, %51
  %53 = sitofp i32 %52 to float
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = sub nsw i32 %54, %55
  %57 = sitofp i32 %56 to float
  %58 = fdiv float %53, %57
  store float %58, ptr %19, align 4, !tbaa !20
  %59 = load float, ptr %19, align 4, !tbaa !20
  %60 = fcmp olt float %59, 0.000000e+00
  br i1 %60, label %61, label %62

61:                                               ; preds = %6
  store float 0.000000e+00, ptr %19, align 4, !tbaa !20
  br label %62

62:                                               ; preds = %61, %6
  %63 = load float, ptr %19, align 4, !tbaa !20
  %64 = fcmp ogt float %63, 1.000000e+00
  br i1 %64, label %65, label %66

65:                                               ; preds = %62
  store float 1.000000e+00, ptr %19, align 4, !tbaa !20
  br label %66

66:                                               ; preds = %65, %62
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %67 = load float, ptr %19, align 4, !tbaa !20
  %68 = load i32, ptr %18, align 4, !tbaa !9
  %69 = sitofp i32 %68 to float
  %70 = fmul float %67, %69
  %71 = fptosi float %70 to i32
  store i32 %71, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #6
  %72 = load i8, ptr %12, align 1, !tbaa !11, !range !21, !noundef !22
  %73 = trunc i8 %72 to i1
  br i1 %73, label %74, label %80

74:                                               ; preds = %66
  %75 = load i32, ptr %14, align 4, !tbaa !9
  %76 = load i32, ptr %20, align 4, !tbaa !9
  %77 = add nsw i32 %75, %76
  %78 = load i32, ptr %15, align 4, !tbaa !9
  %79 = call noundef zeroext i1 @_Z6inRectiiiib(i32 noundef %77, i32 noundef %78, i32 noundef 10, i32 noundef 20, i1 noundef zeroext true)
  br label %80

80:                                               ; preds = %74, %66
  %81 = phi i1 [ false, %66 ], [ %79, %74 ]
  %82 = zext i1 %81 to i8
  store i8 %82, ptr %21, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  %83 = load i32, ptr %13, align 4, !tbaa !9
  %84 = load i8, ptr %21, align 1, !tbaa !11, !range !21, !noundef !22
  %85 = trunc i8 %84 to i1
  %86 = call noundef zeroext i1 @_ZL11buttonLogicjb(i32 noundef %83, i1 noundef zeroext %85)
  %87 = zext i1 %86 to i8
  store i8 %87, ptr %22, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %23) #6
  store i8 0, ptr %23, align 1, !tbaa !11
  %88 = load i32, ptr %13, align 4, !tbaa !9
  %89 = call noundef zeroext i1 @_Z8isActivej(i32 noundef %88)
  br i1 %89, label %90, label %146

90:                                               ; preds = %80
  %91 = load i8, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 11), align 2, !tbaa !23, !range !21, !noundef !22
  %92 = trunc i8 %91 to i1
  br i1 %92, label %93, label %96

93:                                               ; preds = %90
  %94 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 3), align 4, !tbaa !24
  store i32 %94, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 12), align 4, !tbaa !25
  %95 = load float, ptr %19, align 4, !tbaa !20
  store float %95, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 14), align 4, !tbaa !26
  br label %96

96:                                               ; preds = %93, %90
  %97 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 12), align 4, !tbaa !25
  %98 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 3), align 4, !tbaa !24
  %99 = icmp ne i32 %97, %98
  br i1 %99, label %100, label %145

100:                                              ; preds = %96
  %101 = load float, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 14), align 4, !tbaa !26
  %102 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 3), align 4, !tbaa !24
  %103 = load i32, ptr getelementptr inbounds (%struct.GuiState, ptr @_ZL7s_state, i32 0, i32 12), align 4, !tbaa !25
  %104 = sub nsw i32 %102, %103
  %105 = sitofp i32 %104 to float
  %106 = load i32, ptr %18, align 4, !tbaa !9
  %107 = sitofp i32 %106 to float
  %108 = fdiv float %105, %107
  %109 = fadd float %101, %108
  store float %109, ptr %19, align 4, !tbaa !20
  %110 = load float, ptr %19, align 4, !tbaa !20
  %111 = fcmp olt float %110, 0.000000e+00
  br i1 %111, label %112, label %113

112:                                              ; preds = %100
  store float 0.000000e+00, ptr %19, align 4, !tbaa !20
  br label %113

113:                                              ; preds = %112, %100
  %114 = load float, ptr %19, align 4, !tbaa !20
  %115 = fcmp ogt float %114, 1.000000e+00
  br i1 %115, label %116, label %117

116:                                              ; preds = %113
  store float 1.000000e+00, ptr %19, align 4, !tbaa !20
  br label %117

117:                                              ; preds = %116, %113
  %118 = load i32, ptr %9, align 4, !tbaa !9
  %119 = sitofp i32 %118 to float
  %120 = load float, ptr %19, align 4, !tbaa !20
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = load i32, ptr %9, align 4, !tbaa !9
  %123 = sub nsw i32 %121, %122
  %124 = sitofp i32 %123 to float
  %125 = call float @llvm.fmuladd.f32(float %120, float %124, float %119)
  %126 = fptosi float %125 to i32
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %126, ptr %127, align 4, !tbaa !9
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = load i32, ptr %128, align 4, !tbaa !9
  %130 = sitofp i32 %129 to float
  %131 = load i32, ptr %11, align 4, !tbaa !9
  %132 = sitofp i32 %131 to float
  %133 = fdiv float %130, %132
  %134 = fadd float %133, 5.000000e-01
  %135 = call float @llvm.floor.f32(float %134)
  %136 = fptosi float %135 to i32
  %137 = load i32, ptr %11, align 4, !tbaa !9
  %138 = mul nsw i32 %136, %137
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %138, ptr %139, align 4, !tbaa !9
  %140 = load float, ptr %19, align 4, !tbaa !20
  %141 = load i32, ptr %18, align 4, !tbaa !9
  %142 = sitofp i32 %141 to float
  %143 = fmul float %140, %142
  %144 = fptosi float %143 to i32
  store i32 %144, ptr %20, align 4, !tbaa !9
  store i8 1, ptr %23, align 1, !tbaa !11
  br label %145

145:                                              ; preds = %117, %96
  br label %146

146:                                              ; preds = %145, %80
  %147 = load i32, ptr %13, align 4, !tbaa !9
  %148 = call noundef zeroext i1 @_Z8isActivej(i32 noundef %147)
  br i1 %148, label %149, label %157

149:                                              ; preds = %146
  %150 = load i32, ptr %14, align 4, !tbaa !9
  %151 = load i32, ptr %20, align 4, !tbaa !9
  %152 = add nsw i32 %150, %151
  %153 = sitofp i32 %152 to float
  %154 = load i32, ptr %15, align 4, !tbaa !9
  %155 = sitofp i32 %154 to float
  %156 = call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1)
  call void @_Z20AddGfxCmdRoundedRectfffffj(float noundef %153, float noundef %155, float noundef 1.000000e+01, float noundef 2.000000e+01, float noundef 4.000000e+00, i32 noundef %156)
  br label %172

157:                                              ; preds = %146
  %158 = load i32, ptr %14, align 4, !tbaa !9
  %159 = load i32, ptr %20, align 4, !tbaa !9
  %160 = add nsw i32 %158, %159
  %161 = sitofp i32 %160 to float
  %162 = load i32, ptr %15, align 4, !tbaa !9
  %163 = sitofp i32 %162 to float
  %164 = load i32, ptr %13, align 4, !tbaa !9
  %165 = call noundef zeroext i1 @_Z5isHotj(i32 noundef %164)
  br i1 %165, label %166, label %168

166:                                              ; preds = %157
  %167 = call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -60, i8 noundef zeroext 0, i8 noundef zeroext -128)
  br label %170

168:                                              ; preds = %157
  %169 = call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext 64)
  br label %170

170:                                              ; preds = %168, %166
  %171 = phi i32 [ %167, %166 ], [ %169, %168 ]
  call void @_Z20AddGfxCmdRoundedRectfffffj(float noundef %161, float noundef %163, float noundef 1.000000e+01, float noundef 2.000000e+01, float noundef 4.000000e+00, i32 noundef %171)
  br label %172

172:                                              ; preds = %170, %149
  call void @llvm.lifetime.start.p0(i64 128, ptr %24) #6
  %173 = getelementptr inbounds [128 x i8], ptr %24, i64 0, i64 0
  %174 = load ptr, ptr %8, align 8, !tbaa !5
  %175 = load i32, ptr %174, align 4, !tbaa !9
  %176 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %173, i64 noundef 128, ptr noundef @.str.1, i32 noundef %175) #6
  %177 = load i8, ptr %12, align 1, !tbaa !11, !range !21, !noundef !22
  %178 = trunc i8 %177 to i1
  br i1 %178, label %179, label %210

179:                                              ; preds = %172
  %180 = load i32, ptr %14, align 4, !tbaa !9
  %181 = add nsw i32 %180, 10
  %182 = load i32, ptr %15, align 4, !tbaa !9
  %183 = add nsw i32 %182, 10
  %184 = sub nsw i32 %183, 4
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  %186 = load i32, ptr %13, align 4, !tbaa !9
  %187 = call noundef zeroext i1 @_Z5isHotj(i32 noundef %186)
  br i1 %187, label %188, label %190

188:                                              ; preds = %179
  %189 = call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -60, i8 noundef zeroext 0, i8 noundef zeroext -1)
  br label %192

190:                                              ; preds = %179
  %191 = call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -56)
  br label %192

192:                                              ; preds = %190, %188
  %193 = phi i32 [ %189, %188 ], [ %191, %190 ]
  call void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef %181, i32 noundef %184, i32 noundef 0, ptr noundef %185, i32 noundef %193)
  %194 = load i32, ptr %14, align 4, !tbaa !9
  %195 = load i32, ptr %16, align 4, !tbaa !9
  %196 = add nsw i32 %194, %195
  %197 = sub nsw i32 %196, 10
  %198 = load i32, ptr %15, align 4, !tbaa !9
  %199 = add nsw i32 %198, 10
  %200 = sub nsw i32 %199, 4
  %201 = getelementptr inbounds [128 x i8], ptr %24, i64 0, i64 0
  %202 = load i32, ptr %13, align 4, !tbaa !9
  %203 = call noundef zeroext i1 @_Z5isHotj(i32 noundef %202)
  br i1 %203, label %204, label %206

204:                                              ; preds = %192
  %205 = call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -60, i8 noundef zeroext 0, i8 noundef zeroext -1)
  br label %208

206:                                              ; preds = %192
  %207 = call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -56)
  br label %208

208:                                              ; preds = %206, %204
  %209 = phi i32 [ %205, %204 ], [ %207, %206 ]
  call void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef %197, i32 noundef %200, i32 noundef 2, ptr noundef %201, i32 noundef %209)
  br label %227

210:                                              ; preds = %172
  %211 = load i32, ptr %14, align 4, !tbaa !9
  %212 = add nsw i32 %211, 10
  %213 = load i32, ptr %15, align 4, !tbaa !9
  %214 = add nsw i32 %213, 10
  %215 = sub nsw i32 %214, 4
  %216 = load ptr, ptr %7, align 8, !tbaa !5
  %217 = call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -128, i8 noundef zeroext -128, i8 noundef zeroext -128, i8 noundef zeroext -56)
  call void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef %212, i32 noundef %215, i32 noundef 0, ptr noundef %216, i32 noundef %217)
  %218 = load i32, ptr %14, align 4, !tbaa !9
  %219 = load i32, ptr %16, align 4, !tbaa !9
  %220 = add nsw i32 %218, %219
  %221 = sub nsw i32 %220, 10
  %222 = load i32, ptr %15, align 4, !tbaa !9
  %223 = add nsw i32 %222, 10
  %224 = sub nsw i32 %223, 4
  %225 = getelementptr inbounds [128 x i8], ptr %24, i64 0, i64 0
  %226 = call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -128, i8 noundef zeroext -128, i8 noundef zeroext -128, i8 noundef zeroext -56)
  call void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef %221, i32 noundef %224, i32 noundef 2, ptr noundef %225, i32 noundef %226)
  br label %227

227:                                              ; preds = %210, %208
  %228 = load i8, ptr %22, align 1, !tbaa !11, !range !21, !noundef !22
  %229 = trunc i8 %228 to i1
  br i1 %229, label %233, label %230

230:                                              ; preds = %227
  %231 = load i8, ptr %23, align 1, !tbaa !11, !range !21, !noundef !22
  %232 = trunc i8 %231 to i1
  br label %233

233:                                              ; preds = %230, %227
  %234 = phi i1 [ true, %227 ], [ %232, %230 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  ret i1 %234
}

attributes #0 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nounwind "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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !10, i64 64}
!14 = !{!"_ZTS8GuiState", !12, i64 0, !12, i64 1, !12, i64 2, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !12, i64 28, !12, i64 29, !12, i64 30, !10, i64 32, !10, i64 36, !15, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !12, i64 56, !10, i64 60, !10, i64 64}
!15 = !{!"float", !7, i64 0}
!16 = !{!14, !10, i64 60}
!17 = !{!14, !10, i64 44}
!18 = !{!14, !10, i64 48}
!19 = !{!14, !10, i64 52}
!20 = !{!15, !15, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!14, !12, i64 30}
!24 = !{!14, !10, i64 4}
!25 = !{!14, !10, i64 32}
!26 = !{!14, !15, i64 40}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.GuiState = type { i8, i8, i8, i32, i32, i32, i32, i32, i32, i8, i8, i8, i32, i32, float, i32, i32, i32, i8, i32, i32 }

@_ZL7s_state = external hidden local_unnamed_addr global %struct.GuiState, align 4
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z6inRectiiiib(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i1 noundef zeroext) local_unnamed_addr #0

declare void @_Z20AddGfxCmdRoundedRectfffffj(float noundef, float noundef, float noundef, float noundef, float noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #0

declare void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZL11buttonLogicjb(i32 noundef, i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z8isActivej(i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_Z5isHotj(i32 noundef) local_unnamed_addr #0

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_Z11imguiSliderPKcPiiiib(ptr noundef %0, ptr nocapture noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i1 noundef zeroext %5) local_unnamed_addr #3 {
  %7 = alloca [128 x i8], align 16
  %8 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 64), align 4, !tbaa !5
  %9 = add i32 %8, 1
  store i32 %9, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 64), align 4, !tbaa !5
  %10 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 60), align 4, !tbaa !12
  %11 = shl i32 %10, 16
  %12 = or i32 %11, %9
  %13 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 44), align 4, !tbaa !13
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 48), align 4, !tbaa !14
  %15 = add nsw i32 %14, -20
  %16 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 52), align 4, !tbaa !15
  %17 = add nsw i32 %14, -24
  store i32 %17, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 48), align 4, !tbaa !14
  %18 = sitofp i32 %13 to float
  %19 = sitofp i32 %15 to float
  %20 = sitofp i32 %16 to float
  %21 = tail call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext 0, i8 noundef zeroext 0, i8 noundef zeroext 0, i8 noundef zeroext -128)
  tail call void @_Z20AddGfxCmdRoundedRectfffffj(float noundef %18, float noundef %19, float noundef %20, float noundef 2.000000e+01, float noundef 4.000000e+00, i32 noundef %21)
  %22 = add i32 %16, -10
  %23 = load i32, ptr %1, align 4, !tbaa !16
  %24 = sub nsw i32 %23, %2
  %25 = sitofp i32 %24 to float
  %26 = sub nsw i32 %3, %2
  %27 = sitofp i32 %26 to float
  %28 = fdiv float %25, %27
  %29 = fcmp olt float %28, 0.000000e+00
  %.060 = select i1 %29, float 0.000000e+00, float %28
  %30 = fcmp ogt float %.060, 1.000000e+00
  %.1 = select i1 %30, float 1.000000e+00, float %.060
  %31 = sitofp i32 %22 to float
  %32 = fmul float %.1, %31
  %33 = fptosi float %32 to i32
  br i1 %5, label %34, label %37

34:                                               ; preds = %6
  %35 = add nsw i32 %13, %33
  %36 = tail call noundef zeroext i1 @_Z6inRectiiiib(i32 noundef %35, i32 noundef %15, i32 noundef 10, i32 noundef 20, i1 noundef zeroext true)
  br label %37

37:                                               ; preds = %34, %6
  %38 = phi i1 [ false, %6 ], [ %36, %34 ]
  %39 = tail call noundef zeroext i1 @_ZL11buttonLogicjb(i32 noundef %12, i1 noundef zeroext %38)
  %40 = tail call noundef zeroext i1 @_Z8isActivej(i32 noundef %12)
  br i1 %40, label %41, label %66

41:                                               ; preds = %37
  %42 = load i8, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 30), align 2, !tbaa !17, !range !18, !noundef !19
  %43 = trunc nuw i8 %42 to i1
  br i1 %43, label %.thread, label %45

.thread:                                          ; preds = %41
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 4), align 4, !tbaa !20
  store i32 %44, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 32), align 4, !tbaa !21
  store float %.1, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 40), align 4, !tbaa !22
  br label %66

45:                                               ; preds = %41
  %.pre = load i32, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 32), align 4, !tbaa !21
  %.pre66 = load i32, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 4), align 4, !tbaa !20
  %.not = icmp eq i32 %.pre, %.pre66
  br i1 %.not, label %66, label %46

46:                                               ; preds = %45
  %47 = load float, ptr getelementptr inbounds (i8, ptr @_ZL7s_state, i64 40), align 4, !tbaa !22
  %48 = sub nsw i32 %.pre66, %.pre
  %49 = sitofp i32 %48 to float
  %50 = fdiv float %49, %31
  %51 = fadd float %50, %47
  %52 = fcmp olt float %51, 0.000000e+00
  %.2 = select i1 %52, float 0.000000e+00, float %51
  %53 = fcmp ogt float %.2, 1.000000e+00
  %.3 = select i1 %53, float 1.000000e+00, float %.2
  %54 = sitofp i32 %2 to float
  %55 = tail call float @llvm.fmuladd.f32(float %.3, float %27, float %54)
  %56 = fptosi float %55 to i32
  %57 = sitofp i32 %56 to float
  %58 = sitofp i32 %4 to float
  %59 = fdiv float %57, %58
  %60 = fadd float %59, 5.000000e-01
  %61 = tail call float @llvm.floor.f32(float %60)
  %62 = fptosi float %61 to i32
  %63 = mul nsw i32 %62, %4
  store i32 %63, ptr %1, align 4, !tbaa !16
  %64 = fmul float %.3, %31
  %65 = fptosi float %64 to i32
  br label %66

66:                                               ; preds = %.thread, %45, %46, %37
  %.061 = phi i32 [ %65, %46 ], [ %33, %45 ], [ %33, %37 ], [ %33, %.thread ]
  %.0 = phi i1 [ true, %46 ], [ false, %45 ], [ false, %37 ], [ false, %.thread ]
  %67 = tail call noundef zeroext i1 @_Z8isActivej(i32 noundef %12)
  %68 = add nsw i32 %.061, %13
  %69 = sitofp i32 %68 to float
  br i1 %67, label %70, label %72

70:                                               ; preds = %66
  %71 = tail call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1)
  br label %78

72:                                               ; preds = %66
  %73 = tail call noundef zeroext i1 @_Z5isHotj(i32 noundef %12)
  br i1 %73, label %74, label %76

74:                                               ; preds = %72
  %75 = tail call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -60, i8 noundef zeroext 0, i8 noundef zeroext -128)
  br label %78

76:                                               ; preds = %72
  %77 = tail call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext 64)
  br label %78

78:                                               ; preds = %74, %76, %70
  %.sink = phi i32 [ %71, %70 ], [ %75, %74 ], [ %77, %76 ]
  tail call void @_Z20AddGfxCmdRoundedRectfffffj(float noundef %69, float noundef %19, float noundef 1.000000e+01, float noundef 2.000000e+01, float noundef 4.000000e+00, i32 noundef %.sink)
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %7) #6
  %79 = load i32, ptr %1, align 4, !tbaa !16
  %80 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %7, i64 noundef 128, ptr noundef nonnull @.str.1, i32 noundef %79) #6
  %81 = add nsw i32 %13, 10
  %82 = add nsw i32 %14, -14
  br i1 %5, label %83, label %99

83:                                               ; preds = %78
  %84 = tail call noundef zeroext i1 @_Z5isHotj(i32 noundef %12)
  br i1 %84, label %85, label %87

85:                                               ; preds = %83
  %86 = tail call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -60, i8 noundef zeroext 0, i8 noundef zeroext -1)
  br label %89

87:                                               ; preds = %83
  %88 = tail call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -56)
  br label %89

89:                                               ; preds = %87, %85
  %90 = phi i32 [ %86, %85 ], [ %88, %87 ]
  tail call void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef %81, i32 noundef %82, i32 noundef 0, ptr noundef %0, i32 noundef %90)
  %91 = add i32 %22, %13
  %92 = tail call noundef zeroext i1 @_Z5isHotj(i32 noundef %12)
  br i1 %92, label %93, label %95

93:                                               ; preds = %89
  %94 = tail call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -60, i8 noundef zeroext 0, i8 noundef zeroext -1)
  br label %97

95:                                               ; preds = %89
  %96 = tail call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -1, i8 noundef zeroext -56)
  br label %97

97:                                               ; preds = %95, %93
  %98 = phi i32 [ %94, %93 ], [ %96, %95 ]
  call void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef %91, i32 noundef %82, i32 noundef 2, ptr noundef nonnull %7, i32 noundef %98)
  br label %103

99:                                               ; preds = %78
  %100 = tail call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -128, i8 noundef zeroext -128, i8 noundef zeroext -128, i8 noundef zeroext -56)
  tail call void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef %81, i32 noundef %82, i32 noundef 0, ptr noundef %0, i32 noundef %100)
  %101 = add i32 %22, %13
  %102 = tail call noundef i32 @_Z7SetRGBAhhhh(i8 noundef zeroext -128, i8 noundef zeroext -128, i8 noundef zeroext -128, i8 noundef zeroext -56)
  call void @_Z13AddGfxCmdTextii9TextAlignPKcj(i32 noundef %101, i32 noundef %82, i32 noundef 2, ptr noundef nonnull %7, i32 noundef %102)
  br label %103

103:                                              ; preds = %99, %97
  %104 = or i1 %39, %.0
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %7) #6
  ret i1 %104
}

attributes #0 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nofree nounwind "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, !10, i64 64}
!6 = !{!"_ZTS8GuiState", !7, i64 0, !7, i64 1, !7, i64 2, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !7, i64 28, !7, i64 29, !7, i64 30, !10, i64 32, !10, i64 36, !11, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !7, i64 56, !10, i64 60, !10, i64 64}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"float", !8, i64 0}
!12 = !{!6, !10, i64 60}
!13 = !{!6, !10, i64 44}
!14 = !{!6, !10, i64 48}
!15 = !{!6, !10, i64 52}
!16 = !{!10, !10, i64 0}
!17 = !{!6, !7, i64 30}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!6, !10, i64 4}
!21 = !{!6, !10, i64 32}
!22 = !{!6, !11, i64 40}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass