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

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

@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@__const.main.panelRec = external hidden unnamed_addr constant %struct.Rectangle, align 4
@__const.main.panelContentRec = external hidden unnamed_addr constant %struct.Rectangle, align 4
@__const.main.panelScroll = external hidden unnamed_addr constant %struct.Vector2, align 4
@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1

; 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

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

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @GuiScrollPanel(<2 x float>, <2 x float>, <2 x float>, <2 x float>, ptr noundef) #3

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

declare ptr @TextFormat(ptr noundef, ...) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %struct.Rectangle, align 4
  %5 = alloca %struct.Rectangle, align 4
  %6 = alloca %struct.Vector2, align 4
  %7 = alloca i8, align 1
  %8 = alloca %struct.Color, align 1
  %9 = alloca %struct.Color, align 1
  %10 = alloca %struct.Rectangle, align 4
  %11 = alloca %struct.Rectangle, align 4
  %12 = alloca %struct.Vector2, align 4
  %13 = alloca %struct.Color, align 1
  %14 = alloca %struct.Color, align 1
  %15 = alloca %struct.Rectangle, align 4
  %16 = alloca %struct.Rectangle, align 4
  %17 = alloca %struct.Rectangle, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 800, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 450, ptr %3, align 4, !tbaa !5
  call void @InitWindow(i32 noundef 800, i32 noundef 450, ptr noundef @.str.10)
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %4, ptr align 4 @__const.main.panelRec, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 @__const.main.panelContentRec, i64 16, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 @__const.main.panelScroll, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  store i8 1, ptr %7, align 1, !tbaa !9
  call void @SetTargetFPS(i32 noundef 60)
  br label %18

18:                                               ; preds = %115, %0
  %19 = call zeroext i1 @WindowShouldClose()
  %20 = xor i1 %19, true
  br i1 %20, label %21, label %156

