; LLVM IR from godofecht/GANN-Object-Avoidance :: Box2D/Testbed/Framework (RenderGL3)

; 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.stbtt_fontinfo = type { ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.stbtt_bakedchar = type { i16, i16, i16, i16, float, float, float }

@.str.10 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@__PRETTY_FUNCTION__.stbtt_BakeFontBitmap = external hidden unnamed_addr constant [116 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @stbtt_InitFont(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @stbtt_FindGlyphIndex(ptr noundef, i32 noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @stbtt_GetGlyphHMetrics(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local float @stbtt_ScaleForPixelHeight(ptr noundef, float noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @stbtt_GetGlyphBitmapBox(ptr noundef, i32 noundef, float noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @stbtt_MakeGlyphBitmap(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, float noundef, i32 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local i32 @stbtt_BakeFontBitmap(ptr noundef %0, i32 noundef %1, float noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, ptr noundef %8) #1 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca float, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca float, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca %struct.stbtt_fontinfo, align 8
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store i32 %1, ptr %12, align 4, !tbaa !9
  store float %2, ptr %13, align 4, !tbaa !11
  store ptr %3, ptr %14, align 8, !tbaa !5
  store i32 %4, ptr %15, align 4, !tbaa !9
  store i32 %5, ptr %16, align 4, !tbaa !9
  store i32 %6, ptr %17, align 4, !tbaa !9
  store i32 %7, ptr %18, align 4, !tbaa !9
  store ptr %8, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 56, ptr %25) #5
  %36 = load ptr, ptr %11, align 8, !tbaa !5
  %37 = load i32, ptr %12, align 4, !tbaa !9
  %38 = call i32 @stbtt_InitFont(ptr noundef %25, ptr noundef %36, i32 noundef %37)
  %39 = load ptr, ptr %14, align 8, !tbaa !5
  %40 = load i32, ptr %15, align 4, !tbaa !9
  %41 = load i32, ptr %16, align 4, !tbaa !9
  %42 = mul nsw i32 %40, %41
  %43 = sext i32 %42 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %39, i8 0, i64 %43, i1 false)
  store i32 1, ptr %22, align 4, !tbaa !9
  store i32 1, ptr %21, align 4, !tbaa !9
  store i32 1, ptr %23, align 4, !tbaa !9
  %44 = load float, ptr %13, align 4, !tbaa !11
  %45 = call float @stbtt_ScaleForPixelHeight(ptr noundef %25, float noundef %44)
  store float %45, ptr %20, align 4, !tbaa !11
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %46

46:                                               ; preds = %191, %9
  %47 = load i32, ptr %24, align 4, !tbaa !9
  %48 = load i32, ptr %18, align 4, !tbaa !9
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %50, label %194

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  %51 = load i32, ptr %17, align 4, !tbaa !9
  %52 = load i32, ptr %24, align 4, !tbaa !9
  %53 = add nsw i32 %51, %52
  %54 = call i32 @stbtt_FindGlyphIndex(ptr noundef %25, i32 noundef %53)
  store i32 %54, ptr %34, align 4, !tbaa !9
  %55 = load i32, ptr %34, align 4, !tbaa !9
  call void @stbtt_GetGlyphHMetrics(ptr noundef %25, i32 noundef %55, ptr noundef %26, ptr noundef %27)
  %56 = load i32, ptr %34, align 4, !tbaa !9
  %57 = load float, ptr %20, align 4, !tbaa !11
  %58 = load float, ptr %20, align 4, !tbaa !11
  call void @stbtt_GetGlyphBitmapBox(ptr noundef %25, i32 noundef %56, float noundef %57, float noundef %58, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %31)
  %59 = load i32, ptr %30, align 4, !tbaa !9
  %60 = load i32, ptr %28, align 4, !tbaa !9
  %61 = sub nsw i32 %59, %60
  store i32 %61, ptr %32, align 4, !tbaa !9
  %62 = load i32, ptr %31, align 4, !tbaa !9
  %63 = load i32, ptr %29, align 4, !tbaa !9
  %64 = sub nsw i32 %62, %63
  store i32 %64, ptr %33, align 4, !tbaa !9
  %65 = load i32, ptr %21, align 4, !tbaa !9
  %66 = load i32, ptr %32, align 4, !tbaa !9
  %67 = add nsw i32 %65, %66
  %68 = add nsw i32 %67, 1
  %69 = load i32, ptr %15, align 4, !tbaa !9
  %70 = icmp sge i32 %68, %69
  br i1 %70, label %71, label %73

71:                                               ; preds = %50
  %72 = load i32, ptr %23, align 4, !tbaa !9
  store i32 %72, ptr %22, align 4, !tbaa !9
  store i32 1, ptr %21, align 4, !tbaa !9
  br label %73

73:                                               ; preds = %71, %50
  %74 = load i32, ptr %22, align 4, !tbaa !9
  %75 = load i32, ptr %33, align 4, !tbaa !9
  %76 = add nsw i32 %74, %75
  %77 = add nsw i32 %76, 1
  %78 = load i32, ptr %16, align 4, !tbaa !9
  %79 = icmp sge i32 %77, %78
  br i1 %79, label %80, label %83

80:                                               ; preds = %73
  %81 = load i32, ptr %24, align 4, !tbaa !9
  %82 = sub nsw i32 0, %81
  store i32 %82, ptr %10, align 4
  store i32 1, ptr %35, align 4
  br label %188

83:                                               ; preds = %73
  %84 = load i32, ptr %21, align 4, !tbaa !9
  %85 = load i32, ptr %32, align 4, !tbaa !9
  %86 = add nsw i32 %84, %85
  %87 = load i32, ptr %15, align 4, !tbaa !9
  %88 = icmp slt i32 %86, %87
  br i1 %88, label %89, label %90

89:                                               ; preds = %83
  br label %92

90:                                               ; preds = %83
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.10, i32 noundef 1870, ptr noundef @__PRETTY_FUNCTION__.stbtt_BakeFontBitmap) #6
  unreachable

91:                                               ; No predecessors!
  br label %92

92:                                               ; preds = %91, %89
  %93 = load i32, ptr %22, align 4, !tbaa !9
  %94 = load i32, ptr %33, align 4, !tbaa !9
  %95 = add nsw i32 %93, %94
  %96 = load i32, ptr %16, align 4, !tbaa !9
  %97 = icmp slt i32 %95, %96
  br i1 %97, label %98, label %99

98:                                               ; preds = %92
  br label %101

99:                                               ; preds = %92
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.10, i32 noundef 1871, ptr noundef @__PRETTY_FUNCTION__.stbtt_BakeFontBitmap) #6
  unreachable

100:                                              ; No predecessors!
  br label %101

101:                                              ; preds = %100, %98
  %102 = load ptr, ptr %14, align 8, !tbaa !5
  %103 = load i32, ptr %21, align 4, !tbaa !9
  %104 = sext i32 %103 to i64
  %105 = getelementptr inbounds i8, ptr %102, i64 %104
  %106 = load i32, ptr %22, align 4, !tbaa !9
  %107 = load i32, ptr %15, align 4, !tbaa !9
  %108 = mul nsw i32 %106, %107
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i8, ptr %105, i64 %109
  %111 = load i32, ptr %32, align 4, !tbaa !9
  %112 = load i32, ptr %33, align 4, !tbaa !9
  %113 = load i32, ptr %15, align 4, !tbaa !9
  %114 = load float, ptr %20, align 4, !tbaa !11
  %115 = load float, ptr %20, align 4, !tbaa !11
  %116 = load i32, ptr %34, align 4, !tbaa !9
  call void @stbtt_MakeGlyphBitmap(ptr noundef %25, ptr noundef %110, i32 noundef %111, i32 noundef %112, i32 noundef %113, float noundef %114, float noundef %115, i32 noundef %116)
  %117 = load i32, ptr %21, align 4, !tbaa !9
  %118 = trunc i32 %117 to i16
  %119 = load ptr, ptr %19, align 8, !tbaa !5
  %120 = load i32, ptr %24, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %119, i64 %121
  %123 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %122, i32 0, i32 0
  store i16 %118, ptr %123, align 4, !tbaa !13
  %124 = load i32, ptr %22, align 4, !tbaa !9
  %125 = trunc i32 %124 to i16
  %126 = load ptr, ptr %19, align 8, !tbaa !5
  %127 = load i32, ptr %24, align 4, !tbaa !9
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %126, i64 %128
  %130 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %129, i32 0, i32 1
  store i16 %125, ptr %130, align 2, !tbaa !16
  %131 = load i32, ptr %21, align 4, !tbaa !9
  %132 = load i32, ptr %32, align 4, !tbaa !9
  %133 = add nsw i32 %131, %132
  %134 = trunc i32 %133 to i16
  %135 = load ptr, ptr %19, align 8, !tbaa !5
  %136 = load i32, ptr %24, align 4, !tbaa !9
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %135, i64 %137
  %139 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %138, i32 0, i32 2
  store i16 %134, ptr %139, align 4, !tbaa !17
  %140 = load i32, ptr %22, align 4, !tbaa !9
  %141 = load i32, ptr %33, align 4, !tbaa !9
  %142 = add nsw i32 %140, %141
  %143 = trunc i32 %142 to i16
  %144 = load ptr, ptr %19, align 8, !tbaa !5
  %145 = load i32, ptr %24, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %144, i64 %146
  %148 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %147, i32 0, i32 3
  store i16 %143, ptr %148, align 2, !tbaa !18
  %149 = load float, ptr %20, align 4, !tbaa !11
  %150 = load i32, ptr %26, align 4, !tbaa !9
  %151 = sitofp i32 %150 to float
  %152 = fmul float %149, %151
  %153 = load ptr, ptr %19, align 8, !tbaa !5
  %154 = load i32, ptr %24, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %153, i64 %155
  %157 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %156, i32 0, i32 6
  store float %152, ptr %157, align 4, !tbaa !19
  %158 = load i32, ptr %28, align 4, !tbaa !9
  %159 = sitofp i32 %158 to float
  %160 = load ptr, ptr %19, align 8, !tbaa !5
  %161 = load i32, ptr %24, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %160, i64 %162
  %164 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %163, i32 0, i32 4
  store float %159, ptr %164, align 4, !tbaa !20
  %165 = load i32, ptr %29, align 4, !tbaa !9
  %166 = sitofp i32 %165 to float
  %167 = load ptr, ptr %19, align 8, !tbaa !5
  %168 = load i32, ptr %24, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %167, i64 %169
  %171 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %170, i32 0, i32 5
  store float %166, ptr %171, align 4, !tbaa !21
  %172 = load i32, ptr %21, align 4, !tbaa !9
  %173 = load i32, ptr %32, align 4, !tbaa !9
  %174 = add nsw i32 %172, %173
  %175 = add nsw i32 %174, 2
  store i32 %175, ptr %21, align 4, !tbaa !9
  %176 = load i32, ptr %22, align 4, !tbaa !9
  %177 = load i32, ptr %33, align 4, !tbaa !9
  %178 = add nsw i32 %176, %177
  %179 = add nsw i32 %178, 2
  %180 = load i32, ptr %23, align 4, !tbaa !9
  %181 = icmp sgt i32 %179, %180
  br i1 %181, label %182, label %187

182:                                              ; preds = %101
  %183 = load i32, ptr %22, align 4, !tbaa !9
  %184 = load i32, ptr %33, align 4, !tbaa !9
  %185 = add nsw i32 %183, %184
  %186 = add nsw i32 %185, 2
  store i32 %186, ptr %23, align 4, !tbaa !9
  br label %187

187:                                              ; preds = %182, %101
  store i32 0, ptr %35, align 4
  br label %188

188:                                              ; preds = %187, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  %189 = load i32, ptr %35, align 4
  switch i32 %189, label %196 [
    i32 0, label %190
  ]

190:                                              ; preds = %188
  br label %191

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

194:                                              ; preds = %46
  %195 = load i32, ptr %23, align 4, !tbaa !9
  store i32 %195, ptr %10, align 4
  store i32 1, ptr %35, align 4
  br label %196

196:                                              ; preds = %194, %188
  call void @llvm.lifetime.end.p0(i64 56, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  %197 = load i32, ptr %10, align 4
  ret i32 %197
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { mustprogress 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS15stbtt_bakedchar", !15, i64 0, !15, i64 2, !15, i64 4, !15, i64 6, !12, i64 8, !12, i64 12, !12, i64 16}
!15 = !{!"short", !7, i64 0}
!16 = !{!14, !15, i64 2}
!17 = !{!14, !15, i64 4}
!18 = !{!14, !15, i64 6}
!19 = !{!14, !12, i64 16}
!20 = !{!14, !12, i64 8}
!21 = !{!14, !12, i64 12}
!22 = distinct !{!22, !23}
!23 = !{!"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.stbtt_fontinfo = type { ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.stbtt_bakedchar = type { i16, i16, i16, i16, float, float, float }

@.str.10 = external hidden unnamed_addr constant [104 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [10 x i8], align 1
@__PRETTY_FUNCTION__.stbtt_BakeFontBitmap = external hidden unnamed_addr constant [116 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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @stbtt_InitFont(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local i32 @stbtt_FindGlyphIndex(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @stbtt_GetGlyphHMetrics(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local float @stbtt_ScaleForPixelHeight(ptr noundef, float noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @stbtt_GetGlyphBitmapBox(ptr noundef, i32 noundef, float noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @stbtt_MakeGlyphBitmap(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, float noundef, float noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local i32 @stbtt_BakeFontBitmap(ptr noundef %0, i32 noundef %1, float noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5, i32 noundef %6, i32 noundef %7, ptr nocapture noundef writeonly %8) local_unnamed_addr #1 {
  %10 = alloca %struct.stbtt_fontinfo, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %10) #6
  %17 = call i32 @stbtt_InitFont(ptr noundef nonnull %10, ptr noundef %0, i32 noundef %1)
  %18 = mul nsw i32 %5, %4
  %19 = sext i32 %18 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %3, i8 0, i64 %19, i1 false)
  %20 = call float @stbtt_ScaleForPixelHeight(ptr noundef nonnull %10, float noundef %2)
  %21 = icmp sgt i32 %7, 0
  br i1 %21, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %9
  %wide.trip.count = zext nneg i32 %7 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %42
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %42 ]
  %.070100 = phi i32 [ 1, %.lr.ph.preheader ], [ %66, %42 ]
  %.07399 = phi i32 [ 1, %.lr.ph.preheader ], [ %spec.select, %42 ]
  %.07697 = phi i32 [ 1, %.lr.ph.preheader ], [ %spec.select86, %42 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %16) #6
  %22 = trunc i64 %indvars.iv to i32
  %23 = add i32 %22, %6
  %24 = call i32 @stbtt_FindGlyphIndex(ptr noundef nonnull %10, i32 noundef %23)
  call void @stbtt_GetGlyphHMetrics(ptr noundef nonnull %10, i32 noundef %24, ptr noundef nonnull %11, ptr noundef nonnull %12)
  call void @stbtt_GetGlyphBitmapBox(ptr noundef nonnull %10, i32 noundef %24, float noundef %20, float noundef %20, ptr noundef nonnull %13, ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %16)
  %25 = load i32, ptr %15, align 4, !tbaa !5
  %26 = load i32, ptr %13, align 4, !tbaa !5
  %27 = sub nsw i32 %25, %26
  %28 = load i32, ptr %16, align 4, !tbaa !5
  %29 = load i32, ptr %14, align 4, !tbaa !5
  %30 = sub nsw i32 %28, %29
  %31 = add i32 %.070100, 1
  %32 = add i32 %31, %27
  %.not = icmp slt i32 %32, %4
  %spec.select = select i1 %.not, i32 %.07399, i32 %.07697
  %spec.select85 = select i1 %.not, i32 %.070100, i32 1
  %33 = add nsw i32 %spec.select, %30
  %34 = add nsw i32 %33, 1
  %.not84 = icmp slt i32 %34, %5
  br i1 %.not84, label %35, label %39

35:                                               ; preds = %.lr.ph
  %36 = add nsw i32 %spec.select85, %27
  %37 = icmp slt i32 %36, %4
  br i1 %37, label %42, label %38

38:                                               ; preds = %35
  call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.10, i32 noundef 1870, ptr noundef nonnull @__PRETTY_FUNCTION__.stbtt_BakeFontBitmap) #7
  unreachable

39:                                               ; preds = %.lr.ph
  %40 = trunc nuw nsw i64 %indvars.iv to i32
  %41 = sub nsw i32 0, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  br label %.loopexit

42:                                               ; preds = %35
  %43 = sext i32 %spec.select85 to i64
  %44 = getelementptr inbounds i8, ptr %3, i64 %43
  %45 = mul nsw i32 %spec.select, %4
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds i8, ptr %44, i64 %46
  call void @stbtt_MakeGlyphBitmap(ptr noundef nonnull %10, ptr noundef %47, i32 noundef %27, i32 noundef %30, i32 noundef %4, float noundef %20, float noundef %20, i32 noundef %24)
  %48 = trunc i32 %spec.select85 to i16
  %49 = getelementptr inbounds %struct.stbtt_bakedchar, ptr %8, i64 %indvars.iv
  store i16 %48, ptr %49, align 4, !tbaa !9
  %50 = trunc i32 %spec.select to i16
  %51 = getelementptr inbounds i8, ptr %49, i64 2
  store i16 %50, ptr %51, align 2, !tbaa !13
  %52 = trunc i32 %36 to i16
  %53 = getelementptr inbounds i8, ptr %49, i64 4
  store i16 %52, ptr %53, align 4, !tbaa !14
  %54 = trunc i32 %33 to i16
  %55 = getelementptr inbounds i8, ptr %49, i64 6
  store i16 %54, ptr %55, align 2, !tbaa !15
  %56 = load i32, ptr %11, align 4, !tbaa !5
  %57 = sitofp i32 %56 to float
  %58 = fmul float %20, %57
  %59 = getelementptr inbounds i8, ptr %49, i64 16
  store float %58, ptr %59, align 4, !tbaa !16
  %60 = load i32, ptr %13, align 4, !tbaa !5
  %61 = getelementptr inbounds i8, ptr %49, i64 8
  %62 = load i32, ptr %14, align 4, !tbaa !5
  %63 = insertelement <2 x i32> poison, i32 %60, i64 0
  %64 = insertelement <2 x i32> %63, i32 %62, i64 1
  %65 = sitofp <2 x i32> %64 to <2 x float>
  store <2 x float> %65, ptr %61, align 4, !tbaa !17
  %66 = add nsw i32 %36, 2
  %67 = add nsw i32 %33, 2
  %spec.select86 = call i32 @llvm.smax.i32(i32 %67, i32 %.07697)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !18

.loopexit:                                        ; preds = %42, %9, %39
  %.2 = phi i32 [ %41, %39 ], [ 1, %9 ], [ %spec.select86, %42 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %10) #6
  ret i32 %.2
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { mustprogress 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS15stbtt_bakedchar", !11, i64 0, !11, i64 2, !11, i64 4, !11, i64 6, !12, i64 8, !12, i64 12, !12, i64 16}
!11 = !{!"short", !7, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!10, !11, i64 2}
!14 = !{!10, !11, i64 4}
!15 = !{!10, !11, i64 6}
!16 = !{!10, !12, i64 16}
!17 = !{!12, !12, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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