; LLVM IR from caryll/otfcc :: lib/table/otl/subtables (gpos-mark-to-single)

; 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_otl_BaseArray = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_elementinterface_subtable_gpos_markToSingle = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__otfcc_ICoverage = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otfcc_HandlePackage = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otl_Anchor = type { i8, double, double }
%struct.otl_BaseRecord = type { %struct.otfcc_Handle, ptr }
%struct.otfcc_Handle = type { i32, i16, ptr }
%struct.otl_Coverage = type { i16, i32, ptr }
%struct.subtable_gpos_markToSingle = type { i16, %struct.otl_MarkArray, %struct.otl_BaseArray }
%struct.otl_MarkArray = type { i64, i64, ptr }
%struct.otl_BaseArray = type { i64, i64, ptr }

@otl_iBaseArray = external dso_local constant %struct.__caryll_vectorinterface_otl_BaseArray, align 8
@iSubtable_gpos_markToSingle = external dso_local constant %struct.__caryll_elementinterface_subtable_gpos_markToSingle, align 8
@otl_iCoverage = external constant %struct.__otfcc_ICoverage, align 8
@otfcc_iHandle = external constant %struct.otfcc_HandlePackage, align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @otl_read_gpos_markToSingle(ptr noundef %0, i32 noundef %1, i32 noundef %2, i16 noundef zeroext %3, ptr noundef %4) #0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i16, align 2
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i16, align 2
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca i16, align 2
  %22 = alloca %struct.otl_Anchor, align 8
  %23 = alloca %struct.otl_Anchor, align 8
  %24 = alloca %struct.otl_BaseRecord, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store i32 %2, ptr %9, align 4, !tbaa !9
  store i16 %3, ptr %10, align 2, !tbaa !11
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %25 = load ptr, ptr getelementptr inbounds (%struct.__caryll_elementinterface_subtable_gpos_markToSingle, ptr @iSubtable_gpos_markToSingle, i32 0, i32 6), align 8, !tbaa !13
  %26 = call ptr (...) %25()
  store ptr %26, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store ptr null, ptr %14, align 8, !tbaa !5
  %27 = load i32, ptr %8, align 4, !tbaa !9
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = add i32 %28, 12
  %30 = icmp ult i32 %27, %29
  br i1 %30, label %31, label %32

31:                                               ; preds = %5
  br label %240

32:                                               ; preds = %5
  %33 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_ICoverage, ptr @otl_iCoverage, i32 0, i32 9), align 8, !tbaa !15
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = load i32, ptr %8, align 4, !tbaa !9
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = load i32, ptr %9, align 4, !tbaa !9
  %39 = zext i32 %38 to i64
  %40 = getelementptr inbounds i8, ptr %37, i64 %39
  %41 = getelementptr inbounds i8, ptr %40, i64 2
  %42 = call zeroext i16 @read_16u(ptr noundef %41)
  %43 = zext i16 %42 to i32
  %44 = add i32 %36, %43
  %45 = call ptr %33(ptr noundef %34, i32 noundef %35, i32 noundef %44)
  store ptr %45, ptr %13, align 8, !tbaa !5
  %46 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_ICoverage, ptr @otl_iCoverage, i32 0, i32 9), align 8, !tbaa !15
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = load i32, ptr %9, align 4, !tbaa !9
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = zext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %50, i64 %52
  %54 = getelementptr inbounds i8, ptr %53, i64 4
  %55 = call zeroext i16 @read_16u(ptr noundef %54)
  %56 = zext i16 %55 to i32
  %57 = add i32 %49, %56
  %58 = call ptr %46(ptr noundef %47, i32 noundef %48, i32 noundef %57)
  store ptr %58, ptr %14, align 8, !tbaa !5
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %76

61:                                               ; preds = %32
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.otl_Coverage, ptr %62, i32 0, i32 0
  %64 = load i16, ptr %63, align 8, !tbaa !17
  %65 = zext i16 %64 to i32
  %66 = icmp eq i32 %65, 0
  br i1 %66, label %76, label %67

67:                                               ; preds = %61
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %76

70:                                               ; preds = %67
  %71 = load ptr, ptr %14, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.otl_Coverage, ptr %71, i32 0, i32 0
  %73 = load i16, ptr %72, align 8, !tbaa !17
  %74 = zext i16 %73 to i32
  %75 = icmp eq i32 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %70, %67, %61, %32
  br label %240

77:                                               ; preds = %70
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  %79 = load i32, ptr %9, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds i8, ptr %78, i64 %80
  %82 = getelementptr inbounds i8, ptr %81, i64 6
  %83 = call zeroext i16 @read_16u(ptr noundef %82)
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.subtable_gpos_markToSingle, ptr %84, i32 0, i32 0
  store i16 %83, ptr %85, align 8, !tbaa !19
  %86 = load i32, ptr %9, align 4, !tbaa !9
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load i32, ptr %9, align 4, !tbaa !9
  %89 = zext i32 %88 to i64
  %90 = getelementptr inbounds i8, ptr %87, i64 %89
  %91 = getelementptr inbounds i8, ptr %90, i64 8
  %92 = call zeroext i16 @read_16u(ptr noundef %91)
  %93 = zext i16 %92 to i32
  %94 = add i32 %86, %93
  store i32 %94, ptr %15, align 4, !tbaa !9
  %95 = load ptr, ptr %12, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.subtable_gpos_markToSingle, ptr %95, i32 0, i32 1
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = load i32, ptr %8, align 4, !tbaa !9
  %100 = load i32, ptr %15, align 4, !tbaa !9
  call void @otl_readMarkArray(ptr noundef %96, ptr noundef %97, ptr noundef %98, i32 noundef %99, i32 noundef %100)
  %101 = load i32, ptr %9, align 4, !tbaa !9
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = load i32, ptr %9, align 4, !tbaa !9
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds i8, ptr %102, i64 %104
  %106 = getelementptr inbounds i8, ptr %105, i64 10
  %107 = call zeroext i16 @read_16u(ptr noundef %106)
  %108 = zext i16 %107 to i32
  %109 = add i32 %101, %108
  store i32 %109, ptr %16, align 4, !tbaa !9
  %110 = load i32, ptr %8, align 4, !tbaa !9
  %111 = load i32, ptr %16, align 4, !tbaa !9
  %112 = add i32 %111, 2
  %113 = load ptr, ptr %14, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.otl_Coverage, ptr %113, i32 0, i32 0
  %115 = load i16, ptr %114, align 8, !tbaa !17
  %116 = zext i16 %115 to i32
  %117 = mul nsw i32 2, %116
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.subtable_gpos_markToSingle, ptr %118, i32 0, i32 0
  %120 = load i16, ptr %119, align 8, !tbaa !19
  %121 = zext i16 %120 to i32
  %122 = mul nsw i32 %117, %121
  %123 = add i32 %112, %122
  %124 = icmp ult i32 %110, %123
  br i1 %124, label %125, label %126

125:                                              ; preds = %77
  br label %240

126:                                              ; preds = %77
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = load i32, ptr %16, align 4, !tbaa !9
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds i8, ptr %127, i64 %129
  %131 = call zeroext i16 @read_16u(ptr noundef %130)
  %132 = zext i16 %131 to i32
  %133 = load ptr, ptr %14, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.otl_Coverage, ptr %133, i32 0, i32 0
  %135 = load i16, ptr %134, align 8, !tbaa !17
  %136 = zext i16 %135 to i32
  %137 = icmp ne i32 %132, %136
  br i1 %137, label %138, label %139

138:                                              ; preds = %126
  br label %240

139:                                              ; preds = %126
  %140 = load i32, ptr %16, align 4, !tbaa !9
  %141 = add i32 %140, 2
  store i32 %141, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 2, ptr %18) #5
  store i16 0, ptr %18, align 2, !tbaa !11
  br label %142

142:                                              ; preds = %223, %139
  %143 = load i16, ptr %18, align 2, !tbaa !11
  %144 = zext i16 %143 to i32
  %145 = load ptr, ptr %14, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.otl_Coverage, ptr %145, i32 0, i32 0
  %147 = load i16, ptr %146, align 8, !tbaa !17
  %148 = zext i16 %147 to i32
  %149 = icmp slt i32 %144, %148
  br i1 %149, label %151, label %150

150:                                              ; preds = %142
  store i32 3, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %18) #5
  br label %226

151:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %152 = load ptr, ptr %12, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.subtable_gpos_markToSingle, ptr %152, i32 0, i32 0
  %154 = load i16, ptr %153, align 8, !tbaa !19
  %155 = zext i16 %154 to i64
  %156 = mul i64 24, %155
  %157 = call ptr @__caryll_allocate_clean(i64 noundef %156, i64 noundef 49)
  store ptr %157, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %21) #5
  store i16 0, ptr %21, align 2, !tbaa !11
  br label %158

158:                                              ; preds = %197, %151
  %159 = load i16, ptr %21, align 2, !tbaa !11
  %160 = zext i16 %159 to i32
  %161 = load ptr, ptr %12, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.subtable_gpos_markToSingle, ptr %161, i32 0, i32 0
  %163 = load i16, ptr %162, align 8, !tbaa !19
  %164 = zext i16 %163 to i32
  %165 = icmp slt i32 %160, %164
  br i1 %165, label %167, label %166

166:                                              ; preds = %158
  store i32 6, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %21) #5
  br label %200

167:                                              ; preds = %158
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = load i32, ptr %17, align 4, !tbaa !9
  %170 = zext i32 %169 to i64
  %171 = getelementptr inbounds i8, ptr %168, i64 %170
  %172 = call zeroext i16 @read_16u(ptr noundef %171)
  %173 = icmp ne i16 %172, 0
  br i1 %173, label %174, label %189

174:                                              ; preds = %167
  %175 = load ptr, ptr %20, align 8, !tbaa !5
  %176 = load i16, ptr %21, align 2, !tbaa !11
  %177 = zext i16 %176 to i64
  %178 = getelementptr inbounds %struct.otl_Anchor, ptr %175, i64 %177
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #5
  %179 = load ptr, ptr %7, align 8, !tbaa !5
  %180 = load i32, ptr %8, align 4, !tbaa !9
  %181 = load i32, ptr %16, align 4, !tbaa !9
  %182 = load ptr, ptr %7, align 8, !tbaa !5
  %183 = load i32, ptr %17, align 4, !tbaa !9
  %184 = zext i32 %183 to i64
  %185 = getelementptr inbounds i8, ptr %182, i64 %184
  %186 = call zeroext i16 @read_16u(ptr noundef %185)
  %187 = zext i16 %186 to i32
  %188 = add i32 %181, %187
  call void @otl_read_anchor(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8 %22, ptr noundef %179, i32 noundef %180, i32 noundef %188)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %178, ptr align 8 %22, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #5
  br label %194

189:                                              ; preds = %167
  %190 = load ptr, ptr %20, align 8, !tbaa !5
  %191 = load i16, ptr %21, align 2, !tbaa !11
  %192 = zext i16 %191 to i64
  %193 = getelementptr inbounds %struct.otl_Anchor, ptr %190, i64 %192
  call void @llvm.lifetime.start.p0(i64 24, ptr %23) #5
  call void (ptr, ...) @otl_anchor_absent(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8 %23)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %193, ptr align 8 %23, i64 24, i1 false), !tbaa.struct !23
  call void @llvm.lifetime.end.p0(i64 24, ptr %23) #5
  br label %194

194:                                              ; preds = %189, %174
  %195 = load i32, ptr %17, align 4, !tbaa !9
  %196 = add i32 %195, 2
  store i32 %196, ptr %17, align 4, !tbaa !9
  br label %197

197:                                              ; preds = %194
  %198 = load i16, ptr %21, align 2, !tbaa !11
  %199 = add i16 %198, 1
  store i16 %199, ptr %21, align 2, !tbaa !11
  br label %158, !llvm.loop !28

200:                                              ; preds = %166
  %201 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_otl_BaseArray, ptr @otl_iBaseArray, i32 0, i32 13), align 8, !tbaa !30
  %202 = load ptr, ptr %12, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.subtable_gpos_markToSingle, ptr %202, i32 0, i32 2
  %204 = getelementptr inbounds %struct.otl_BaseRecord, ptr %24, i32 0, i32 0
  %205 = load ptr, ptr getelementptr inbounds (%struct.otfcc_HandlePackage, ptr @otfcc_iHandle, i32 0, i32 7), align 8, !tbaa !32
  %206 = load ptr, ptr %14, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.otl_Coverage, ptr %206, i32 0, i32 2
  %208 = load ptr, ptr %207, align 8, !tbaa !34
  %209 = load i16, ptr %18, align 2, !tbaa !11
  %210 = zext i16 %209 to i64
  %211 = getelementptr inbounds %struct.otfcc_Handle, ptr %208, i64 %210
  %212 = getelementptr inbounds { i64, ptr }, ptr %211, i32 0, i32 0
  %213 = load i64, ptr %212, align 8
  %214 = getelementptr inbounds { i64, ptr }, ptr %211, i32 0, i32 1
  %215 = load ptr, ptr %214, align 8
  %216 = call { i64, ptr } %205(i64 %213, ptr %215)
  %217 = getelementptr inbounds { i64, ptr }, ptr %204, i32 0, i32 0
  %218 = extractvalue { i64, ptr } %216, 0
  store i64 %218, ptr %217, align 8
  %219 = getelementptr inbounds { i64, ptr }, ptr %204, i32 0, i32 1
  %220 = extractvalue { i64, ptr } %216, 1
  store ptr %220, ptr %219, align 8
  %221 = getelementptr inbounds %struct.otl_BaseRecord, ptr %24, i32 0, i32 1
  %222 = load ptr, ptr %20, align 8, !tbaa !5
  store ptr %222, ptr %221, align 8, !tbaa !35
  call void %201(ptr noundef %203, ptr noundef byval(%struct.otl_BaseRecord) align 8 %24)
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  br label %223

223:                                              ; preds = %200
  %224 = load i16, ptr %18, align 2, !tbaa !11
  %225 = add i16 %224, 1
  store i16 %225, ptr %18, align 2, !tbaa !11
  br label %142, !llvm.loop !38

226:                                              ; preds = %150
  %227 = load ptr, ptr %13, align 8, !tbaa !5
  %228 = icmp ne ptr %227, null
  br i1 %228, label %229, label %232

229:                                              ; preds = %226
  %230 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_ICoverage, ptr @otl_iCoverage, i32 0, i32 7), align 8, !tbaa !39
  %231 = load ptr, ptr %13, align 8, !tbaa !5
  call void %230(ptr noundef %231)
  br label %232

232:                                              ; preds = %229, %226
  %233 = load ptr, ptr %14, align 8, !tbaa !5
  %234 = icmp ne ptr %233, null
  br i1 %234, label %235, label %238

235:                                              ; preds = %232
  %236 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_ICoverage, ptr @otl_iCoverage, i32 0, i32 7), align 8, !tbaa !39
  %237 = load ptr, ptr %14, align 8, !tbaa !5
  call void %236(ptr noundef %237)
  br label %238

238:                                              ; preds = %235, %232
  %239 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %239, ptr %6, align 8
  store i32 1, ptr %19, align 4
  br label %243

240:                                              ; preds = %138, %125, %76, %31
  %241 = load ptr, ptr getelementptr inbounds (%struct.__caryll_elementinterface_subtable_gpos_markToSingle, ptr @iSubtable_gpos_markToSingle, i32 0, i32 7), align 8, !tbaa !40
  %242 = load ptr, ptr %12, align 8, !tbaa !5
  call void %241(ptr noundef %242)
  store ptr null, ptr %6, align 8
  store i32 1, ptr %19, align 4
  br label %243

243:                                              ; preds = %240, %238
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %244 = load ptr, ptr %6, align 8
  ret ptr %244
}

; 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 zeroext i16 @read_16u(ptr noundef) #2

declare void @otl_readMarkArray(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #3

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

declare void @otl_read_anchor(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8, ptr noundef, i32 noundef, i32 noundef) #3

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

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

declare void @otl_anchor_absent(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8, ...) #3

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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !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 48}
!14 = !{!"__caryll_elementinterface_subtable_gpos_markToSingle", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!15 = !{!16, !6, i64 72}
!16 = !{!"__otfcc_ICoverage", !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}
!17 = !{!18, !12, i64 0}
!18 = !{!"", !12, i64 0, !10, i64 4, !6, i64 8}
!19 = !{!20, !12, i64 0}
!20 = !{!"", !12, i64 0, !21, i64 8, !21, i64 32}
!21 = !{!"", !22, i64 0, !22, i64 8, !6, i64 16}
!22 = !{!"long", !7, i64 0}
!23 = !{i64 0, i64 1, !24, i64 8, i64 8, !26, i64 16, i64 8, !26}
!24 = !{!25, !25, i64 0}
!25 = !{!"_Bool", !7, i64 0}
!26 = !{!27, !27, i64 0}
!27 = !{!"double", !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!31, !6, i64 104}
!31 = !{!"__caryll_vectorinterface_otl_BaseArray", !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}
!32 = !{!33, !6, i64 56}
!33 = !{!"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}
!34 = !{!18, !6, i64 8}
!35 = !{!36, !6, i64 16}
!36 = !{!"", !37, i64 0, !6, i64 16}
!37 = !{!"otfcc_Handle", !10, i64 0, !12, i64 4, !6, i64 8}
!38 = distinct !{!38, !29}
!39 = !{!16, !6, i64 56}
!40 = !{!14, !6, i64 56}


; 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_otl_BaseArray = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_elementinterface_subtable_gpos_markToSingle = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__otfcc_ICoverage = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otfcc_HandlePackage = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otl_Anchor = type { i8, double, double }
%struct.otl_BaseRecord = type { %struct.otfcc_Handle, ptr }
%struct.otfcc_Handle = type { i32, i16, ptr }

@otl_iBaseArray = external dso_local local_unnamed_addr constant %struct.__caryll_vectorinterface_otl_BaseArray, align 8
@iSubtable_gpos_markToSingle = external dso_local local_unnamed_addr constant %struct.__caryll_elementinterface_subtable_gpos_markToSingle, align 8
@otl_iCoverage = external local_unnamed_addr constant %struct.__otfcc_ICoverage, align 8
@otfcc_iHandle = external local_unnamed_addr constant %struct.otfcc_HandlePackage, align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @otl_read_gpos_markToSingle(ptr noundef %0, i32 noundef %1, i32 noundef %2, i16 noundef zeroext %3, ptr nocapture noundef readnone %4) local_unnamed_addr #0 {
  %6 = alloca %struct.otl_Anchor, align 8
  %7 = alloca %struct.otl_Anchor, align 8
  %8 = alloca %struct.otl_BaseRecord, align 8
  %9 = load ptr, ptr getelementptr inbounds (i8, ptr @iSubtable_gpos_markToSingle, i64 48), align 8, !tbaa !5
  %10 = tail call ptr (...) %9() #5
  %11 = add i32 %2, 12
  %12 = icmp ugt i32 %11, %1
  br i1 %12, label %98, label %13

13:                                               ; preds = %5
  %14 = load ptr, ptr getelementptr inbounds (i8, ptr @otl_iCoverage, i64 72), align 8, !tbaa !10
  %15 = zext i32 %2 to i64
  %16 = getelementptr inbounds i8, ptr %0, i64 %15
  %17 = getelementptr inbounds i8, ptr %16, i64 2
  %18 = tail call zeroext i16 @read_16u(ptr noundef nonnull %17)
  %19 = zext i16 %18 to i32
  %20 = add i32 %19, %2
  %21 = tail call ptr %14(ptr noundef %0, i32 noundef %1, i32 noundef %20) #5
  %22 = getelementptr inbounds i8, ptr %16, i64 4
  %23 = tail call zeroext i16 @read_16u(ptr noundef nonnull %22)
  %24 = zext i16 %23 to i32
  %25 = add i32 %24, %2
  %26 = tail call ptr %14(ptr noundef %0, i32 noundef %1, i32 noundef %25) #5
  %.not = icmp eq ptr %21, null
  br i1 %.not, label %98, label %27

27:                                               ; preds = %13
  %28 = load i16, ptr %21, align 8, !tbaa !12
  %29 = icmp ne i16 %28, 0
  %30 = icmp ne ptr %26, null
  %or.cond = select i1 %29, i1 %30, i1 false
  br i1 %or.cond, label %31, label %98

31:                                               ; preds = %27
  %32 = load i16, ptr %26, align 8, !tbaa !12
  %33 = icmp eq i16 %32, 0
  br i1 %33, label %98, label %34

34:                                               ; preds = %31
  %35 = getelementptr inbounds i8, ptr %16, i64 6
  %36 = tail call zeroext i16 @read_16u(ptr noundef nonnull %35)
  store i16 %36, ptr %10, align 8, !tbaa !16
  %37 = getelementptr inbounds i8, ptr %16, i64 8
  %38 = tail call zeroext i16 @read_16u(ptr noundef nonnull %37)
  %39 = zext i16 %38 to i32
  %40 = add i32 %39, %2
  %41 = getelementptr inbounds i8, ptr %10, i64 8
  tail call void @otl_readMarkArray(ptr noundef nonnull %41, ptr noundef nonnull %21, ptr noundef %0, i32 noundef %1, i32 noundef %40) #5
  %42 = getelementptr inbounds i8, ptr %16, i64 10
  %43 = tail call zeroext i16 @read_16u(ptr noundef nonnull %42)
  %44 = zext i16 %43 to i32
  %45 = add i32 %44, %2
  %46 = add i32 %45, 2
  %47 = load i16, ptr %26, align 8, !tbaa !12
  %48 = zext i16 %47 to i32
  %49 = shl nuw nsw i32 %48, 1
  %50 = load i16, ptr %10, align 8, !tbaa !16
  %51 = zext i16 %50 to i32
  %52 = mul nuw nsw i32 %49, %51
  %53 = add i32 %52, %46
  %54 = icmp ugt i32 %53, %1
  br i1 %54, label %98, label %55

55:                                               ; preds = %34
  %56 = zext i32 %45 to i64
  %57 = getelementptr inbounds i8, ptr %0, i64 %56
  %58 = tail call zeroext i16 @read_16u(ptr noundef %57)
  %59 = load i16, ptr %26, align 8, !tbaa !12
  %.not74 = icmp eq i16 %58, %59
  br i1 %.not74, label %.preheader, label %98

.preheader:                                       ; preds = %55
  %.not82 = icmp eq i16 %58, 0
  br i1 %.not82, label %._crit_edge81, label %.lr.ph80

.lr.ph80:                                         ; preds = %.preheader
  %60 = load ptr, ptr getelementptr inbounds (i8, ptr @otl_iBaseArray, i64 104), align 8
  %61 = getelementptr inbounds i8, ptr %10, i64 32
  %62 = load ptr, ptr getelementptr inbounds (i8, ptr @otfcc_iHandle, i64 56), align 8
  %63 = getelementptr inbounds i8, ptr %26, i64 8
  %64 = getelementptr inbounds i8, ptr %8, i64 8
  %65 = getelementptr inbounds i8, ptr %8, i64 16
  br label %66

66:                                               ; preds = %.lr.ph80, %._crit_edge
  %indvars.iv85 = phi i64 [ 0, %.lr.ph80 ], [ %indvars.iv.next86, %._crit_edge ]
  %.07078 = phi i32 [ %46, %.lr.ph80 ], [ %.1.lcssa, %._crit_edge ]
  %67 = load i16, ptr %10, align 8, !tbaa !16
  %68 = zext i16 %67 to i64
  %69 = mul nuw nsw i64 %68, 24
  %70 = call ptr @__caryll_allocate_clean(i64 noundef %69, i64 noundef 49)
  %71 = load i16, ptr %10, align 8, !tbaa !16
  %.not83 = icmp eq i16 %71, 0
  br i1 %.not83, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %92, %66
  %.1.lcssa = phi i32 [ %.07078, %66 ], [ %93, %92 ]
  %72 = load ptr, ptr %63, align 8, !tbaa !20
  %73 = getelementptr inbounds %struct.otfcc_Handle, ptr %72, i64 %indvars.iv85
  %74 = load i64, ptr %73, align 8
  %75 = getelementptr inbounds i8, ptr %73, i64 8
  %76 = load ptr, ptr %75, align 8
  %77 = call { i64, ptr } %62(i64 %74, ptr %76) #5
  %78 = extractvalue { i64, ptr } %77, 0
  store i64 %78, ptr %8, align 8
  %79 = extractvalue { i64, ptr } %77, 1
  store ptr %79, ptr %64, align 8
  store ptr %70, ptr %65, align 8, !tbaa !21
  call void %60(ptr noundef nonnull %61, ptr noundef nonnull byval(%struct.otl_BaseRecord) align 8 %8) #5
  %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1
  %80 = load i16, ptr %26, align 8, !tbaa !12
  %81 = zext i16 %80 to i64
  %82 = icmp ult i64 %indvars.iv.next86, %81
  br i1 %82, label %66, label %._crit_edge81, !llvm.loop !24

.lr.ph:                                           ; preds = %66, %92
  %indvars.iv = phi i64 [ %indvars.iv.next, %92 ], [ 0, %66 ]
  %.176 = phi i32 [ %93, %92 ], [ %.07078, %66 ]
  %83 = zext i32 %.176 to i64
  %84 = getelementptr inbounds i8, ptr %0, i64 %83
  %85 = call zeroext i16 @read_16u(ptr noundef %84)
  %.not75 = icmp eq i16 %85, 0
  %86 = getelementptr inbounds %struct.otl_Anchor, ptr %70, i64 %indvars.iv
  br i1 %.not75, label %91, label %87

87:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  %88 = call zeroext i16 @read_16u(ptr noundef %84)
  %89 = zext i16 %88 to i32
  %90 = add i32 %45, %89
  call void @otl_read_anchor(ptr dead_on_unwind nonnull writable sret(%struct.otl_Anchor) align 8 %6, ptr noundef %0, i32 noundef %1, i32 noundef %90) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr noundef nonnull align 8 dereferenceable(24) %6, i64 24, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  br label %92

91:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  call void (ptr, ...) @otl_anchor_absent(ptr dead_on_unwind nonnull writable sret(%struct.otl_Anchor) align 8 %7) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr noundef nonnull align 8 dereferenceable(24) %7, i64 24, i1 false), !tbaa.struct !26
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  br label %92

92:                                               ; preds = %91, %87
  %93 = add i32 %.176, 2
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %94 = load i16, ptr %10, align 8, !tbaa !16
  %95 = zext i16 %94 to i64
  %96 = icmp ult i64 %indvars.iv.next, %95
  br i1 %96, label %.lr.ph, label %._crit_edge, !llvm.loop !31

._crit_edge81:                                    ; preds = %._crit_edge, %.preheader
  %97 = load ptr, ptr getelementptr inbounds (i8, ptr @otl_iCoverage, i64 56), align 8, !tbaa !32
  call void %97(ptr noundef nonnull %21) #5
  call void %97(ptr noundef nonnull %26) #5
  br label %100

98:                                               ; preds = %55, %34, %13, %27, %31, %5
  %99 = load ptr, ptr getelementptr inbounds (i8, ptr @iSubtable_gpos_markToSingle, i64 56), align 8, !tbaa !33
  tail call void %99(ptr noundef %10) #5
  br label %100

100:                                              ; preds = %98, %._crit_edge81
  %.068 = phi ptr [ null, %98 ], [ %10, %._crit_edge81 ]
  ret ptr %.068
}

; Function Attrs: mustprogress 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 zeroext i16 @read_16u(ptr noundef) local_unnamed_addr #2

declare void @otl_readMarkArray(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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

declare void @otl_read_anchor(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

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

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

declare void @otl_anchor_absent(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8, ...) local_unnamed_addr #3

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 = { 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 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !7, i64 48}
!6 = !{!"__caryll_elementinterface_subtable_gpos_markToSingle", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 72}
!11 = !{!"__otfcc_ICoverage", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120}
!12 = !{!13, !14, i64 0}
!13 = !{!"", !14, i64 0, !15, i64 4, !7, i64 8}
!14 = !{!"short", !8, i64 0}
!15 = !{!"int", !8, i64 0}
!16 = !{!17, !14, i64 0}
!17 = !{!"", !14, i64 0, !18, i64 8, !18, i64 32}
!18 = !{!"", !19, i64 0, !19, i64 8, !7, i64 16}
!19 = !{!"long", !8, i64 0}
!20 = !{!13, !7, i64 8}
!21 = !{!22, !7, i64 16}
!22 = !{!"", !23, i64 0, !7, i64 16}
!23 = !{!"otfcc_Handle", !15, i64 0, !14, i64 4, !7, i64 8}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{i64 0, i64 1, !27, i64 8, i64 8, !29, i64 16, i64 8, !29}
!27 = !{!28, !28, i64 0}
!28 = !{!"_Bool", !8, i64 0}
!29 = !{!30, !30, i64 0}
!30 = !{!"double", !8, i64 0}
!31 = distinct !{!31, !25}
!32 = !{!11, !7, i64 56}
!33 = !{!6, !7, i64 56}


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