21:                                               ; preds = %18
  call void @BeginDrawing()
  %22 = getelementptr inbounds %struct.Color, ptr %8, i32 0, i32 0
  store i8 -11, ptr %22, align 1, !tbaa !11
  %23 = getelementptr inbounds %struct.Color, ptr %8, i32 0, i32 1
  store i8 -11, ptr %23, align 1, !tbaa !13
  %24 = getelementptr inbounds %struct.Color, ptr %8, i32 0, i32 2
  store i8 -11, ptr %24, align 1, !tbaa !14
  %25 = getelementptr inbounds %struct.Color, ptr %8, i32 0, i32 3
  store i8 -1, ptr %25, align 1, !tbaa !15
  %26 = load i32, ptr %8, align 1
  call void @ClearBackground(i32 %26)
  %27 = getelementptr inbounds %struct.Vector2, ptr %6, i32 0, i32 0
  %28 = load float, ptr %27, align 4, !tbaa !16
  %29 = fpext float %28 to double
  %30 = getelementptr inbounds %struct.Vector2, ptr %6, i32 0, i32 1
  %31 = load float, ptr %30, align 4, !tbaa !19
  %32 = fpext float %31 to double
  %33 = call ptr (ptr, ...) @TextFormat(ptr noundef @.str.11, double noundef %29, double noundef %32)
  %34 = getelementptr inbounds %struct.Color, ptr %9, i32 0, i32 0
  store i8 -26, ptr %34, align 1, !tbaa !11
  %35 = getelementptr inbounds %struct.Color, ptr %9, i32 0, i32 1
  store i8 41, ptr %35, align 1, !tbaa !13
  %36 = getelementptr inbounds %struct.Color, ptr %9, i32 0, i32 2
  store i8 55, ptr %36, align 1, !tbaa !14
  %37 = getelementptr inbounds %struct.Color, ptr %9, i32 0, i32 3
  store i8 -1, ptr %37, align 1, !tbaa !15
  %38 = load i32, ptr %9, align 1
  call void @DrawText(ptr noundef %33, i32 noundef 4, i32 noundef 4, i32 noundef 20, i32 %38)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  %39 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 0
  %40 = load <2 x float>, ptr %39, align 4
  %41 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %4, i32 0, i32 1
  %42 = load <2 x float>, ptr %41, align 4
  %43 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %5, i32 0, i32 0
  %44 = load <2 x float>, ptr %43, align 4
  %45 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %5, i32 0, i32 1
  %46 = load <2 x float>, ptr %45, align 4
  %47 = call { <2 x float>, <2 x float> } @GuiScrollPanel(<2 x float> %40, <2 x float> %42, <2 x float> %44, <2 x float> %46, ptr noundef %6)
  %48 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %10, i32 0, i32 0
  %49 = extractvalue { <2 x float>, <2 x float> } %47, 0
  store <2 x float> %49, ptr %48, align 4
  %50 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %10, i32 0, i32 1
  %51 = extractvalue { <2 x float>, <2 x float> } %47, 1
  store <2 x float> %51, ptr %50, align 4
  %52 = getelementptr inbounds %struct.Rectangle, ptr %10, i32 0, i32 0
  %53 = load float, ptr %52, align 4, !tbaa !20
  %54 = fptosi float %53 to i32
  %55 = getelementptr inbounds %struct.Rectangle, ptr %10, i32 0, i32 1
  %56 = load float, ptr %55, align 4, !tbaa !22
  %57 = fptosi float %56 to i32
  %58 = getelementptr inbounds %struct.Rectangle, ptr %10, i32 0, i32 2
  %59 = load float, ptr %58, align 4, !tbaa !23
  %60 = fptosi float %59 to i32
  %61 = getelementptr inbounds %struct.Rectangle, ptr %10, i32 0, i32 3
  %62 = load float, ptr %61, align 4, !tbaa !24
  %63 = fptosi float %62 to i32
  call void @BeginScissorMode(i32 noundef %54, i32 noundef %57, i32 noundef %60, i32 noundef %63)
  %64 = getelementptr inbounds %struct.Rectangle, ptr %11, i32 0, i32 0
  %65 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 0
  %66 = load float, ptr %65, align 4, !tbaa !20
  %67 = getelementptr inbounds %struct.Vector2, ptr %6, i32 0, i32 0
  %68 = load float, ptr %67, align 4, !tbaa !16
  %69 = fadd float %66, %68
  store float %69, ptr %64, align 4, !tbaa !20
  %70 = getelementptr inbounds %struct.Rectangle, ptr %11, i32 0, i32 1
  %71 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 1
  %72 = load float, ptr %71, align 4, !tbaa !22
  %73 = getelementptr inbounds %struct.Vector2, ptr %6, i32 0, i32 1
  %74 = load float, ptr %73, align 4, !tbaa !19
  %75 = fadd float %72, %74
  store float %75, ptr %70, align 4, !tbaa !22
  %76 = getelementptr inbounds %struct.Rectangle, ptr %11, i32 0, i32 2
  %77 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 2
  %78 = load float, ptr %77, align 4, !tbaa !23
  store float %78, ptr %76, align 4, !tbaa !23
  %79 = getelementptr inbounds %struct.Rectangle, ptr %11, i32 0, i32 3
  %80 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 3
  %81 = load float, ptr %80, align 4, !tbaa !24
  store float %81, ptr %79, align 4, !tbaa !24
  %82 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %11, i32 0, i32 0
  %83 = load <2 x float>, ptr %82, align 4
  %84 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %11, i32 0, i32 1
  %85 = load <2 x float>, ptr %84, align 4
  %86 = call <2 x float> @GuiGrid(<2 x float> %83, <2 x float> %85, float noundef 1.600000e+01, i32 noundef 3)
  store <2 x float> %86, ptr %12, align 4
  call void @EndScissorMode()
  %87 = load i8, ptr %7, align 1, !tbaa !9, !range !25, !noundef !26
  %88 = trunc i8 %87 to i1
  br i1 %88, label %89, label %115

89:                                               ; preds = %21
  %90 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 0
  %91 = load float, ptr %90, align 4, !tbaa !20
  %92 = getelementptr inbounds %struct.Vector2, ptr %6, i32 0, i32 0
  %93 = load float, ptr %92, align 4, !tbaa !16
  %94 = fadd float %91, %93
  %95 = fptosi float %94 to i32
  %96 = getelementptr inbounds %struct.Rectangle, ptr %4, i32 0, i32 1
  %97 = load float, ptr %96, align 4, !tbaa !22
  %98 = getelementptr inbounds %struct.Vector2, ptr %6, i32 0, i32 1
  %99 = load float, ptr %98, align 4, !tbaa !19
  %100 = fadd float %97, %99
  %101 = fptosi float %100 to i32
  %102 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 2
  %103 = load float, ptr %102, align 4, !tbaa !23
  %104 = fptosi float %103 to i32
  %105 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 3
  %106 = load float, ptr %105, align 4, !tbaa !24
  %107 = fptosi float %106 to i32
  %108 = getelementptr inbounds %struct.Color, ptr %14, i32 0, i32 0
  store i8 -26, ptr %108, align 1, !tbaa !11
  %109 = getelementptr inbounds %struct.Color, ptr %14, i32 0, i32 1
  store i8 41, ptr %109, align 1, !tbaa !13
  %110 = getelementptr inbounds %struct.Color, ptr %14, i32 0, i32 2
  store i8 55, ptr %110, align 1, !tbaa !14
  %111 = getelementptr inbounds %struct.Color, ptr %14, i32 0, i32 3
  store i8 -1, ptr %111, align 1, !tbaa !15
  %112 = load i32, ptr %14, align 1
  %113 = call i32 @Fade(i32 %112, float noundef 0x3FB99999A0000000)
  store i32 %113, ptr %13, align 1
  %114 = load i32, ptr %13, align 1
  call void @DrawRectangle(i32 noundef %95, i32 noundef %101, i32 noundef %104, i32 noundef %107, i32 %114)
  br label %115

