; LLVM IR from ashishzero/karma :: src/modules/core (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, i16, i16, i16, i16, i32 }

; 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_FindGlyphIndex(ptr noundef, i32 noundef) #1

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

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

; Function Attrs: mustprogress 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) #1

; Function Attrs: mustprogress uwtable
define dso_local i32 @stbtt_PackFontRangesGatherRects(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #1 {
  %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 i32, align 4
  %15 = alloca float, align 4
  %16 = alloca float, 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
  %22 = 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
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  store i32 0, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %13, align 4, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %23

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

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

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

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

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

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

74:                                               ; preds = %65
  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
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #2
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds %struct.stbtt_pack_range, ptr %75, i64 %77
  %79 = getelementptr inbounds %struct.stbtt_pack_range, ptr %78, i32 0, i32 2
  %80 = load ptr, ptr %79, align 8, !tbaa !21
  %81 = icmp eq ptr %80, null
  br i1 %81, label %82, label %91

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

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

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

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

114:                                              ; preds = %109
  %115 = load i32, ptr %14, align 4, !tbaa !9
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %128

117:                                              ; preds = %114, %109
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = load i32, ptr %13, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds %struct.stbrp_rect, ptr %118, i64 %120
  %122 = getelementptr inbounds %struct.stbrp_rect, ptr %121, i32 0, i32 2
  store i16 0, ptr %122, align 2, !tbaa !24
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = load i32, ptr %13, align 4, !tbaa !9
  %125 = sext i32 %124 to i64
  %126 = getelementptr inbounds %struct.stbrp_rect, ptr %123, i64 %125
  %127 = getelementptr inbounds %struct.stbrp_rect, ptr %126, i32 0, i32 1
  store i16 0, ptr %127, align 4, !tbaa !27
  br label %183

128:                                              ; preds = %114, %102
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = load i32, ptr %22, align 4, !tbaa !9
  %131 = load float, ptr %16, align 4, !tbaa !14
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.stbtt_pack_context, ptr %132, i32 0, i32 7
  %134 = load i32, ptr %133, align 4, !tbaa !15
  %135 = uitofp i32 %134 to float
  %136 = fmul float %131, %135
  %137 = load float, ptr %16, align 4, !tbaa !14
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.stbtt_pack_context, ptr %138, i32 0, i32 8
  %140 = load i32, ptr %139, align 8, !tbaa !18
  %141 = uitofp i32 %140 to float
  %142 = fmul float %137, %141
  call void @stbtt_GetGlyphBitmapBoxSubpixel(ptr noundef %129, i32 noundef %130, float noundef %136, float noundef %142, float noundef 0.000000e+00, float noundef 0.000000e+00, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20)
  %143 = load i32, ptr %19, align 4, !tbaa !9
  %144 = load i32, ptr %17, align 4, !tbaa !9
  %145 = sub nsw i32 %143, %144
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.stbtt_pack_context, ptr %146, i32 0, i32 5
  %148 = load i32, ptr %147, align 4, !tbaa !28
  %149 = add nsw i32 %145, %148
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.stbtt_pack_context, ptr %150, i32 0, i32 7
  %152 = load i32, ptr %151, align 4, !tbaa !15
  %153 = add i32 %149, %152
  %154 = sub i32 %153, 1
  %155 = trunc i32 %154 to i16
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = load i32, ptr %13, align 4, !tbaa !9
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds %struct.stbrp_rect, ptr %156, i64 %158
  %160 = getelementptr inbounds %struct.stbrp_rect, ptr %159, i32 0, i32 1
  store i16 %155, ptr %160, align 4, !tbaa !27
  %161 = load i32, ptr %20, align 4, !tbaa !9
  %162 = load i32, ptr %18, align 4, !tbaa !9
  %163 = sub nsw i32 %161, %162
  %164 = load ptr, ptr %6, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.stbtt_pack_context, ptr %164, i32 0, i32 5
  %166 = load i32, ptr %165, align 4, !tbaa !28
  %167 = add nsw i32 %163, %166
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.stbtt_pack_context, ptr %168, i32 0, i32 8
  %170 = load i32, ptr %169, align 8, !tbaa !18
  %171 = add i32 %167, %170
  %172 = sub i32 %171, 1
  %173 = trunc i32 %172 to i16
  %174 = load ptr, ptr %10, align 8, !tbaa !5
  %175 = load i32, ptr %13, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds %struct.stbrp_rect, ptr %174, i64 %176
  %178 = getelementptr inbounds %struct.stbrp_rect, ptr %177, i32 0, i32 2
  store i16 %173, ptr %178, align 2, !tbaa !24
  %179 = load i32, ptr %22, align 4, !tbaa !9
  %180 = icmp eq i32 %179, 0
  br i1 %180, label %181, label %182

181:                                              ; preds = %128
  store i32 1, ptr %14, align 4, !tbaa !9
  br label %182

182:                                              ; preds = %181, %128
  br label %183

183:                                              ; preds = %182, %117
  %184 = load i32, ptr %13, align 4, !tbaa !9
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #2
  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
  br label %186

186:                                              ; preds = %183
  %187 = load i32, ptr %12, align 4, !tbaa !9
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %12, align 4, !tbaa !9
  br label %65, !llvm.loop !29

189:                                              ; preds = %65
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #2
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %11, align 4, !tbaa !9
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %11, align 4, !tbaa !9
  br label %23, !llvm.loop !31

193:                                              ; preds = %23
  %194 = load i32, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  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 %194
}

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 = { 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, !13, i64 0}
!12 = !{!"_ZTS16stbtt_pack_range", !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 = !{!"_ZTS18stbtt_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, !26, i64 6}
!25 = !{!"_ZTS10stbrp_rect", !10, i64 0, !26, i64 4, !26, i64 6, !26, i64 8, !26, i64 10, !10, i64 12}
!26 = !{!"short", !7, i64 0}
!27 = !{!25, !26, i64 4}
!28 = !{!16, !10, i64 28}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}


; 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, i16, i16, i16, i16, i32 }

; 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_FindGlyphIndex(ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress 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 #1

; Function Attrs: mustprogress 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 #1 {
  %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.ph70, label %._crit_edge71

.lr.ph70:                                         ; 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.ph70, %._crit_edge
  %indvars.iv78 = phi i64 [ 0, %.lr.ph70 ], [ %indvars.iv.next79, %._crit_edge ]
  %.05567 = phi i32 [ 0, %.lr.ph70 ], [ %.1.lcssa, %._crit_edge ]
  %.05666 = phi i32 [ 0, %.lr.ph70 ], [ %.157.lcssa, %._crit_edge ]
  %16 = getelementptr inbounds %struct.stbtt_pack_range, ptr %2, i64 %indvars.iv78
  %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 %.05567 to i64
  br label %38

38:                                               ; preds = %.lr.ph, %87
  %indvars.iv73 = phi i64 [ %37, %.lr.ph ], [ %indvars.iv.next74, %87 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %87 ]
  %.15762 = phi i32 [ %.05666, %.lr.ph ], [ %.2, %87 ]
  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 %60

52:                                               ; preds = %48
  %53 = load i32, ptr %13, align 8, !tbaa !21
  %54 = icmp ne i32 %53, 0
  %55 = icmp ne i32 %.15762, 0
  %or.cond = select i1 %54, i1 true, i1 %55
  br i1 %or.cond, label %56, label %60

56:                                               ; preds = %52
  %57 = getelementptr inbounds %struct.stbrp_rect, ptr %4, i64 %indvars.iv73
  %58 = getelementptr inbounds i8, ptr %57, i64 6
  store i16 0, ptr %58, align 2, !tbaa !22
  %59 = getelementptr inbounds i8, ptr %57, i64 4
  store i16 0, ptr %59, align 4, !tbaa !25
  br label %87

60:                                               ; preds = %52, %48
  %spec.select = phi i32 [ 1, %52 ], [ %.15762, %48 ]
  %61 = load i32, ptr %11, align 4, !tbaa !12
  %62 = uitofp i32 %61 to float
  %63 = fmul float %25, %62
  %64 = load i32, ptr %12, align 8, !tbaa !15
  %65 = uitofp i32 %64 to float
  %66 = fmul float %25, %65
  call void @stbtt_GetGlyphBitmapBoxSubpixel(ptr noundef %1, i32 noundef %50, float noundef %63, float noundef %66, 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)
  %67 = load i32, ptr %8, align 4, !tbaa !20
  %68 = load i32, ptr %6, align 4, !tbaa !20
  %69 = sub i32 %67, %68
  %70 = load i32, ptr %14, align 4, !tbaa !26
  %71 = add nsw i32 %69, %70
  %72 = load i32, ptr %11, align 4, !tbaa !12
  %73 = add i32 %71, %72
  %74 = trunc i32 %73 to i16
  %75 = add i16 %74, -1
  %76 = getelementptr inbounds %struct.stbrp_rect, ptr %4, i64 %indvars.iv73
  %77 = getelementptr inbounds i8, ptr %76, i64 4
  store i16 %75, ptr %77, align 4, !tbaa !25
  %78 = load i32, ptr %9, align 4, !tbaa !20
  %79 = load i32, ptr %7, align 4, !tbaa !20
  %80 = load i32, ptr %12, align 8, !tbaa !15
  %81 = add i32 %78, %70
  %82 = sub i32 %81, %79
  %83 = add i32 %82, %80
  %84 = trunc i32 %83 to i16
  %85 = add i16 %84, -1
  %86 = getelementptr inbounds i8, ptr %76, i64 6
  store i16 %85, ptr %86, align 2, !tbaa !22
  br label %87

87:                                               ; preds = %60, %56
  %.2 = phi i32 [ %.15762, %56 ], [ %spec.select, %60 ]
  %indvars.iv.next74 = add nsw i64 %indvars.iv73, 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
  %88 = load i32, ptr %32, align 8, !tbaa !17
  %89 = sext i32 %88 to i64
  %90 = icmp slt i64 %indvars.iv.next, %89
  br i1 %90, label %38, label %._crit_edge.loopexit, !llvm.loop !27

._crit_edge.loopexit:                             ; preds = %87
  %91 = trunc nsw i64 %indvars.iv.next74 to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %24
  %.157.lcssa = phi i32 [ %.05666, %24 ], [ %.2, %._crit_edge.loopexit ]
  %.1.lcssa = phi i32 [ %.05567, %24 ], [ %91, %._crit_edge.loopexit ]
  %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge71, label %15, !llvm.loop !29

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

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 = { 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 = !{!"_ZTS16stbtt_pack_range", !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++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !10, i64 36}
!13 = !{!"_ZTS18stbtt_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, !24, i64 6}
!23 = !{!"_ZTS10stbrp_rect", !10, i64 0, !24, i64 4, !24, i64 6, !24, i64 8, !24, i64 10, !10, i64 12}
!24 = !{!"short", !8, i64 0}
!25 = !{!23, !24, i64 4}
!26 = !{!13, !10, i64 28}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}


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