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

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

@guiFont = external hidden global %struct.Font, align 8
@GuiTextInputBox.textEditMode = external hidden global 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 @GuiWindowBox(<2 x float>, <2 x float>, ptr noundef) #2

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

declare <2 x float> @MeasureTextEx(ptr noundef byval(%struct.Font) align 8, ptr noundef, float noundef, float noundef) #4

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @GuiTextInputBox(<2 x float> %0, <2 x float> %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #2 {
  %7 = alloca %struct.Rectangle, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca %struct.Rectangle, align 4
  %16 = alloca i32, align 4
  %17 = alloca %struct.Rectangle, align 4
  %18 = alloca %struct.Vector2, align 4
  %19 = alloca %struct.Rectangle, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 0
  store <2 x float> %0, ptr %23, align 4
  %24 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 1
  store <2 x float> %1, ptr %24, align 4
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  store ptr %5, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 -1, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = call ptr @GuiTextSplit(ptr noundef %25, ptr noundef %13, ptr noundef null)
  store ptr %26, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  call void @llvm.memset.p0.i64(ptr align 4 %15, i8 0, i64 16, i1 false)
  %27 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 0
  %28 = load float, ptr %27, align 4, !tbaa !11
  %29 = fadd float %28, 1.000000e+01
  %30 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 0
  store float %29, ptr %30, align 4, !tbaa !11
  %31 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 1
  %32 = load float, ptr %31, align 4, !tbaa !14
  %33 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 3
  %34 = load float, ptr %33, align 4, !tbaa !15
  %35 = fadd float %32, %34
  %36 = fsub float %35, 2.400000e+01
  %37 = fsub float %36, 1.000000e+01
  %38 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 1
  store float %37, ptr %38, align 4, !tbaa !14
  %39 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 2
  %40 = load float, ptr %39, align 4, !tbaa !16
  %41 = load i32, ptr %13, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  %43 = mul nsw i32 10, %42
  %44 = sitofp i32 %43 to float
  %45 = fsub float %40, %44
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = sitofp i32 %46 to float
  %48 = fdiv float %45, %47
  %49 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 2
  store float %48, ptr %49, align 4, !tbaa !16
  %50 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 3
  store float 2.400000e+01, ptr %50, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %51 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 3
  %52 = load float, ptr %51, align 4, !tbaa !15
  %53 = fsub float %52, 2.200000e+01
  %54 = call i32 @GuiGetStyle(i32 noundef 15, i32 noundef 12)
  %55 = sitofp i32 %54 to float
  %56 = fsub float %53, %55
  %57 = fsub float %56, 2.400000e+01
  %58 = fsub float %57, 2.000000e+01
  %59 = fptosi float %58 to i32
  store i32 %59, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  call void @llvm.memset.p0.i64(ptr align 4 %17, i8 0, i64 16, i1 false)
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = icmp ne ptr %60, null
  br i1 %61, label %62, label %96

62:                                               ; preds = %6
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %65 = sitofp i32 %64 to float
  %66 = call <2 x float> @MeasureTextEx(ptr noundef byval(%struct.Font) align 8 @guiFont, ptr noundef %63, float noundef %65, float noundef 1.000000e+00)
  store <2 x float> %66, ptr %18, align 4
  %67 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 0
  %68 = load float, ptr %67, align 4, !tbaa !11
  %69 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 2
  %70 = load float, ptr %69, align 4, !tbaa !16
  %71 = fdiv float %70, 2.000000e+00
  %72 = fadd float %68, %71
  %73 = getelementptr inbounds %struct.Vector2, ptr %18, i32 0, i32 0
  %74 = load float, ptr %73, align 4, !tbaa !17
  %75 = fdiv float %74, 2.000000e+00
  %76 = fsub float %72, %75
  %77 = getelementptr inbounds %struct.Rectangle, ptr %17, i32 0, i32 0
  store float %76, ptr %77, align 4, !tbaa !11
  %78 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 1
  %79 = load float, ptr %78, align 4, !tbaa !14
  %80 = fadd float %79, 2.200000e+01
  %81 = load i32, ptr %16, align 4, !tbaa !9
  %82 = sdiv i32 %81, 4
  %83 = sitofp i32 %82 to float
  %84 = fadd float %80, %83
  %85 = getelementptr inbounds %struct.Vector2, ptr %18, i32 0, i32 1
  %86 = load float, ptr %85, align 4, !tbaa !19
  %87 = fdiv float %86, 2.000000e+00
  %88 = fsub float %84, %87
  %89 = getelementptr inbounds %struct.Rectangle, ptr %17, i32 0, i32 1
  store float %88, ptr %89, align 4, !tbaa !14
  %90 = getelementptr inbounds %struct.Vector2, ptr %18, i32 0, i32 0
  %91 = load float, ptr %90, align 4, !tbaa !17
  %92 = getelementptr inbounds %struct.Rectangle, ptr %17, i32 0, i32 2
  store float %91, ptr %92, align 4, !tbaa !16
  %93 = getelementptr inbounds %struct.Vector2, ptr %18, i32 0, i32 1
  %94 = load float, ptr %93, align 4, !tbaa !19
  %95 = getelementptr inbounds %struct.Rectangle, ptr %17, i32 0, i32 3
  store float %94, ptr %95, align 4, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %96

96:                                               ; preds = %62, %6
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  call void @llvm.memset.p0.i64(ptr align 4 %19, i8 0, i64 16, i1 false)
  %97 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 0
  %98 = load float, ptr %97, align 4, !tbaa !11
  %99 = fadd float %98, 1.000000e+01
  %100 = getelementptr inbounds %struct.Rectangle, ptr %19, i32 0, i32 0
  store float %99, ptr %100, align 4, !tbaa !11
  %101 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 1
  %102 = load float, ptr %101, align 4, !tbaa !14
  %103 = fadd float %102, 2.200000e+01
  %104 = fsub float %103, 1.500000e+01
  %105 = getelementptr inbounds %struct.Rectangle, ptr %19, i32 0, i32 1
  store float %104, ptr %105, align 4, !tbaa !14
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = icmp eq ptr %106, null
  br i1 %107, label %108, label %115

108:                                              ; preds = %96
  %109 = load i32, ptr %16, align 4, !tbaa !9
  %110 = sdiv i32 %109, 2
  %111 = sitofp i32 %110 to float
  %112 = getelementptr inbounds %struct.Rectangle, ptr %19, i32 0, i32 1
  %113 = load float, ptr %112, align 4, !tbaa !14
  %114 = fadd float %113, %111
  store float %114, ptr %112, align 4, !tbaa !14
  br label %125

115:                                              ; preds = %96
  %116 = load i32, ptr %16, align 4, !tbaa !9
  %117 = sdiv i32 %116, 2
  %118 = load i32, ptr %16, align 4, !tbaa !9
  %119 = sdiv i32 %118, 4
  %120 = add nsw i32 %117, %119
  %121 = sitofp i32 %120 to float
  %122 = getelementptr inbounds %struct.Rectangle, ptr %19, i32 0, i32 1
  %123 = load float, ptr %122, align 4, !tbaa !14
  %124 = fadd float %123, %121
  store float %124, ptr %122, align 4, !tbaa !14
  br label %125

125:                                              ; preds = %115, %108
  %126 = getelementptr inbounds %struct.Rectangle, ptr %7, i32 0, i32 2
  %127 = load float, ptr %126, align 4, !tbaa !16
  %128 = fsub float %127, 2.000000e+01
  %129 = getelementptr inbounds %struct.Rectangle, ptr %19, i32 0, i32 2
  store float %128, ptr %129, align 4, !tbaa !16
  %130 = getelementptr inbounds %struct.Rectangle, ptr %19, i32 0, i32 3
  store float 3.000000e+01, ptr %130, align 4, !tbaa !15
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 0
  %133 = load <2 x float>, ptr %132, align 4
  %134 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %7, i32 0, i32 1
  %135 = load <2 x float>, ptr %134, align 4
  %136 = call zeroext i1 @GuiWindowBox(<2 x float> %133, <2 x float> %135, ptr noundef %131)
  br i1 %136, label %137, label %138

137:                                              ; preds = %125
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %138

138:                                              ; preds = %137, %125
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = icmp ne ptr %139, null
  br i1 %140, label %141, label %149

141:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %142 = call i32 @GuiGetStyle(i32 noundef 1, i32 noundef 14)
  store i32 %142, ptr %20, align 4, !tbaa !9
  call void @GuiSetStyle(i32 noundef 1, i32 noundef 14, i32 noundef 1)
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 0
  %145 = load <2 x float>, ptr %144, align 4
  %146 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %17, i32 0, i32 1
  %147 = load <2 x float>, ptr %146, align 4
  call void @GuiLabel(<2 x float> %145, <2 x float> %147, ptr noundef %143)
  %148 = load i32, ptr %20, align 4, !tbaa !9
  call void @GuiSetStyle(i32 noundef 1, i32 noundef 14, i32 noundef %148)
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %149

149:                                              ; preds = %141, %138
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  %151 = load i8, ptr @GuiTextInputBox.textEditMode, align 1, !tbaa !20, !range !22, !noundef !23
  %152 = trunc i8 %151 to i1
  %153 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %19, i32 0, i32 0
  %154 = load <2 x float>, ptr %153, align 4
  %155 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %19, i32 0, i32 1
  %156 = load <2 x float>, ptr %155, align 4
  %157 = call zeroext i1 @GuiTextBox(<2 x float> %154, <2 x float> %156, ptr noundef %150, i32 noundef 256, i1 noundef zeroext %152)
  br i1 %157, label %158, label %163

158:                                              ; preds = %149
  %159 = load i8, ptr @GuiTextInputBox.textEditMode, align 1, !tbaa !20, !range !22, !noundef !23
  %160 = trunc i8 %159 to i1
  %161 = xor i1 %160, true
  %162 = zext i1 %161 to i8
  store i8 %162, ptr @GuiTextInputBox.textEditMode, align 1, !tbaa !20
  br label %163

163:                                              ; preds = %158, %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %164 = call i32 @GuiGetStyle(i32 noundef 2, i32 noundef 14)
  store i32 %164, ptr %21, align 4, !tbaa !9
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 14, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %165

165:                                              ; preds = %191, %163
  %166 = load i32, ptr %22, align 4, !tbaa !9
  %167 = load i32, ptr %13, align 4, !tbaa !9
  %168 = icmp slt i32 %166, %167
  br i1 %168, label %170, label %169

169:                                              ; preds = %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %194

170:                                              ; preds = %165
  %171 = load ptr, ptr %14, align 8, !tbaa !5
  %172 = load i32, ptr %22, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds ptr, ptr %171, i64 %173
  %175 = load ptr, ptr %174, align 8, !tbaa !5
  %176 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %15, i32 0, i32 0
  %177 = load <2 x float>, ptr %176, align 4
  %178 = getelementptr inbounds { <2 x float>, <2 x float> }, ptr %15, i32 0, i32 1
  %179 = load <2 x float>, ptr %178, align 4
  %180 = call zeroext i1 @GuiButton(<2 x float> %177, <2 x float> %179, ptr noundef %175)
  br i1 %180, label %181, label %184

181:                                              ; preds = %170
  %182 = load i32, ptr %22, align 4, !tbaa !9
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %12, align 4, !tbaa !9
  br label %184

184:                                              ; preds = %181, %170
  %185 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 2
  %186 = load float, ptr %185, align 4, !tbaa !16
  %187 = fadd float %186, 1.000000e+01
  %188 = getelementptr inbounds %struct.Rectangle, ptr %15, i32 0, i32 0
  %189 = load float, ptr %188, align 4, !tbaa !11
  %190 = fadd float %189, %187
  store float %190, ptr %188, align 4, !tbaa !11
  br label %191

191:                                              ; preds = %184
  %192 = load i32, ptr %22, align 4, !tbaa !9
  %193 = add nsw i32 %192, 1
  store i32 %193, ptr %22, align 4, !tbaa !9
  br label %165, !llvm.loop !24

194:                                              ; preds = %169
  %195 = load i32, ptr %21, align 4, !tbaa !9
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 14, i32 noundef %195)
  %196 = load i32, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  ret i32 %196
}

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"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 0}
!12 = !{!"Rectangle", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !13, i64 4}
!15 = !{!12, !13, i64 12}
!16 = !{!12, !13, i64 8}
!17 = !{!18, !13, i64 0}
!18 = !{!"Vector2", !13, i64 0, !13, i64 4}
!19 = !{!18, !13, i64 4}
!20 = !{!21, !21, i64 0}
!21 = !{!"_Bool", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = distinct !{!24, !25}
!25 = !{!"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.Font = type { i32, i32, i32, %struct.Texture, ptr, ptr }
%struct.Texture = type { i32, i32, i32, i32, i32 }

@guiFont = external hidden global %struct.Font, align 8
@GuiTextInputBox.textEditMode = external hidden local_unnamed_addr global 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 @GuiWindowBox(<2 x float>, <2 x float>, ptr noundef) local_unnamed_addr #2

; 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 dso_local void @GuiLabel(<2 x float>, <2 x float>, ptr noundef) local_unnamed_addr #2

declare <2 x float> @MeasureTextEx(ptr noundef byval(%struct.Font) align 8, ptr noundef, float noundef, float noundef) local_unnamed_addr #3

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @GuiTextInputBox(<2 x float> %0, <2 x float> %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #2 {
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  %8 = call ptr @GuiTextSplit(ptr noundef %4, ptr noundef nonnull %7, ptr noundef null)
  %.sroa.043.0.vec.extract = extractelement <2 x float> %0, i64 0
  %9 = fadd float %.sroa.043.0.vec.extract, 1.000000e+01
  %.sroa.027.0.vec.insert = insertelement <2 x float> <float poison, float 0.000000e+00>, float %9, i64 0
  %.sroa.043.4.vec.extract = extractelement <2 x float> %0, i64 1
  %.sroa.853.12.vec.extract = extractelement <2 x float> %1, i64 1
  %10 = fadd float %.sroa.043.4.vec.extract, %.sroa.853.12.vec.extract
  %11 = fadd float %10, -2.400000e+01
  %12 = fadd float %11, -1.000000e+01
  %.sroa.027.4.vec.insert = insertelement <2 x float> %.sroa.027.0.vec.insert, float %12, i64 1
  %.sroa.853.8.vec.extract = extractelement <2 x float> %1, i64 0
  %13 = load i32, ptr %7, align 4, !tbaa !5
  %14 = mul i32 %13, 10
  %15 = add i32 %14, 10
  %16 = sitofp i32 %15 to float
  %17 = fsub float %.sroa.853.8.vec.extract, %16
  %18 = sitofp i32 %13 to float
  %19 = fdiv float %17, %18
  %.sroa.8.12.vec.insert = insertelement <2 x float> <float poison, float 2.400000e+01>, float %19, i64 0
  %20 = fadd float %.sroa.853.12.vec.extract, -2.200000e+01
  %21 = call i32 @GuiGetStyle(i32 noundef 15, i32 noundef 12)
  %22 = sitofp i32 %21 to float
  %23 = fsub float %20, %22
  %24 = fadd float %23, -2.400000e+01
  %25 = fadd float %24, -2.000000e+01
  %26 = fptosi float %25 to i32
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %27, label %30

27:                                               ; preds = %6
  %28 = fadd float %.sroa.043.4.vec.extract, 2.200000e+01
  %29 = sdiv i32 %26, 2
  br label %47

30:                                               ; preds = %6
  %31 = call i32 @GuiGetStyle(i32 noundef 0, i32 noundef 16)
  %32 = sitofp i32 %31 to float
  %33 = call <2 x float> @MeasureTextEx(ptr noundef nonnull byval(%struct.Font) align 8 @guiFont, ptr noundef nonnull %3, float noundef %32, float noundef 1.000000e+00) #4
  %34 = shufflevector <2 x float> %1, <2 x float> %0, <2 x i32> <i32 0, i32 3>
  %35 = fmul <2 x float> %34, <float 5.000000e-01, float poison>
  %36 = fadd <2 x float> %34, <float poison, float 2.200000e+01>
  %37 = shufflevector <2 x float> %35, <2 x float> %36, <2 x i32> <i32 0, i32 3>
  %38 = sdiv i32 %26, 4
  %39 = sitofp i32 %38 to float
  %40 = insertelement <2 x float> %0, float %39, i64 1
  %41 = fadd <2 x float> %40, %37
  %42 = fmul <2 x float> %33, <float 5.000000e-01, float 5.000000e-01>
  %43 = fsub <2 x float> %41, %42
  %44 = sdiv i32 %26, 2
  %45 = add nsw i32 %44, %38
  %46 = extractelement <2 x float> %36, i64 1
  br label %47

47:                                               ; preds = %30, %27
  %.sink = phi i32 [ %45, %30 ], [ %29, %27 ]
  %.sink77.in = phi float [ %46, %30 ], [ %28, %27 ]
  %.sroa.020.070 = phi <2 x float> [ %43, %30 ], [ zeroinitializer, %27 ]
  %.sroa.6.068 = phi <2 x float> [ %33, %30 ], [ zeroinitializer, %27 ]
  %.sink77 = fadd float %.sink77.in, -1.500000e+01
  %48 = sitofp i32 %.sink to float
  %49 = fadd float %.sink77, %48
  %.sroa.0.4.vec.insert13 = insertelement <2 x float> %.sroa.027.0.vec.insert, float %49, i64 1
  %50 = fadd float %.sroa.853.8.vec.extract, -2.000000e+01
  %.sroa.10.12.vec.insert = insertelement <2 x float> <float poison, float 3.000000e+01>, float %50, i64 0
  %51 = call zeroext i1 @GuiWindowBox(<2 x float> %0, <2 x float> %1, ptr noundef %2)
  %not. = xor i1 %51, true
  %spec.select = sext i1 %not. to i32
  br i1 %.not, label %54, label %52

52:                                               ; preds = %47
  %53 = call i32 @GuiGetStyle(i32 noundef 1, i32 noundef 14)
  call void @GuiSetStyle(i32 noundef 1, i32 noundef 14, i32 noundef 1)
  call void @GuiLabel(<2 x float> %.sroa.020.070, <2 x float> %.sroa.6.068, ptr noundef nonnull %3)
  call void @GuiSetStyle(i32 noundef 1, i32 noundef 14, i32 noundef %53)
  br label %54

54:                                               ; preds = %52, %47
  %55 = load i8, ptr @GuiTextInputBox.textEditMode, align 1, !tbaa !9, !range !11, !noundef !12
  %56 = trunc nuw i8 %55 to i1
  %57 = call zeroext i1 @GuiTextBox(<2 x float> %.sroa.0.4.vec.insert13, <2 x float> %.sroa.10.12.vec.insert, ptr noundef %5, i32 noundef 256, i1 noundef zeroext %56)
  br i1 %57, label %58, label %61

58:                                               ; preds = %54
  %59 = load i8, ptr @GuiTextInputBox.textEditMode, align 1, !tbaa !9, !range !11, !noundef !12
  %60 = xor i8 %59, 1
  store i8 %60, ptr @GuiTextInputBox.textEditMode, align 1, !tbaa !9
  br label %61

61:                                               ; preds = %58, %54
  %62 = call i32 @GuiGetStyle(i32 noundef 2, i32 noundef 14)
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 14, i32 noundef 1)
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = icmp sgt i32 %63, 0
  br i1 %64, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %61
  %65 = fadd float %19, 1.000000e+01
  br label %66

._crit_edge:                                      ; preds = %66, %61
  %.1.lcssa = phi i32 [ %spec.select, %61 ], [ %spec.select64, %66 ]
  call void @GuiSetStyle(i32 noundef 2, i32 noundef 14, i32 noundef %62)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  ret i32 %.1.lcssa

66:                                               ; preds = %.lr.ph, %66
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %66 ]
  %.174 = phi i32 [ %spec.select, %.lr.ph ], [ %spec.select64, %66 ]
  %.sroa.027.073 = phi <2 x float> [ %.sroa.027.4.vec.insert, %.lr.ph ], [ %.sroa.027.0.vec.insert31, %66 ]
  %67 = getelementptr inbounds ptr, ptr %8, i64 %indvars.iv
  %68 = load ptr, ptr %67, align 8, !tbaa !13
  %69 = call zeroext i1 @GuiButton(<2 x float> %.sroa.027.073, <2 x float> %.sroa.8.12.vec.insert, ptr noundef %68)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %70 = trunc nuw nsw i64 %indvars.iv.next to i32
  %spec.select64 = select i1 %69, i32 %70, i32 %.174
  %.sroa.027.0.vec.extract = extractelement <2 x float> %.sroa.027.073, i64 0
  %71 = fadd float %65, %.sroa.027.0.vec.extract
  %.sroa.027.0.vec.insert31 = insertelement <2 x float> %.sroa.027.073, float %71, i64 0
  %72 = load i32, ptr %7, align 4, !tbaa !5
  %73 = sext i32 %72 to i64
  %74 = icmp slt i64 %indvars.iv.next, %73
  br i1 %74, label %66, label %._crit_edge, !llvm.loop !15
}

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 = !{!"any pointer", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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