; LLVM IR from reworks-org/galaxy :: deps/sfml_deps/freetype-src/src/autofit (aflatin)

; 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.AF_GlyphHintsRec_ = type { ptr, i64, i64, i64, i64, i32, i32, ptr, i32, i32, ptr, [2 x %struct.AF_AxisHintsRec_], i32, i32, ptr, %struct.anon.0 }
%struct.AF_AxisHintsRec_ = type { i32, i32, ptr, i32, i32, ptr, i32, %struct.anon }
%struct.anon = type { [18 x %struct.AF_SegmentRec_], [12 x %struct.AF_EdgeRec_] }
%struct.AF_SegmentRec_ = type { i8, i8, i16, i16, i16, i16, i16, ptr, ptr, ptr, ptr, i64, i64, ptr, ptr }
%struct.AF_EdgeRec_ = type { i16, i64, i64, i8, i8, i64, ptr, ptr, ptr, i32, ptr, ptr }
%struct.anon.0 = type { [8 x ptr], [96 x %struct.AF_PointRec_] }
%struct.AF_PointRec_ = type { i16, i8, i8, i64, i64, i16, i16, i64, i64, i64, i64, ptr, ptr }
%struct.AF_LatinMetricsRec_ = type { %struct.AF_StyleMetricsRec_, i32, [2 x %struct.AF_LatinAxisRec_] }
%struct.AF_StyleMetricsRec_ = type { ptr, %struct.AF_ScalerRec_, i8, ptr }
%struct.AF_ScalerRec_ = type { ptr, i64, i64, i64, i64, i32, i32 }
%struct.AF_LatinAxisRec_ = type { i64, i64, i32, [16 x %struct.AF_WidthRec_], i64, i64, i8, i32, [266 x %struct.AF_LatinBlueRec_], i64, i64 }
%struct.AF_WidthRec_ = type { i64, i64, i64 }
%struct.AF_LatinBlueRec_ = type { %struct.AF_WidthRec_, %struct.AF_WidthRec_, i64, i64, i32 }
%struct.FT_FaceRec_ = type { i64, i64, i64, i64, i64, ptr, ptr, i32, ptr, i32, ptr, %struct.FT_Generic_, %struct.FT_BBox_, i16, i16, i16, i16, i16, i16, i16, i16, ptr, ptr, ptr, ptr, ptr, ptr, %struct.FT_ListRec_, %struct.FT_Generic_, ptr, ptr }
%struct.FT_BBox_ = type { i64, i64, i64, i64 }
%struct.FT_ListRec_ = type { ptr, ptr }
%struct.FT_Generic_ = type { ptr, ptr }
%struct.AF_StyleClassRec_ = type { i32, i32, i32, i32, i32 }
%struct.AF_ScriptClassRec_ = type { i32, ptr, ptr, i8, ptr }
%struct.FT_GlyphSlotRec_ = type { ptr, ptr, ptr, i32, %struct.FT_Generic_, %struct.FT_Glyph_Metrics_, i64, i64, %struct.FT_Vector_, i32, %struct.FT_Bitmap_, i32, i32, %struct.FT_Outline_, i32, ptr, ptr, i64, i64, i64, ptr, ptr }
%struct.FT_Glyph_Metrics_ = type { i64, i64, i64, i64, i64, i64, i64, i64 }
%struct.FT_Vector_ = type { i64, i64 }
%struct.FT_Bitmap_ = type { i32, i32, i32, ptr, i16, i8, i8, ptr }
%struct.FT_Outline_ = type { i16, i16, ptr, ptr, ptr, i32 }

@af_script_classes = external hidden constant [0 x ptr], align 8

; Function Attrs: nounwind uwtable
define hidden void @af_latin_metrics_init_widths(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [1 x %struct.AF_GlyphHintsRec_], align 16
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca [1 x %struct.AF_LatinMetricsRec_], align 16
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i64, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12904, ptr %5) #4
  br label %27

27:                                               ; preds = %2
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  br label %34

34:                                               ; preds = %33
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  br label %37

37:                                               ; preds = %36
  br label %38

38:                                               ; preds = %37
  %39 = getelementptr inbounds [1 x %struct.AF_GlyphHintsRec_], ptr %5, i64 0, i64 0
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.FT_FaceRec_, ptr %40, i32 0, i32 25
  %42 = load ptr, ptr %41, align 8, !tbaa !9
  call void @af_glyph_hints_init(ptr noundef %39, ptr noundef %42)
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %43, i32 0, i32 2
  %45 = getelementptr inbounds [2 x %struct.AF_LatinAxisRec_], ptr %44, i64 0, i64 0
  %46 = getelementptr inbounds %struct.AF_LatinAxisRec_, ptr %45, i32 0, i32 2
  store i32 0, ptr %46, align 8, !tbaa !17
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %47, i32 0, i32 2
  %49 = getelementptr inbounds [2 x %struct.AF_LatinAxisRec_], ptr %48, i64 0, i64 1
  %50 = getelementptr inbounds %struct.AF_LatinAxisRec_, ptr %49, i32 0, i32 2
  store i32 0, ptr %50, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 39280, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %51 = getelementptr inbounds [1 x %struct.AF_LatinMetricsRec_], ptr %9, i64 0, i64 0
  %52 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds %struct.AF_StyleMetricsRec_, ptr %52, i32 0, i32 1
  store ptr %53, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %54, i32 0, i32 0
  %56 = getelementptr inbounds %struct.AF_StyleMetricsRec_, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !19
  store ptr %57, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.AF_StyleClassRec_, ptr %58, i32 0, i32 2
  %60 = load i32, ptr %59, align 4, !tbaa !23
  %61 = zext i32 %60 to i64
  %62 = getelementptr inbounds [0 x ptr], ptr @af_script_classes, i64 0, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  store ptr %63, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  store ptr %13, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.AF_ScriptClassRec_, ptr %64, i32 0, i32 4
  %66 = load ptr, ptr %65, align 8, !tbaa !25
  store ptr %66, ptr %15, align 8, !tbaa !5
  store i64 0, ptr %7, align 8, !tbaa !27
  br label %67

67:                                               ; preds = %100, %98, %38
  %68 = load ptr, ptr %15, align 8, !tbaa !5
  %69 = load i8, ptr %68, align 1, !tbaa !28
  %70 = icmp ne i8 %69, 0
  br i1 %70, label %71, label %101

71:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  br label %72

72:                                               ; preds = %77, %71
  %73 = load ptr, ptr %15, align 8, !tbaa !5
  %74 = load i8, ptr %73, align 1, !tbaa !28
  %75 = sext i8 %74 to i32
  %76 = icmp eq i32 %75, 32
  br i1 %76, label %77, label %80

77:                                               ; preds = %72
  %78 = load ptr, ptr %15, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %78, i32 1
  store ptr %79, ptr %15, align 8, !tbaa !5
  br label %72, !llvm.loop !29

80:                                               ; preds = %72
  %81 = load ptr, ptr %15, align 8, !tbaa !5
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  %85 = call ptr @af_shaper_get_cluster(ptr noundef %81, ptr noundef %83, ptr noundef %84, ptr noundef %16)
  store ptr %85, ptr %15, align 8, !tbaa !5
  %86 = load i32, ptr %16, align 4, !tbaa !31
  %87 = icmp ugt i32 %86, 1
  br i1 %87, label %88, label %89

88:                                               ; preds = %80
  store i32 10, ptr %17, align 4
  br label %98, !llvm.loop !32

89:                                               ; preds = %80
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %90, i32 0, i32 0
  %92 = load ptr, ptr %14, align 8, !tbaa !5
  %93 = call i64 @af_shaper_get_elem(ptr noundef %91, ptr noundef %92, i32 noundef 0, ptr noundef null, ptr noundef null)
  store i64 %93, ptr %7, align 8, !tbaa !27
  %94 = load i64, ptr %7, align 8, !tbaa !27
  %95 = icmp ne i64 %94, 0
  br i1 %95, label %96, label %97

96:                                               ; preds = %89
  store i32 11, ptr %17, align 4
  br label %98

97:                                               ; preds = %89
  store i32 0, ptr %17, align 4
  br label %98

98:                                               ; preds = %97, %96, %88
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  %99 = load i32, ptr %17, align 4
  switch i32 %99, label %320 [
    i32 0, label %100
    i32 10, label %67
    i32 11, label %101
  ]

100:                                              ; preds = %98
  br label %67, !llvm.loop !32

101:                                              ; preds = %98, %67
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = load ptr, ptr %14, align 8, !tbaa !5
  call void @af_shaper_buf_destroy(ptr noundef %102, ptr noundef %103)
  %104 = load i64, ptr %7, align 8, !tbaa !27
  %105 = icmp ne i64 %104, 0
  br i1 %105, label %110, label %106

106:                                              ; preds = %101
  br label %107

107:                                              ; preds = %106
  br label %108

108:                                              ; preds = %107
  br label %109

109:                                              ; preds = %108
  br label %274

110:                                              ; preds = %101
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = load i64, ptr %7, align 8, !tbaa !27
  %116 = trunc i64 %115 to i32
  %117 = call i32 @FT_Load_Glyph(ptr noundef %114, i32 noundef %116, i32 noundef 1)
  store i32 %117, ptr %6, align 4, !tbaa !31
  %118 = load i32, ptr %6, align 4, !tbaa !31
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %129, label %120

120:                                              ; preds = %113
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.FT_FaceRec_, ptr %121, i32 0, i32 21
  %123 = load ptr, ptr %122, align 8, !tbaa !33
  %124 = getelementptr inbounds %struct.FT_GlyphSlotRec_, ptr %123, i32 0, i32 13
  %125 = getelementptr inbounds %struct.FT_Outline_, ptr %124, i32 0, i32 1
  %126 = load i16, ptr %125, align 2, !tbaa !34
  %127 = sext i16 %126 to i32
  %128 = icmp sle i32 %127, 0
  br i1 %128, label %129, label %130

129:                                              ; preds = %120, %113
  br label %274

130:                                              ; preds = %120
  %131 = getelementptr inbounds [1 x %struct.AF_LatinMetricsRec_], ptr %9, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %131, i8 0, i64 39280, i1 false)
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %132, i32 0, i32 1
  %134 = load i32, ptr %133, align 8, !tbaa !40
  %135 = getelementptr inbounds [1 x %struct.AF_LatinMetricsRec_], ptr %9, i64 0, i64 0
  %136 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %135, i32 0, i32 1
  store i32 %134, ptr %136, align 8, !tbaa !40
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.AF_ScalerRec_, ptr %137, i32 0, i32 1
  store i64 65536, ptr %138, align 8, !tbaa !41
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.AF_ScalerRec_, ptr %139, i32 0, i32 2
  store i64 65536, ptr %140, align 8, !tbaa !42
  %141 = load ptr, ptr %10, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.AF_ScalerRec_, ptr %141, i32 0, i32 3
  store i64 0, ptr %142, align 8, !tbaa !43
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.AF_ScalerRec_, ptr %143, i32 0, i32 4
  store i64 0, ptr %144, align 8, !tbaa !44
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.AF_ScalerRec_, ptr %146, i32 0, i32 0
  store ptr %145, ptr %147, align 8, !tbaa !45
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.AF_ScalerRec_, ptr %148, i32 0, i32 5
  store i32 0, ptr %149, align 8, !tbaa !46
  %150 = load ptr, ptr %10, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.AF_ScalerRec_, ptr %150, i32 0, i32 6
  store i32 0, ptr %151, align 4, !tbaa !47
  %152 = getelementptr inbounds [1 x %struct.AF_GlyphHintsRec_], ptr %5, i64 0, i64 0
  %153 = getelementptr inbounds [1 x %struct.AF_LatinMetricsRec_], ptr %9, i64 0, i64 0
  call void @af_glyph_hints_rescale(ptr noundef %152, ptr noundef %153)
  %154 = getelementptr inbounds [1 x %struct.AF_GlyphHintsRec_], ptr %5, i64 0, i64 0
  %155 = load ptr, ptr %4, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.FT_FaceRec_, ptr %155, i32 0, i32 21
  %157 = load ptr, ptr %156, align 8, !tbaa !33
  %158 = getelementptr inbounds %struct.FT_GlyphSlotRec_, ptr %157, i32 0, i32 13
  %159 = call i32 @af_glyph_hints_reload(ptr noundef %154, ptr noundef %158)
  store i32 %159, ptr %6, align 4, !tbaa !31
  %160 = load i32, ptr %6, align 4, !tbaa !31
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %163

162:                                              ; preds = %130
  br label %274

163:                                              ; preds = %130
  store i32 0, ptr %8, align 4, !tbaa !31
  br label %164

164:                                              ; preds = %270, %163
  %165 = load i32, ptr %8, align 4, !tbaa !31
  %166 = icmp slt i32 %165, 2
  br i1 %166, label %167, label %273

167:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %168 = load ptr, ptr %3, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %168, i32 0, i32 2
  %170 = load i32, ptr %8, align 4, !tbaa !31
  %171 = sext i32 %170 to i64
  %172 = getelementptr inbounds [2 x %struct.AF_LatinAxisRec_], ptr %169, i64 0, i64 %171
  store ptr %172, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %173 = getelementptr inbounds [1 x %struct.AF_GlyphHintsRec_], ptr %5, i64 0, i64 0
  %174 = getelementptr inbounds %struct.AF_GlyphHintsRec_, ptr %173, i32 0, i32 11
  %175 = load i32, ptr %8, align 4, !tbaa !31
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds [2 x %struct.AF_AxisHintsRec_], ptr %174, i64 0, i64 %176
  store ptr %177, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #4
  store i32 0, ptr %23, align 4, !tbaa !31
  %178 = getelementptr inbounds [1 x %struct.AF_GlyphHintsRec_], ptr %5, i64 0, i64 0
  %179 = load i32, ptr %8, align 4, !tbaa !31
  %180 = call i32 @af_latin_hints_compute_segments(ptr noundef %178, i32 noundef %179)
  store i32 %180, ptr %6, align 4, !tbaa !31
  %181 = load i32, ptr %6, align 4, !tbaa !31
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %184

183:                                              ; preds = %167
  store i32 16, ptr %17, align 4
  br label %267

184:                                              ; preds = %167
  %185 = getelementptr inbounds [1 x %struct.AF_GlyphHintsRec_], ptr %5, i64 0, i64 0
  %186 = load i32, ptr %8, align 4, !tbaa !31
  call void @af_latin_hints_link_segments(ptr noundef %185, i32 noundef 0, ptr noundef null, i32 noundef %186)
  %187 = load ptr, ptr %19, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.AF_AxisHintsRec_, ptr %187, i32 0, i32 2
  %189 = load ptr, ptr %188, align 8, !tbaa !48
  store ptr %189, ptr %20, align 8, !tbaa !5
  %190 = load ptr, ptr %20, align 8, !tbaa !5
  %191 = icmp ne ptr %190, null
  br i1 %191, label %192, label %199

192:                                              ; preds = %184
  %193 = load ptr, ptr %20, align 8, !tbaa !5
  %194 = load ptr, ptr %19, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.AF_AxisHintsRec_, ptr %194, i32 0, i32 0
  %196 = load i32, ptr %195, align 8, !tbaa !51
  %197 = zext i32 %196 to i64
  %198 = getelementptr inbounds %struct.AF_SegmentRec_, ptr %193, i64 %197
  br label %200

199:                                              ; preds = %184
  br label %200

200:                                              ; preds = %199, %192
  %201 = phi ptr [ %198, %192 ], [ null, %199 ]
  store ptr %201, ptr %21, align 8, !tbaa !5
  br label %202

202:                                              ; preds = %252, %200
  %203 = load ptr, ptr %20, align 8, !tbaa !5
  %204 = load ptr, ptr %21, align 8, !tbaa !5
  %205 = icmp ult ptr %203, %204
  br i1 %205, label %206, label %255

206:                                              ; preds = %202
  %207 = load ptr, ptr %20, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.AF_SegmentRec_, ptr %207, i32 0, i32 9
  %209 = load ptr, ptr %208, align 8, !tbaa !52
  store ptr %209, ptr %22, align 8, !tbaa !5
  %210 = load ptr, ptr %22, align 8, !tbaa !5
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %251

212:                                              ; preds = %206
  %213 = load ptr, ptr %22, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.AF_SegmentRec_, ptr %213, i32 0, i32 9
  %215 = load ptr, ptr %214, align 8, !tbaa !52
  %216 = load ptr, ptr %20, align 8, !tbaa !5
  %217 = icmp eq ptr %215, %216
  br i1 %217, label %218, label %251

218:                                              ; preds = %212
  %219 = load ptr, ptr %22, align 8, !tbaa !5
  %220 = load ptr, ptr %20, align 8, !tbaa !5
  %221 = icmp ugt ptr %219, %220
  br i1 %221, label %222, label %251

222:                                              ; preds = %218
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %223 = load ptr, ptr %20, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.AF_SegmentRec_, ptr %223, i32 0, i32 2
  %225 = load i16, ptr %224, align 2, !tbaa !54
  %226 = sext i16 %225 to i32
  %227 = load ptr, ptr %22, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.AF_SegmentRec_, ptr %227, i32 0, i32 2
  %229 = load i16, ptr %228, align 2, !tbaa !54
  %230 = sext i16 %229 to i32
  %231 = sub nsw i32 %226, %230
  %232 = sext i32 %231 to i64
  store i64 %232, ptr %24, align 8, !tbaa !27
  %233 = load i64, ptr %24, align 8, !tbaa !27
  %234 = icmp slt i64 %233, 0
  br i1 %234, label %235, label %238

235:                                              ; preds = %222
  %236 = load i64, ptr %24, align 8, !tbaa !27
  %237 = sub nsw i64 0, %236
  store i64 %237, ptr %24, align 8, !tbaa !27
  br label %238

238:                                              ; preds = %235, %222
  %239 = load i32, ptr %23, align 4, !tbaa !31
  %240 = icmp ult i32 %239, 16
  br i1 %240, label %241, label %250

241:                                              ; preds = %238
  %242 = load i64, ptr %24, align 8, !tbaa !27
  %243 = load ptr, ptr %18, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.AF_LatinAxisRec_, ptr %243, i32 0, i32 3
  %245 = load i32, ptr %23, align 4, !tbaa !31
  %246 = add i32 %245, 1
  store i32 %246, ptr %23, align 4, !tbaa !31
  %247 = zext i32 %245 to i64
  %248 = getelementptr inbounds [16 x %struct.AF_WidthRec_], ptr %244, i64 0, i64 %247
  %249 = getelementptr inbounds %struct.AF_WidthRec_, ptr %248, i32 0, i32 0
  store i64 %242, ptr %249, align 8, !tbaa !55
  br label %250

250:                                              ; preds = %241, %238
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  br label %251

251:                                              ; preds = %250, %218, %212, %206
  br label %252

252:                                              ; preds = %251
  %253 = load ptr, ptr %20, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.AF_SegmentRec_, ptr %253, i32 1
  store ptr %254, ptr %20, align 8, !tbaa !5
  br label %202, !llvm.loop !57

255:                                              ; preds = %202
  %256 = load ptr, ptr %18, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.AF_LatinAxisRec_, ptr %256, i32 0, i32 3
  %258 = getelementptr inbounds [16 x %struct.AF_WidthRec_], ptr %257, i64 0, i64 0
  %259 = getelementptr inbounds [1 x %struct.AF_LatinMetricsRec_], ptr %9, i64 0, i64 0
  %260 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %259, i32 0, i32 1
  %261 = load i32, ptr %260, align 8, !tbaa !40
  %262 = udiv i32 %261, 100
  %263 = zext i32 %262 to i64
  call void @af_sort_and_quantize_widths(ptr noundef %23, ptr noundef %258, i64 noundef %263)
  %264 = load i32, ptr %23, align 4, !tbaa !31
  %265 = load ptr, ptr %18, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.AF_LatinAxisRec_, ptr %265, i32 0, i32 2
  store i32 %264, ptr %266, align 8, !tbaa !17
  store i32 0, ptr %17, align 4
  br label %267

267:                                              ; preds = %255, %183
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  %268 = load i32, ptr %17, align 4
  switch i32 %268, label %320 [
    i32 0, label %269
    i32 16, label %274
  ]

269:                                              ; preds = %267
  br label %270

270:                                              ; preds = %269
  %271 = load i32, ptr %8, align 4, !tbaa !31
  %272 = add nsw i32 %271, 1
  store i32 %272, ptr %8, align 4, !tbaa !31
  br label %164, !llvm.loop !58

273:                                              ; preds = %164
  br label %274

274:                                              ; preds = %273, %267, %162, %129, %109
  store i32 0, ptr %8, align 4, !tbaa !31
  br label %275

275:                                              ; preds = %312, %274
  %276 = load i32, ptr %8, align 4, !tbaa !31
  %277 = icmp slt i32 %276, 2
  br i1 %277, label %278, label %315

278:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %279 = load ptr, ptr %3, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %279, i32 0, i32 2
  %281 = load i32, ptr %8, align 4, !tbaa !31
  %282 = sext i32 %281 to i64
  %283 = getelementptr inbounds [2 x %struct.AF_LatinAxisRec_], ptr %280, i64 0, i64 %282
  store ptr %283, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #4
  %284 = load ptr, ptr %25, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.AF_LatinAxisRec_, ptr %284, i32 0, i32 2
  %286 = load i32, ptr %285, align 8, !tbaa !17
  %287 = icmp ugt i32 %286, 0
  br i1 %287, label %288, label %294

288:                                              ; preds = %278
  %289 = load ptr, ptr %25, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.AF_LatinAxisRec_, ptr %289, i32 0, i32 3
  %291 = getelementptr inbounds [16 x %struct.AF_WidthRec_], ptr %290, i64 0, i64 0
  %292 = getelementptr inbounds %struct.AF_WidthRec_, ptr %291, i32 0, i32 0
  %293 = load i64, ptr %292, align 8, !tbaa !55
  br label %301

294:                                              ; preds = %278
  %295 = load ptr, ptr %3, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.AF_LatinMetricsRec_, ptr %295, i32 0, i32 1
  %297 = load i32, ptr %296, align 8, !tbaa !40
  %298 = zext i32 %297 to i64
  %299 = mul nsw i64 50, %298
  %300 = sdiv i64 %299, 2048
  br label %301

301:                                              ; preds = %294, %288
  %302 = phi i64 [ %293, %288 ], [ %300, %294 ]
  store i64 %302, ptr %26, align 8, !tbaa !27
  %303 = load i64, ptr %26, align 8, !tbaa !27
  %304 = sdiv i64 %303, 5
  %305 = load ptr, ptr %25, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.AF_LatinAxisRec_, ptr %305, i32 0, i32 4
  store i64 %304, ptr %306, align 8, !tbaa !59
  %307 = load i64, ptr %26, align 8, !tbaa !27
  %308 = load ptr, ptr %25, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.AF_LatinAxisRec_, ptr %308, i32 0, i32 5
  store i64 %307, ptr %309, align 8, !tbaa !60
  %310 = load ptr, ptr %25, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.AF_LatinAxisRec_, ptr %310, i32 0, i32 6
  store i8 0, ptr %311, align 8, !tbaa !61
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  br label %312

312:                                              ; preds = %301
  %313 = load i32, ptr %8, align 4, !tbaa !31
  %314 = add nsw i32 %313, 1
  store i32 %314, ptr %8, align 4, !tbaa !31
  br label %275, !llvm.loop !62

315:                                              ; preds = %275
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 39280, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %316

316:                                              ; preds = %315
  br label %317

317:                                              ; preds = %316
  br label %318

318:                                              ; preds = %317
  %319 = getelementptr inbounds [1 x %struct.AF_GlyphHintsRec_], ptr %5, i64 0, i64 0
  call void @af_glyph_hints_done(ptr noundef %319)
  call void @llvm.lifetime.end.p0(i64 12904, ptr %5) #4
  ret void

320:                                              ; preds = %267, %98
  unreachable
}

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

declare hidden void @af_glyph_hints_init(ptr noundef, ptr noundef) #2

declare ptr @af_shaper_get_cluster(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i64 @af_shaper_get_elem(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

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

declare void @af_shaper_buf_destroy(ptr noundef, ptr noundef) #2

declare i32 @FT_Load_Glyph(ptr noundef, i32 noundef, i32 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

declare hidden void @af_glyph_hints_rescale(ptr noundef, ptr noundef) #2

declare hidden i32 @af_glyph_hints_reload(ptr noundef, ptr noundef) #2

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

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

declare hidden void @af_sort_and_quantize_widths(ptr noundef, ptr noundef, i64 noundef) #2

declare hidden void @af_glyph_hints_done(ptr noundef) #2

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 = { "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 = { 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, !6, i64 184}
!10 = !{!"FT_FaceRec_", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !6, i64 40, !6, i64 48, !12, i64 56, !6, i64 64, !12, i64 72, !6, i64 80, !13, i64 88, !14, i64 104, !15, i64 136, !15, i64 138, !15, i64 140, !15, i64 142, !15, i64 144, !15, i64 146, !15, i64 148, !15, i64 150, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !16, i64 200, !13, i64 216, !6, i64 232, !6, i64 240}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"FT_Generic_", !6, i64 0, !6, i64 8}
!14 = !{!"FT_BBox_", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!15 = !{!"short", !7, i64 0}
!16 = !{!"FT_ListRec_", !6, i64 0, !6, i64 8}
!17 = !{!18, !12, i64 16}
!18 = !{!"AF_LatinAxisRec_", !11, i64 0, !11, i64 8, !12, i64 16, !7, i64 24, !11, i64 408, !11, i64 416, !7, i64 424, !12, i64 428, !7, i64 432, !11, i64 19584, !11, i64 19592}
!19 = !{!20, !6, i64 0}
!20 = !{!"AF_LatinMetricsRec_", !21, i64 0, !12, i64 72, !7, i64 80}
!21 = !{!"AF_StyleMetricsRec_", !6, i64 0, !22, i64 8, !7, i64 56, !6, i64 64}
!22 = !{!"AF_ScalerRec_", !6, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !12, i64 40, !12, i64 44}
!23 = !{!24, !12, i64 8}
!24 = !{!"AF_StyleClassRec_", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16}
!25 = !{!26, !6, i64 32}
!26 = !{!"AF_ScriptClassRec_", !12, i64 0, !6, i64 8, !6, i64 16, !7, i64 24, !6, i64 32}
!27 = !{!11, !11, i64 0}
!28 = !{!7, !7, i64 0}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!12, !12, i64 0}
!32 = distinct !{!32, !30}
!33 = !{!10, !6, i64 152}
!34 = !{!35, !15, i64 202}
!35 = !{!"FT_GlyphSlotRec_", !6, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !13, i64 32, !36, i64 48, !11, i64 112, !11, i64 120, !37, i64 128, !12, i64 144, !38, i64 152, !12, i64 192, !12, i64 196, !39, i64 200, !12, i64 240, !6, i64 248, !6, i64 256, !11, i64 264, !11, i64 272, !11, i64 280, !6, i64 288, !6, i64 296}
!36 = !{!"FT_Glyph_Metrics_", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!37 = !{!"FT_Vector_", !11, i64 0, !11, i64 8}
!38 = !{!"FT_Bitmap_", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !15, i64 24, !7, i64 26, !7, i64 27, !6, i64 32}
!39 = !{!"FT_Outline_", !15, i64 0, !15, i64 2, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32}
!40 = !{!20, !12, i64 72}
!41 = !{!22, !11, i64 8}
!42 = !{!22, !11, i64 16}
!43 = !{!22, !11, i64 24}
!44 = !{!22, !11, i64 32}
!45 = !{!22, !6, i64 0}
!46 = !{!22, !12, i64 40}
!47 = !{!22, !12, i64 44}
!48 = !{!49, !6, i64 8}
!49 = !{!"AF_AxisHintsRec_", !12, i64 0, !12, i64 4, !6, i64 8, !12, i64 16, !12, i64 20, !6, i64 24, !12, i64 32, !50, i64 40}
!50 = !{!"", !7, i64 0, !7, i64 1440}
!51 = !{!49, !12, i64 0}
!52 = !{!53, !6, i64 32}
!53 = !{!"AF_SegmentRec_", !7, i64 0, !7, i64 1, !15, i64 2, !15, i64 4, !15, i64 6, !15, i64 8, !15, i64 10, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 56, !6, i64 64, !6, i64 72}
!54 = !{!53, !15, i64 2}
!55 = !{!56, !11, i64 0}
!56 = !{!"AF_WidthRec_", !11, i64 0, !11, i64 8, !11, i64 16}
!57 = distinct !{!57, !30}
!58 = distinct !{!58, !30}
!59 = !{!18, !11, i64 408}
!60 = !{!18, !11, i64 416}
!61 = !{!18, !7, i64 424}
!62 = distinct !{!62, !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.AF_GlyphHintsRec_ = type { ptr, i64, i64, i64, i64, i32, i32, ptr, i32, i32, ptr, [2 x %struct.AF_AxisHintsRec_], i32, i32, ptr, %struct.anon.0 }
%struct.AF_AxisHintsRec_ = type { i32, i32, ptr, i32, i32, ptr, i32, %struct.anon }
%struct.anon = type { [18 x %struct.AF_SegmentRec_], [12 x %struct.AF_EdgeRec_] }
%struct.AF_SegmentRec_ = type { i8, i8, i16, i16, i16, i16, i16, ptr, ptr, ptr, ptr, i64, i64, ptr, ptr }
%struct.AF_EdgeRec_ = type { i16, i64, i64, i8, i8, i64, ptr, ptr, ptr, i32, ptr, ptr }
%struct.anon.0 = type { [8 x ptr], [96 x %struct.AF_PointRec_] }
%struct.AF_PointRec_ = type { i16, i8, i8, i64, i64, i16, i16, i64, i64, i64, i64, ptr, ptr }
%struct.AF_LatinMetricsRec_ = type { %struct.AF_StyleMetricsRec_, i32, [2 x %struct.AF_LatinAxisRec_] }
%struct.AF_StyleMetricsRec_ = type { ptr, %struct.AF_ScalerRec_, i8, ptr }
%struct.AF_ScalerRec_ = type { ptr, i64, i64, i64, i64, i32, i32 }
%struct.AF_LatinAxisRec_ = type { i64, i64, i32, [16 x %struct.AF_WidthRec_], i64, i64, i8, i32, [266 x %struct.AF_LatinBlueRec_], i64, i64 }
%struct.AF_WidthRec_ = type { i64, i64, i64 }
%struct.AF_LatinBlueRec_ = type { %struct.AF_WidthRec_, %struct.AF_WidthRec_, i64, i64, i32 }

@af_script_classes = external hidden local_unnamed_addr constant [0 x ptr], align 8

; Function Attrs: nounwind uwtable
define hidden void @af_latin_metrics_init_widths(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca [1 x %struct.AF_GlyphHintsRec_], align 16
  %4 = alloca [1 x %struct.AF_LatinMetricsRec_], align 16
  %5 = alloca i64, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 12904, ptr nonnull %3) #5
  %8 = getelementptr inbounds i8, ptr %1, i64 184
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  call void @af_glyph_hints_init(ptr noundef nonnull %3, ptr noundef %9) #5
  %10 = getelementptr inbounds i8, ptr %0, i64 96
  store i32 0, ptr %10, align 8, !tbaa !16
  %11 = getelementptr inbounds i8, ptr %0, i64 19696
  store i32 0, ptr %11, align 8, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 39280, ptr nonnull %4) #5
  %12 = getelementptr inbounds i8, ptr %4, i64 8
  %13 = load ptr, ptr %0, align 8, !tbaa !18
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  %15 = load i32, ptr %14, align 4, !tbaa !22
  %16 = zext i32 %15 to i64
  %17 = getelementptr inbounds [0 x ptr], ptr @af_script_classes, i64 0, i64 %16
  %18 = load ptr, ptr %17, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %19 = getelementptr inbounds i8, ptr %18, i64 32
  %20 = load ptr, ptr %19, align 8, !tbaa !25
  %21 = load i8, ptr %20, align 1, !tbaa !27
  %.not123 = icmp eq i8 %21, 0
  br i1 %.not123, label %._crit_edge127, label %.lr.ph126

.lr.ph126:                                        ; preds = %2, %select.unfold
  %.078124 = phi ptr [ %27, %select.unfold ], [ %20, %2 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  br label %22

22:                                               ; preds = %22, %.lr.ph126
  %.179 = phi ptr [ %.078124, %.lr.ph126 ], [ %25, %22 ]
  %23 = load i8, ptr %.179, align 1, !tbaa !27
  %24 = icmp eq i8 %23, 32
  %25 = getelementptr inbounds i8, ptr %.179, i64 1
  br i1 %24, label %22, label %26, !llvm.loop !28

26:                                               ; preds = %22
  %27 = call ptr @af_shaper_get_cluster(ptr noundef nonnull %.179, ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef nonnull %6) #5
  %28 = load i32, ptr %6, align 4, !tbaa !30
  %29 = icmp ugt i32 %28, 1
  br i1 %29, label %select.unfold, label %30, !llvm.loop !31

30:                                               ; preds = %26
  %31 = call i64 @af_shaper_get_elem(ptr noundef nonnull %0, ptr noundef nonnull %5, i32 noundef 0, ptr noundef null, ptr noundef null) #5
  %.not90 = icmp eq i64 %31, 0
  br i1 %.not90, label %select.unfold, label %.thread112

.thread112:                                       ; preds = %30
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @af_shaper_buf_destroy(ptr noundef %1, ptr noundef nonnull %5) #5
  %32 = trunc i64 %31 to i32
  %33 = call i32 @FT_Load_Glyph(ptr noundef %1, i32 noundef %32, i32 noundef 1) #5
  %.not92 = icmp eq i32 %33, 0
  br i1 %.not92, label %35, label %.loopexit

select.unfold:                                    ; preds = %30, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %34 = load i8, ptr %27, align 1, !tbaa !27
  %.not = icmp eq i8 %34, 0
  br i1 %.not, label %._crit_edge127, label %.lr.ph126

._crit_edge127:                                   ; preds = %select.unfold, %2
  call void @af_shaper_buf_destroy(ptr noundef %1, ptr noundef nonnull %5) #5
  br label %.loopexit

35:                                               ; preds = %.thread112
  %36 = getelementptr inbounds i8, ptr %1, i64 152
  %37 = load ptr, ptr %36, align 8, !tbaa !32
  %38 = getelementptr inbounds i8, ptr %37, i64 202
  %39 = load i16, ptr %38, align 2, !tbaa !33
  %40 = icmp slt i16 %39, 1
  br i1 %40, label %.loopexit, label %41

41:                                               ; preds = %35
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(39280) %4, i8 0, i64 39280, i1 false)
  %42 = getelementptr inbounds i8, ptr %0, i64 72
  %43 = load i32, ptr %42, align 8, !tbaa !39
  %44 = getelementptr inbounds i8, ptr %4, i64 72
  store i32 %43, ptr %44, align 8, !tbaa !39
  %45 = getelementptr inbounds i8, ptr %4, i64 16
  store i64 65536, ptr %45, align 16, !tbaa !40
  %46 = getelementptr inbounds i8, ptr %4, i64 24
  store i64 65536, ptr %46, align 8, !tbaa !41
  %47 = getelementptr inbounds i8, ptr %4, i64 32
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(16) %47, i8 0, i64 16, i1 false)
  store ptr %1, ptr %12, align 8, !tbaa !42
  %48 = getelementptr inbounds i8, ptr %4, i64 52
  store i32 0, ptr %48, align 4, !tbaa !43
  call void @af_glyph_hints_rescale(ptr noundef nonnull %3, ptr noundef nonnull %4) #5
  %49 = load ptr, ptr %36, align 8, !tbaa !32
  %50 = getelementptr inbounds i8, ptr %49, i64 200
  %51 = call i32 @af_glyph_hints_reload(ptr noundef nonnull %3, ptr noundef nonnull %50) #5
  %.not93 = icmp eq i32 %51, 0
  br i1 %.not93, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %41
  %52 = getelementptr inbounds i8, ptr %3, i64 72
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 0, ptr %7, align 4, !tbaa !30
  %53 = call i32 @af_latin_hints_compute_segments(ptr noundef nonnull %3, i32 noundef 0)
  %.not94 = icmp eq i32 %53, 0
  br i1 %.not94, label %54, label %89

54:                                               ; preds = %.preheader
  call void @af_latin_hints_link_segments(ptr noundef nonnull %3, i32 noundef 0, ptr noundef null, i32 noundef 0)
  %55 = getelementptr inbounds i8, ptr %3, i64 80
  %56 = load ptr, ptr %55, align 16, !tbaa !44
  %.not95 = icmp eq ptr %56, null
  br i1 %.not95, label %._crit_edge, label %57

57:                                               ; preds = %54
  %58 = load i32, ptr %52, align 8, !tbaa !47
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds %struct.AF_SegmentRec_, ptr %56, i64 %59
  %.not120 = icmp eq i32 %58, 0
  br i1 %.not120, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %57
  %61 = getelementptr inbounds i8, ptr %0, i64 104
  %.promoted = load i32, ptr %7, align 4, !tbaa !30
  br label %62

62:                                               ; preds = %.lr.ph, %84
  %63 = phi i32 [ %.promoted, %.lr.ph ], [ %85, %84 ]
  %.080103 = phi ptr [ %56, %.lr.ph ], [ %87, %84 ]
  %64 = phi i32 [ 0, %.lr.ph ], [ %86, %84 ]
  %65 = getelementptr inbounds i8, ptr %.080103, i64 32
  %66 = load ptr, ptr %65, align 8, !tbaa !48
  %.not96 = icmp eq ptr %66, null
  br i1 %.not96, label %84, label %67

67:                                               ; preds = %62
  %68 = getelementptr inbounds i8, ptr %66, i64 32
  %69 = load ptr, ptr %68, align 8, !tbaa !48
  %70 = icmp eq ptr %69, %.080103
  %71 = icmp ugt ptr %66, %.080103
  %or.cond = and i1 %71, %70
  %72 = icmp ult i32 %64, 16
  %or.cond106 = select i1 %or.cond, i1 %72, i1 false
  br i1 %or.cond106, label %73, label %84

73:                                               ; preds = %67
  %74 = getelementptr inbounds i8, ptr %.080103, i64 2
  %75 = load i16, ptr %74, align 2, !tbaa !50
  %76 = sext i16 %75 to i64
  %77 = getelementptr inbounds i8, ptr %66, i64 2
  %78 = load i16, ptr %77, align 2, !tbaa !50
  %79 = sext i16 %78 to i64
  %80 = sub nsw i64 %76, %79
  %spec.select = call i64 @llvm.abs.i64(i64 %80, i1 true)
  %81 = add nuw nsw i32 %64, 1
  %82 = zext nneg i32 %64 to i64
  %83 = getelementptr inbounds [16 x %struct.AF_WidthRec_], ptr %61, i64 0, i64 %82
  store i64 %spec.select, ptr %83, align 8, !tbaa !51
  br label %84

84:                                               ; preds = %73, %62, %67
  %85 = phi i32 [ %81, %73 ], [ %63, %62 ], [ %63, %67 ]
  %86 = phi i32 [ %81, %73 ], [ %64, %62 ], [ %64, %67 ]
  %87 = getelementptr inbounds i8, ptr %.080103, i64 80
  %88 = icmp ult ptr %87, %60
  br i1 %88, label %62, label %._crit_edge.loopexit, !llvm.loop !53

89:                                               ; preds = %._crit_edge, %.preheader
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %.loopexit

._crit_edge.loopexit:                             ; preds = %84
  store i32 %85, ptr %7, align 4, !tbaa !30
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %54, %57
  %90 = getelementptr inbounds i8, ptr %0, i64 104
  %91 = load i32, ptr %44, align 8, !tbaa !39
  %92 = udiv i32 %91, 100
  %93 = zext nneg i32 %92 to i64
  call void @af_sort_and_quantize_widths(ptr noundef nonnull %7, ptr noundef nonnull %90, i64 noundef %93) #5
  %94 = load i32, ptr %7, align 4, !tbaa !30
  %95 = getelementptr inbounds i8, ptr %0, i64 96
  store i32 %94, ptr %95, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  %96 = getelementptr inbounds i8, ptr %3, i64 2608
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 0, ptr %7, align 4, !tbaa !30
  %97 = call i32 @af_latin_hints_compute_segments(ptr noundef nonnull %3, i32 noundef 1)
  %.not94.1 = icmp eq i32 %97, 0
  br i1 %.not94.1, label %98, label %89

98:                                               ; preds = %._crit_edge
  call void @af_latin_hints_link_segments(ptr noundef nonnull %3, i32 noundef 0, ptr noundef null, i32 noundef 1)
  %99 = getelementptr inbounds i8, ptr %3, i64 2616
  %100 = load ptr, ptr %99, align 8, !tbaa !44
  %.not95.1 = icmp eq ptr %100, null
  br i1 %.not95.1, label %._crit_edge.1, label %101

101:                                              ; preds = %98
  %102 = load i32, ptr %96, align 16, !tbaa !47
  %103 = zext i32 %102 to i64
  %104 = getelementptr inbounds %struct.AF_SegmentRec_, ptr %100, i64 %103
  %.not121 = icmp eq i32 %102, 0
  br i1 %.not121, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %101
  %.promoted.1 = load i32, ptr %7, align 4, !tbaa !30
  %105 = getelementptr inbounds i8, ptr %0, i64 19704
  br label %106

106:                                              ; preds = %127, %.lr.ph.1
  %.080103.1 = phi ptr [ %100, %.lr.ph.1 ], [ %129, %127 ]
  %107 = phi i32 [ %.promoted.1, %.lr.ph.1 ], [ %128, %127 ]
  %108 = getelementptr inbounds i8, ptr %.080103.1, i64 32
  %109 = load ptr, ptr %108, align 8, !tbaa !48
  %.not96.1 = icmp eq ptr %109, null
  br i1 %.not96.1, label %127, label %110

110:                                              ; preds = %106
  %111 = getelementptr inbounds i8, ptr %109, i64 32
  %112 = load ptr, ptr %111, align 8, !tbaa !48
  %113 = icmp eq ptr %112, %.080103.1
  %114 = icmp ugt ptr %109, %.080103.1
  %or.cond.1 = and i1 %114, %113
  %115 = icmp ult i32 %107, 16
  %or.cond106.1 = select i1 %or.cond.1, i1 %115, i1 false
  br i1 %or.cond106.1, label %116, label %127

116:                                              ; preds = %110
  %117 = getelementptr inbounds i8, ptr %.080103.1, i64 2
  %118 = load i16, ptr %117, align 2, !tbaa !50
  %119 = sext i16 %118 to i64
  %120 = getelementptr inbounds i8, ptr %109, i64 2
  %121 = load i16, ptr %120, align 2, !tbaa !50
  %122 = sext i16 %121 to i64
  %123 = sub nsw i64 %119, %122
  %spec.select.1 = call i64 @llvm.abs.i64(i64 %123, i1 true)
  %124 = add nuw nsw i32 %107, 1
  store i32 %124, ptr %7, align 4, !tbaa !30
  %125 = zext nneg i32 %107 to i64
  %126 = getelementptr inbounds [16 x %struct.AF_WidthRec_], ptr %105, i64 0, i64 %125
  store i64 %spec.select.1, ptr %126, align 8, !tbaa !51
  br label %127

127:                                              ; preds = %116, %110, %106
  %128 = phi i32 [ %124, %116 ], [ %107, %106 ], [ %107, %110 ]
  %129 = getelementptr inbounds i8, ptr %.080103.1, i64 80
  %130 = icmp ult ptr %129, %104
  br i1 %130, label %106, label %._crit_edge.1, !llvm.loop !53

._crit_edge.1:                                    ; preds = %127, %98, %101
  %131 = getelementptr inbounds i8, ptr %0, i64 19704
  %132 = load i32, ptr %44, align 8, !tbaa !39
  %133 = udiv i32 %132, 100
  %134 = zext nneg i32 %133 to i64
  call void @af_sort_and_quantize_widths(ptr noundef nonnull %7, ptr noundef nonnull %131, i64 noundef %134) #5
  %135 = load i32, ptr %7, align 4, !tbaa !30
  %136 = getelementptr inbounds i8, ptr %0, i64 19696
  store i32 %135, ptr %136, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %.loopexit

.loopexit:                                        ; preds = %._crit_edge127, %._crit_edge.1, %89, %41, %.thread112, %35
  %137 = getelementptr inbounds i8, ptr %0, i64 72
  %138 = getelementptr inbounds i8, ptr %0, i64 96
  %139 = load i32, ptr %138, align 8, !tbaa !16
  %.not97 = icmp eq i32 %139, 0
  br i1 %.not97, label %143, label %140

140:                                              ; preds = %.loopexit
  %141 = getelementptr inbounds i8, ptr %0, i64 104
  %142 = load i64, ptr %141, align 8, !tbaa !51
  br label %148

143:                                              ; preds = %.loopexit
  %144 = load i32, ptr %137, align 8, !tbaa !39
  %145 = zext i32 %144 to i64
  %146 = mul nuw nsw i64 %145, 50
  %147 = lshr i64 %146, 11
  br label %148

148:                                              ; preds = %143, %140
  %149 = phi i64 [ %142, %140 ], [ %147, %143 ]
  %150 = sdiv i64 %149, 5
  %151 = getelementptr inbounds i8, ptr %0, i64 488
  store i64 %150, ptr %151, align 8, !tbaa !54
  %152 = getelementptr inbounds i8, ptr %0, i64 496
  store i64 %149, ptr %152, align 8, !tbaa !55
  %153 = getelementptr inbounds i8, ptr %0, i64 504
  store i8 0, ptr %153, align 8, !tbaa !56
  %154 = getelementptr inbounds i8, ptr %0, i64 19696
  %155 = load i32, ptr %154, align 8, !tbaa !16
  %.not97.1 = icmp eq i32 %155, 0
  br i1 %.not97.1, label %159, label %156

156:                                              ; preds = %148
  %157 = getelementptr inbounds i8, ptr %0, i64 19704
  %158 = load i64, ptr %157, align 8, !tbaa !51
  br label %164

159:                                              ; preds = %148
  %160 = load i32, ptr %137, align 8, !tbaa !39
  %161 = zext i32 %160 to i64
  %162 = mul nuw nsw i64 %161, 50
  %163 = lshr i64 %162, 11
  br label %164

164:                                              ; preds = %159, %156
  %165 = phi i64 [ %158, %156 ], [ %163, %159 ]
  %166 = sdiv i64 %165, 5
  %167 = getelementptr inbounds i8, ptr %0, i64 20088
  store i64 %166, ptr %167, align 8, !tbaa !54
  %168 = getelementptr inbounds i8, ptr %0, i64 20096
  store i64 %165, ptr %168, align 8, !tbaa !55
  %169 = getelementptr inbounds i8, ptr %0, i64 20104
  store i8 0, ptr %169, align 8, !tbaa !56
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 39280, ptr nonnull %4) #5
  call void @af_glyph_hints_done(ptr noundef nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 12904, ptr nonnull %3) #5
  ret void
}

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

declare hidden void @af_glyph_hints_init(ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @af_shaper_get_cluster(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i64 @af_shaper_get_elem(ptr noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @af_shaper_buf_destroy(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @FT_Load_Glyph(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

declare hidden void @af_glyph_hints_rescale(ptr noundef, ptr noundef) local_unnamed_addr #2

declare hidden i32 @af_glyph_hints_reload(ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

declare hidden void @af_sort_and_quantize_widths(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare hidden void @af_glyph_hints_done(ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.abs.i64(i64, i1 immarg) #4

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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !10, i64 184}
!6 = !{!"FT_FaceRec_", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 48, !11, i64 56, !10, i64 64, !11, i64 72, !10, i64 80, !12, i64 88, !13, i64 104, !14, i64 136, !14, i64 138, !14, i64 140, !14, i64 142, !14, i64 144, !14, i64 146, !14, i64 148, !14, i64 150, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !15, i64 200, !12, i64 216, !10, i64 232, !10, i64 240}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"FT_Generic_", !10, i64 0, !10, i64 8}
!13 = !{!"FT_BBox_", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!14 = !{!"short", !8, i64 0}
!15 = !{!"FT_ListRec_", !10, i64 0, !10, i64 8}
!16 = !{!17, !11, i64 16}
!17 = !{!"AF_LatinAxisRec_", !7, i64 0, !7, i64 8, !11, i64 16, !8, i64 24, !7, i64 408, !7, i64 416, !8, i64 424, !11, i64 428, !8, i64 432, !7, i64 19584, !7, i64 19592}
!18 = !{!19, !10, i64 0}
!19 = !{!"AF_LatinMetricsRec_", !20, i64 0, !11, i64 72, !8, i64 80}
!20 = !{!"AF_StyleMetricsRec_", !10, i64 0, !21, i64 8, !8, i64 56, !10, i64 64}
!21 = !{!"AF_ScalerRec_", !10, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !11, i64 40, !11, i64 44}
!22 = !{!23, !11, i64 8}
!23 = !{!"AF_StyleClassRec_", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16}
!24 = !{!10, !10, i64 0}
!25 = !{!26, !10, i64 32}
!26 = !{!"AF_ScriptClassRec_", !11, i64 0, !10, i64 8, !10, i64 16, !8, i64 24, !10, i64 32}
!27 = !{!8, !8, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!11, !11, i64 0}
!31 = distinct !{!31, !29}
!32 = !{!6, !10, i64 152}
!33 = !{!34, !14, i64 202}
!34 = !{!"FT_GlyphSlotRec_", !10, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 32, !35, i64 48, !7, i64 112, !7, i64 120, !36, i64 128, !11, i64 144, !37, i64 152, !11, i64 192, !11, i64 196, !38, i64 200, !11, i64 240, !10, i64 248, !10, i64 256, !7, i64 264, !7, i64 272, !7, i64 280, !10, i64 288, !10, i64 296}
!35 = !{!"FT_Glyph_Metrics_", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!36 = !{!"FT_Vector_", !7, i64 0, !7, i64 8}
!37 = !{!"FT_Bitmap_", !11, i64 0, !11, i64 4, !11, i64 8, !10, i64 16, !14, i64 24, !8, i64 26, !8, i64 27, !10, i64 32}
!38 = !{!"FT_Outline_", !14, i64 0, !14, i64 2, !10, i64 8, !10, i64 16, !10, i64 24, !11, i64 32}
!39 = !{!19, !11, i64 72}
!40 = !{!21, !7, i64 8}
!41 = !{!21, !7, i64 16}
!42 = !{!21, !10, i64 0}
!43 = !{!21, !11, i64 44}
!44 = !{!45, !10, i64 8}
!45 = !{!"AF_AxisHintsRec_", !11, i64 0, !11, i64 4, !10, i64 8, !11, i64 16, !11, i64 20, !10, i64 24, !11, i64 32, !46, i64 40}
!46 = !{!"", !8, i64 0, !8, i64 1440}
!47 = !{!45, !11, i64 0}
!48 = !{!49, !10, i64 32}
!49 = !{!"AF_SegmentRec_", !8, i64 0, !8, i64 1, !14, i64 2, !14, i64 4, !14, i64 6, !14, i64 8, !14, i64 10, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !10, i64 72}
!50 = !{!49, !14, i64 2}
!51 = !{!52, !7, i64 0}
!52 = !{!"AF_WidthRec_", !7, i64 0, !7, i64 8, !7, i64 16}
!53 = distinct !{!53, !29}
!54 = !{!17, !7, i64 408}
!55 = !{!17, !7, i64 416}
!56 = !{!17, !8, i64 424}


; Effective O3 passes: ADCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,ReassociatePass,SROAPass,SimplifyCFGPass