; LLVM IR from caryll/otfcc :: lib/table/glyf (read)

; 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.__caryll_vectorinterface_table_glyf = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otfcc_Packet = type { i32, i16, i16, i16, i16, ptr }
%struct.otfcc_PacketPiece = type { i32, i32, i32, i32, ptr }
%struct.GlyfIOContext = type { i8, i16, i16, ptr, i8, i8 }
%struct.otfcc_Options = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, ptr, ptr }
%struct.otfcc_ILogger = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@table_iGlyf = external constant %struct.__caryll_vectorinterface_table_glyf, align 8
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @otfcc_readGlyf(ptr noundef byval(%struct.otfcc_Packet) align 8 %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.otfcc_PacketPiece, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %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 %struct.otfcc_PacketPiece, align 8
  %23 = alloca i32, align 4
  %24 = alloca ptr, align 8
  %25 = alloca i32, align 4
  %26 = alloca i16, align 2
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr null, ptr %8, align 8, !tbaa !5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.GlyfIOContext, ptr %27, i32 0, i32 1
  %29 = load i16, ptr %28, align 2, !tbaa !9
  %30 = zext i16 %29 to i32
  %31 = add nsw i32 %30, 1
  %32 = sext i32 %31 to i64
  %33 = mul i64 4, %32
  %34 = call ptr @__caryll_allocate_clean(i64 noundef %33, i64 noundef 649)
  store ptr %34, ptr %7, align 8, !tbaa !5
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %38, label %37

37:                                               ; preds = %3
  br label %338

38:                                               ; preds = %3
  store i8 0, ptr %9, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 0, ptr %11, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !14
  br label %39

39:                                               ; preds = %178, %38
  %40 = load i32, ptr %12, align 4, !tbaa !14
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %51

42:                                               ; preds = %39
  %43 = load i32, ptr %10, align 4, !tbaa !14
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %51

45:                                               ; preds = %42
  %46 = load i32, ptr %11, align 4, !tbaa !14
  %47 = getelementptr inbounds %struct.otfcc_Packet, ptr %0, i32 0, i32 1
  %48 = load i16, ptr %47, align 4, !tbaa !16
  %49 = zext i16 %48 to i32
  %50 = icmp slt i32 %46, %49
  br label %51

51:                                               ; preds = %45, %42, %39
  %52 = phi i1 [ false, %42 ], [ false, %39 ], [ %50, %45 ]
  br i1 %52, label %54, label %53

53:                                               ; preds = %51
  store i32 3, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %185

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #6
  %55 = getelementptr inbounds %struct.otfcc_Packet, ptr %0, i32 0, i32 5
  %56 = load ptr, ptr %55, align 8, !tbaa !18
  %57 = load i32, ptr %11, align 4, !tbaa !14
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %56, i64 %58
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %59, i64 24, i1 false), !tbaa.struct !19
  br label %60

60:                                               ; preds = %172, %54
  %61 = load i32, ptr %10, align 4, !tbaa !14
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %64, label %63

63:                                               ; preds = %60
  store i32 6, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #6
  br label %177

64:                                               ; preds = %60
  %65 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %14, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !20
  %67 = icmp eq i32 %66, 1819239265
  br i1 %67, label %68, label %171

68:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 1, ptr %15, align 4, !tbaa !14
  br label %69

69:                                               ; preds = %168, %68
  %70 = load i32, ptr %15, align 4, !tbaa !14
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %73, label %72

72:                                               ; preds = %69
  store i32 9, ptr %13, align 4
  br label %169

73:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %74 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %14, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !22
  store ptr %75, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %76 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %14, i32 0, i32 3
  %77 = load i32, ptr %76, align 4, !tbaa !23
  store i32 %77, ptr %17, align 4, !tbaa !14
  %78 = load i32, ptr %17, align 4, !tbaa !14
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.GlyfIOContext, ptr %79, i32 0, i32 1
  %81 = load i16, ptr %80, align 2, !tbaa !9
  %82 = zext i16 %81 to i32
  %83 = mul nsw i32 2, %82
  %84 = add nsw i32 %83, 2
  %85 = icmp ult i32 %78, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %73
  br label %150

87:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !14
  br label %88

88:                                               ; preds = %144, %87
  %89 = load i32, ptr %18, align 4, !tbaa !14
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.GlyfIOContext, ptr %90, i32 0, i32 1
  %92 = load i16, ptr %91, align 2, !tbaa !9
  %93 = zext i16 %92 to i32
  %94 = add nsw i32 %93, 1
  %95 = icmp ult i32 %89, %94
  br i1 %95, label %97, label %96

96:                                               ; preds = %88
  store i32 13, ptr %13, align 4
  br label %147

97:                                               ; preds = %88
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.GlyfIOContext, ptr %98, i32 0, i32 0
  %100 = load i8, ptr %99, align 8, !tbaa !24, !range !25, !noundef !26
  %101 = trunc i8 %100 to i1
  br i1 %101, label %102, label %113

102:                                              ; preds = %97
  %103 = load ptr, ptr %16, align 8, !tbaa !5
  %104 = load i32, ptr %18, align 4, !tbaa !14
  %105 = mul i32 %104, 4
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %103, i64 %106
  %108 = call i32 @read_32u(ptr noundef %107)
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = load i32, ptr %18, align 4, !tbaa !14
  %111 = zext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %109, i64 %111
  store i32 %108, ptr %112, align 4, !tbaa !14
  br label %126

113:                                              ; preds = %97
  %114 = load ptr, ptr %16, align 8, !tbaa !5
  %115 = load i32, ptr %18, align 4, !tbaa !14
  %116 = mul i32 %115, 2
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds i8, ptr %114, i64 %117
  %119 = call zeroext i16 @read_16u(ptr noundef %118)
  %120 = zext i16 %119 to i32
  %121 = mul nsw i32 %120, 2
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = load i32, ptr %18, align 4, !tbaa !14
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds i32, ptr %122, i64 %124
  store i32 %121, ptr %125, align 4, !tbaa !14
  br label %126

126:                                              ; preds = %113, %102
  %127 = load i32, ptr %18, align 4, !tbaa !14
  %128 = icmp ugt i32 %127, 0
  br i1 %128, label %129, label %143

129:                                              ; preds = %126
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = load i32, ptr %18, align 4, !tbaa !14
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %130, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !14
  %135 = load ptr, ptr %7, align 8, !tbaa !5
  %136 = load i32, ptr %18, align 4, !tbaa !14
  %137 = sub i32 %136, 1
  %138 = zext i32 %137 to i64
  %139 = getelementptr inbounds i32, ptr %135, i64 %138
  %140 = load i32, ptr %139, align 4, !tbaa !14
  %141 = icmp ult i32 %134, %140
  br i1 %141, label %142, label %143

142:                                              ; preds = %129
  store i32 12, ptr %13, align 4
  br label %147

143:                                              ; preds = %129, %126
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %18, align 4, !tbaa !14
  %146 = add i32 %145, 1
  store i32 %146, ptr %18, align 4, !tbaa !14
  br label %88, !llvm.loop !27

147:                                              ; preds = %142, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  %148 = load i32, ptr %13, align 4
  switch i32 %148, label %166 [
    i32 13, label %149
    i32 12, label %150
  ]

149:                                              ; preds = %147
  store i8 1, ptr %9, align 1, !tbaa !13
  store i32 9, ptr %13, align 4
  br label %166

150:                                              ; preds = %147, %86
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.otfcc_Options, ptr %151, i32 0, i32 24
  %153 = load ptr, ptr %152, align 8, !tbaa !29
  %154 = getelementptr inbounds %struct.otfcc_ILogger, ptr %153, i32 0, i32 6
  %155 = load ptr, ptr %154, align 8, !tbaa !31
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.otfcc_Options, ptr %156, i32 0, i32 24
  %158 = load ptr, ptr %157, align 8, !tbaa !29
  %159 = call ptr @sdsempty()
  %160 = call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %159, ptr noundef @.str)
  call void %155(ptr noundef %158, i8 noundef zeroext 1, i32 noundef 1, ptr noundef %160)
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = icmp ne ptr %161, null
  br i1 %162, label %163, label %165

163:                                              ; preds = %150
  %164 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %164) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  store ptr null, ptr %7, align 8, !tbaa !5
  br label %165

165:                                              ; preds = %163, %150
  store i32 11, ptr %13, align 4
  br label %166

166:                                              ; preds = %165, %149, %147
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  %167 = load i32, ptr %13, align 4
  switch i32 %167, label %169 [
    i32 11, label %168
  ]

168:                                              ; preds = %166
  store i32 0, ptr %15, align 4, !tbaa !14
  store i32 0, ptr %12, align 4, !tbaa !14
  br label %69, !llvm.loop !33

169:                                              ; preds = %166, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %170

170:                                              ; preds = %169
  br label %171

171:                                              ; preds = %170, %64
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %10, align 4, !tbaa !14
  %174 = icmp ne i32 %173, 0
  %175 = xor i1 %174, true
  %176 = zext i1 %175 to i32
  store i32 %176, ptr %10, align 4, !tbaa !14
  br label %60, !llvm.loop !34

177:                                              ; preds = %63
  br label %178

178:                                              ; preds = %177
  %179 = load i32, ptr %10, align 4, !tbaa !14
  %180 = icmp ne i32 %179, 0
  %181 = xor i1 %180, true
  %182 = zext i1 %181 to i32
  store i32 %182, ptr %10, align 4, !tbaa !14
  %183 = load i32, ptr %11, align 4, !tbaa !14
  %184 = add nsw i32 %183, 1
  store i32 %184, ptr %11, align 4, !tbaa !14
  br label %39, !llvm.loop !35

185:                                              ; preds = %53
  %186 = load i8, ptr %9, align 1, !tbaa !13, !range !25, !noundef !26
  %187 = trunc i8 %186 to i1
  br i1 %187, label %189, label %188

188:                                              ; preds = %185
  br label %338

189:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  store i32 1, ptr %21, align 4, !tbaa !14
  br label %190

190:                                              ; preds = %318, %189
  %191 = load i32, ptr %21, align 4, !tbaa !14
  %192 = icmp ne i32 %191, 0
  br i1 %192, label %193, label %202

193:                                              ; preds = %190
  %194 = load i32, ptr %19, align 4, !tbaa !14
  %195 = icmp ne i32 %194, 0
  br i1 %195, label %196, label %202

196:                                              ; preds = %193
  %197 = load i32, ptr %20, align 4, !tbaa !14
  %198 = getelementptr inbounds %struct.otfcc_Packet, ptr %0, i32 0, i32 1
  %199 = load i16, ptr %198, align 4, !tbaa !16
  %200 = zext i16 %199 to i32
  %201 = icmp slt i32 %197, %200
  br label %202

202:                                              ; preds = %196, %193, %190
  %203 = phi i1 [ false, %193 ], [ false, %190 ], [ %201, %196 ]
  br i1 %203, label %205, label %204

204:                                              ; preds = %202
  store i32 16, ptr %13, align 4
  br label %325

205:                                              ; preds = %202
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  %206 = getelementptr inbounds %struct.otfcc_Packet, ptr %0, i32 0, i32 5
  %207 = load ptr, ptr %206, align 8, !tbaa !18
  %208 = load i32, ptr %20, align 4, !tbaa !14
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %207, i64 %209
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %210, i64 24, i1 false), !tbaa.struct !19
  br label %211

211:                                              ; preds = %310, %205
  %212 = load i32, ptr %19, align 4, !tbaa !14
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %215, label %214

214:                                              ; preds = %211
  store i32 19, ptr %13, align 4
  br label %315

215:                                              ; preds = %211
  %216 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %22, i32 0, i32 0
  %217 = load i32, ptr %216, align 8, !tbaa !20
  %218 = icmp eq i32 %217, 1735162214
  br i1 %218, label %219, label %309

219:                                              ; preds = %215
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 1, ptr %23, align 4, !tbaa !14
  br label %220

220:                                              ; preds = %305, %219
  %221 = load i32, ptr %23, align 4, !tbaa !14
  %222 = icmp ne i32 %221, 0
  br i1 %222, label %224, label %223

223:                                              ; preds = %220
  store i32 22, ptr %13, align 4
  br label %306

224:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %225 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %22, i32 0, i32 4
  %226 = load ptr, ptr %225, align 8, !tbaa !22
  store ptr %226, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %227 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %22, i32 0, i32 3
  %228 = load i32, ptr %227, align 4, !tbaa !23
  store i32 %228, ptr %25, align 4, !tbaa !14
  %229 = load i32, ptr %25, align 4, !tbaa !14
  %230 = load ptr, ptr %7, align 8, !tbaa !5
  %231 = load ptr, ptr %6, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.GlyfIOContext, ptr %231, i32 0, i32 1
  %233 = load i16, ptr %232, align 2, !tbaa !9
  %234 = zext i16 %233 to i64
  %235 = getelementptr inbounds i32, ptr %230, i64 %234
  %236 = load i32, ptr %235, align 4, !tbaa !14
  %237 = icmp ult i32 %229, %236
  br i1 %237, label %238, label %239

238:                                              ; preds = %224
  br label %285

239:                                              ; preds = %224
  %240 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_table_glyf, ptr @table_iGlyf, i32 0, i32 6), align 8, !tbaa !36
  %241 = call ptr (...) %240()
  store ptr %241, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %26) #6
  store i16 0, ptr %26, align 2, !tbaa !38
  br label %242

242:                                              ; preds = %281, %239
  %243 = load i16, ptr %26, align 2, !tbaa !38
  %244 = zext i16 %243 to i32
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.GlyfIOContext, ptr %245, i32 0, i32 1
  %247 = load i16, ptr %246, align 2, !tbaa !9
  %248 = zext i16 %247 to i32
  %249 = icmp slt i32 %244, %248
  br i1 %249, label %251, label %250

250:                                              ; preds = %242
  store i32 26, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %26) #6
  br label %284

251:                                              ; preds = %242
  %252 = load ptr, ptr %7, align 8, !tbaa !5
  %253 = load i16, ptr %26, align 2, !tbaa !38
  %254 = zext i16 %253 to i64
  %255 = getelementptr inbounds i32, ptr %252, i64 %254
  %256 = load i32, ptr %255, align 4, !tbaa !14
  %257 = load ptr, ptr %7, align 8, !tbaa !5
  %258 = load i16, ptr %26, align 2, !tbaa !38
  %259 = zext i16 %258 to i32
  %260 = add nsw i32 %259, 1
  %261 = sext i32 %260 to i64
  %262 = getelementptr inbounds i32, ptr %257, i64 %261
  %263 = load i32, ptr %262, align 4, !tbaa !14
  %264 = icmp ult i32 %256, %263
  br i1 %264, label %265, label %276

265:                                              ; preds = %251
  %266 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_table_glyf, ptr @table_iGlyf, i32 0, i32 13), align 8, !tbaa !39
  %267 = load ptr, ptr %8, align 8, !tbaa !5
  %268 = load ptr, ptr %24, align 8, !tbaa !5
  %269 = load ptr, ptr %7, align 8, !tbaa !5
  %270 = load i16, ptr %26, align 2, !tbaa !38
  %271 = zext i16 %270 to i64
  %272 = getelementptr inbounds i32, ptr %269, i64 %271
  %273 = load i32, ptr %272, align 4, !tbaa !14
  %274 = load ptr, ptr %5, align 8, !tbaa !5
  %275 = call ptr @otfcc_read_glyph(ptr noundef %268, i32 noundef %273, ptr noundef %274)
  call void %266(ptr noundef %267, ptr noundef %275)
  br label %280

276:                                              ; preds = %251
  %277 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_table_glyf, ptr @table_iGlyf, i32 0, i32 13), align 8, !tbaa !39
  %278 = load ptr, ptr %8, align 8, !tbaa !5
  %279 = call ptr (...) @otfcc_newGlyf_glyph()
  call void %277(ptr noundef %278, ptr noundef %279)
  br label %280

280:                                              ; preds = %276, %265
  br label %281

281:                                              ; preds = %280
  %282 = load i16, ptr %26, align 2, !tbaa !38
  %283 = add i16 %282, 1
  store i16 %283, ptr %26, align 2, !tbaa !38
  br label %242, !llvm.loop !40

284:                                              ; preds = %250
  store i32 29, ptr %13, align 4
  br label %302

285:                                              ; preds = %238
  %286 = load ptr, ptr %5, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.otfcc_Options, ptr %286, i32 0, i32 24
  %288 = load ptr, ptr %287, align 8, !tbaa !29
  %289 = getelementptr inbounds %struct.otfcc_ILogger, ptr %288, i32 0, i32 6
  %290 = load ptr, ptr %289, align 8, !tbaa !31
  %291 = load ptr, ptr %5, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.otfcc_Options, ptr %291, i32 0, i32 24
  %293 = load ptr, ptr %292, align 8, !tbaa !29
  %294 = call ptr @sdsempty()
  %295 = call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %294, ptr noundef @.str.1)
  call void %290(ptr noundef %293, i8 noundef zeroext 1, i32 noundef 1, ptr noundef %295)
  %296 = load ptr, ptr %8, align 8, !tbaa !5
  %297 = icmp ne ptr %296, null
  br i1 %297, label %298, label %301

298:                                              ; preds = %285
  %299 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_table_glyf, ptr @table_iGlyf, i32 0, i32 7), align 8, !tbaa !41
  %300 = load ptr, ptr %8, align 8, !tbaa !5
  call void %299(ptr noundef %300)
  store ptr null, ptr %8, align 8, !tbaa !5
  store ptr null, ptr %8, align 8, !tbaa !5
  br label %301

301:                                              ; preds = %298, %285
  store i32 0, ptr %13, align 4
  br label %302

302:                                              ; preds = %301, %284
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  %303 = load i32, ptr %13, align 4
  switch i32 %303, label %306 [
    i32 0, label %304
  ]

304:                                              ; preds = %302
  br label %305

305:                                              ; preds = %304
  store i32 0, ptr %23, align 4, !tbaa !14
  store i32 0, ptr %21, align 4, !tbaa !14
  br label %220, !llvm.loop !42

306:                                              ; preds = %302, %223
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  %307 = load i32, ptr %13, align 4
  switch i32 %307, label %315 [
    i32 22, label %308
  ]

308:                                              ; preds = %306
  br label %309

309:                                              ; preds = %308, %215
  br label %310

310:                                              ; preds = %309
  %311 = load i32, ptr %19, align 4, !tbaa !14
  %312 = icmp ne i32 %311, 0
  %313 = xor i1 %312, true
  %314 = zext i1 %313 to i32
  store i32 %314, ptr %19, align 4, !tbaa !14
  br label %211, !llvm.loop !43

315:                                              ; preds = %306, %214
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  %316 = load i32, ptr %13, align 4
  switch i32 %316, label %325 [
    i32 19, label %317
  ]

317:                                              ; preds = %315
  br label %318

318:                                              ; preds = %317
  %319 = load i32, ptr %19, align 4, !tbaa !14
  %320 = icmp ne i32 %319, 0
  %321 = xor i1 %320, true
  %322 = zext i1 %321 to i32
  store i32 %322, ptr %19, align 4, !tbaa !14
  %323 = load i32, ptr %20, align 4, !tbaa !14
  %324 = add nsw i32 %323, 1
  store i32 %324, ptr %20, align 4, !tbaa !14
  br label %190, !llvm.loop !44

325:                                              ; preds = %315, %204
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  %326 = load i32, ptr %13, align 4
  switch i32 %326, label %349 [
    i32 16, label %327
    i32 29, label %328
  ]

327:                                              ; preds = %325
  br label %338

328:                                              ; preds = %325
  %329 = load ptr, ptr %7, align 8, !tbaa !5
  %330 = icmp ne ptr %329, null
  br i1 %330, label %331, label %333

331:                                              ; preds = %328
  %332 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %332) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  store ptr null, ptr %7, align 8, !tbaa !5
  br label %333

333:                                              ; preds = %331, %328
  %334 = load ptr, ptr %5, align 8, !tbaa !5
  %335 = load ptr, ptr %8, align 8, !tbaa !5
  %336 = load ptr, ptr %6, align 8, !tbaa !5
  call void @polymorphize(ptr noundef byval(%struct.otfcc_Packet) align 8 %0, ptr noundef %334, ptr noundef %335, ptr noundef %336)
  %337 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %337, ptr %4, align 8
  store i32 1, ptr %13, align 4
  br label %349

338:                                              ; preds = %327, %188, %37
  %339 = load ptr, ptr %7, align 8, !tbaa !5
  %340 = icmp ne ptr %339, null
  br i1 %340, label %341, label %343

341:                                              ; preds = %338
  %342 = load ptr, ptr %7, align 8, !tbaa !5
  call void @free(ptr noundef %342) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  store ptr null, ptr %7, align 8, !tbaa !5
  br label %343

343:                                              ; preds = %341, %338
  %344 = load ptr, ptr %8, align 8, !tbaa !5
  %345 = icmp ne ptr %344, null
  br i1 %345, label %346, label %348

346:                                              ; preds = %343
  %347 = load ptr, ptr %8, align 8, !tbaa !5
  call void @free(ptr noundef %347) #6
  store ptr null, ptr %8, align 8, !tbaa !5
  store ptr null, ptr %8, align 8, !tbaa !5
  br label %348

348:                                              ; preds = %346, %343
  store ptr null, ptr %4, align 8
  store i32 1, ptr %13, align 4
  br label %349

349:                                              ; preds = %348, %333, %325
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %350 = load ptr, ptr %4, align 8
  ret ptr %350
}

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @__caryll_allocate_clean(i64 noundef, i64 noundef) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @read_32u(ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @read_16u(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 ptr @sdscatprintf(ptr noundef, ptr noundef, ...) #4

declare ptr @sdsempty() #4

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

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

declare ptr @otfcc_newGlyf_glyph(...) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @polymorphize(ptr noundef byval(%struct.otfcc_Packet) align 8, ptr noundef, ptr noundef, 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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "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 #6 = { 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, !12, i64 2}
!10 = !{!"", !11, i64 0, !12, i64 2, !12, i64 4, !6, i64 8, !11, i64 16, !11, i64 17}
!11 = !{!"_Bool", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!17, !12, i64 4}
!17 = !{!"", !15, i64 0, !12, i64 4, !12, i64 6, !12, i64 8, !12, i64 10, !6, i64 16}
!18 = !{!17, !6, i64 16}
!19 = !{i64 0, i64 4, !14, i64 4, i64 4, !14, i64 8, i64 4, !14, i64 12, i64 4, !14, i64 16, i64 8, !5}
!20 = !{!21, !15, i64 0}
!21 = !{!"", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !6, i64 16}
!22 = !{!21, !6, i64 16}
!23 = !{!21, !15, i64 12}
!24 = !{!10, !11, i64 0}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!30, !6, i64 32}
!30 = !{!"", !11, i64 0, !11, i64 1, !11, i64 2, !11, i64 3, !11, i64 4, !11, i64 5, !11, i64 6, !11, i64 7, !11, i64 8, !11, i64 9, !11, i64 10, !11, i64 11, !11, i64 12, !11, i64 13, !11, i64 14, !11, i64 15, !11, i64 16, !11, i64 17, !11, i64 18, !11, i64 19, !11, i64 20, !11, i64 21, !11, i64 22, !6, i64 24, !6, i64 32}
!31 = !{!32, !6, i64 48}
!32 = !{!"otfcc_ILogger", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!33 = distinct !{!33, !28}
!34 = distinct !{!34, !28}
!35 = distinct !{!35, !28}
!36 = !{!37, !6, i64 48}
!37 = !{!"__caryll_vectorinterface_table_glyf", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144}
!38 = !{!12, !12, i64 0}
!39 = !{!37, !6, i64 104}
!40 = distinct !{!40, !28}
!41 = !{!37, !6, i64 56}
!42 = distinct !{!42, !28}
!43 = distinct !{!43, !28}
!44 = distinct !{!44, !28}


; 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.__caryll_vectorinterface_table_glyf = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otfcc_Packet = type { i32, i16, i16, i16, i16, ptr }
%struct.otfcc_PacketPiece = type { i32, i32, i32, i32, ptr }

@.str = external hidden unnamed_addr constant [25 x i8], align 1
@table_iGlyf = external local_unnamed_addr constant %struct.__caryll_vectorinterface_table_glyf, align 8
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @otfcc_readGlyf(ptr noundef byval(%struct.otfcc_Packet) align 8 %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %2, i64 2
  %5 = load i16, ptr %4, align 2, !tbaa !5
  %6 = zext i16 %5 to i64
  %7 = shl nuw nsw i64 %6, 2
  %8 = add nuw nsw i64 %7, 4
  %9 = tail call ptr @__caryll_allocate_clean(i64 noundef %8, i64 noundef 649)
  %.not = icmp eq ptr %9, null
  br i1 %.not, label %.thread187, label %.preheader195

.preheader195:                                    ; preds = %3
  %10 = getelementptr inbounds i8, ptr %0, i64 4
  %11 = load i16, ptr %10, align 4
  %.not236 = icmp eq i16 %11, 0
  br i1 %.not236, label %.thread181, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader195
  %12 = getelementptr inbounds i8, ptr %0, i64 16
  %13 = getelementptr inbounds i8, ptr %1, i64 32
  %invariant.gep = getelementptr i8, ptr %9, i64 -4
  br label %21

.critedge:                                        ; preds = %.split210.us, %.loopexit192.us
  %14 = phi i16 [ %65, %.loopexit192.us ], [ %66, %.split210.us ]
  %.0104.lcssa = phi i1 [ %.0104214, %.loopexit192.us ], [ %.us-phi211, %.split210.us ]
  %.094.lcssa = phi ptr [ null, %.loopexit192.us ], [ %9, %.split210.us ]
  %15 = icmp ne i16 %14, 0
  %or.cond235 = select i1 %.0104.lcssa, i1 %15, i1 false
  br i1 %or.cond235, label %.lr.ph231, label %.critedge8.thread

.lr.ph231:                                        ; preds = %.critedge
  %16 = getelementptr inbounds i8, ptr %0, i64 16
  %17 = load ptr, ptr getelementptr inbounds (i8, ptr @table_iGlyf, i64 48), align 8
  %18 = load ptr, ptr getelementptr inbounds (i8, ptr @table_iGlyf, i64 104), align 8
  %19 = getelementptr inbounds i8, ptr %1, i64 32
  %20 = load ptr, ptr getelementptr inbounds (i8, ptr @table_iGlyf, i64 56), align 8
  br label %69

21:                                               ; preds = %.lr.ph, %.split210.us
  %indvars.iv240 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next241, %.split210.us ]
  %.0104214 = phi i1 [ false, %.lr.ph ], [ %.us-phi211, %.split210.us ]
  %22 = load ptr, ptr %12, align 8, !tbaa !12
  %23 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %22, i64 %indvars.iv240
  %.sroa.037.0.copyload = load i32, ptr %23, align 8, !tbaa !15
  %.sroa.540.0..sroa_idx = getelementptr inbounds i8, ptr %23, i64 16
  %.sroa.540.0.copyload = load ptr, ptr %.sroa.540.0..sroa_idx, align 8, !tbaa !16
  %24 = icmp eq i32 %.sroa.037.0.copyload, 1819239265
  br i1 %24, label %.preheader193.us, label %.split210.us

.preheader193.us:                                 ; preds = %21
  %.sroa.439.0..sroa_idx = getelementptr inbounds i8, ptr %23, i64 12
  %.sroa.439.0.copyload = load i32, ptr %.sroa.439.0..sroa_idx, align 4, !tbaa !15
  %25 = load i16, ptr %4, align 2, !tbaa !5
  %26 = zext i16 %25 to i32
  %27 = shl nuw nsw i32 %26, 1
  %28 = add nuw nsw i32 %27, 2
  %29 = icmp ult i32 %.sroa.439.0.copyload, %28
  br i1 %29, label %.loopexit192.us, label %.preheader191.us.preheader

.preheader191.us.preheader:                       ; preds = %.preheader193.us
  %30 = load i8, ptr %2, align 8, !tbaa !17, !range !18, !noundef !19
  %31 = trunc nuw i8 %30 to i1
  br i1 %31, label %36, label %32

32:                                               ; preds = %.preheader191.us.preheader
  %33 = tail call zeroext i16 @read_16u(ptr noundef %.sroa.540.0.copyload)
  %34 = zext i16 %33 to i32
  %35 = shl nuw nsw i32 %34, 1
  br label %38

36:                                               ; preds = %.preheader191.us.preheader
  %37 = tail call i32 @read_32u(ptr noundef %.sroa.540.0.copyload)
  br label %38

38:                                               ; preds = %32, %36
  %.sink = phi i32 [ %37, %36 ], [ %35, %32 ]
  store i32 %.sink, ptr %9, align 4
  %39 = load i16, ptr %4, align 2, !tbaa !5
  %.not146.us.not.peel.not = icmp eq i16 %39, 0
  br i1 %.not146.us.not.peel.not, label %.split210.us, label %.preheader191.us

.preheader191.us:                                 ; preds = %38, %57
  %indvars.iv = phi i64 [ %indvars.iv.next, %57 ], [ 1, %38 ]
  %40 = load i8, ptr %2, align 8, !tbaa !17, !range !18, !noundef !19
  %41 = trunc nuw i8 %40 to i1
  br i1 %41, label %48, label %42

42:                                               ; preds = %.preheader191.us
  %43 = shl nuw nsw i64 %indvars.iv, 1
  %44 = getelementptr inbounds i8, ptr %.sroa.540.0.copyload, i64 %43
  %45 = tail call zeroext i16 @read_16u(ptr noundef nonnull %44)
  %46 = zext i16 %45 to i32
  %47 = shl nuw nsw i32 %46, 1
  br label %52

48:                                               ; preds = %.preheader191.us
  %49 = shl nuw nsw i64 %indvars.iv, 2
  %50 = getelementptr inbounds i8, ptr %.sroa.540.0.copyload, i64 %49
  %51 = tail call i32 @read_32u(ptr noundef nonnull %50)
  br label %52

52:                                               ; preds = %42, %48
  %53 = phi i32 [ %51, %48 ], [ %47, %42 ]
  %54 = getelementptr inbounds i32, ptr %9, i64 %indvars.iv
  store i32 %53, ptr %54, align 4
  %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv
  %55 = load i32, ptr %gep, align 4, !tbaa !15
  %56 = icmp ult i32 %53, %55
  br i1 %56, label %.loopexit192.us, label %57

57:                                               ; preds = %52
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %58 = load i16, ptr %4, align 2, !tbaa !5
  %59 = zext i16 %58 to i64
  %.not146.us.not = icmp ult i64 %indvars.iv, %59
  br i1 %.not146.us.not, label %.preheader191.us, label %.split210.us, !llvm.loop !20

.loopexit192.us:                                  ; preds = %.preheader193.us, %52
  %60 = load ptr, ptr %13, align 8, !tbaa !23
  %61 = getelementptr inbounds i8, ptr %60, i64 48
  %62 = load ptr, ptr %61, align 8, !tbaa !25
  %63 = tail call ptr @sdsempty() #4
  %64 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %63, ptr noundef nonnull @.str) #4
  tail call void %62(ptr noundef %60, i8 noundef zeroext 1, i32 noundef 1, ptr noundef %64) #4
  tail call void @free(ptr noundef nonnull %9) #4
  %65 = load i16, ptr %10, align 4
  br label %.critedge

.split210.us:                                     ; preds = %57, %38, %21
  %.us-phi211 = phi i1 [ %.0104214, %21 ], [ true, %38 ], [ true, %57 ]
  %indvars.iv.next241 = add nuw nsw i64 %indvars.iv240, 1
  %66 = load i16, ptr %10, align 4
  %67 = zext i16 %66 to i64
  %68 = icmp ult i64 %indvars.iv.next241, %67
  br i1 %68, label %21, label %.critedge, !llvm.loop !27

69:                                               ; preds = %.lr.ph231, %.split226
  %70 = phi i16 [ %14, %.lr.ph231 ], [ %103, %.split226 ]
  %indvars.iv245 = phi i64 [ 0, %.lr.ph231 ], [ %indvars.iv.next246, %.split226 ]
  %.096230 = phi ptr [ null, %.lr.ph231 ], [ %.us-phi228, %.split226 ]
  %71 = load ptr, ptr %16, align 8, !tbaa !12
  %72 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %71, i64 %indvars.iv245
  %.sroa.0.0.copyload = load i32, ptr %72, align 8, !tbaa !15
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %72, i64 16
  %.sroa.5.0.copyload = load ptr, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !16
  %73 = icmp ne i32 %.sroa.0.0.copyload, 1735162214
  br i1 %73, label %.split226, label %.preheader.us

.preheader.us:                                    ; preds = %69
  %.sroa.415.0..sroa_idx = getelementptr inbounds i8, ptr %72, i64 12
  %.sroa.415.0.copyload = load i32, ptr %.sroa.415.0..sroa_idx, align 4, !tbaa !15
  %74 = load i16, ptr %4, align 2, !tbaa !5
  %75 = zext i16 %74 to i64
  %76 = getelementptr inbounds i32, ptr %.094.lcssa, i64 %75
  %77 = load i32, ptr %76, align 4, !tbaa !15
  %78 = icmp ult i32 %.sroa.415.0.copyload, %77
  br i1 %78, label %96, label %79

79:                                               ; preds = %.preheader.us
  %80 = tail call ptr (...) %17() #4
  %81 = load i16, ptr %4, align 2, !tbaa !5
  %.not237 = icmp eq i16 %81, 0
  br i1 %.not237, label %.critedge8, label %.lr.ph218.us

.lr.ph218.us:                                     ; preds = %79, %92
  %indvars.iv242 = phi i64 [ %84, %92 ], [ 0, %79 ]
  %82 = getelementptr inbounds i32, ptr %.094.lcssa, i64 %indvars.iv242
  %83 = load i32, ptr %82, align 4, !tbaa !15
  %84 = add nuw nsw i64 %indvars.iv242, 1
  %85 = getelementptr inbounds i32, ptr %.094.lcssa, i64 %84
  %86 = load i32, ptr %85, align 4, !tbaa !15
  %87 = icmp ult i32 %83, %86
  br i1 %87, label %90, label %88

88:                                               ; preds = %.lr.ph218.us
  %89 = tail call ptr (...) @otfcc_newGlyf_glyph() #4
  br label %92

90:                                               ; preds = %.lr.ph218.us
  %91 = tail call ptr @otfcc_read_glyph(ptr noundef %.sroa.5.0.copyload, i32 noundef %83, ptr noundef %1)
  br label %92

92:                                               ; preds = %90, %88
  %.sink275 = phi ptr [ %91, %90 ], [ %89, %88 ]
  tail call void %18(ptr noundef %80, ptr noundef %.sink275) #4
  %93 = load i16, ptr %4, align 2, !tbaa !5
  %94 = zext i16 %93 to i64
  %95 = icmp ult i64 %84, %94
  br i1 %95, label %.lr.ph218.us, label %.loopexit.us, !llvm.loop !28

96:                                               ; preds = %.preheader.us
  %97 = load ptr, ptr %19, align 8, !tbaa !23
  %98 = getelementptr inbounds i8, ptr %97, i64 48
  %99 = load ptr, ptr %98, align 8, !tbaa !25
  %100 = tail call ptr @sdsempty() #4
  %101 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %100, ptr noundef nonnull @.str.1) #4
  tail call void %99(ptr noundef %97, i8 noundef zeroext 1, i32 noundef 1, ptr noundef %101) #4
  %.not140.us = icmp eq ptr %.096230, null
  br i1 %.not140.us, label %.loopexit.us..split226_crit_edge, label %102

102:                                              ; preds = %96
  tail call void %20(ptr noundef nonnull %.096230) #4
  br label %.loopexit.us..split226_crit_edge

.loopexit.us:                                     ; preds = %92
  br i1 %78, label %.loopexit.us..split226_crit_edge, label %.critedge8, !llvm.loop !29

.loopexit.us..split226_crit_edge:                 ; preds = %96, %102, %.loopexit.us
  %.4100.us262 = phi ptr [ %80, %.loopexit.us ], [ null, %102 ], [ null, %96 ]
  %.pre = load i16, ptr %10, align 4
  br label %.split226

.split226:                                        ; preds = %.loopexit.us..split226_crit_edge, %69
  %103 = phi i16 [ %70, %69 ], [ %.pre, %.loopexit.us..split226_crit_edge ]
  %.us-phi228 = phi ptr [ %.096230, %69 ], [ %.4100.us262, %.loopexit.us..split226_crit_edge ]
  %indvars.iv.next246 = add nuw nsw i64 %indvars.iv245, 1
  %104 = zext i16 %103 to i64
  %105 = icmp ult i64 %indvars.iv.next246, %104
  %or.cond155 = select i1 %73, i1 %105, i1 false
  br i1 %or.cond155, label %69, label %.critedge8.thread, !llvm.loop !30

.critedge8:                                       ; preds = %79, %.loopexit.us
  tail call void @free(ptr noundef nonnull %.094.lcssa) #4
  tail call void @polymorphize(ptr noundef nonnull byval(%struct.otfcc_Packet) align 8 %0, ptr noundef %1, ptr noundef %80, ptr noundef nonnull %2)
  br label %.thread187

.critedge8.thread:                                ; preds = %.split226, %.critedge
  %.9 = phi ptr [ null, %.critedge ], [ %.us-phi228, %.split226 ]
  %.not142 = icmp eq ptr %.094.lcssa, null
  br i1 %.not142, label %106, label %.thread181

.thread181:                                       ; preds = %.preheader195, %.critedge8.thread
  %.094.lcssa253 = phi ptr [ %.094.lcssa, %.critedge8.thread ], [ %9, %.preheader195 ]
  %.9185 = phi ptr [ %.9, %.critedge8.thread ], [ null, %.preheader195 ]
  tail call void @free(ptr noundef nonnull %.094.lcssa253) #4
  br label %106

106:                                              ; preds = %.thread181, %.critedge8.thread
  %.9180 = phi ptr [ %.9185, %.thread181 ], [ %.9, %.critedge8.thread ]
  %.not143 = icmp eq ptr %.9180, null
  br i1 %.not143, label %.thread187, label %107

107:                                              ; preds = %106
  tail call void @free(ptr noundef nonnull %.9180) #4
  br label %.thread187

.thread187:                                       ; preds = %3, %106, %107, %.critedge8
  %.093 = phi ptr [ %80, %.critedge8 ], [ null, %107 ], [ null, %106 ], [ null, %3 ]
  ret ptr %.093
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @__caryll_allocate_clean(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @read_32u(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @read_16u(ptr noundef) local_unnamed_addr #1

declare ptr @sdscatprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #2

declare ptr @sdsempty() local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

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

declare ptr @otfcc_newGlyf_glyph(...) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @polymorphize(ptr noundef byval(%struct.otfcc_Packet) align 8, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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 = { inlinehint 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 #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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 2}
!6 = !{!"", !7, i64 0, !10, i64 2, !10, i64 4, !11, i64 8, !7, i64 16, !7, i64 17}
!7 = !{!"_Bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !11, i64 16}
!13 = !{!"", !14, i64 0, !10, i64 4, !10, i64 6, !10, i64 8, !10, i64 10, !11, i64 16}
!14 = !{!"int", !8, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!11, !11, i64 0}
!17 = !{!6, !7, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !21, !22}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!"llvm.loop.peeled.count", i32 1}
!23 = !{!24, !11, i64 32}
!24 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !7, i64 21, !7, i64 22, !11, i64 24, !11, i64 32}
!25 = !{!26, !11, i64 48}
!26 = !{!"otfcc_ILogger", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88}
!27 = distinct !{!27, !21}
!28 = distinct !{!28, !21}
!29 = distinct !{!29, !21}
!30 = distinct !{!30, !21}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,MergedLoadStoreMotionPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass