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

; 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
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @GuiSetStyle(i32 noundef, i32 noundef, i32 noundef) #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) #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @GuiButton(<2 x float>, <2 x float>, ptr noundef) #2

; 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: nounwind uwtable
declare hidden void @GuiDrawText(ptr noundef, <2 x float>, <2 x float>, i32 noundef, i32) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @GuiComboBox(<2 x float> %0, <2 x float> %1, ptr noundef %2, i32 noundef %3) #2 {
  %5 = alloca %struct.Rectangle, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.Rectangle, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %struct.Vector2, align 4
  %13 = alloca %struct.Color, align 1
  %14 = alloca %struct.Color, align 1
  %15 = alloca %struct.Color, align 1
  %16 = alloca %struct.Color, align 1
  %17 = alloca %struct.Rectangle, align 4
  %18 = alloca %struct.Color, align 1
  %19 = alloca %struct.Color, align 1
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %5, i32 0, i32 0
  store <2 x float> %0, ptr %22, align 4
  %23 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %5, i32 0, i32 1
  store <2 x float> %1, ptr %23, align 4
  store ptr %2, ptr %6, align 8, !tbaa !5
  store i32 %3, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %24 = load i32, ptr @guiState, align 4, !tbaa !9
  store i32 %24, ptr %8, align 4, !tbaa !9
  %25 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 16)
  %26 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 17)
  %27 = add nsw i32 %25, %26
  %28 = sitofp i32 %27 to float
  %29 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 2
  %30 = load float, ptr %29, align 4, !tbaa !11
  %31 = fsub float %30, %28
  store float %31, ptr %29, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #4
  %32 = getelementptr inbounds %struct.Rectangle, ptr %9, i32 0, i32 0
  %33 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 0
  %34 = load float, ptr %33, align 4, !tbaa !14
  %35 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 2
  %36 = load float, ptr %35, align 4, !tbaa !11
  %37 = fadd float %34, %36
  %38 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 17)
  %39 = sitofp i32 %38 to float
  %40 = fadd float %37, %39
  store float %40, ptr %32, align 4, !tbaa !14
  %41 = getelementptr inbounds %struct.Rectangle, ptr %9, i32 0, i32 1
  %42 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 1
  %43 = load float, ptr %42, align 4, !tbaa !15
  store float %43, ptr %41, align 4, !tbaa !15
  %44 = getelementptr inbounds %struct.Rectangle, ptr %9, i32 0, i32 2
  %45 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 16)
  %46 = sitofp i32 %45 to float
  store float %46, ptr %44, align 4, !tbaa !11
  %47 = getelementptr inbounds %struct.Rectangle, ptr %9, i32 0, i32 3
  %48 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 3
  %49 = load float, ptr %48, align 4, !tbaa !16
  store float %49, ptr %47, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = call ptr @GuiTextSplit(ptr noundef %50, ptr noundef %10, ptr noundef null)
  store ptr %51, ptr %11, align 8, !tbaa !5
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = icmp slt i32 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %64

55:                                               ; preds = %4
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = sub nsw i32 %57, 1
  %59 = icmp sgt i32 %56, %58
  br i1 %59, label %60, label %63

60:                                               ; preds = %55
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = sub nsw i32 %61, 1
  store i32 %62, ptr %7, align 4, !tbaa !9
  br label %63

63:                                               ; preds = %60, %55
  br label %64

64:                                               ; preds = %63, %54
  %65 = load i32, ptr %8, align 4, !tbaa !9
  %66 = icmp ne i32 %65, 3
  br i1 %66, label %67, label %104

67:                                               ; preds = %64
  %68 = load i8, ptr @guiLocked, align 1, !tbaa !17, !range !19, !noundef !20
  %69 = trunc i8 %68 to i1
  br i1 %69, label %104, label %70

70:                                               ; preds = %67
  %71 = load i32, ptr %10, align 4, !tbaa !9
  %72 = icmp sgt i32 %71, 1
  br i1 %72, label %73, label %104

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

81:                                               ; preds = %73
  %82 = load <2 x float>, ptr %12, align 4
  %83 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  %84 = load <2 x float>, ptr %83, align 4
  %85 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  %86 = load <2 x float>, ptr %85, align 4
  %87 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %82, <2 x float> %84, <2 x float> %86)
  br i1 %87, label %88, label %103

88:                                               ; preds = %81, %73
  %89 = call zeroext i1 @IsMouseButtonPressed(i32 noundef 0)
  br i1 %89, label %90, label %98

90:                                               ; preds = %88
  %91 = load i32, ptr %7, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %7, align 4, !tbaa !9
  %93 = load i32, ptr %7, align 4, !tbaa !9
  %94 = load i32, ptr %10, align 4, !tbaa !9
  %95 = icmp sge i32 %93, %94
  br i1 %95, label %96, label %97

96:                                               ; preds = %90
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %97

97:                                               ; preds = %96, %90
  br label %98

98:                                               ; preds = %97, %88
  %99 = call zeroext i1 @IsMouseButtonDown(i32 noundef 0)
  br i1 %99, label %100, label %101

100:                                              ; preds = %98
  store i32 2, ptr %8, align 4, !tbaa !9
  br label %102

101:                                              ; preds = %98
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %102

102:                                              ; preds = %101, %100
  br label %103

103:                                              ; preds = %102, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %104

104:                                              ; preds = %103, %70, %67, %64
  %105 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 12)
  %106 = load i32, ptr %8, align 4, !tbaa !9
  %107 = mul i32 %106, 3
  %108 = add i32 0, %107
  %109 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef %108)
  %110 = call i32 @GetColor(i32 noundef %109)
  store i32 %110, ptr %14, align 1
  %111 = load float, ptr @guiAlpha, align 4, !tbaa !21
  %112 = load i32, ptr %14, align 1
  %113 = call i32 @Fade(i32 %112, float noundef %111)
  store i32 %113, ptr %13, align 1
  %114 = load i32, ptr %8, align 4, !tbaa !9
  %115 = mul i32 %114, 3
  %116 = add i32 1, %115
  %117 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef %116)
  %118 = call i32 @GetColor(i32 noundef %117)
  store i32 %118, ptr %16, align 1
  %119 = load float, ptr @guiAlpha, align 4, !tbaa !21
  %120 = load i32, ptr %16, align 1
  %121 = call i32 @Fade(i32 %120, float noundef %119)
  store i32 %121, ptr %15, align 1
  %122 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %5, i32 0, i32 0
  %123 = load <2 x float>, ptr %122, align 4
  %124 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %5, i32 0, i32 1
  %125 = load <2 x float>, ptr %124, align 4
  %126 = load i32, ptr %13, align 1
  %127 = load i32, ptr %15, align 1
  call void @GuiDrawRectangle(<2 x float> %123, <2 x float> %125, i32 noundef %105, i32 %126, i32 %127)
  %128 = load ptr, ptr %11, align 8, !tbaa !5
  %129 = load i32, ptr %7, align 4, !tbaa !9
  %130 = sext i32 %129 to i64
  %131 = getelementptr inbounds ptr, ptr %128, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  %133 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %5, i32 0, i32 0
  %134 = load <2 x float>, ptr %133, align 4
  %135 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %5, i32 0, i32 1
  %136 = load <2 x float>, ptr %135, align 4
  %137 = call { <2 x float>, <2 x float> } @GetTextBounds(i32 noundef 7, <2 x float> %134, <2 x float> %136)
  %138 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 0
  %139 = extractvalue { <2 x float>, <2 x float> } %137, 0
  store <2 x float> %139, ptr %138, align 4
  %140 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 1
  %141 = extractvalue { <2 x float>, <2 x float> } %137, 1
  store <2 x float> %141, ptr %140, align 4
  %142 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 14)
  %143 = load i32, ptr %8, align 4, !tbaa !9
  %144 = mul i32 %143, 3
  %145 = add i32 2, %144
  %146 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef %145)
  %147 = call i32 @GetColor(i32 noundef %146)
  store i32 %147, ptr %19, align 1
  %148 = load float, ptr @guiAlpha, align 4, !tbaa !21
  %149 = load i32, ptr %19, align 1
  %150 = call i32 @Fade(i32 %149, float noundef %148)
  store i32 %150, ptr %18, align 1
  %151 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 0
  %152 = load <2 x float>, ptr %151, align 4
  %153 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 1
  %154 = load <2 x float>, ptr %153, align 4
  %155 = load i32, ptr %18, align 1
  call void @GuiDrawText(ptr noundef %132, <2 x float> %152, <2 x float> %154, i32 noundef %142, i32 %155)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  %156 = call i32 @GuiGetStyle(i32 noundef 2, i32 noundef 12)
  store i32 %156, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  %157 = call i32 @GuiGetStyle(i32 noundef 2, i32 noundef 14)
  store i32 %157, ptr %21, align 4, !tbaa !9
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 12, i32 noundef 1)
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 14, i32 noundef 1)
  %158 = load i32, ptr %7, align 4, !tbaa !9
  %159 = add nsw i32 %158, 1
  %160 = load i32, ptr %10, align 4, !tbaa !9
  %161 = call ptr (ptr, ...) @TextFormat(ptr noundef @.str, i32 noundef %159, i32 noundef %160)
  %162 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 0
  %163 = load <2 x float>, ptr %162, align 4
  %164 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %9, i32 0, i32 1
  %165 = load <2 x float>, ptr %164, align 4
  %166 = call zeroext i1 @GuiButton(<2 x float> %163, <2 x float> %165, ptr noundef %161)
  %167 = load i32, ptr %21, align 4, !tbaa !9
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 14, i32 noundef %167)
  %168 = load i32, ptr %20, align 4, !tbaa !9
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 12, i32 noundef %168)
  %169 = load i32, ptr %7, align 4, !tbaa !9
  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 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  ret i32 %169
}

