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

; 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_subtable_gpos_cursive = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, 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_GposCursiveEntry = type { %struct.otfcc_Handle, %struct.otl_Anchor, %struct.otl_Anchor }
%struct.otfcc_Handle = type { i32, i16, ptr }
%struct.otl_Coverage = type { i16, i32, ptr }

@iSubtable_gpos_cursive = external dso_local constant %struct.__caryll_vectorinterface_subtable_gpos_cursive, 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_cursive(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 i16, align 2
  %15 = alloca i16, align 2
  %16 = alloca i16, align 2
  %17 = alloca i16, align 2
  %18 = alloca %struct.otl_Anchor, align 8
  %19 = alloca %struct.otl_Anchor, align 8
  %20 = alloca %struct.otl_Anchor, align 8
  %21 = alloca %struct.otl_Anchor, align 8
  %22 = alloca %struct.otl_GposCursiveEntry, align 8
  %23 = alloca i32, align 4
  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
  %24 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_subtable_gpos_cursive, ptr @iSubtable_gpos_cursive, i32 0, i32 6), align 8, !tbaa !13
  %25 = call ptr (...) %24()
  store ptr %25, 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
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = load i32, ptr %9, align 4, !tbaa !9
  %28 = add i32 %27, 6
  %29 = icmp ult i32 %26, %28
  br i1 %29, label %30, label %31

30:                                               ; preds = %5
  br label %163

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

47:                                               ; preds = %31
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.otl_Coverage, ptr %48, i32 0, i32 0
  %50 = load i16, ptr %49, align 8, !tbaa !17
  %51 = zext i16 %50 to i32
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %47, %31
  br label %163

54:                                               ; preds = %47
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %55, i64 %57
  %59 = getelementptr inbounds i8, ptr %58, i64 4
  %60 = call zeroext i16 @read_16u(ptr noundef %59)
  store i16 %60, ptr %14, align 2, !tbaa !11
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = load i32, ptr %9, align 4, !tbaa !9
  %63 = add i32 %62, 6
  %64 = load i16, ptr %14, align 2, !tbaa !11
  %65 = zext i16 %64 to i32
  %66 = mul nsw i32 4, %65
  %67 = add i32 %63, %66
  %68 = icmp ult i32 %61, %67
  br i1 %68, label %69, label %70

69:                                               ; preds = %54
  br label %163

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

78:                                               ; preds = %70
  br label %163

79:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 2, ptr %15) #5
  store i16 0, ptr %15, align 2, !tbaa !11
  br label %80

80:                                               ; preds = %152, %79
  %81 = load i16, ptr %15, align 2, !tbaa !11
  %82 = zext i16 %81 to i32
  %83 = load i16, ptr %14, align 2, !tbaa !11
  %84 = zext i16 %83 to i32
  %85 = icmp slt i32 %82, %84
  br i1 %85, label %87, label %86

86:                                               ; preds = %80
  call void @llvm.lifetime.end.p0(i64 2, ptr %15) #5
  br label %155

87:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #5
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = load i32, ptr %9, align 4, !tbaa !9
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %88, i64 %90
  %92 = getelementptr inbounds i8, ptr %91, i64 6
  %93 = load i16, ptr %15, align 2, !tbaa !11
  %94 = zext i16 %93 to i32
  %95 = mul nsw i32 4, %94
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds i8, ptr %92, i64 %96
  %98 = call zeroext i16 @read_16u(ptr noundef %97)
  store i16 %98, ptr %16, align 2, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 2, ptr %17) #5
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = load i32, ptr %9, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds i8, ptr %99, i64 %101
  %103 = getelementptr inbounds i8, ptr %102, i64 6
  %104 = load i16, ptr %15, align 2, !tbaa !11
  %105 = zext i16 %104 to i32
  %106 = mul nsw i32 4, %105
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds i8, ptr %103, i64 %107
  %109 = getelementptr inbounds i8, ptr %108, i64 2
  %110 = call zeroext i16 @read_16u(ptr noundef %109)
  store i16 %110, ptr %17, align 2, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #5
  call void (ptr, ...) @otl_anchor_absent(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8 %18)
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #5
  call void (ptr, ...) @otl_anchor_absent(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8 %19)
  %111 = load i16, ptr %16, align 2, !tbaa !11
  %112 = icmp ne i16 %111, 0
  br i1 %112, label %113, label %120

113:                                              ; preds = %87
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #5
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = load i32, ptr %8, align 4, !tbaa !9
  %116 = load i32, ptr %9, align 4, !tbaa !9
  %117 = load i16, ptr %16, align 2, !tbaa !11
  %118 = zext i16 %117 to i32
  %119 = add i32 %116, %118
  call void @otl_read_anchor(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8 %20, ptr noundef %114, i32 noundef %115, i32 noundef %119)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 8 %20, i64 24, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  br label %120

120:                                              ; preds = %113, %87
  %121 = load i16, ptr %17, align 2, !tbaa !11
  %122 = icmp ne i16 %121, 0
  br i1 %122, label %123, label %130

123:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #5
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = load i32, ptr %8, align 4, !tbaa !9
  %126 = load i32, ptr %9, align 4, !tbaa !9
  %127 = load i16, ptr %17, align 2, !tbaa !11
  %128 = zext i16 %127 to i32
  %129 = add i32 %126, %128
  call void @otl_read_anchor(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8 %21, ptr noundef %124, i32 noundef %125, i32 noundef %129)
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %19, ptr align 8 %21, i64 24, i1 false), !tbaa.struct !19
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #5
  br label %130

130:                                              ; preds = %123, %120
  %131 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_subtable_gpos_cursive, ptr @iSubtable_gpos_cursive, i32 0, i32 13), align 8, !tbaa !24
  %132 = load ptr, ptr %12, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.otl_GposCursiveEntry, ptr %22, i32 0, i32 0
  %134 = load ptr, ptr getelementptr inbounds (%struct.otfcc_HandlePackage, ptr @otfcc_iHandle, i32 0, i32 7), align 8, !tbaa !25
  %135 = load ptr, ptr %13, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.otl_Coverage, ptr %135, i32 0, i32 2
  %137 = load ptr, ptr %136, align 8, !tbaa !27
  %138 = load i16, ptr %15, align 2, !tbaa !11
  %139 = zext i16 %138 to i64
  %140 = getelementptr inbounds %struct.otfcc_Handle, ptr %137, i64 %139
  %141 = getelementptr inbounds { i64, ptr }, ptr %140, i32 0, i32 0
  %142 = load i64, ptr %141, align 8
  %143 = getelementptr inbounds { i64, ptr }, ptr %140, i32 0, i32 1
  %144 = load ptr, ptr %143, align 8
  %145 = call { i64, ptr } %134(i64 %142, ptr %144)
  %146 = getelementptr inbounds { i64, ptr }, ptr %133, i32 0, i32 0
  %147 = extractvalue { i64, ptr } %145, 0
  store i64 %147, ptr %146, align 8
  %148 = getelementptr inbounds { i64, ptr }, ptr %133, i32 0, i32 1
  %149 = extractvalue { i64, ptr } %145, 1
  store ptr %149, ptr %148, align 8
  %150 = getelementptr inbounds %struct.otl_GposCursiveEntry, ptr %22, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %150, ptr align 8 %18, i64 24, i1 false), !tbaa.struct !19
  %151 = getelementptr inbounds %struct.otl_GposCursiveEntry, ptr %22, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %151, ptr align 8 %19, i64 24, i1 false), !tbaa.struct !19
  call void %131(ptr noundef %132, ptr noundef byval(%struct.otl_GposCursiveEntry) align 8 %22)
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 2, ptr %16) #5
  br label %152

152:                                              ; preds = %130
  %153 = load i16, ptr %15, align 2, !tbaa !11
  %154 = add i16 %153, 1
  store i16 %154, ptr %15, align 2, !tbaa !11
  br label %80, !llvm.loop !28

155:                                              ; preds = %86
  %156 = load ptr, ptr %13, align 8, !tbaa !5
  %157 = icmp ne ptr %156, null
  br i1 %157, label %158, label %161

158:                                              ; preds = %155
  %159 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_ICoverage, ptr @otl_iCoverage, i32 0, i32 7), align 8, !tbaa !30
  %160 = load ptr, ptr %13, align 8, !tbaa !5
  call void %159(ptr noundef %160)
  br label %161

161:                                              ; preds = %158, %155
  %162 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %162, ptr %6, align 8
  store i32 1, ptr %23, align 4
  br label %172

163:                                              ; preds = %78, %69, %53, %30
  %164 = load ptr, ptr %13, align 8, !tbaa !5
  %165 = icmp ne ptr %164, null
  br i1 %165, label %166, label %169

166:                                              ; preds = %163
  %167 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_ICoverage, ptr @otl_iCoverage, i32 0, i32 7), align 8, !tbaa !30
  %168 = load ptr, ptr %13, align 8, !tbaa !5
  call void %167(ptr noundef %168)
  br label %169

169:                                              ; preds = %166, %163
  %170 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_subtable_gpos_cursive, ptr @iSubtable_gpos_cursive, i32 0, i32 7), align 8, !tbaa !31
  %171 = load ptr, ptr %12, align 8, !tbaa !5
  call void %170(ptr noundef %171)
  store ptr null, ptr %6, align 8
  store i32 1, ptr %23, align 4
  br label %172

172:                                              ; preds = %169, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %173 = load ptr, ptr %6, align 8
  ret ptr %173
}

; 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_anchor_absent(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8, ...) #3

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

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_vectorinterface_subtable_gpos_cursive", !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}
!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 = !{i64 0, i64 1, !20, i64 8, i64 8, !22, i64 16, i64 8, !22}
!20 = !{!21, !21, i64 0}
!21 = !{!"_Bool", !7, i64 0}
!22 = !{!23, !23, i64 0}
!23 = !{!"double", !7, i64 0}
!24 = !{!14, !6, i64 104}
!25 = !{!26, !6, i64 56}
!26 = !{!"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}
!27 = !{!18, !6, i64 8}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!16, !6, i64 56}
!31 = !{!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_subtable_gpos_cursive = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, 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_GposCursiveEntry = type { %struct.otfcc_Handle, %struct.otl_Anchor, %struct.otl_Anchor }
%struct.otfcc_Handle = type { i32, i16, ptr }

@iSubtable_gpos_cursive = external dso_local local_unnamed_addr constant %struct.__caryll_vectorinterface_subtable_gpos_cursive, 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_cursive(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_Anchor, align 8
  %9 = alloca %struct.otl_Anchor, align 8
  %10 = alloca %struct.otl_GposCursiveEntry, align 8
  %11 = load ptr, ptr getelementptr inbounds (i8, ptr @iSubtable_gpos_cursive, i64 48), align 8, !tbaa !5
  %12 = tail call ptr (...) %11() #5
  %13 = add i32 %2, 6
  %14 = icmp ugt i32 %13, %1
  br i1 %14, label %68, label %15

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

24:                                               ; preds = %15
  %25 = load i16, ptr %23, align 8, !tbaa !12
  %26 = icmp eq i16 %25, 0
  br i1 %26, label %66, label %27

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %18, i64 4
  %29 = tail call zeroext i16 @read_16u(ptr noundef nonnull %28)
  %30 = zext i16 %29 to i32
  %31 = shl nuw nsw i32 %30, 2
  %32 = add i32 %31, %13
  %33 = icmp ugt i32 %32, %1
  br i1 %33, label %66, label %34

34:                                               ; preds = %27
  %35 = load i16, ptr %23, align 8, !tbaa !12
  %.not53 = icmp eq i16 %29, %35
  br i1 %.not53, label %.preheader, label %66

.preheader:                                       ; preds = %34
  %.not61 = icmp eq i16 %29, 0
  br i1 %.not61, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %36 = getelementptr inbounds i8, ptr %18, i64 6
  %37 = load ptr, ptr getelementptr inbounds (i8, ptr @iSubtable_gpos_cursive, i64 104), align 8
  %38 = load ptr, ptr getelementptr inbounds (i8, ptr @otfcc_iHandle, i64 56), align 8
  %39 = getelementptr inbounds i8, ptr %23, i64 8
  %40 = getelementptr inbounds i8, ptr %10, i64 8
  %41 = getelementptr inbounds i8, ptr %10, i64 16
  %42 = getelementptr inbounds i8, ptr %10, i64 40
  %wide.trip.count = zext i16 %29 to i64
  br label %43

43:                                               ; preds = %.lr.ph, %56
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %56 ]
  %44 = shl nuw nsw i64 %indvars.iv, 2
  %45 = getelementptr inbounds i8, ptr %36, i64 %44
  %46 = call zeroext i16 @read_16u(ptr noundef nonnull %45)
  %47 = getelementptr inbounds i8, ptr %45, i64 2
  %48 = call zeroext i16 @read_16u(ptr noundef nonnull %47)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  call void (ptr, ...) @otl_anchor_absent(ptr dead_on_unwind nonnull writable sret(%struct.otl_Anchor) align 8 %6) #5
  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
  %.not54 = icmp eq i16 %46, 0
  br i1 %.not54, label %52, label %49

49:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  %50 = zext i16 %46 to i32
  %51 = add i32 %50, %2
  call void @otl_read_anchor(ptr dead_on_unwind nonnull writable sret(%struct.otl_Anchor) align 8 %8, ptr noundef %0, i32 noundef %1, i32 noundef %51) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %8, i64 24, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  br label %52

52:                                               ; preds = %49, %43
  %.not55 = icmp eq i16 %48, 0
  br i1 %.not55, label %56, label %53

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #5
  %54 = zext i16 %48 to i32
  %55 = add i32 %54, %2
  call void @otl_read_anchor(ptr dead_on_unwind nonnull writable sret(%struct.otl_Anchor) align 8 %9, ptr noundef %0, i32 noundef %1, i32 noundef %55) #5
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %9, i64 24, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #5
  br label %56

56:                                               ; preds = %53, %52
  %57 = load ptr, ptr %39, align 8, !tbaa !21
  %58 = getelementptr inbounds %struct.otfcc_Handle, ptr %57, i64 %indvars.iv
  %59 = load i64, ptr %58, align 8
  %60 = getelementptr inbounds i8, ptr %58, i64 8
  %61 = load ptr, ptr %60, align 8
  %62 = call { i64, ptr } %38(i64 %59, ptr %61) #5
  %63 = extractvalue { i64, ptr } %62, 0
  store i64 %63, ptr %10, align 8
  %64 = extractvalue { i64, ptr } %62, 1
  store ptr %64, ptr %40, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 8 dereferenceable(24) %6, i64 24, i1 false), !tbaa.struct !16
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %42, ptr noundef nonnull align 8 dereferenceable(24) %7, i64 24, i1 false), !tbaa.struct !16
  call void %37(ptr noundef %12, ptr noundef nonnull byval(%struct.otl_GposCursiveEntry) align 8 %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  %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 %._crit_edge, label %43, !llvm.loop !22

._crit_edge:                                      ; preds = %56, %.preheader
  %65 = load ptr, ptr getelementptr inbounds (i8, ptr @otl_iCoverage, i64 56), align 8, !tbaa !24
  call void %65(ptr noundef nonnull %23) #5
  br label %70

66:                                               ; preds = %24, %27, %34
  %67 = load ptr, ptr getelementptr inbounds (i8, ptr @otl_iCoverage, i64 56), align 8, !tbaa !24
  tail call void %67(ptr noundef nonnull %23) #5
  br label %68

68:                                               ; preds = %5, %15, %66
  %69 = load ptr, ptr getelementptr inbounds (i8, ptr @iSubtable_gpos_cursive, i64 56), align 8, !tbaa !25
  tail call void %69(ptr noundef %12) #5
  br label %70

70:                                               ; preds = %68, %._crit_edge
  %.0 = phi ptr [ null, %68 ], [ %12, %._crit_edge ]
  ret ptr %.0
}

; 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_anchor_absent(ptr dead_on_unwind writable sret(%struct.otl_Anchor) align 8, ...) local_unnamed_addr #3

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

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_vectorinterface_subtable_gpos_cursive", !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, !7, i64 128, !7, i64 136, !7, i64 144}
!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 = !{i64 0, i64 1, !17, i64 8, i64 8, !19, i64 16, i64 8, !19}
!17 = !{!18, !18, i64 0}
!18 = !{!"_Bool", !8, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !8, i64 0}
!21 = !{!13, !7, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!11, !7, i64 56}
!25 = !{!6, !7, i64 56}


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