115:                                              ; preds = %89, %21
  call void @DrawStyleEditControls()
  %116 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 0
  store float 5.650000e+02, ptr %116, align 4, !tbaa !20
  %117 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 1
  store float 8.000000e+01, ptr %117, align 4, !tbaa !22
  %118 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 2
  store float 2.000000e+01, ptr %118, align 4, !tbaa !23
  %119 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 3
  store float 2.000000e+01, ptr %119, align 4, !tbaa !24
  %120 = load i8, ptr %7, align 1, !tbaa !9, !range !25, !noundef !26
  %121 = trunc i8 %120 to i1
  %122 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %15, i32 0, i32 0
  %123 = load <2 x float>, ptr %122, align 4
  %124 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %15, i32 0, i32 1
  %125 = load <2 x float>, ptr %124, align 4
  %126 = call zeroext i1 @GuiCheckBox(<2 x float> %123, <2 x float> %125, ptr noundef @.str.12, i1 noundef zeroext %121)
  %127 = zext i1 %126 to i8
  store i8 %127, ptr %7, align 1, !tbaa !9
  %128 = getelementptr inbounds %struct.Rectangle, ptr %16, i32 0, i32 0
  store float 5.900000e+02, ptr %128, align 4, !tbaa !20
  %129 = getelementptr inbounds %struct.Rectangle, ptr %16, i32 0, i32 1
  store float 3.850000e+02, ptr %129, align 4, !tbaa !22
  %130 = getelementptr inbounds %struct.Rectangle, ptr %16, i32 0, i32 2
  store float 1.450000e+02, ptr %130, align 4, !tbaa !23
  %131 = getelementptr inbounds %struct.Rectangle, ptr %16, i32 0, i32 3
  store float 1.500000e+01, ptr %131, align 4, !tbaa !24
  %132 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 2
  %133 = load float, ptr %132, align 4, !tbaa !23
  %134 = fptosi float %133 to i32
  %135 = call ptr (ptr, ...) @TextFormat(ptr noundef @.str.4, i32 noundef %134)
  %136 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %16, i32 0, i32 0
  %137 = load <2 x float>, ptr %136, align 4
  %138 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %16, i32 0, i32 1
  %139 = load <2 x float>, ptr %138, align 4
  %140 = call float @GuiSliderBar(<2 x float> %137, <2 x float> %139, ptr noundef @.str.13, ptr noundef %135, float noundef 1.000000e+00, float noundef 6.000000e+02, float noundef 1.000000e+00)
  %141 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 2
  store float %140, ptr %141, align 4, !tbaa !23
  %142 = getelementptr inbounds %struct.Rectangle, ptr %17, i32 0, i32 0
  store float 5.900000e+02, ptr %142, align 4, !tbaa !20
  %143 = getelementptr inbounds %struct.Rectangle, ptr %17, i32 0, i32 1
  store float 4.100000e+02, ptr %143, align 4, !tbaa !22
  %144 = getelementptr inbounds %struct.Rectangle, ptr %17, i32 0, i32 2
  store float 1.450000e+02, ptr %144, align 4, !tbaa !23
  %145 = getelementptr inbounds %struct.Rectangle, ptr %17, i32 0, i32 3
  store float 1.500000e+01, ptr %145, align 4, !tbaa !24
  %146 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 3
  %147 = load float, ptr %146, align 4, !tbaa !24
  %148 = fptosi float %147 to i32
  %149 = call ptr (ptr, ...) @TextFormat(ptr noundef @.str.4, i32 noundef %148)
  %150 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 0
  %151 = load <2 x float>, ptr %150, align 4
  %152 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 1
  %153 = load <2 x float>, ptr %152, align 4
  %154 = call float @GuiSliderBar(<2 x float> %151, <2 x float> %153, ptr noundef @.str.14, ptr noundef %149, float noundef 1.000000e+00, float noundef 4.000000e+02, float noundef 1.000000e+00)
  %155 = getelementptr inbounds %struct.Rectangle, ptr %5, i32 0, i32 3
  store float %154, ptr %155, align 4, !tbaa !24
  call void @EndDrawing()
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  br label %18, !llvm.loop !27

156:                                              ; preds = %18
  call void @CloseWindow()
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  ret i32 0
}

declare void @InitWindow(i32 noundef, i32 noundef, ptr noundef) #2

declare void @SetTargetFPS(i32 noundef) #2

declare zeroext i1 @WindowShouldClose() #2

declare void @BeginDrawing() #2

declare void @ClearBackground(i32) #2

declare void @DrawText(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32) #2

declare void @BeginScissorMode(i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare void @EndScissorMode() #2

declare void @DrawRectangle(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32) #2

; Function Attrs: nounwind uwtable
declare hidden void @DrawStyleEditControls() #3

declare void @EndDrawing() #2

declare void @CloseWindow() #2

attributes #0 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 = !{!12, !7, i64 0}
!12 = !{!"Color", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3}
!13 = !{!12, !7, i64 1}
!14 = !{!12, !7, i64 2}
!15 = !{!12, !7, i64 3}
!16 = !{!17, !18, i64 0}
!17 = !{!"Vector2", !18, i64 0, !18, i64 4}
!18 = !{!"float", !7, i64 0}
!19 = !{!17, !18, i64 4}
!20 = !{!21, !18, i64 0}
!21 = !{!"Rectangle", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12}
!22 = !{!21, !18, i64 4}
!23 = !{!21, !18, i64 8}
!24 = !{!21, !18, i64 12}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


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

@.str.4 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [26 x i8], align 1
@__const.main.panelRec = external hidden unnamed_addr constant %struct.Rectangle, align 4
@__const.main.panelContentRec = external hidden unnamed_addr constant %struct.Rectangle, align 4
@__const.main.panelScroll = external hidden unnamed_addr constant %struct.Vector2, align 4
@.str.11 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [7 x i8], align 1

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local { <2 x float>, <2 x float> } @GuiScrollPanel(<2 x float>, <2 x float>, <2 x float>, <2 x float>, ptr noundef) local_unnamed_addr #2

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

declare ptr @TextFormat(ptr noundef, ...) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca %struct.Vector2, align 8
  tail call void @InitWindow(i32 noundef 800, i32 noundef 450, ptr noundef nonnull @.str.10) #3
  %.sroa.042.0.copyload = load <2 x float>, ptr @__const.main.panelRec, align 4
  %.sroa.8.0.copyload = load <2 x float>, ptr getelementptr inbounds (i8, ptr @__const.main.panelRec, i64 8), align 4
  %.sroa.029.0.copyload = load <2 x float>, ptr @__const.main.panelContentRec, align 4
  %.sroa.430.0.copyload = load <2 x float>, ptr getelementptr inbounds (i8, ptr @__const.main.panelContentRec, i64 8), align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #3
  %2 = load i64, ptr @__const.main.panelScroll, align 4
  store i64 %2, ptr %1, align 8
  tail call void @SetTargetFPS(i32 noundef 60) #3
  %3 = tail call zeroext i1 @WindowShouldClose() #3
  br i1 %3, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %0
  %4 = getelementptr inbounds i8, ptr %1, i64 4
  %5 = extractelement <2 x float> %.sroa.042.0.copyload, i64 0
  %6 = extractelement <2 x float> %.sroa.042.0.copyload, i64 1
  br label %7

7:                                                ; preds = %.lr.ph, %35
  %.sroa.430.049 = phi <2 x float> [ %.sroa.430.0.copyload, %.lr.ph ], [ %.sroa.430.12.vec.insert, %35 ]
  %.048 = phi i1 [ true, %.lr.ph ], [ %37, %35 ]
  call void @BeginDrawing() #3
  call void @ClearBackground(i32 -657931) #3
  %8 = load float, ptr %1, align 8, !tbaa !5
  %9 = fpext float %8 to double
  %10 = load float, ptr %4, align 4, !tbaa !10
  %11 = fpext float %10 to double
  %12 = call ptr (ptr, ...) @TextFormat(ptr noundef nonnull @.str.11, double noundef %9, double noundef %11) #3
  call void @DrawText(ptr noundef %12, i32 noundef 4, i32 noundef 4, i32 noundef 20, i32 -13162010) #3
  %13 = call { <2 x float>, <2 x float> } @GuiScrollPanel(<2 x float> %.sroa.042.0.copyload, <2 x float> %.sroa.8.0.copyload, <2 x float> %.sroa.029.0.copyload, <2 x float> %.sroa.430.049, ptr noundef nonnull %1)
  %14 = extractvalue { <2 x float>, <2 x float> } %13, 0
  %15 = extractvalue { <2 x float>, <2 x float> } %13, 1
  %.sroa.019.0.vec.extract = extractelement <2 x float> %14, i64 0
  %16 = fptosi float %.sroa.019.0.vec.extract to i32
  %.sroa.019.4.vec.extract = extractelement <2 x float> %14, i64 1
  %17 = fptosi float %.sroa.019.4.vec.extract to i32
  %.sroa.5.8.vec.extract = extractelement <2 x float> %15, i64 0
  %18 = fptosi float %.sroa.5.8.vec.extract to i32
  %.sroa.5.12.vec.extract = extractelement <2 x float> %15, i64 1
  %19 = fptosi float %.sroa.5.12.vec.extract to i32
  call void @BeginScissorMode(i32 noundef %16, i32 noundef %17, i32 noundef %18, i32 noundef %19) #3
  %20 = load <2 x float>, ptr %1, align 8, !tbaa !11
  %21 = fadd <2 x float> %.sroa.042.0.copyload, %20
  %22 = call <2 x float> @GuiGrid(<2 x float> %21, <2 x float> %.sroa.430.049, float noundef 1.600000e+01, i32 noundef 3)
  call void @EndScissorMode() #3
  br i1 %.048, label %24, label %._crit_edge50

._crit_edge50:                                    ; preds = %7
  %23 = fptosi <2 x float> %.sroa.430.049 to <2 x i32>
  br label %35

24:                                               ; preds = %7
  %25 = load float, ptr %1, align 8, !tbaa !5
  %26 = fadd float %5, %25
  %27 = fptosi float %26 to i32
  %28 = load float, ptr %4, align 4, !tbaa !10
  %29 = fadd float %6, %28
  %30 = fptosi float %29 to i32
  %31 = fptosi <2 x float> %.sroa.430.049 to <2 x i32>
  %32 = call i32 @Fade(i32 -13162010, float noundef 0x3FB99999A0000000) #3
  %33 = extractelement <2 x i32> %31, i64 0
  %34 = extractelement <2 x i32> %31, i64 1
  call void @DrawRectangle(i32 noundef %27, i32 noundef %30, i32 noundef %33, i32 noundef %34, i32 %32) #3
  br label %35

35:                                               ; preds = %._crit_edge50, %24
  %36 = phi <2 x i32> [ %23, %._crit_edge50 ], [ %31, %24 ]
  call void @DrawStyleEditControls()
  %37 = call zeroext i1 @GuiCheckBox(<2 x float> <float 5.650000e+02, float 8.000000e+01>, <2 x float> <float 2.000000e+01, float 2.000000e+01>, ptr noundef nonnull @.str.12, i1 noundef zeroext %.048)
  %38 = extractelement <2 x i32> %36, i64 0
  %39 = call ptr (ptr, ...) @TextFormat(ptr noundef nonnull @.str.4, i32 noundef %38) #3
  %40 = call float @GuiSliderBar(<2 x float> <float 5.900000e+02, float 3.850000e+02>, <2 x float> <float 1.450000e+02, float 1.500000e+01>, ptr noundef nonnull @.str.13, ptr noundef %39, float noundef 1.000000e+00, float noundef 6.000000e+02, float noundef 1.000000e+00)
  %.sroa.430.8.vec.insert = insertelement <2 x float> poison, float %40, i64 0
  %41 = extractelement <2 x i32> %36, i64 1
  %42 = call ptr (ptr, ...) @TextFormat(ptr noundef nonnull @.str.4, i32 noundef %41) #3
  %43 = call float @GuiSliderBar(<2 x float> <float 5.900000e+02, float 4.100000e+02>, <2 x float> <float 1.450000e+02, float 1.500000e+01>, ptr noundef nonnull @.str.14, ptr noundef %42, float noundef 1.000000e+00, float noundef 4.000000e+02, float noundef 1.000000e+00)
  %.sroa.430.12.vec.insert = insertelement <2 x float> %.sroa.430.8.vec.insert, float %43, i64 1
  call void @EndDrawing() #3
  %44 = call zeroext i1 @WindowShouldClose() #3
  br i1 %44, label %._crit_edge, label %7, !llvm.loop !12

._crit_edge:                                      ; preds = %35, %0
  call void @CloseWindow() #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #3
  ret i32 0
}

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

declare void @SetTargetFPS(i32 noundef) local_unnamed_addr #1

declare zeroext i1 @WindowShouldClose() local_unnamed_addr #1

declare void @BeginDrawing() local_unnamed_addr #1

declare void @ClearBackground(i32) local_unnamed_addr #1

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

declare void @BeginScissorMode(i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @EndScissorMode() local_unnamed_addr #1

declare void @DrawRectangle(i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @DrawStyleEditControls() local_unnamed_addr #2

declare void @EndDrawing() local_unnamed_addr #1

declare void @CloseWindow() local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { 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, !7, i64 0}
!6 = !{!"Vector2", !7, i64 0, !7, i64 4}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass