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

; 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.Vector2 = type { float, float }
%struct.Rectangle = type { float, float, float, float }
%struct.Color = type { i8, i8, i8, i8 }

@guiState = external hidden global i32, align 4
@guiLocked = external hidden global i8, align 1
@__const.GuiGrid.currentCell = external hidden unnamed_addr constant %struct.Vector2, align 4

; 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) #0

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

; Function Attrs: 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 @GuiGetStyle(i32 noundef, i32 noundef) #2

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

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

declare i32 @GetColor(i32 noundef) #4

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

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

; Function Attrs: nounwind uwtable
define dso_local <2 x float> @GuiGrid(<2 x float> %0, <2 x float> %1, float noundef %2, i32 noundef %3) #3 {
  %5 = alloca %struct.Vector2, align 4
  %6 = alloca %struct.Rectangle, align 4
  %7 = alloca float, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.Vector2, 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 i32, align 4
  %20 = alloca %struct.Rectangle, align 4
  %21 = alloca %struct.Color, align 1
  %22 = alloca %struct.Color, align 1
  %23 = alloca %struct.Color, align 1
  %24 = alloca %struct.Color, align 1
  %25 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 0
  store <2 x float> %0, ptr %25, align 4
  %26 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 1
  store <2 x float> %1, ptr %26, align 4
  store float %2, ptr %7, align 4, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %27 = load i32, ptr @guiState, align 4, !tbaa !9
  store i32 %27, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %28 = call <2 x float> @GetMousePosition()
  store <2 x float> %28, ptr %10, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 @__const.GuiGrid.currentCell, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %29 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 2
  %30 = load float, ptr %29, align 4, !tbaa !11
  %31 = load float, ptr %7, align 4, !tbaa !5
  %32 = fdiv float %30, %31
  %33 = fptosi float %32 to i32
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = mul nsw i32 %33, %34
  %36 = add nsw i32 %35, 1
  store i32 %36, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %37 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 3
  %38 = load float, ptr %37, align 4, !tbaa !13
  %39 = load float, ptr %7, align 4, !tbaa !5
  %40 = fdiv float %38, %39
  %41 = fptosi float %40 to i32
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = mul nsw i32 %41, %42
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %12, align 4, !tbaa !9
  %45 = load i32, ptr %9, align 4, !tbaa !9
  %46 = icmp ne i32 %45, 3
  br i1 %46, label %47, label %79

47:                                               ; preds = %4
  %48 = load i8, ptr @guiLocked, align 1, !tbaa !14, !range !16, !noundef !17
  %49 = trunc i8 %48 to i1
  br i1 %49, label %79, label %50

50:                                               ; preds = %47
  %51 = load <2 x float>, ptr %10, align 4
  %52 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 0
  %53 = load <2 x float>, ptr %52, align 4
  %54 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %6, i32 0, i32 1
  %55 = load <2 x float>, ptr %54, align 4
  %56 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %51, <2 x float> %53, <2 x float> %55)
  br i1 %56, label %57, label %78

57:                                               ; preds = %50
  %58 = getelementptr inbounds %struct.Vector2, ptr %10, i32 0, i32 0
  %59 = load float, ptr %58, align 4, !tbaa !18
  %60 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 0
  %61 = load float, ptr %60, align 4, !tbaa !20
  %62 = fsub float %59, %61
  %63 = load float, ptr %7, align 4, !tbaa !5
  %64 = fdiv float %62, %63
  %65 = fptosi float %64 to i32
  %66 = sitofp i32 %65 to float
  %67 = getelementptr inbounds %struct.Vector2, ptr %5, i32 0, i32 0
  store float %66, ptr %67, align 4, !tbaa !18
  %68 = getelementptr inbounds %struct.Vector2, ptr %10, i32 0, i32 1
  %69 = load float, ptr %68, align 4, !tbaa !21
  %70 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 1
  %71 = load float, ptr %70, align 4, !tbaa !22
  %72 = fsub float %69, %71
  %73 = load float, ptr %7, align 4, !tbaa !5
  %74 = fdiv float %72, %73
  %75 = fptosi float %74 to i32
  %76 = sitofp i32 %75 to float
  %77 = getelementptr inbounds %struct.Vector2, ptr %5, i32 0, i32 1
  store float %76, ptr %77, align 4, !tbaa !21
  br label %78

78:                                               ; preds = %57, %50
  br label %79

79:                                               ; preds = %78, %47, %4
  %80 = load i32, ptr %9, align 4, !tbaa !9
  switch i32 %80, label %192 [
    i32 0, label %81
  ]

81:                                               ; preds = %79
  %82 = load i32, ptr %8, align 4, !tbaa !9
  %83 = icmp sgt i32 %82, 0
  br i1 %83, label %84, label %191

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

85:                                               ; preds = %134, %84
  %86 = load i32, ptr %13, align 4, !tbaa !9
  %87 = load i32, ptr %11, align 4, !tbaa !9
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %137

90:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  %91 = getelementptr inbounds %struct.Rectangle, ptr %14, i32 0, i32 0
  %92 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 0
  %93 = load float, ptr %92, align 4, !tbaa !20
  %94 = load float, ptr %7, align 4, !tbaa !5
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = sitofp i32 %95 to float
  %97 = fmul float %94, %96
  %98 = load i32, ptr %8, align 4, !tbaa !9
  %99 = sitofp i32 %98 to float
  %100 = fdiv float %97, %99
  %101 = fadd float %93, %100
  store float %101, ptr %91, align 4, !tbaa !20
  %102 = getelementptr inbounds %struct.Rectangle, ptr %14, i32 0, i32 1
  %103 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 1
  %104 = load float, ptr %103, align 4, !tbaa !22
  store float %104, ptr %102, align 4, !tbaa !22
  %105 = getelementptr inbounds %struct.Rectangle, ptr %14, i32 0, i32 2
  store float 1.000000e+00, ptr %105, align 4, !tbaa !11
  %106 = getelementptr inbounds %struct.Rectangle, ptr %14, i32 0, i32 3
  %107 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 3
  %108 = load float, ptr %107, align 4, !tbaa !13
  store float %108, ptr %106, align 4, !tbaa !13
  %109 = getelementptr inbounds %struct.Color, ptr %15, i32 0, i32 0
  store i8 0, ptr %109, align 1, !tbaa !23
  %110 = getelementptr inbounds %struct.Color, ptr %15, i32 0, i32 1
  store i8 0, ptr %110, align 1, !tbaa !25
  %111 = getelementptr inbounds %struct.Color, ptr %15, i32 0, i32 2
  store i8 0, ptr %111, align 1, !tbaa !26
  %112 = getelementptr inbounds %struct.Color, ptr %15, i32 0, i32 3
  store i8 0, ptr %112, align 1, !tbaa !27
  %113 = load i32, ptr %13, align 4, !tbaa !9
  %114 = load i32, ptr %8, align 4, !tbaa !9
  %115 = srem i32 %113, %114
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %122

117:                                              ; preds = %90
  %118 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %119 = call i32 @GetColor(i32 noundef %118)
  store i32 %119, ptr %17, align 1
  %120 = load i32, ptr %17, align 1
  %121 = call i32 @Fade(i32 %120, float noundef 0x3FE3333340000000)
  store i32 %121, ptr %16, align 1
  br label %127

122:                                              ; preds = %90
  %123 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %124 = call i32 @GetColor(i32 noundef %123)
  store i32 %124, ptr %18, align 1
  %125 = load i32, ptr %18, align 1
  %126 = call i32 @Fade(i32 %125, float noundef 0x3FC3333340000000)
  store i32 %126, ptr %16, align 1
  br label %127

127:                                              ; preds = %122, %117
  %128 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %14, i32 0, i32 0
  %129 = load <2 x float>, ptr %128, align 4
  %130 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %14, i32 0, i32 1
  %131 = load <2 x float>, ptr %130, align 4
  %132 = load i32, ptr %15, align 1
  %133 = load i32, ptr %16, align 1
  call void @GuiDrawRectangle(<2 x float> %129, <2 x float> %131, i32 noundef 0, i32 %132, i32 %133)
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  br label %134

134:                                              ; preds = %127
  %135 = load i32, ptr %13, align 4, !tbaa !9
  %136 = add nsw i32 %135, 1
  store i32 %136, ptr %13, align 4, !tbaa !9
  br label %85, !llvm.loop !28

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

138:                                              ; preds = %187, %137
  %139 = load i32, ptr %19, align 4, !tbaa !9
  %140 = load i32, ptr %12, align 4, !tbaa !9
  %141 = icmp slt i32 %139, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %190

143:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  %144 = getelementptr inbounds %struct.Rectangle, ptr %20, i32 0, i32 0
  %145 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 0
  %146 = load float, ptr %145, align 4, !tbaa !20
  store float %146, ptr %144, align 4, !tbaa !20
  %147 = getelementptr inbounds %struct.Rectangle, ptr %20, i32 0, i32 1
  %148 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 1
  %149 = load float, ptr %148, align 4, !tbaa !22
  %150 = load float, ptr %7, align 4, !tbaa !5
  %151 = load i32, ptr %19, align 4, !tbaa !9
  %152 = sitofp i32 %151 to float
  %153 = fmul float %150, %152
  %154 = load i32, ptr %8, align 4, !tbaa !9
  %155 = sitofp i32 %154 to float
  %156 = fdiv float %153, %155
  %157 = fadd float %149, %156
  store float %157, ptr %147, align 4, !tbaa !22
  %158 = getelementptr inbounds %struct.Rectangle, ptr %20, i32 0, i32 2
  %159 = getelementptr inbounds %struct.Rectangle, ptr %6, i32 0, i32 2
  %160 = load float, ptr %159, align 4, !tbaa !11
  store float %160, ptr %158, align 4, !tbaa !11
  %161 = getelementptr inbounds %struct.Rectangle, ptr %20, i32 0, i32 3
  store float 1.000000e+00, ptr %161, align 4, !tbaa !13
  %162 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 0
  store i8 0, ptr %162, align 1, !tbaa !23
  %163 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 1
  store i8 0, ptr %163, align 1, !tbaa !25
  %164 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 2
  store i8 0, ptr %164, align 1, !tbaa !26
  %165 = getelementptr inbounds %struct.Color, ptr %21, i32 0, i32 3
  store i8 0, ptr %165, align 1, !tbaa !27
  %166 = load i32, ptr %19, align 4, !tbaa !9
  %167 = load i32, ptr %8, align 4, !tbaa !9
  %168 = srem i32 %166, %167
  %169 = icmp eq i32 %168, 0
  br i1 %169, label %170, label %175

170:                                              ; preds = %143
  %171 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %172 = call i32 @GetColor(i32 noundef %171)
  store i32 %172, ptr %23, align 1
  %173 = load i32, ptr %23, align 1
  %174 = call i32 @Fade(i32 %173, float noundef 0x3FE3333340000000)
  store i32 %174, ptr %22, align 1
  br label %180

175:                                              ; preds = %143
  %176 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %177 = call i32 @GetColor(i32 noundef %176)
  store i32 %177, ptr %24, align 1
  %178 = load i32, ptr %24, align 1
  %179 = call i32 @Fade(i32 %178, float noundef 0x3FC3333340000000)
  store i32 %179, ptr %22, align 1
  br label %180

180:                                              ; preds = %175, %170
  %181 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %20, i32 0, i32 0
  %182 = load <2 x float>, ptr %181, align 4
  %183 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %20, i32 0, i32 1
  %184 = load <2 x float>, ptr %183, align 4
  %185 = load i32, ptr %21, align 1
  %186 = load i32, ptr %22, align 1
  call void @GuiDrawRectangle(<2 x float> %182, <2 x float> %184, i32 noundef 0, i32 %185, i32 %186)
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  br label %187

187:                                              ; preds = %180
  %188 = load i32, ptr %19, align 4, !tbaa !9
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %19, align 4, !tbaa !9
  br label %138, !llvm.loop !30

190:                                              ; preds = %142
  br label %191

191:                                              ; preds = %190, %81
  br label %193

192:                                              ; preds = %79
  br label %193

193:                                              ; preds = %192, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  %194 = load <2 x float>, ptr %5, align 4
  ret <2 x float> %194
}

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

!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 8}
!12 = !{!"Rectangle", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!13 = !{!12, !6, i64 12}
!14 = !{!15, !15, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!19, !6, i64 0}
!19 = !{!"Vector2", !6, i64 0, !6, i64 4}
!20 = !{!12, !6, i64 0}
!21 = !{!19, !6, i64 4}
!22 = !{!12, !6, i64 4}
!23 = !{!24, !7, i64 0}
!24 = !{!"Color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!25 = !{!24, !7, i64 1}
!26 = !{!24, !7, i64 2}
!27 = !{!24, !7, i64 3}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


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

@guiState = external hidden local_unnamed_addr global i32, align 4
@guiLocked = external hidden local_unnamed_addr global i8, align 1
@__const.GuiGrid.currentCell = external hidden unnamed_addr constant %struct.Vector2, 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

; Function Attrs: nounwind uwtable
define dso_local <2 x float> @GuiGrid(<2 x float> %0, <2 x float> %1, float noundef %2, i32 noundef %3) local_unnamed_addr #1 {
  %5 = load i32, ptr @guiState, align 4, !tbaa !5
  %6 = tail call <2 x float> @GetMousePosition() #3
  %.sroa.059.0.copyload = load <2 x float>, ptr @__const.GuiGrid.currentCell, align 4
  %.sroa.8.8.vec.extract = extractelement <2 x float> %1, i64 0
  %7 = fdiv float %.sroa.8.8.vec.extract, %2
  %8 = fptosi float %7 to i32
  %9 = mul i32 %8, %3
  %.sroa.8.12.vec.extract = extractelement <2 x float> %1, i64 1
  %10 = fdiv float %.sroa.8.12.vec.extract, %2
  %11 = fptosi float %10 to i32
  %12 = mul i32 %11, %3
  %.not = icmp eq i32 %5, 3
  br i1 %.not, label %.thread, label %13

13:                                               ; preds = %4
  %14 = load i8, ptr @guiLocked, align 1, !tbaa !9, !range !11, !noundef !12
  %15 = trunc nuw i8 %14 to i1
  br i1 %15, label %25, label %16

16:                                               ; preds = %13
  %17 = tail call zeroext i1 @CheckCollisionPointRec(<2 x float> %6, <2 x float> %0, <2 x float> %1) #3
  br i1 %17, label %18, label %25

18:                                               ; preds = %16
  %19 = fsub <2 x float> %6, %0
  %20 = insertelement <2 x float> poison, float %2, i64 0
  %21 = shufflevector <2 x float> %20, <2 x float> poison, <2 x i32> zeroinitializer
  %22 = fdiv <2 x float> %19, %21
  %23 = fptosi <2 x float> %22 to <2 x i32>
  %24 = sitofp <2 x i32> %23 to <2 x float>
  br label %25

25:                                               ; preds = %16, %18, %13
  %.sroa.059.0 = phi <2 x float> [ %.sroa.059.0.copyload, %13 ], [ %24, %18 ], [ %.sroa.059.0.copyload, %16 ]
  %cond = icmp eq i32 %5, 0
  %26 = icmp sgt i32 %3, 0
  %or.cond = and i1 %26, %cond
  br i1 %or.cond, label %.preheader70, label %.thread

.preheader70:                                     ; preds = %25
  %.not6371 = icmp slt i32 %9, 0
  br i1 %.not6371, label %.preheader, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader70
  %.sroa.044.0.vec.extract47 = extractelement <2 x float> %0, i64 0
  %27 = uitofp nneg i32 %3 to float
  %.sroa.520.12.vec.insert65 = insertelement <2 x float> %1, float 1.000000e+00, i64 0
  br label %29

.preheader:                                       ; preds = %29, %.preheader70
  %.not6473 = icmp slt i32 %12, 0
  br i1 %.not6473, label %.thread, label %.lr.ph75

.lr.ph75:                                         ; preds = %.preheader
  %.sroa.044.4.vec.extract53 = extractelement <2 x float> %0, i64 1
  %28 = uitofp nneg i32 %3 to float
  %.sroa.5.12.vec.insert = insertelement <2 x float> %1, float 1.000000e+00, i64 1
  br label %40

29:                                               ; preds = %.lr.ph, %29
  %.072 = phi i32 [ 0, %.lr.ph ], [ %39, %29 ]
  %30 = uitofp nneg i32 %.072 to float
  %31 = fmul float %30, %2
  %32 = fdiv float %31, %27
  %33 = fadd float %.sroa.044.0.vec.extract47, %32
  %.sroa.018.4.vec.insert = insertelement <2 x float> %0, float %33, i64 0
  %34 = urem i32 %.072, %3
  %35 = icmp eq i32 %34, 0
  %36 = tail call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %37 = tail call i32 @GetColor(i32 noundef %36) #3
  %. = select i1 %35, float 0x3FE3333340000000, float 0x3FC3333340000000
  %38 = tail call i32 @Fade(i32 %37, float noundef %.) #3
  tail call void @GuiDrawRectangle(<2 x float> %.sroa.018.4.vec.insert, <2 x float> %.sroa.520.12.vec.insert65, i32 noundef 0, i32 0, i32 %38)
  %39 = add nuw i32 %.072, 1
  %exitcond.not = icmp eq i32 %.072, %9
  br i1 %exitcond.not, label %.preheader, label %29, !llvm.loop !13

40:                                               ; preds = %.lr.ph75, %40
  %.06174 = phi i32 [ 0, %.lr.ph75 ], [ %50, %40 ]
  %41 = uitofp nneg i32 %.06174 to float
  %42 = fmul float %41, %2
  %43 = fdiv float %42, %28
  %44 = fadd float %.sroa.044.4.vec.extract53, %43
  %.sroa.05.4.vec.insert = insertelement <2 x float> %0, float %44, i64 1
  %45 = urem i32 %.06174, %3
  %46 = icmp eq i32 %45, 0
  %47 = tail call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 18)
  %48 = tail call i32 @GetColor(i32 noundef %47) #3
  %.78 = select i1 %46, float 0x3FE3333340000000, float 0x3FC3333340000000
  %49 = tail call i32 @Fade(i32 %48, float noundef %.78) #3
  tail call void @GuiDrawRectangle(<2 x float> %.sroa.05.4.vec.insert, <2 x float> %.sroa.5.12.vec.insert, i32 noundef 0, i32 0, i32 %49)
  %50 = add nuw i32 %.06174, 1
  %exitcond76.not = icmp eq i32 %.06174, %12
  br i1 %exitcond76.not, label %.thread, label %40, !llvm.loop !15

.thread:                                          ; preds = %40, %.preheader, %4, %25
  %.sroa.059.069 = phi <2 x float> [ %.sroa.059.0, %25 ], [ %.sroa.059.0.copyload, %4 ], [ %.sroa.059.0, %.preheader ], [ %.sroa.059.0, %40 ]
  ret <2 x float> %.sroa.059.069
}

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 = { 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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


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