; LLVM IR from caryll/otfcc :: lib/table/otl/subtables/chaining (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.otfcc_HandlePackage = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otfcc_Handle = type { i32, i16, ptr }
%struct.classdefs = type { ptr, ptr, ptr }
%struct.otl_Coverage = type { i16, i32, ptr }
%struct.otl_ClassDef = type { i16, i32, i16, ptr, ptr }

@otfcc_iHandle = external constant %struct.otfcc_HandlePackage, align 8

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

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

; 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) #2

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

; Function Attrs: nounwind uwtable
define dso_local ptr @classCoverage(ptr noundef %0, i32 noundef %1, i16 noundef zeroext %2, i32 noundef %3, i16 noundef zeroext %4, i16 noundef zeroext %5, ptr noundef %6) #3 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i16, align 2
  %12 = alloca i32, align 4
  %13 = alloca i16, align 2
  %14 = alloca i16, align 2
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i16, align 2
  %20 = alloca i16, align 2
  %21 = alloca i32, align 4
  %22 = alloca i8, align 1
  %23 = alloca i16, align 2
  %24 = alloca i16, align 2
  %25 = alloca i16, align 2
  %26 = alloca i16, align 2
  %27 = alloca i8, align 1
  %28 = alloca i16, align 2
  %29 = alloca %struct.otfcc_Handle, align 8
  %30 = alloca i16, align 2
  %31 = alloca %struct.otfcc_Handle, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i32 %1, ptr %10, align 4, !tbaa !9
  store i16 %2, ptr %11, align 2, !tbaa !11
  store i32 %3, ptr %12, align 4, !tbaa !9
  store i16 %4, ptr %13, align 2, !tbaa !11
  store i16 %5, ptr %14, align 2, !tbaa !11
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %32 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %32, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %33 = load i16, ptr %13, align 2, !tbaa !11
  %34 = zext i16 %33 to i32
  %35 = icmp eq i32 %34, 1
  br i1 %35, label %36, label %40

36:                                               ; preds = %7
  %37 = load ptr, ptr %16, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.classdefs, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !13
  br label %54

40:                                               ; preds = %7
  %41 = load i16, ptr %13, align 2, !tbaa !11
  %42 = zext i16 %41 to i32
  %43 = icmp eq i32 %42, 2
  br i1 %43, label %44, label %48

44:                                               ; preds = %40
  %45 = load ptr, ptr %16, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.classdefs, ptr %45, i32 0, i32 1
  %47 = load ptr, ptr %46, align 8, !tbaa !15
  br label %52

48:                                               ; preds = %40
  %49 = load ptr, ptr %16, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.classdefs, ptr %49, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !16
  br label %52

52:                                               ; preds = %48, %44
  %53 = phi ptr [ %47, %44 ], [ %51, %48 ]
  br label %54

54:                                               ; preds = %52, %36
  %55 = phi ptr [ %39, %36 ], [ %53, %52 ]
  store ptr %55, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %56 = call ptr @__caryll_allocate_clean(i64 noundef 16, i64 noundef 26)
  store ptr %56, ptr %18, align 8, !tbaa !5
  %57 = load ptr, ptr %18, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.otl_Coverage, ptr %57, i32 0, i32 0
  store i16 0, ptr %58, align 8, !tbaa !17
  %59 = load ptr, ptr %18, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.otl_Coverage, ptr %59, i32 0, i32 2
  store ptr null, ptr %60, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 2, ptr %19) #4
  store i16 0, ptr %19, align 2, !tbaa !11
  %61 = load i16, ptr %11, align 2, !tbaa !11
  %62 = zext i16 %61 to i32
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %124

64:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 2, ptr %20) #4
  store i16 0, ptr %20, align 2, !tbaa !11
  br label %65

65:                                               ; preds = %120, %64
  %66 = load i16, ptr %20, align 2, !tbaa !11
  %67 = zext i16 %66 to i32
  %68 = load i16, ptr %14, align 2, !tbaa !11
  %69 = zext i16 %68 to i32
  %70 = icmp slt i32 %67, %69
  br i1 %70, label %72, label %71

71:                                               ; preds = %65
  store i32 2, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %20) #4
  br label %123

72:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #4
  store i8 0, ptr %22, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 2, ptr %23) #4
  store i16 0, ptr %23, align 2, !tbaa !11
  br label %73

73:                                               ; preds = %107, %72
  %74 = load i16, ptr %23, align 2, !tbaa !11
  %75 = zext i16 %74 to i32
  %76 = load ptr, ptr %17, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.otl_ClassDef, ptr %76, i32 0, i32 0
  %78 = load i16, ptr %77, align 8, !tbaa !22
  %79 = zext i16 %78 to i32
  %80 = icmp slt i32 %75, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %73
  store i32 5, ptr %21, align 4
  br label %110

82:                                               ; preds = %73
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.otl_ClassDef, ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !24
  %86 = load i16, ptr %23, align 2, !tbaa !11
  %87 = zext i16 %86 to i64
  %88 = getelementptr inbounds i16, ptr %85, i64 %87
  %89 = load i16, ptr %88, align 2, !tbaa !11
  %90 = zext i16 %89 to i32
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %92, label %106

92:                                               ; preds = %82
  %93 = load ptr, ptr %17, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.otl_ClassDef, ptr %93, i32 0, i32 3
  %95 = load ptr, ptr %94, align 8, !tbaa !25
  %96 = load i16, ptr %23, align 2, !tbaa !11
  %97 = zext i16 %96 to i64
  %98 = getelementptr inbounds %struct.otfcc_Handle, ptr %95, i64 %97
  %99 = getelementptr inbounds %struct.otfcc_Handle, ptr %98, i32 0, i32 1
  %100 = load i16, ptr %99, align 4, !tbaa !26
  %101 = zext i16 %100 to i32
  %102 = load i16, ptr %20, align 2, !tbaa !11
  %103 = zext i16 %102 to i32
  %104 = icmp eq i32 %101, %103
  br i1 %104, label %105, label %106

105:                                              ; preds = %92
  store i8 1, ptr %22, align 1, !tbaa !20
  store i32 5, ptr %21, align 4
  br label %110

106:                                              ; preds = %92, %82
  br label %107

107:                                              ; preds = %106
  %108 = load i16, ptr %23, align 2, !tbaa !11
  %109 = add i16 %108, 1
  store i16 %109, ptr %23, align 2, !tbaa !11
  br label %73, !llvm.loop !28

110:                                              ; preds = %105, %81
  call void @llvm.lifetime.end.p0(i64 2, ptr %23) #4
  br label %111

111:                                              ; preds = %110
  %112 = load i8, ptr %22, align 1, !tbaa !20, !range !30, !noundef !31
  %113 = trunc i8 %112 to i1
  br i1 %113, label %119, label %114

114:                                              ; preds = %111
  %115 = load i16, ptr %19, align 2, !tbaa !11
  %116 = zext i16 %115 to i32
  %117 = add nsw i32 %116, 1
  %118 = trunc i32 %117 to i16
  store i16 %118, ptr %19, align 2, !tbaa !11
  br label %119

119:                                              ; preds = %114, %111
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #4
  br label %120

120:                                              ; preds = %119
  %121 = load i16, ptr %20, align 2, !tbaa !11
  %122 = add i16 %121, 1
  store i16 %122, ptr %20, align 2, !tbaa !11
  br label %65, !llvm.loop !32

123:                                              ; preds = %71
  br label %154

124:                                              ; preds = %54
  call void @llvm.lifetime.start.p0(i64 2, ptr %24) #4
  store i16 0, ptr %24, align 2, !tbaa !11
  br label %125

125:                                              ; preds = %150, %124
  %126 = load i16, ptr %24, align 2, !tbaa !11
  %127 = zext i16 %126 to i32
  %128 = load ptr, ptr %17, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.otl_ClassDef, ptr %128, i32 0, i32 0
  %130 = load i16, ptr %129, align 8, !tbaa !22
  %131 = zext i16 %130 to i32
  %132 = icmp slt i32 %127, %131
  br i1 %132, label %134, label %133

133:                                              ; preds = %125
  store i32 8, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %24) #4
  br label %153

134:                                              ; preds = %125
  %135 = load ptr, ptr %17, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.otl_ClassDef, ptr %135, i32 0, i32 4
  %137 = load ptr, ptr %136, align 8, !tbaa !24
  %138 = load i16, ptr %24, align 2, !tbaa !11
  %139 = zext i16 %138 to i64
  %140 = getelementptr inbounds i16, ptr %137, i64 %139
  %141 = load i16, ptr %140, align 2, !tbaa !11
  %142 = zext i16 %141 to i32
  %143 = load i16, ptr %11, align 2, !tbaa !11
  %144 = zext i16 %143 to i32
  %145 = icmp eq i32 %142, %144
  br i1 %145, label %146, label %149

146:                                              ; preds = %134
  %147 = load i16, ptr %19, align 2, !tbaa !11
  %148 = add i16 %147, 1
  store i16 %148, ptr %19, align 2, !tbaa !11
  br label %149

149:                                              ; preds = %146, %134
  br label %150

150:                                              ; preds = %149
  %151 = load i16, ptr %24, align 2, !tbaa !11
  %152 = add i16 %151, 1
  store i16 %152, ptr %24, align 2, !tbaa !11
  br label %125, !llvm.loop !33

153:                                              ; preds = %133
  br label %154

154:                                              ; preds = %153, %123
  %155 = load i16, ptr %19, align 2, !tbaa !11
  %156 = icmp ne i16 %155, 0
  br i1 %156, label %159, label %157

157:                                              ; preds = %154
  %158 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %158, ptr %8, align 8
  store i32 1, ptr %21, align 4
  br label %295

159:                                              ; preds = %154
  %160 = load i16, ptr %19, align 2, !tbaa !11
  %161 = load ptr, ptr %18, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.otl_Coverage, ptr %161, i32 0, i32 0
  store i16 %160, ptr %162, align 8, !tbaa !17
  %163 = load i16, ptr %19, align 2, !tbaa !11
  %164 = zext i16 %163 to i64
  %165 = mul i64 16, %164
  %166 = call ptr @__caryll_allocate_clean(i64 noundef %165, i64 noundef 49)
  %167 = load ptr, ptr %18, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.otl_Coverage, ptr %167, i32 0, i32 2
  store ptr %166, ptr %168, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 2, ptr %25) #4
  store i16 0, ptr %25, align 2, !tbaa !11
  %169 = load i16, ptr %11, align 2, !tbaa !11
  %170 = zext i16 %169 to i32
  %171 = icmp eq i32 %170, 0
  br i1 %171, label %172, label %242

172:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 2, ptr %26) #4
  store i16 0, ptr %26, align 2, !tbaa !11
  br label %173

173:                                              ; preds = %238, %172
  %174 = load i16, ptr %26, align 2, !tbaa !11
  %175 = zext i16 %174 to i32
  %176 = load i16, ptr %14, align 2, !tbaa !11
  %177 = zext i16 %176 to i32
  %178 = icmp slt i32 %175, %177
  br i1 %178, label %180, label %179

179:                                              ; preds = %173
  store i32 11, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %26) #4
  br label %241

180:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #4
  store i8 0, ptr %27, align 1, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 2, ptr %28) #4
  store i16 0, ptr %28, align 2, !tbaa !11
  br label %181

181:                                              ; preds = %215, %180
  %182 = load i16, ptr %28, align 2, !tbaa !11
  %183 = zext i16 %182 to i32
  %184 = load ptr, ptr %17, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.otl_ClassDef, ptr %184, i32 0, i32 0
  %186 = load i16, ptr %185, align 8, !tbaa !22
  %187 = zext i16 %186 to i32
  %188 = icmp slt i32 %183, %187
  br i1 %188, label %190, label %189

189:                                              ; preds = %181
  store i32 14, ptr %21, align 4
  br label %218

190:                                              ; preds = %181
  %191 = load ptr, ptr %17, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.otl_ClassDef, ptr %191, i32 0, i32 4
  %193 = load ptr, ptr %192, align 8, !tbaa !24
  %194 = load i16, ptr %28, align 2, !tbaa !11
  %195 = zext i16 %194 to i64
  %196 = getelementptr inbounds i16, ptr %193, i64 %195
  %197 = load i16, ptr %196, align 2, !tbaa !11
  %198 = zext i16 %197 to i32
  %199 = icmp sgt i32 %198, 0
  br i1 %199, label %200, label %214

200:                                              ; preds = %190
  %201 = load ptr, ptr %17, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.otl_ClassDef, ptr %201, i32 0, i32 3
  %203 = load ptr, ptr %202, align 8, !tbaa !25
  %204 = load i16, ptr %28, align 2, !tbaa !11
  %205 = zext i16 %204 to i64
  %206 = getelementptr inbounds %struct.otfcc_Handle, ptr %203, i64 %205
  %207 = getelementptr inbounds %struct.otfcc_Handle, ptr %206, i32 0, i32 1
  %208 = load i16, ptr %207, align 4, !tbaa !26
  %209 = zext i16 %208 to i32
  %210 = load i16, ptr %26, align 2, !tbaa !11
  %211 = zext i16 %210 to i32
  %212 = icmp eq i32 %209, %211
  br i1 %212, label %213, label %214

213:                                              ; preds = %200
  store i8 1, ptr %27, align 1, !tbaa !20
  store i32 14, ptr %21, align 4
  br label %218

214:                                              ; preds = %200, %190
  br label %215

215:                                              ; preds = %214
  %216 = load i16, ptr %28, align 2, !tbaa !11
  %217 = add i16 %216, 1
  store i16 %217, ptr %28, align 2, !tbaa !11
  br label %181, !llvm.loop !34

218:                                              ; preds = %213, %189
  call void @llvm.lifetime.end.p0(i64 2, ptr %28) #4
  br label %219

219:                                              ; preds = %218
  %220 = load i8, ptr %27, align 1, !tbaa !20, !range !30, !noundef !31
  %221 = trunc i8 %220 to i1
  br i1 %221, label %237, label %222

222:                                              ; preds = %219
  %223 = load ptr, ptr %18, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.otl_Coverage, ptr %223, i32 0, i32 2
  %225 = load ptr, ptr %224, align 8, !tbaa !19
  %226 = load i16, ptr %25, align 2, !tbaa !11
  %227 = add i16 %226, 1
  store i16 %227, ptr %25, align 2, !tbaa !11
  %228 = zext i16 %226 to i64
  %229 = getelementptr inbounds %struct.otfcc_Handle, ptr %225, i64 %228
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #4
  %230 = load ptr, ptr getelementptr inbounds (%struct.otfcc_HandlePackage, ptr @otfcc_iHandle, i32 0, i32 8), align 8, !tbaa !35
  %231 = load i16, ptr %26, align 2, !tbaa !11
  %232 = call { i64, ptr } %230(i16 noundef zeroext %231)
  %233 = getelementptr inbounds { i64, ptr }, ptr %29, i32 0, i32 0
  %234 = extractvalue { i64, ptr } %232, 0
  store i64 %234, ptr %233, align 8
  %235 = getelementptr inbounds { i64, ptr }, ptr %29, i32 0, i32 1
  %236 = extractvalue { i64, ptr } %232, 1
  store ptr %236, ptr %235, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %229, ptr align 8 %29, i64 16, i1 false), !tbaa.struct !37
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #4
  br label %237

237:                                              ; preds = %222, %219
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #4
  br label %238

238:                                              ; preds = %237
  %239 = load i16, ptr %26, align 2, !tbaa !11
  %240 = add i16 %239, 1
  store i16 %240, ptr %26, align 2, !tbaa !11
  br label %173, !llvm.loop !38

241:                                              ; preds = %179
  br label %293

242:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 2, ptr %30) #4
  store i16 0, ptr %30, align 2, !tbaa !11
  br label %243

243:                                              ; preds = %289, %242
  %244 = load i16, ptr %30, align 2, !tbaa !11
  %245 = zext i16 %244 to i32
  %246 = load ptr, ptr %17, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.otl_ClassDef, ptr %246, i32 0, i32 0
  %248 = load i16, ptr %247, align 8, !tbaa !22
  %249 = zext i16 %248 to i32
  %250 = icmp slt i32 %245, %249
  br i1 %250, label %252, label %251

251:                                              ; preds = %243
  store i32 17, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %30) #4
  br label %292

252:                                              ; preds = %243
  %253 = load ptr, ptr %17, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.otl_ClassDef, ptr %253, i32 0, i32 4
  %255 = load ptr, ptr %254, align 8, !tbaa !24
  %256 = load i16, ptr %30, align 2, !tbaa !11
  %257 = zext i16 %256 to i64
  %258 = getelementptr inbounds i16, ptr %255, i64 %257
  %259 = load i16, ptr %258, align 2, !tbaa !11
  %260 = zext i16 %259 to i32
  %261 = load i16, ptr %11, align 2, !tbaa !11
  %262 = zext i16 %261 to i32
  %263 = icmp eq i32 %260, %262
  br i1 %263, label %264, label %288

264:                                              ; preds = %252
  %265 = load ptr, ptr %18, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.otl_Coverage, ptr %265, i32 0, i32 2
  %267 = load ptr, ptr %266, align 8, !tbaa !19
  %268 = load i16, ptr %25, align 2, !tbaa !11
  %269 = add i16 %268, 1
  store i16 %269, ptr %25, align 2, !tbaa !11
  %270 = zext i16 %268 to i64
  %271 = getelementptr inbounds %struct.otfcc_Handle, ptr %267, i64 %270
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #4
  %272 = load ptr, ptr getelementptr inbounds (%struct.otfcc_HandlePackage, ptr @otfcc_iHandle, i32 0, i32 7), align 8, !tbaa !39
  %273 = load ptr, ptr %17, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.otl_ClassDef, ptr %273, i32 0, i32 3
  %275 = load ptr, ptr %274, align 8, !tbaa !25
  %276 = load i16, ptr %30, align 2, !tbaa !11
  %277 = zext i16 %276 to i64
  %278 = getelementptr inbounds %struct.otfcc_Handle, ptr %275, i64 %277
  %279 = getelementptr inbounds { i64, ptr }, ptr %278, i32 0, i32 0
  %280 = load i64, ptr %279, align 8
  %281 = getelementptr inbounds { i64, ptr }, ptr %278, i32 0, i32 1
  %282 = load ptr, ptr %281, align 8
  %283 = call { i64, ptr } %272(i64 %280, ptr %282)
  %284 = getelementptr inbounds { i64, ptr }, ptr %31, i32 0, i32 0
  %285 = extractvalue { i64, ptr } %283, 0
  store i64 %285, ptr %284, align 8
  %286 = getelementptr inbounds { i64, ptr }, ptr %31, i32 0, i32 1
  %287 = extractvalue { i64, ptr } %283, 1
  store ptr %287, ptr %286, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %271, ptr align 8 %31, i64 16, i1 false), !tbaa.struct !37
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #4
  br label %288

288:                                              ; preds = %264, %252
  br label %289

289:                                              ; preds = %288
  %290 = load i16, ptr %30, align 2, !tbaa !11
  %291 = add i16 %290, 1
  store i16 %291, ptr %30, align 2, !tbaa !11
  br label %243, !llvm.loop !40

292:                                              ; preds = %251
  br label %293

293:                                              ; preds = %292, %241
  %294 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %294, ptr %8, align 8
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %25) #4
  br label %295

295:                                              ; preds = %293, %157
  call void @llvm.lifetime.end.p0(i64 2, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  %296 = load ptr, ptr %8, align 8
  ret ptr %296
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!14, !6, i64 8}
!16 = !{!14, !6, i64 16}
!17 = !{!18, !12, i64 0}
!18 = !{!"", !12, i64 0, !10, i64 4, !6, i64 8}
!19 = !{!18, !6, i64 8}
!20 = !{!21, !21, i64 0}
!21 = !{!"_Bool", !7, i64 0}
!22 = !{!23, !12, i64 0}
!23 = !{!"", !12, i64 0, !10, i64 4, !12, i64 8, !6, i64 16, !6, i64 24}
!24 = !{!23, !6, i64 24}
!25 = !{!23, !6, i64 16}
!26 = !{!27, !12, i64 4}
!27 = !{!"otfcc_Handle", !10, i64 0, !12, i64 4, !6, i64 8}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = distinct !{!32, !29}
!33 = distinct !{!33, !29}
!34 = distinct !{!34, !29}
!35 = !{!36, !6, i64 64}
!36 = !{!"otfcc_HandlePackage", !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}
!37 = !{i64 0, i64 4, !9, i64 4, i64 2, !11, i64 8, i64 8, !5}
!38 = distinct !{!38, !29}
!39 = !{!36, !6, i64 56}
!40 = distinct !{!40, !29}


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

%struct.otfcc_HandlePackage = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otfcc_Handle = type { i32, i16, ptr }

@otfcc_iHandle = external local_unnamed_addr constant %struct.otfcc_HandlePackage, align 8

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

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @classCoverage(ptr nocapture noundef readnone %0, i32 noundef %1, i16 noundef zeroext %2, i32 noundef %3, i16 noundef zeroext %4, i16 noundef zeroext %5, ptr nocapture noundef readonly %6) local_unnamed_addr #1 {
  switch i16 %4, label %10 [
    i16 1, label %12
    i16 2, label %8
  ]

8:                                                ; preds = %7
  %9 = getelementptr inbounds i8, ptr %6, i64 8
  br label %12

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %6, i64 16
  br label %12

12:                                               ; preds = %7, %8, %10
  %.in = phi ptr [ %9, %8 ], [ %11, %10 ], [ %6, %7 ]
  %13 = load ptr, ptr %.in, align 8, !tbaa !5
  %14 = tail call ptr @__caryll_allocate_clean(i64 noundef 16, i64 noundef 26)
  store i16 0, ptr %14, align 8, !tbaa !9
  %15 = getelementptr inbounds i8, ptr %14, i64 8
  store ptr null, ptr %15, align 8, !tbaa !13
  %16 = icmp eq i16 %2, 0
  br i1 %16, label %.preheader89, label %.preheader91

.preheader91:                                     ; preds = %12
  %17 = load i16, ptr %13, align 8, !tbaa !14
  %.not110 = icmp eq i16 %17, 0
  br i1 %.not110, label %.loopexit85, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader91
  %18 = getelementptr inbounds i8, ptr %13, i64 24
  %19 = load ptr, ptr %18, align 8, !tbaa !16
  %wide.trip.count = zext i16 %17 to i64
  %min.iters.check = icmp ult i16 %17, 16
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %indvars.iv.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %.294.ph = phi i16 [ 0, %.lr.ph ], [ %29, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %wide.trip.count, 65520
  %broadcast.splatinsert = insertelement <8 x i16> poison, i16 %2, i64 0
  %broadcast.splat = shufflevector <8 x i16> %broadcast.splatinsert, <8 x i16> poison, <8 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <8 x i16> [ zeroinitializer, %vector.ph ], [ %26, %vector.body ]
  %vec.phi143 = phi <8 x i16> [ zeroinitializer, %vector.ph ], [ %27, %vector.body ]
  %20 = getelementptr inbounds i16, ptr %19, i64 %index
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %wide.load = load <8 x i16>, ptr %20, align 2, !tbaa !17
  %wide.load144 = load <8 x i16>, ptr %21, align 2, !tbaa !17
  %22 = icmp eq <8 x i16> %wide.load, %broadcast.splat
  %23 = icmp eq <8 x i16> %wide.load144, %broadcast.splat
  %24 = zext <8 x i1> %22 to <8 x i16>
  %25 = zext <8 x i1> %23 to <8 x i16>
  %26 = add <8 x i16> %vec.phi, %24
  %27 = add <8 x i16> %vec.phi143, %25
  %index.next = add nuw i64 %index, 16
  %28 = icmp eq i64 %index.next, %n.vec
  br i1 %28, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <8 x i16> %27, %26
  %29 = tail call i16 @llvm.vector.reduce.add.v8i16(<8 x i16> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %wide.trip.count
  br i1 %cmp.n, label %.loopexit90, label %scalar.ph.preheader

.preheader89:                                     ; preds = %12
  %.not111 = icmp eq i16 %5, 0
  br i1 %.not111, label %.loopexit85, label %.preheader88.lr.ph

.preheader88.lr.ph:                               ; preds = %.preheader89
  %30 = getelementptr inbounds i8, ptr %13, i64 16
  %31 = load i16, ptr %13, align 8, !tbaa !14
  %32 = icmp eq i16 %31, 0
  br i1 %32, label %.loopexit90.thread135, label %.preheader88.lr.ph.split

.preheader88.lr.ph.split:                         ; preds = %.preheader88.lr.ph
  %33 = getelementptr inbounds i8, ptr %13, i64 24
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  %35 = zext i16 %31 to i64
  br label %.preheader88

.preheader88:                                     ; preds = %.preheader88.lr.ph.split, %._crit_edge
  %.064101 = phi i16 [ 0, %.preheader88.lr.ph.split ], [ %spec.select, %._crit_edge ]
  %.066100 = phi i16 [ 0, %.preheader88.lr.ph.split ], [ %48, %._crit_edge ]
  br label %36

36:                                               ; preds = %.preheader88, %45
  %indvars.iv119 = phi i64 [ 0, %.preheader88 ], [ %indvars.iv.next120, %45 ]
  %37 = phi i1 [ false, %.preheader88 ], [ %46, %45 ]
  %38 = getelementptr inbounds i16, ptr %34, i64 %indvars.iv119
  %39 = load i16, ptr %38, align 2, !tbaa !17
  %.not82 = icmp eq i16 %39, 0
  br i1 %.not82, label %45, label %40

40:                                               ; preds = %36
  %41 = load ptr, ptr %30, align 8, !tbaa !22
  %42 = getelementptr inbounds %struct.otfcc_Handle, ptr %41, i64 %indvars.iv119, i32 1
  %43 = load i16, ptr %42, align 4, !tbaa !23
  %44 = icmp eq i16 %43, %.066100
  br i1 %44, label %._crit_edge, label %45

45:                                               ; preds = %36, %40
  %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1
  %46 = icmp uge i64 %indvars.iv.next120, %35
  %exitcond122 = icmp eq i64 %indvars.iv.next120, %35
  br i1 %exitcond122, label %._crit_edge, label %36, !llvm.loop !25

._crit_edge:                                      ; preds = %45, %40
  %.lcssa = phi i1 [ %37, %40 ], [ %46, %45 ]
  %47 = zext i1 %.lcssa to i16
  %spec.select = add i16 %.064101, %47
  %48 = add nuw i16 %.066100, 1
  %exitcond123.not = icmp eq i16 %48, %5
  br i1 %exitcond123.not, label %.loopexit90, label %.preheader88, !llvm.loop !26

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %scalar.ph ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %.294 = phi i16 [ %spec.select83, %scalar.ph ], [ %.294.ph, %scalar.ph.preheader ]
  %49 = getelementptr inbounds i16, ptr %19, i64 %indvars.iv
  %50 = load i16, ptr %49, align 2, !tbaa !17
  %51 = icmp eq i16 %50, %2
  %52 = zext i1 %51 to i16
  %spec.select83 = add i16 %.294, %52
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit90, label %scalar.ph, !llvm.loop !27

.loopexit90:                                      ; preds = %scalar.ph, %._crit_edge, %middle.block
  %.4 = phi i16 [ %29, %middle.block ], [ %spec.select, %._crit_edge ], [ %spec.select83, %scalar.ph ]
  %.not = icmp eq i16 %.4, 0
  br i1 %.not, label %.loopexit85, label %.loopexit90.thread135

.loopexit90.thread135:                            ; preds = %.preheader88.lr.ph, %.loopexit90
  %.4138 = phi i16 [ %.4, %.loopexit90 ], [ %5, %.preheader88.lr.ph ]
  store i16 %.4138, ptr %14, align 8, !tbaa !9
  %53 = zext i16 %.4138 to i64
  %54 = shl nuw nsw i64 %53, 4
  %55 = tail call ptr @__caryll_allocate_clean(i64 noundef %54, i64 noundef 49)
  store ptr %55, ptr %15, align 8, !tbaa !13
  br i1 %16, label %.preheader84, label %.preheader86

.preheader86:                                     ; preds = %.loopexit90.thread135
  %56 = load i16, ptr %13, align 8, !tbaa !14
  %.not112 = icmp eq i16 %56, 0
  br i1 %.not112, label %.loopexit85, label %.lr.ph105

.lr.ph105:                                        ; preds = %.preheader86
  %57 = getelementptr inbounds i8, ptr %13, i64 24
  %58 = load ptr, ptr getelementptr inbounds (i8, ptr @otfcc_iHandle, i64 56), align 8
  %59 = getelementptr inbounds i8, ptr %13, i64 16
  br label %82

.preheader84:                                     ; preds = %.loopexit90.thread135
  %.not113 = icmp eq i16 %5, 0
  br i1 %.not113, label %.loopexit85, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %.preheader84
  %60 = getelementptr inbounds i8, ptr %13, i64 24
  %61 = getelementptr inbounds i8, ptr %13, i64 16
  %62 = load ptr, ptr getelementptr inbounds (i8, ptr @otfcc_iHandle, i64 64), align 8
  br label %.preheader

.preheader:                                       ; preds = %.preheader.lr.ph, %.loopexit
  %.069109 = phi i16 [ 0, %.preheader.lr.ph ], [ %81, %.loopexit ]
  %.070108 = phi i16 [ 0, %.preheader.lr.ph ], [ %.171, %.loopexit ]
  %63 = load i16, ptr %13, align 8, !tbaa !14
  %.not114 = icmp eq i16 %63, 0
  br i1 %.not114, label %.critedge, label %.lr.ph107

.lr.ph107:                                        ; preds = %.preheader
  %64 = load ptr, ptr %60, align 8, !tbaa !16
  %wide.trip.count130 = zext i16 %63 to i64
  br label %65

65:                                               ; preds = %.lr.ph107, %73
  %indvars.iv127 = phi i64 [ 0, %.lr.ph107 ], [ %indvars.iv.next128, %73 ]
  %66 = getelementptr inbounds i16, ptr %64, i64 %indvars.iv127
  %67 = load i16, ptr %66, align 2, !tbaa !17
  %.not81 = icmp eq i16 %67, 0
  br i1 %.not81, label %73, label %68

68:                                               ; preds = %65
  %69 = load ptr, ptr %61, align 8, !tbaa !22
  %70 = getelementptr inbounds %struct.otfcc_Handle, ptr %69, i64 %indvars.iv127, i32 1
  %71 = load i16, ptr %70, align 4, !tbaa !23
  %72 = icmp eq i16 %71, %.069109
  br i1 %72, label %.loopexit, label %73

73:                                               ; preds = %65, %68
  %indvars.iv.next128 = add nuw nsw i64 %indvars.iv127, 1
  %exitcond131.not = icmp eq i64 %indvars.iv.next128, %wide.trip.count130
  br i1 %exitcond131.not, label %.critedge, label %65, !llvm.loop !28

.critedge:                                        ; preds = %73, %.preheader
  %74 = load ptr, ptr %15, align 8, !tbaa !13
  %75 = add i16 %.070108, 1
  %76 = zext i16 %.070108 to i64
  %77 = getelementptr inbounds %struct.otfcc_Handle, ptr %74, i64 %76
  %78 = tail call { i64, ptr } %62(i16 noundef zeroext %.069109) #3
  %79 = extractvalue { i64, ptr } %78, 0
  %80 = extractvalue { i64, ptr } %78, 1
  store i64 %79, ptr %77, align 8
  %.sroa.45.0..sroa_idx = getelementptr inbounds i8, ptr %77, i64 8
  store ptr %80, ptr %.sroa.45.0..sroa_idx, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %68, %.critedge
  %.171 = phi i16 [ %75, %.critedge ], [ %.070108, %68 ]
  %81 = add nuw i16 %.069109, 1
  %exitcond132.not = icmp eq i16 %81, %5
  br i1 %exitcond132.not, label %.loopexit85, label %.preheader, !llvm.loop !29

82:                                               ; preds = %.lr.ph105, %101
  %83 = phi i16 [ %56, %.lr.ph105 ], [ %102, %101 ]
  %indvars.iv124 = phi i64 [ 0, %.lr.ph105 ], [ %indvars.iv.next125, %101 ]
  %.272103 = phi i16 [ 0, %.lr.ph105 ], [ %.373, %101 ]
  %84 = load ptr, ptr %57, align 8, !tbaa !16
  %85 = getelementptr inbounds i16, ptr %84, i64 %indvars.iv124
  %86 = load i16, ptr %85, align 2, !tbaa !17
  %87 = icmp eq i16 %86, %2
  br i1 %87, label %88, label %101

88:                                               ; preds = %82
  %89 = load ptr, ptr %15, align 8, !tbaa !13
  %90 = add i16 %.272103, 1
  %91 = zext i16 %.272103 to i64
  %92 = getelementptr inbounds %struct.otfcc_Handle, ptr %89, i64 %91
  %93 = load ptr, ptr %59, align 8, !tbaa !22
  %94 = getelementptr inbounds %struct.otfcc_Handle, ptr %93, i64 %indvars.iv124
  %95 = load i64, ptr %94, align 8
  %96 = getelementptr inbounds i8, ptr %94, i64 8
  %97 = load ptr, ptr %96, align 8
  %98 = tail call { i64, ptr } %58(i64 %95, ptr %97) #3
  %99 = extractvalue { i64, ptr } %98, 0
  %100 = extractvalue { i64, ptr } %98, 1
  store i64 %99, ptr %92, align 8
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %92, i64 8
  store ptr %100, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !5
  %.pre = load i16, ptr %13, align 8, !tbaa !14
  br label %101

101:                                              ; preds = %82, %88
  %102 = phi i16 [ %.pre, %88 ], [ %83, %82 ]
  %.373 = phi i16 [ %90, %88 ], [ %.272103, %82 ]
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %103 = zext i16 %102 to i64
  %104 = icmp ult i64 %indvars.iv.next125, %103
  br i1 %104, label %82, label %.loopexit85, !llvm.loop !30

.loopexit85:                                      ; preds = %101, %.loopexit, %.preheader91, %.preheader89, %.preheader86, %.preheader84, %.loopexit90
  ret ptr %14
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.vector.reduce.add.v8i16(<8 x i16>) #2

attributes #0 = { 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 #1 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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, !11, i64 0}
!10 = !{!"", !11, i64 0, !12, i64 4, !6, i64 8}
!11 = !{!"short", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !6, i64 8}
!14 = !{!15, !11, i64 0}
!15 = !{!"", !11, i64 0, !12, i64 4, !11, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!15, !6, i64 24}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19, !20, !21}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = !{!15, !6, i64 16}
!23 = !{!24, !11, i64 4}
!24 = !{!"otfcc_Handle", !12, i64 0, !11, i64 4, !6, i64 8}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !19}
!27 = distinct !{!27, !19, !21, !20}
!28 = distinct !{!28, !19}
!29 = distinct !{!29, !19}
!30 = distinct !{!30, !19}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass