; LLVM IR from vectozavr/3dzavr :: engine/io/microui (microui)

; 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.mu_Rect = type { i32, i32, i32, i32 }
%struct.mu_Context = type { ptr, ptr, ptr, %struct.mu_Style, ptr, i32, i32, i32, %struct.mu_Rect, i32, i32, i32, ptr, ptr, ptr, [127 x i8], i32, %struct.anon, %struct.anon.0, %struct.anon.1, %struct.anon.2, %struct.anon.3, %struct.anon.4, [48 x %struct.mu_PoolItem], [48 x %struct.mu_Container], [48 x %struct.mu_PoolItem], %struct.mu_Vec2, %struct.mu_Vec2, %struct.mu_Vec2, %struct.mu_Vec2, i32, i32, i32, i32, [32 x i8] }
%struct.mu_Style = type { ptr, %struct.mu_Vec2, i32, i32, i32, i32, i32, i32, [14 x %struct.mu_Color] }
%struct.mu_Color = type { i8, i8, i8, i8 }
%struct.anon = type { i32, [262144 x i8] }
%struct.anon.0 = type { i32, [32 x ptr] }
%struct.anon.1 = type { i32, [32 x ptr] }
%struct.anon.2 = type { i32, [32 x %struct.mu_Rect] }
%struct.anon.3 = type { i32, [32 x i32] }
%struct.anon.4 = type { i32, [16 x %struct.mu_Layout] }
%struct.mu_Layout = type { %struct.mu_Rect, %struct.mu_Rect, %struct.mu_Vec2, %struct.mu_Vec2, %struct.mu_Vec2, [16 x i32], i32, i32, i32, i32, i32 }
%struct.mu_Container = type { ptr, ptr, %struct.mu_Rect, %struct.mu_Rect, %struct.mu_Vec2, %struct.mu_Vec2, i32, i32 }
%struct.mu_PoolItem = type { i32, i32 }
%struct.mu_Vec2 = type { i32, i32 }

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @mu_rect(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #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.start.p0(i64 immarg, ptr nocapture) #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @mu_layout_next(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @mu_draw_control_frame(ptr noundef, i32 noundef, i64, i64, i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @mu_draw_control_text(ptr noundef, ptr noundef, i64, i64, i32 noundef, i32 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @mu_update_control(ptr noundef, i32 noundef, i64, i64, i32 noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @mu_slider_ex(ptr noundef %0, ptr noundef %1, float noundef %2, float noundef %3, float noundef %4, ptr noundef %5, i32 noundef %6) #0 {
  %8 = alloca i32, 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 ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca [128 x i8], align 16
  %17 = alloca %struct.mu_Rect, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca float, align 4
  %22 = alloca float, align 4
  %23 = alloca i32, align 4
  %24 = alloca %struct.mu_Rect, align 4
  %25 = alloca i32, align 4
  %26 = alloca %struct.mu_Rect, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store float %2, ptr %11, align 4, !tbaa !9
  store float %3, ptr %12, align 4, !tbaa !9
  store float %4, ptr %13, align 4, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  store i32 %6, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 128, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  %28 = load float, ptr %27, align 4, !tbaa !9
  store float %28, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  %29 = load float, ptr %21, align 4, !tbaa !9
  store float %29, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = call i32 @mu_get_id(ptr noundef %30, ptr noundef %10, i32 noundef 8)
  store i32 %31, ptr %23, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #4
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = call { i64, i64 } @mu_layout_next(ptr noundef %32)
  %34 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 0
  %35 = extractvalue { i64, i64 } %33, 0
  store i64 %35, ptr %34, align 4
  %36 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 1
  %37 = extractvalue { i64, i64 } %33, 1
  store i64 %37, ptr %36, align 4
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = load i32, ptr %23, align 4, !tbaa !11
  %40 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 0
  %41 = load i64, ptr %40, align 4
  %42 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 1
  %43 = load i64, ptr %42, align 4
  %44 = call i32 @number_textbox(ptr noundef %38, ptr noundef %22, i64 %41, i64 %43, i32 noundef %39)
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %48

46:                                               ; preds = %7
  %47 = load i32, ptr %20, align 4, !tbaa !11
  store i32 %47, ptr %8, align 4
  store i32 1, ptr %25, align 4
  br label %195

48:                                               ; preds = %7
  %49 = load ptr, ptr %9, align 8, !tbaa !5
  %50 = load i32, ptr %23, align 4, !tbaa !11
  %51 = load i32, ptr %15, align 4, !tbaa !11
  %52 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 0
  %53 = load i64, ptr %52, align 4
  %54 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 1
  %55 = load i64, ptr %54, align 4
  call void @mu_update_control(ptr noundef %49, i32 noundef %50, i64 %53, i64 %55, i32 noundef %51)
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.mu_Context, ptr %56, i32 0, i32 6
  %58 = load i32, ptr %57, align 4, !tbaa !13
  %59 = load i32, ptr %23, align 4, !tbaa !11
  %60 = icmp eq i32 %58, %59
  br i1 %60, label %61, label %101

61:                                               ; preds = %48
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.mu_Context, ptr %62, i32 0, i32 30
  %64 = load i32, ptr %63, align 8, !tbaa !20
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.mu_Context, ptr %65, i32 0, i32 31
  %67 = load i32, ptr %66, align 4, !tbaa !21
  %68 = or i32 %64, %67
  %69 = icmp eq i32 %68, 1
  br i1 %69, label %70, label %101

70:                                               ; preds = %61
  %71 = load float, ptr %11, align 4, !tbaa !9
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.mu_Context, ptr %72, i32 0, i32 26
  %74 = getelementptr inbounds %struct.mu_Vec2, ptr %73, i32 0, i32 0
  %75 = load i32, ptr %74, align 8, !tbaa !22
  %76 = getelementptr inbounds %struct.mu_Rect, ptr %24, i32 0, i32 0
  %77 = load i32, ptr %76, align 4, !tbaa !23
  %78 = sub nsw i32 %75, %77
  %79 = sitofp i32 %78 to float
  %80 = load float, ptr %12, align 4, !tbaa !9
  %81 = load float, ptr %11, align 4, !tbaa !9
  %82 = fsub float %80, %81
  %83 = fmul float %79, %82
  %84 = getelementptr inbounds %struct.mu_Rect, ptr %24, i32 0, i32 2
  %85 = load i32, ptr %84, align 4, !tbaa !24
  %86 = sitofp i32 %85 to float
  %87 = fdiv float %83, %86
  %88 = fadd float %71, %87
  store float %88, ptr %22, align 4, !tbaa !9
  %89 = load float, ptr %13, align 4, !tbaa !9
  %90 = fcmp une float %89, 0.000000e+00
  br i1 %90, label %91, label %100

91:                                               ; preds = %70
  %92 = load float, ptr %22, align 4, !tbaa !9
  %93 = load float, ptr %13, align 4, !tbaa !9
  %94 = fdiv float %93, 2.000000e+00
  %95 = fadd float %92, %94
  %96 = load float, ptr %13, align 4, !tbaa !9
  %97 = fdiv float %95, %96
  %98 = load float, ptr %13, align 4, !tbaa !9
  %99 = fmul float %97, %98
  store float %99, ptr %22, align 4, !tbaa !9
  br label %100

100:                                              ; preds = %91, %70
  br label %101

101:                                              ; preds = %100, %61, %48
  %102 = load float, ptr %12, align 4, !tbaa !9
  %103 = load float, ptr %11, align 4, !tbaa !9
  %104 = load float, ptr %22, align 4, !tbaa !9
  %105 = fcmp ogt float %103, %104
  br i1 %105, label %106, label %108

106:                                              ; preds = %101
  %107 = load float, ptr %11, align 4, !tbaa !9
  br label %110

108:                                              ; preds = %101
  %109 = load float, ptr %22, align 4, !tbaa !9
  br label %110

110:                                              ; preds = %108, %106
  %111 = phi float [ %107, %106 ], [ %109, %108 ]
  %112 = fcmp olt float %102, %111
  br i1 %112, label %113, label %115

113:                                              ; preds = %110
  %114 = load float, ptr %12, align 4, !tbaa !9
  br label %125

115:                                              ; preds = %110
  %116 = load float, ptr %11, align 4, !tbaa !9
  %117 = load float, ptr %22, align 4, !tbaa !9
  %118 = fcmp ogt float %116, %117
  br i1 %118, label %119, label %121

119:                                              ; preds = %115
  %120 = load float, ptr %11, align 4, !tbaa !9
  br label %123

121:                                              ; preds = %115
  %122 = load float, ptr %22, align 4, !tbaa !9
  br label %123

123:                                              ; preds = %121, %119
  %124 = phi float [ %120, %119 ], [ %122, %121 ]
  br label %125

125:                                              ; preds = %123, %113
  %126 = phi float [ %114, %113 ], [ %124, %123 ]
  store float %126, ptr %22, align 4, !tbaa !9
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  store float %126, ptr %127, align 4, !tbaa !9
  %128 = load float, ptr %21, align 4, !tbaa !9
  %129 = load float, ptr %22, align 4, !tbaa !9
  %130 = fcmp une float %128, %129
  br i1 %130, label %131, label %134

131:                                              ; preds = %125
  %132 = load i32, ptr %20, align 4, !tbaa !11
  %133 = or i32 %132, 4
  store i32 %133, ptr %20, align 4, !tbaa !11
  br label %134

134:                                              ; preds = %131, %125
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = load i32, ptr %23, align 4, !tbaa !11
  %137 = load i32, ptr %15, align 4, !tbaa !11
  %138 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 0
  %139 = load i64, ptr %138, align 4
  %140 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 1
  %141 = load i64, ptr %140, align 4
  call void @mu_draw_control_frame(ptr noundef %135, i32 noundef %136, i64 %139, i64 %141, i32 noundef 9, i32 noundef %137)
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.mu_Context, ptr %142, i32 0, i32 4
  %144 = load ptr, ptr %143, align 8, !tbaa !25
  %145 = getelementptr inbounds %struct.mu_Style, ptr %144, i32 0, i32 7
  %146 = load i32, ptr %145, align 4, !tbaa !26
  store i32 %146, ptr %19, align 4, !tbaa !11
  %147 = load float, ptr %22, align 4, !tbaa !9
  %148 = load float, ptr %11, align 4, !tbaa !9
  %149 = fsub float %147, %148
  %150 = getelementptr inbounds %struct.mu_Rect, ptr %24, i32 0, i32 2
  %151 = load i32, ptr %150, align 4, !tbaa !24
  %152 = load i32, ptr %19, align 4, !tbaa !11
  %153 = sub nsw i32 %151, %152
  %154 = sitofp i32 %153 to float
  %155 = fmul float %149, %154
  %156 = load float, ptr %12, align 4, !tbaa !9
  %157 = load float, ptr %11, align 4, !tbaa !9
  %158 = fsub float %156, %157
  %159 = fdiv float %155, %158
  %160 = fptosi float %159 to i32
  store i32 %160, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #4
  %161 = getelementptr inbounds %struct.mu_Rect, ptr %24, i32 0, i32 0
  %162 = load i32, ptr %161, align 4, !tbaa !23
  %163 = load i32, ptr %18, align 4, !tbaa !11
  %164 = add nsw i32 %162, %163
  %165 = getelementptr inbounds %struct.mu_Rect, ptr %24, i32 0, i32 1
  %166 = load i32, ptr %165, align 4, !tbaa !27
  %167 = load i32, ptr %19, align 4, !tbaa !11
  %168 = getelementptr inbounds %struct.mu_Rect, ptr %24, i32 0, i32 3
  %169 = load i32, ptr %168, align 4, !tbaa !28
  %170 = call { i64, i64 } @mu_rect(i32 noundef %164, i32 noundef %166, i32 noundef %167, i32 noundef %169)
  %171 = getelementptr inbounds { i64, i64 }, ptr %26, i32 0, i32 0
  %172 = extractvalue { i64, i64 } %170, 0
  store i64 %172, ptr %171, align 4
  %173 = getelementptr inbounds { i64, i64 }, ptr %26, i32 0, i32 1
  %174 = extractvalue { i64, i64 } %170, 1
  store i64 %174, ptr %173, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %26, i64 16, i1 false), !tbaa.struct !29
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #4
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = load i32, ptr %23, align 4, !tbaa !11
  %177 = load i32, ptr %15, align 4, !tbaa !11
  %178 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %179 = load i64, ptr %178, align 4
  %180 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %181 = load i64, ptr %180, align 4
  call void @mu_draw_control_frame(ptr noundef %175, i32 noundef %176, i64 %179, i64 %181, i32 noundef 6, i32 noundef %177)
  %182 = getelementptr inbounds [128 x i8], ptr %16, i64 0, i64 0
  %183 = load ptr, ptr %14, align 8, !tbaa !5
  %184 = load float, ptr %22, align 4, !tbaa !9
  %185 = fpext float %184 to double
  %186 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %182, ptr noundef %183, double noundef %185) #4
  %187 = load ptr, ptr %9, align 8, !tbaa !5
  %188 = getelementptr inbounds [128 x i8], ptr %16, i64 0, i64 0
  %189 = load i32, ptr %15, align 4, !tbaa !11
  %190 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 0
  %191 = load i64, ptr %190, align 4
  %192 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 1
  %193 = load i64, ptr %192, align 4
  call void @mu_draw_control_text(ptr noundef %187, ptr noundef %188, i64 %191, i64 %193, i32 noundef 0, i32 noundef %189)
  %194 = load i32, ptr %20, align 4, !tbaa !11
  store i32 %194, ptr %8, align 4
  store i32 1, ptr %25, align 4
  br label %195

195:                                              ; preds = %134, %46
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr %16) #4
  %196 = load i32, ptr %8, align 4
  ret i32 %196
}

; Function Attrs: nounwind uwtable
declare hidden i32 @number_textbox(ptr noundef, ptr noundef, i64, i64, i32 noundef) #0

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #3

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 132}
!14 = !{!"mu_Context", !6, i64 0, !6, i64 8, !6, i64 16, !15, i64 24, !6, i64 120, !12, i64 128, !12, i64 132, !12, i64 136, !17, i64 140, !12, i64 156, !12, i64 160, !12, i64 164, !6, i64 168, !6, i64 176, !6, i64 184, !7, i64 192, !12, i64 320, !18, i64 324, !19, i64 262472, !19, i64 262736, !18, i64 263000, !18, i64 263516, !18, i64 263648, !7, i64 265892, !7, i64 266280, !7, i64 269736, !16, i64 270120, !16, i64 270128, !16, i64 270136, !16, i64 270144, !12, i64 270152, !12, i64 270156, !12, i64 270160, !12, i64 270164, !7, i64 270168}
!15 = !{!"", !6, i64 0, !16, i64 8, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !7, i64 40}
!16 = !{!"", !12, i64 0, !12, i64 4}
!17 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12}
!18 = !{!"", !12, i64 0, !7, i64 4}
!19 = !{!"", !12, i64 0, !7, i64 8}
!20 = !{!14, !12, i64 270152}
!21 = !{!14, !12, i64 270156}
!22 = !{!14, !12, i64 270120}
!23 = !{!17, !12, i64 0}
!24 = !{!17, !12, i64 8}
!25 = !{!14, !6, i64 120}
!26 = !{!15, !12, i64 36}
!27 = !{!17, !12, i64 4}
!28 = !{!17, !12, i64 12}
!29 = !{i64 0, i64 4, !11, i64 4, i64 4, !11, i64 8, i64 4, !11, i64 12, i64 4, !11}


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

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @mu_rect(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local { i64, i64 } @mu_layout_next(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @mu_draw_control_frame(ptr noundef, i32 noundef, i64, i64, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @mu_draw_control_text(ptr noundef, ptr noundef, i64, i64, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @mu_update_control(ptr noundef, i32 noundef, i64, i64, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 5) i32 @mu_slider_ex(ptr noundef %0, ptr noundef %1, float noundef %2, float noundef %3, float noundef %4, ptr nocapture noundef readonly %5, i32 noundef %6) local_unnamed_addr #0 {
  %8 = alloca ptr, align 8
  %9 = alloca [128 x i8], align 16
  %10 = alloca float, align 4
  store ptr %1, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %9) #3
  %11 = load float, ptr %1, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #3
  store float %11, ptr %10, align 4, !tbaa !9
  %12 = call i32 @mu_get_id(ptr noundef %0, ptr noundef nonnull %8, i32 noundef 8)
  %13 = call { i64, i64 } @mu_layout_next(ptr noundef %0)
  %14 = extractvalue { i64, i64 } %13, 0
  %15 = extractvalue { i64, i64 } %13, 1
  %16 = call i32 @number_textbox(ptr noundef %0, ptr noundef nonnull %10, i64 %14, i64 %15, i32 noundef %12)
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %17, label %71

17:                                               ; preds = %7
  call void @mu_update_control(ptr noundef %0, i32 noundef %12, i64 %14, i64 %15, i32 noundef %6)
  %18 = getelementptr inbounds i8, ptr %0, i64 132
  %19 = load i32, ptr %18, align 4, !tbaa !11
  %20 = icmp eq i32 %19, %12
  br i1 %20, label %21, label %44

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %0, i64 270152
  %23 = load i32, ptr %22, align 8, !tbaa !19
  %24 = getelementptr inbounds i8, ptr %0, i64 270156
  %25 = load i32, ptr %24, align 4, !tbaa !20
  %26 = or i32 %25, %23
  %27 = icmp eq i32 %26, 1
  br i1 %27, label %28, label %44

28:                                               ; preds = %21
  %29 = getelementptr inbounds i8, ptr %0, i64 270120
  %30 = load i32, ptr %29, align 8, !tbaa !21
  %.sroa.01.0.extract.trunc = trunc i64 %14 to i32
  %31 = sub nsw i32 %30, %.sroa.01.0.extract.trunc
  %32 = sitofp i32 %31 to float
  %33 = fsub float %3, %2
  %34 = fmul float %33, %32
  %.sroa.10.8.extract.trunc = trunc i64 %15 to i32
  %35 = sitofp i32 %.sroa.10.8.extract.trunc to float
  %36 = fdiv float %34, %35
  %37 = fadd float %36, %2
  store float %37, ptr %10, align 4, !tbaa !9
  %38 = fcmp une float %4, 0.000000e+00
  br i1 %38, label %39, label %44

39:                                               ; preds = %28
  %40 = fmul float %4, 5.000000e-01
  %41 = fadd float %40, %37
  %42 = fdiv float %41, %4
  %43 = fmul float %42, %4
  store float %43, ptr %10, align 4, !tbaa !9
  br label %44

44:                                               ; preds = %28, %39, %21, %17
  %45 = load float, ptr %10, align 4
  %46 = fcmp olt float %45, %2
  %47 = select i1 %46, float %2, float %45
  %48 = fcmp ogt float %47, %3
  %. = select i1 %48, float %3, float %47
  store float %., ptr %10, align 4, !tbaa !9
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  store float %., ptr %49, align 4, !tbaa !9
  %50 = load float, ptr %10, align 4, !tbaa !9
  %51 = fcmp une float %11, %50
  %.061 = select i1 %51, i32 4, i32 0
  call void @mu_draw_control_frame(ptr noundef nonnull %0, i32 noundef %12, i64 %14, i64 %15, i32 noundef 9, i32 noundef %6)
  %52 = getelementptr inbounds i8, ptr %0, i64 120
  %53 = load ptr, ptr %52, align 8, !tbaa !22
  %54 = getelementptr inbounds i8, ptr %53, i64 36
  %55 = load i32, ptr %54, align 4, !tbaa !23
  %56 = load float, ptr %10, align 4, !tbaa !9
  %57 = fsub float %56, %2
  %.sroa.10.8.extract.trunc13 = trunc i64 %15 to i32
  %58 = sub nsw i32 %.sroa.10.8.extract.trunc13, %55
  %59 = sitofp i32 %58 to float
  %60 = fmul float %57, %59
  %61 = fsub float %3, %2
  %62 = fdiv float %60, %61
  %63 = fptosi float %62 to i32
  %.sroa.01.0.extract.trunc7 = trunc i64 %14 to i32
  %64 = add nsw i32 %63, %.sroa.01.0.extract.trunc7
  %.sroa.01.4.extract.shift = lshr i64 %14, 32
  %.sroa.01.4.extract.trunc = trunc nuw i64 %.sroa.01.4.extract.shift to i32
  %.sroa.10.12.extract.shift = lshr i64 %15, 32
  %.sroa.10.12.extract.trunc = trunc nuw i64 %.sroa.10.12.extract.shift to i32
  %65 = call { i64, i64 } @mu_rect(i32 noundef %64, i32 noundef %.sroa.01.4.extract.trunc, i32 noundef %55, i32 noundef %.sroa.10.12.extract.trunc)
  %66 = extractvalue { i64, i64 } %65, 0
  %67 = extractvalue { i64, i64 } %65, 1
  call void @mu_draw_control_frame(ptr noundef nonnull %0, i32 noundef %12, i64 %66, i64 %67, i32 noundef 6, i32 noundef %6)
  %68 = load float, ptr %10, align 4, !tbaa !9
  %69 = fpext float %68 to double
  %70 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %9, ptr noundef nonnull dereferenceable(1) %5, double noundef %69) #3
  call void @mu_draw_control_text(ptr noundef nonnull %0, ptr noundef nonnull %9, i64 %14, i64 %15, i32 noundef 0, i32 noundef %6)
  br label %71

71:                                               ; preds = %7, %44
  %.0 = phi i32 [ %.061, %44 ], [ 0, %7 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %9) #3
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden i32 @number_textbox(ptr noundef, ptr noundef, i64, i64, i32 noundef) local_unnamed_addr #0

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{!12, !15, i64 132}
!12 = !{!"mu_Context", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 120, !15, i64 128, !15, i64 132, !15, i64 136, !16, i64 140, !15, i64 156, !15, i64 160, !15, i64 164, !6, i64 168, !6, i64 176, !6, i64 184, !7, i64 192, !15, i64 320, !17, i64 324, !18, i64 262472, !18, i64 262736, !17, i64 263000, !17, i64 263516, !17, i64 263648, !7, i64 265892, !7, i64 266280, !7, i64 269736, !14, i64 270120, !14, i64 270128, !14, i64 270136, !14, i64 270144, !15, i64 270152, !15, i64 270156, !15, i64 270160, !15, i64 270164, !7, i64 270168}
!13 = !{!"", !6, i64 0, !14, i64 8, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !7, i64 40}
!14 = !{!"", !15, i64 0, !15, i64 4}
!15 = !{!"int", !7, i64 0}
!16 = !{!"", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!17 = !{!"", !15, i64 0, !7, i64 4}
!18 = !{!"", !15, i64 0, !7, i64 8}
!19 = !{!12, !15, i64 270152}
!20 = !{!12, !15, i64 270156}
!21 = !{!12, !15, i64 270120}
!22 = !{!12, !6, i64 120}
!23 = !{!13, !15, i64 36}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass