; LLVM IR from libtcod/libtcod :: src/vendor (stb)

; 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_pack_range = type { float, i32, ptr, i32, ptr, i8, i8 }
%struct.stbtt_pack_context = type { ptr, ptr, i32, i32, i32, i32, i32, i32, i32, ptr, ptr }
%struct.stbrp_rect = type { i32, i32, i32, i32, i32, i32 }

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

; Function Attrs: nounwind uwtable
declare dso_local float @stbtt_ScaleForMappingEmToPixels(ptr noundef, float noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @stbtt_GetGlyphBitmapBoxSubpixel(ptr noundef, i32 noundef, float noundef, float noundef, float noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @stbtt_PackFontRangesGatherRects(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca float, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #2
  store i32 0, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %22

22:                                               ; preds = %180, %5
  %23 = load i32, ptr %11, align 4, !tbaa !9
  %24 = load i32, ptr %9, align 4, !tbaa !9
  %25 = icmp slt i32 %23, %24
  br i1 %25, label %26, label %183

26:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = load i32, ptr %11, align 4, !tbaa !9
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds %struct.stbtt_pack_range, ptr %27, i64 %29
  %31 = getelementptr inbounds %struct.stbtt_pack_range, ptr %30, i32 0, i32 0
  %32 = load float, ptr %31, align 8, !tbaa !11
  store float %32, ptr %14, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #2
  %33 = load float, ptr %14, align 4, !tbaa !14
  %34 = fcmp ogt float %33, 0.000000e+00
  br i1 %34, label %35, label %39

35:                                               ; preds = %26
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = load float, ptr %14, align 4, !tbaa !14
  %38 = call float @stbtt_ScaleForPixelHeight(ptr noundef %36, float noundef %37)
  br label %44

39:                                               ; preds = %26
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = load float, ptr %14, align 4, !tbaa !14
  %42 = fneg float %41
  %43 = call float @stbtt_ScaleForMappingEmToPixels(ptr noundef %40, float noundef %42)
  br label %44

44:                                               ; preds = %39, %35
  %45 = phi float [ %38, %35 ], [ %43, %39 ]
  store float %45, ptr %15, align 4, !tbaa !14
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.stbtt_pack_context, ptr %46, i32 0, i32 7
  %48 = load i32, ptr %47, align 4, !tbaa !15
  %49 = trunc i32 %48 to i8
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds %struct.stbtt_pack_range, ptr %50, i64 %52
  %54 = getelementptr inbounds %struct.stbtt_pack_range, ptr %53, i32 0, i32 5
  store i8 %49, ptr %54, align 8, !tbaa !17
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.stbtt_pack_context, ptr %55, i32 0, i32 8
  %57 = load i32, ptr %56, align 8, !tbaa !18
  %58 = trunc i32 %57 to i8
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds %struct.stbtt_pack_range, ptr %59, i64 %61
  %63 = getelementptr inbounds %struct.stbtt_pack_range, ptr %62, i32 0, i32 6
  store i8 %58, ptr %63, align 1, !tbaa !19
  store i32 0, ptr %12, align 4, !tbaa !9
  br label %64

64:                                               ; preds = %176, %44
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = load i32, ptr %11, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = getelementptr inbounds %struct.stbtt_pack_range, ptr %66, i64 %68
  %70 = getelementptr inbounds %struct.stbtt_pack_range, ptr %69, i32 0, i32 3
  %71 = load i32, ptr %70, align 8, !tbaa !20
  %72 = icmp slt i32 %65, %71
  br i1 %72, label %73, label %179

73:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #2
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = load i32, ptr %11, align 4, !tbaa !9
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds %struct.stbtt_pack_range, ptr %74, i64 %76
  %78 = getelementptr inbounds %struct.stbtt_pack_range, ptr %77, i32 0, i32 2
  %79 = load ptr, ptr %78, align 8, !tbaa !21
  %80 = icmp eq ptr %79, null
  br i1 %80, label %81, label %90

81:                                               ; preds = %73
  %82 = load ptr, ptr %8, align 8, !tbaa !5
  %83 = load i32, ptr %11, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds %struct.stbtt_pack_range, ptr %82, i64 %84
  %86 = getelementptr inbounds %struct.stbtt_pack_range, ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !22
  %88 = load i32, ptr %12, align 4, !tbaa !9
  %89 = add nsw i32 %87, %88
  br label %101

90:                                               ; preds = %73
  %91 = load ptr, ptr %8, align 8, !tbaa !5
  %92 = load i32, ptr %11, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds %struct.stbtt_pack_range, ptr %91, i64 %93
  %95 = getelementptr inbounds %struct.stbtt_pack_range, ptr %94, i32 0, i32 2
  %96 = load ptr, ptr %95, align 8, !tbaa !21
  %97 = load i32, ptr %12, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds i32, ptr %96, i64 %98
  %100 = load i32, ptr %99, align 4, !tbaa !9
  br label %101

101:                                              ; preds = %90, %81
  %102 = phi i32 [ %89, %81 ], [ %100, %90 ]
  store i32 %102, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #2
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = load i32, ptr %20, align 4, !tbaa !9
  %105 = call i32 @stbtt_FindGlyphIndex(ptr noundef %103, i32 noundef %104)
  store i32 %105, ptr %21, align 4, !tbaa !9
  %106 = load i32, ptr %21, align 4, !tbaa !9
  %107 = icmp eq i32 %106, 0
  br i1 %107, label %108, label %124

108:                                              ; preds = %101
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.stbtt_pack_context, ptr %109, i32 0, i32 6
  %111 = load i32, ptr %110, align 8, !tbaa !23
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %124

113:                                              ; preds = %108
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = load i32, ptr %13, align 4, !tbaa !9
  %116 = sext i32 %115 to i64
  %117 = getelementptr inbounds %struct.stbrp_rect, ptr %114, i64 %116
  %118 = getelementptr inbounds %struct.stbrp_rect, ptr %117, i32 0, i32 4
  store i32 0, ptr %118, align 4, !tbaa !24
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = load i32, ptr %13, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds %struct.stbrp_rect, ptr %119, i64 %121
  %123 = getelementptr inbounds %struct.stbrp_rect, ptr %122, i32 0, i32 3
  store i32 0, ptr %123, align 4, !tbaa !26
  br label %173

124:                                              ; preds = %108, %101
  %125 = load ptr, ptr %7, align 8, !tbaa !5
  %126 = load i32, ptr %21, align 4, !tbaa !9
  %127 = load float, ptr %15, align 4, !tbaa !14
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.stbtt_pack_context, ptr %128, i32 0, i32 7
  %130 = load i32, ptr %129, align 4, !tbaa !15
  %131 = uitofp i32 %130 to float
  %132 = fmul float %127, %131
  %133 = load float, ptr %15, align 4, !tbaa !14
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.stbtt_pack_context, ptr %134, i32 0, i32 8
  %136 = load i32, ptr %135, align 8, !tbaa !18
  %137 = uitofp i32 %136 to float
  %138 = fmul float %133, %137
  call void @stbtt_GetGlyphBitmapBoxSubpixel(ptr noundef %125, i32 noundef %126, float noundef %132, float noundef %138, float noundef 0.000000e+00, float noundef 0.000000e+00, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19)
  %139 = load i32, ptr %18, align 4, !tbaa !9
  %140 = load i32, ptr %16, align 4, !tbaa !9
  %141 = sub nsw i32 %139, %140
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.stbtt_pack_context, ptr %142, i32 0, i32 5
  %144 = load i32, ptr %143, align 4, !tbaa !27
  %145 = add nsw i32 %141, %144
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.stbtt_pack_context, ptr %146, i32 0, i32 7
  %148 = load i32, ptr %147, align 4, !tbaa !15
  %149 = add i32 %145, %148
  %150 = sub i32 %149, 1
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = load i32, ptr %13, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds %struct.stbrp_rect, ptr %151, i64 %153
  %155 = getelementptr inbounds %struct.stbrp_rect, ptr %154, i32 0, i32 3
  store i32 %150, ptr %155, align 4, !tbaa !26
  %156 = load i32, ptr %19, align 4, !tbaa !9
  %157 = load i32, ptr %17, align 4, !tbaa !9
  %158 = sub nsw i32 %156, %157
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.stbtt_pack_context, ptr %159, i32 0, i32 5
  %161 = load i32, ptr %160, align 4, !tbaa !27
  %162 = add nsw i32 %158, %161
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.stbtt_pack_context, ptr %163, i32 0, i32 8
  %165 = load i32, ptr %164, align 8, !tbaa !18
  %166 = add i32 %162, %165
  %167 = sub i32 %166, 1
  %168 = load ptr, ptr %10, align 8, !tbaa !5
  %169 = load i32, ptr %13, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds %struct.stbrp_rect, ptr %168, i64 %170
  %172 = getelementptr inbounds %struct.stbrp_rect, ptr %171, i32 0, i32 4
  store i32 %167, ptr %172, align 4, !tbaa !24
  br label %173

173:                                              ; preds = %124, %113
  %174 = load i32, ptr %13, align 4, !tbaa !9
  %175 = add nsw i32 %174, 1
  store i32 %175, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  br label %176

176:                                              ; preds = %173
  %177 = load i32, ptr %12, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %12, align 4, !tbaa !9
  br label %64, !llvm.loop !28

179:                                              ; preds = %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  br label %180

180:                                              ; preds = %179
  %181 = load i32, ptr %11, align 4, !tbaa !9
  %182 = add nsw i32 %181, 1
  store i32 %182, ptr %11, align 4, !tbaa !9
  br label %22, !llvm.loop !30

183:                                              ; preds = %22
  %184 = load i32, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  ret i32 %184
}

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 }

!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 = !{!"", !13, i64 0, !10, i64 4, !6, i64 8, !10, i64 16, !6, i64 24, !7, i64 32, !7, i64 33}
!13 = !{!"float", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!16, !10, i64 36}
!16 = !{!"stbtt_pack_context", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !6, i64 48, !6, i64 56}
!17 = !{!12, !7, i64 32}
!18 = !{!16, !10, i64 40}
!19 = !{!12, !7, i64 33}
!20 = !{!12, !10, i64 16}
!21 = !{!12, !6, i64 8}
!22 = !{!12, !10, i64 4}
!23 = !{!16, !10, i64 32}
!24 = !{!25, !10, i64 16}
!25 = !{!"stbrp_rect", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!26 = !{!25, !10, i64 12}
!27 = !{!16, !10, i64 28}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !29}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.stbtt_pack_range = type { float, i32, ptr, i32, ptr, i8, i8 }
%struct.stbrp_rect = type { i32, i32, i32, i32, i32, i32 }

; Function Attrs: nounwind uwtable
declare dso_local i32 @stbtt_FindGlyphIndex(ptr 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 float @stbtt_ScaleForPixelHeight(ptr noundef, float noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local float @stbtt_ScaleForMappingEmToPixels(ptr noundef, float noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @stbtt_GetGlyphBitmapBoxSubpixel(ptr noundef, i32 noundef, float noundef, float noundef, float noundef, float noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @stbtt_PackFontRangesGatherRects(ptr nocapture noundef readonly %0, ptr noundef %1, ptr nocapture noundef %2, i32 noundef %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #0 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = icmp sgt i32 %3, 0
  br i1 %10, label %.lr.ph62, label %._crit_edge63

.lr.ph62:                                         ; preds = %5
  %11 = getelementptr inbounds i8, ptr %0, i64 36
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  %13 = getelementptr inbounds i8, ptr %0, i64 32
  %14 = getelementptr inbounds i8, ptr %0, i64 28
  %wide.trip.count = zext nneg i32 %3 to i64
  br label %15

15:                                               ; preds = %.lr.ph62, %._crit_edge
  %indvars.iv70 = phi i64 [ 0, %.lr.ph62 ], [ %indvars.iv.next71, %._crit_edge ]
  %.05259 = phi i32 [ 0, %.lr.ph62 ], [ %.1.lcssa, %._crit_edge ]
  %16 = getelementptr inbounds %struct.stbtt_pack_range, ptr %2, i64 %indvars.iv70
  %17 = load float, ptr %16, align 8, !tbaa !5
  %18 = fcmp ogt float %17, 0.000000e+00
  br i1 %18, label %19, label %21

19:                                               ; preds = %15
  %20 = call float @stbtt_ScaleForPixelHeight(ptr noundef %1, float noundef %17)
  br label %24

21:                                               ; preds = %15
  %22 = fneg float %17
  %23 = call float @stbtt_ScaleForMappingEmToPixels(ptr noundef %1, float noundef %22)
  br label %24

24:                                               ; preds = %21, %19
  %25 = phi float [ %20, %19 ], [ %23, %21 ]
  %26 = load i32, ptr %11, align 4, !tbaa !12
  %27 = trunc i32 %26 to i8
  %28 = getelementptr inbounds i8, ptr %16, i64 32
  store i8 %27, ptr %28, align 8, !tbaa !14
  %29 = load i32, ptr %12, align 8, !tbaa !15
  %30 = trunc i32 %29 to i8
  %31 = getelementptr inbounds i8, ptr %16, i64 33
  store i8 %30, ptr %31, align 1, !tbaa !16
  %32 = getelementptr inbounds i8, ptr %16, i64 16
  %33 = load i32, ptr %32, align 8, !tbaa !17
  %34 = icmp sgt i32 %33, 0
  br i1 %34, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %24
  %35 = getelementptr inbounds i8, ptr %16, i64 8
  %36 = getelementptr inbounds i8, ptr %16, i64 4
  %37 = sext i32 %.05259 to i64
  br label %38

38:                                               ; preds = %.lr.ph, %82
  %indvars.iv65 = phi i64 [ %37, %.lr.ph ], [ %indvars.iv.next66, %82 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %82 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #2
  %39 = load ptr, ptr %35, align 8, !tbaa !18
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %45

41:                                               ; preds = %38
  %42 = load i32, ptr %36, align 4, !tbaa !19
  %43 = trunc nuw nsw i64 %indvars.iv to i32
  %44 = add nsw i32 %42, %43
  br label %48

45:                                               ; preds = %38
  %46 = getelementptr inbounds i32, ptr %39, i64 %indvars.iv
  %47 = load i32, ptr %46, align 4, !tbaa !20
  br label %48

48:                                               ; preds = %45, %41
  %49 = phi i32 [ %44, %41 ], [ %47, %45 ]
  %50 = call i32 @stbtt_FindGlyphIndex(ptr noundef %1, i32 noundef %49)
  %51 = icmp eq i32 %50, 0
  br i1 %51, label %52, label %58

52:                                               ; preds = %48
  %53 = load i32, ptr %13, align 8, !tbaa !21
  %.not = icmp eq i32 %53, 0
  br i1 %.not, label %58, label %54

54:                                               ; preds = %52
  %55 = getelementptr inbounds %struct.stbrp_rect, ptr %4, i64 %indvars.iv65
  %56 = getelementptr inbounds i8, ptr %55, i64 16
  store i32 0, ptr %56, align 4, !tbaa !22
  %57 = getelementptr inbounds i8, ptr %55, i64 12
  store i32 0, ptr %57, align 4, !tbaa !24
  br label %82

58:                                               ; preds = %52, %48
  %59 = load i32, ptr %11, align 4, !tbaa !12
  %60 = uitofp i32 %59 to float
  %61 = fmul float %25, %60
  %62 = load i32, ptr %12, align 8, !tbaa !15
  %63 = uitofp i32 %62 to float
  %64 = fmul float %25, %63
  call void @stbtt_GetGlyphBitmapBoxSubpixel(ptr noundef %1, i32 noundef %50, float noundef %61, float noundef %64, float noundef 0.000000e+00, float noundef 0.000000e+00, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9)
  %65 = load i32, ptr %8, align 4, !tbaa !20
  %66 = load i32, ptr %6, align 4, !tbaa !20
  %67 = load i32, ptr %14, align 4, !tbaa !25
  %68 = load i32, ptr %11, align 4, !tbaa !12
  %69 = add i32 %67, -1
  %70 = add i32 %69, %65
  %71 = sub i32 %70, %66
  %72 = add i32 %71, %68
  %73 = getelementptr inbounds %struct.stbrp_rect, ptr %4, i64 %indvars.iv65
  %74 = getelementptr inbounds i8, ptr %73, i64 12
  store i32 %72, ptr %74, align 4, !tbaa !24
  %75 = load i32, ptr %9, align 4, !tbaa !20
  %76 = load i32, ptr %7, align 4, !tbaa !20
  %77 = load i32, ptr %12, align 8, !tbaa !15
  %78 = add i32 %69, %75
  %79 = sub i32 %78, %76
  %80 = add i32 %79, %77
  %81 = getelementptr inbounds i8, ptr %73, i64 16
  store i32 %80, ptr %81, align 4, !tbaa !22
  br label %82

82:                                               ; preds = %58, %54
  %indvars.iv.next66 = add nsw i64 %indvars.iv65, 1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #2
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %83 = load i32, ptr %32, align 8, !tbaa !17
  %84 = sext i32 %83 to i64
  %85 = icmp slt i64 %indvars.iv.next, %84
  br i1 %85, label %38, label %._crit_edge.loopexit, !llvm.loop !26

._crit_edge.loopexit:                             ; preds = %82
  %86 = trunc nsw i64 %indvars.iv.next66 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %24
  %.1.lcssa = phi i32 [ %.05259, %24 ], [ %86, %._crit_edge.loopexit ]
  %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge63, label %15, !llvm.loop !28

._crit_edge63:                                    ; preds = %._crit_edge, %5
  %.052.lcssa = phi i32 [ 0, %5 ], [ %.1.lcssa, %._crit_edge ]
  ret i32 %.052.lcssa
}

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 }

!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 = !{!"", !7, i64 0, !10, i64 4, !11, i64 8, !10, i64 16, !11, i64 24, !8, i64 32, !8, i64 33}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !10, i64 36}
!13 = !{!"stbtt_pack_context", !11, i64 0, !11, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !11, i64 48, !11, i64 56}
!14 = !{!6, !8, i64 32}
!15 = !{!13, !10, i64 40}
!16 = !{!6, !8, i64 33}
!17 = !{!6, !10, i64 16}
!18 = !{!6, !11, i64 8}
!19 = !{!6, !10, i64 4}
!20 = !{!10, !10, i64 0}
!21 = !{!13, !10, i64 32}
!22 = !{!23, !10, i64 16}
!23 = !{!"stbrp_rect", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!24 = !{!23, !10, i64 12}
!25 = !{!13, !10, i64 28}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}


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