declare zeroext i1 @IsMouseButtonPressed(i32 noundef) #3

declare ptr @TextFormat(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 nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"Rectangle", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !13, i64 0}
!15 = !{!12, !13, i64 4}
!16 = !{!12, !13, i64 12}
!17 = !{!18, !18, i64 0}
!18 = !{!"_Bool", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!13, !13, i64 0}


; 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
@.str = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @GuiSetStyle(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 @GuiGetStyle(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @GuiButton(<2 x float>, <2 x float>, ptr noundef) local_unnamed_addr #2

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

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

declare i32 @GetColor(i32 noundef) local_unnamed_addr #3

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden { <2 x float>, <2 x float> } @GetTextBounds(i32 noundef, <2 x float>, <2 x float>) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local i32 @GuiComboBox(<2 x float> %0, <2 x float> %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca i32, align 4
  %6 = load i32, ptr @guiState, align 4, !tbaa !5
  %7 = tail call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 16)
  %8 = tail call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 17)
  %9 = add nsw i32 %8, %7
  %10 = sitofp i32 %9 to float
  %.sroa.632.8.vec.extract = extractelement <2 x float> %1, i64 0
  %11 = fsub float %.sroa.632.8.vec.extract, %10
  %.sroa.632.8.vec.insert = insertelement <2 x float> %1, float %11, i64 0
  %.sroa.028.0.vec.extract = extractelement <2 x float> %0, i64 0
  %12 = fadd float %.sroa.028.0.vec.extract, %11
  %13 = tail call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 17)
  %14 = sitofp i32 %13 to float
  %15 = fadd float %12, %14
  %.sroa.011.4.vec.insert = insertelement <2 x float> %0, float %15, i64 0
  %16 = tail call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 16)
  %17 = sitofp i32 %16 to float
  %.sroa.6.12.vec.insert = insertelement <2 x float> %1, float %17, i64 0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  store i32 0, ptr %5, align 4, !tbaa !5
  %18 = call ptr @GuiTextSplit(ptr noundef %2, ptr noundef nonnull %5, ptr noundef null)
  %19 = icmp slt i32 %3, 0
  %20 = load i32, ptr %5, align 4
  %.not45 = icmp sgt i32 %20, %3
  %21 = add nsw i32 %20, -1
  %spec.select = select i1 %.not45, i32 %3, i32 %21
  %.0 = select i1 %19, i32 0, i32 %spec.select
  %.not46 = icmp eq i32 %6, 3
  br i1 %.not46, label %36, label %22

22:                                               ; preds = %4
  %23 = load i8, ptr @guiLocked, align 1, !tbaa !9, !range !11, !noundef !12
  %24 = trunc nuw i8 %23 to i1
  %25 = icmp slt i32 %20, 2
  %or.cond.not = select i1 %24, i1 true, i1 %25
  br i1 %or.cond.not, label %36, label %26

26:                                               ; preds = %22
  %27 = call <2 x float> @GetMousePosition() #4
  %28 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %27, <2 x float> %0, <2 x float> %.sroa.632.8.vec.insert) #4
  br i1 %28, label %31, label %29

29:                                               ; preds = %26
  %30 = call zeroext i1 @CheckCollisionPointRec(<2 x float> %27, <2 x float> %.sroa.011.4.vec.insert, <2 x float> %.sroa.6.12.vec.insert) #4
  br i1 %30, label %31, label %36

31:                                               ; preds = %29, %26
  %32 = call zeroext i1 @IsMouseButtonPressed(i32 noundef 0) #4
  %33 = add nsw i32 %.0, 1
  %34 = load i32, ptr %5, align 4
  %.not = icmp slt i32 %33, %34
  %spec.store.select = select i1 %.not, i32 %33, i32 0
  %.1 = select i1 %32, i32 %spec.store.select, i32 %.0
  %35 = call zeroext i1 @IsMouseButtonDown(i32 noundef 0) #4
  %spec.select48 = select i1 %35, i32 2, i32 1
  br label %36

36:                                               ; preds = %31, %29, %22, %4
  %.140 = phi i32 [ %6, %22 ], [ 3, %4 ], [ %6, %29 ], [ %spec.select48, %31 ]
  %.3 = phi i32 [ %.0, %22 ], [ %.0, %4 ], [ %.0, %29 ], [ %.1, %31 ]
  %37 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 12)
  %38 = mul i32 %.140, 3
  %39 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef %38)
  %40 = call i32 @GetColor(i32 noundef %39) #4
  %41 = load float, ptr @guiAlpha, align 4, !tbaa !13
  %42 = call i32 @Fade(i32 %40, float noundef %41) #4
  %43 = add i32 %38, 1
  %44 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef %43)
  %45 = call i32 @GetColor(i32 noundef %44) #4
  %46 = load float, ptr @guiAlpha, align 4, !tbaa !13
  %47 = call i32 @Fade(i32 %45, float noundef %46) #4
  call void @GuiDrawRectangle(<2 x float> %0, <2 x float> %.sroa.632.8.vec.insert, i32 noundef %37, i32 %42, i32 %47)
  %48 = sext i32 %.3 to i64
  %49 = getelementptr inbounds ptr, ptr %18, i64 %48
  %50 = load ptr, ptr %49, align 8, !tbaa !15
  %51 = call { <2 x float>, <2 x float> } @GetTextBounds(i32 noundef 7, <2 x float> %0, <2 x float> %.sroa.632.8.vec.insert)
  %52 = extractvalue { <2 x float>, <2 x float> } %51, 0
  %53 = extractvalue { <2 x float>, <2 x float> } %51, 1
  %54 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef 14)
  %55 = add i32 %38, 2
  %56 = call i32 @GuiGetStyle(i32 noundef 7, i32 noundef %55)
  %57 = call i32 @GetColor(i32 noundef %56) #4
  %58 = load float, ptr @guiAlpha, align 4, !tbaa !13
  %59 = call i32 @Fade(i32 %57, float noundef %58) #4
  call void @GuiDrawText(ptr noundef %50, <2 x float> %52, <2 x float> %53, i32 noundef %54, i32 %59)
  %60 = call i32 @GuiGetStyle(i32 noundef 2, i32 noundef 12)
  %61 = call i32 @GuiGetStyle(i32 noundef 2, i32 noundef 14)
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 12, i32 noundef 1)
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 14, i32 noundef 1)
  %62 = add nsw i32 %.3, 1
  %63 = load i32, ptr %5, align 4, !tbaa !5
  %64 = call ptr (ptr, ...) @TextFormat(ptr noundef nonnull @.str, i32 noundef %62, i32 noundef %63) #4
  %65 = call zeroext i1 @GuiButton(<2 x float> %.sroa.011.4.vec.insert, <2 x float> %.sroa.6.12.vec.insert, ptr noundef %64)
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 14, i32 noundef %61)
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 12, i32 noundef %60)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  ret i32 %.3
}

declare zeroext i1 @IsMouseButtonPressed(i32 noundef) local_unnamed_addr #3

declare ptr @TextFormat(ptr noundef, ...) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!16, !16, i64 0}
!16 = !{!"any pointer", !7, i64 0}


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