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

; 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_ICoverage = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__otfcc_IClassDef = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otl_PositionValue = type { double, double, double, double }
%struct.subtable_gpos_pair = type { ptr, ptr, ptr, ptr }
%struct.otl_ClassDef = type { i16, i32, i16, ptr, ptr }

@otl_iCoverage = external constant %struct.__otfcc_ICoverage, align 8
@otl_iClassDef = external constant %struct.__otfcc_IClassDef, 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @covFromCD(ptr noundef) #2

declare ptr @bk_new_Block(i32 noundef, ...) #1

declare ptr @bk_newBlockFromBuffer(ptr noundef) #1

declare ptr @bk_push(ptr noundef, i32 noundef, ...) #1

declare ptr @bk_gpos_value(ptr noundef byval(%struct.otl_PositionValue) align 8, i16 noundef zeroext) #1

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

32:                                               ; preds = %84, %1
  %33 = load i16, ptr %8, align 2, !tbaa !9
  %34 = zext i16 %33 to i32
  %35 = load i16, ptr %6, align 2, !tbaa !9
  %36 = zext i16 %35 to i32
  %37 = icmp slt i32 %34, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %32
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %8) #3
  br label %87

39:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 2, ptr %10) #3
  store i16 0, ptr %10, align 2, !tbaa !9
  br label %40

40:                                               ; preds = %80, %39
  %41 = load i16, ptr %10, align 2, !tbaa !9
  %42 = zext i16 %41 to i32
  %43 = load i16, ptr %7, align 2, !tbaa !9
  %44 = zext i16 %43 to i32
  %45 = icmp slt i32 %42, %44
  br i1 %45, label %47, label %46

46:                                               ; preds = %40
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %10) #3
  br label %83

47:                                               ; preds = %40
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %48, i32 0, i32 2
  %50 = load ptr, ptr %49, align 8, !tbaa !17
  %51 = load i16, ptr %8, align 2, !tbaa !9
  %52 = zext i16 %51 to i64
  %53 = getelementptr inbounds ptr, ptr %50, i64 %52
  %54 = load ptr, ptr %53, align 8, !tbaa !5
  %55 = load i16, ptr %10, align 2, !tbaa !9
  %56 = zext i16 %55 to i64
  %57 = getelementptr inbounds %struct.otl_PositionValue, ptr %54, i64 %56
  %58 = call zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8 %57)
  %59 = zext i8 %58 to i32
  %60 = load i16, ptr %4, align 2, !tbaa !9
  %61 = zext i16 %60 to i32
  %62 = or i32 %61, %59
  %63 = trunc i32 %62 to i16
  store i16 %63, ptr %4, align 2, !tbaa !9
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %64, i32 0, i32 3
  %66 = load ptr, ptr %65, align 8, !tbaa !18
  %67 = load i16, ptr %8, align 2, !tbaa !9
  %68 = zext i16 %67 to i64
  %69 = getelementptr inbounds ptr, ptr %66, i64 %68
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  %71 = load i16, ptr %10, align 2, !tbaa !9
  %72 = zext i16 %71 to i64
  %73 = getelementptr inbounds %struct.otl_PositionValue, ptr %70, i64 %72
  %74 = call zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8 %73)
  %75 = zext i8 %74 to i32
  %76 = load i16, ptr %5, align 2, !tbaa !9
  %77 = zext i16 %76 to i32
  %78 = or i32 %77, %75
  %79 = trunc i32 %78 to i16
  store i16 %79, ptr %5, align 2, !tbaa !9
  br label %80

80:                                               ; preds = %47
  %81 = load i16, ptr %10, align 2, !tbaa !9
  %82 = add i16 %81, 1
  store i16 %82, ptr %10, align 2, !tbaa !9
  br label %40, !llvm.loop !19

83:                                               ; preds = %46
  br label %84

84:                                               ; preds = %83
  %85 = load i16, ptr %8, align 2, !tbaa !9
  %86 = add i16 %85, 1
  store i16 %86, ptr %8, align 2, !tbaa !9
  br label %32, !llvm.loop !21

87:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %88 = load ptr, ptr %3, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !11
  %91 = call ptr @covFromCD(ptr noundef %90)
  store ptr %91, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %92 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_ICoverage, ptr @otl_iCoverage, i32 0, i32 12), align 8, !tbaa !22
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  %94 = call ptr %92(ptr noundef %93)
  %95 = call ptr @bk_newBlockFromBuffer(ptr noundef %94)
  %96 = load i16, ptr %4, align 2, !tbaa !9
  %97 = zext i16 %96 to i32
  %98 = load i16, ptr %5, align 2, !tbaa !9
  %99 = zext i16 %98 to i32
  %100 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_IClassDef, ptr @otl_iClassDef, i32 0, i32 13), align 8, !tbaa !24
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %101, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !11
  %104 = call ptr %100(ptr noundef %103)
  %105 = call ptr @bk_newBlockFromBuffer(ptr noundef %104)
  %106 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_IClassDef, ptr @otl_iClassDef, i32 0, i32 13), align 8, !tbaa !24
  %107 = load ptr, ptr %3, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %107, i32 0, i32 1
  %109 = load ptr, ptr %108, align 8, !tbaa !16
  %110 = call ptr %106(ptr noundef %109)
  %111 = call ptr @bk_newBlockFromBuffer(ptr noundef %110)
  %112 = load i16, ptr %6, align 2, !tbaa !9
  %113 = zext i16 %112 to i32
  %114 = load i16, ptr %7, align 2, !tbaa !9
  %115 = zext i16 %114 to i32
  %116 = call ptr (i32, ...) @bk_new_Block(i32 noundef 2, i32 noundef 2, i32 noundef 16, ptr noundef %95, i32 noundef 2, i32 noundef %97, i32 noundef 2, i32 noundef %99, i32 noundef 16, ptr noundef %105, i32 noundef 16, ptr noundef %111, i32 noundef 2, i32 noundef %113, i32 noundef 2, i32 noundef %115, i32 noundef 0)
  store ptr %116, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %13) #3
  store i16 0, ptr %13, align 2, !tbaa !9
  br label %117

117:                                              ; preds = %163, %87
  %118 = load i16, ptr %13, align 2, !tbaa !9
  %119 = zext i16 %118 to i32
  %120 = load i16, ptr %6, align 2, !tbaa !9
  %121 = zext i16 %120 to i32
  %122 = icmp slt i32 %119, %121
  br i1 %122, label %124, label %123

123:                                              ; preds = %117
  store i32 8, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %13) #3
  br label %166

124:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #3
  store i16 0, ptr %14, align 2, !tbaa !9
  br label %125

125:                                              ; preds = %159, %124
  %126 = load i16, ptr %14, align 2, !tbaa !9
  %127 = zext i16 %126 to i32
  %128 = load i16, ptr %7, align 2, !tbaa !9
  %129 = zext i16 %128 to i32
  %130 = icmp slt i32 %127, %129
  br i1 %130, label %132, label %131

131:                                              ; preds = %125
  store i32 11, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #3
  br label %162

132:                                              ; preds = %125
  %133 = load ptr, ptr %12, align 8, !tbaa !5
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %134, i32 0, i32 2
  %136 = load ptr, ptr %135, align 8, !tbaa !17
  %137 = load i16, ptr %13, align 2, !tbaa !9
  %138 = zext i16 %137 to i64
  %139 = getelementptr inbounds ptr, ptr %136, i64 %138
  %140 = load ptr, ptr %139, align 8, !tbaa !5
  %141 = load i16, ptr %14, align 2, !tbaa !9
  %142 = zext i16 %141 to i64
  %143 = getelementptr inbounds %struct.otl_PositionValue, ptr %140, i64 %142
  %144 = load i16, ptr %4, align 2, !tbaa !9
  %145 = call ptr @bk_gpos_value(ptr noundef byval(%struct.otl_PositionValue) align 8 %143, i16 noundef zeroext %144)
  %146 = load ptr, ptr %3, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.subtable_gpos_pair, ptr %146, i32 0, i32 3
  %148 = load ptr, ptr %147, align 8, !tbaa !18
  %149 = load i16, ptr %13, align 2, !tbaa !9
  %150 = zext i16 %149 to i64
  %151 = getelementptr inbounds ptr, ptr %148, i64 %150
  %152 = load ptr, ptr %151, align 8, !tbaa !5
  %153 = load i16, ptr %14, align 2, !tbaa !9
  %154 = zext i16 %153 to i64
  %155 = getelementptr inbounds %struct.otl_PositionValue, ptr %152, i64 %154
  %156 = load i16, ptr %5, align 2, !tbaa !9
  %157 = call ptr @bk_gpos_value(ptr noundef byval(%struct.otl_PositionValue) align 8 %155, i16 noundef zeroext %156)
  %158 = call ptr (ptr, i32, ...) @bk_push(ptr noundef %133, i32 noundef 255, ptr noundef %145, i32 noundef 255, ptr noundef %157, i32 noundef 0)
  br label %159

159:                                              ; preds = %132
  %160 = load i16, ptr %14, align 2, !tbaa !9
  %161 = add i16 %160, 1
  store i16 %161, ptr %14, align 2, !tbaa !9
  br label %125, !llvm.loop !26

162:                                              ; preds = %131
  br label %163

163:                                              ; preds = %162
  %164 = load i16, ptr %13, align 2, !tbaa !9
  %165 = add i16 %164, 1
  store i16 %165, ptr %13, align 2, !tbaa !9
  br label %117, !llvm.loop !27

166:                                              ; preds = %123
  %167 = load ptr, ptr getelementptr inbounds (%struct.__otfcc_ICoverage, ptr @otl_iCoverage, i32 0, i32 7), align 8, !tbaa !28
  %168 = load ptr, ptr %11, align 8, !tbaa !5
  call void %167(ptr noundef %168)
  store ptr null, ptr %11, align 8, !tbaa !5
  %169 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret ptr %169
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = { 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 = !{!"short", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!13 = !{!14, !10, i64 8}
!14 = !{!"", !10, i64 0, !15, i64 4, !10, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!"int", !7, i64 0}
!16 = !{!12, !6, i64 8}
!17 = !{!12, !6, i64 16}
!18 = !{!12, !6, i64 24}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!23, !6, i64 96}
!23 = !{!"__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}
!24 = !{!25, !6, i64 104}
!25 = !{!"__otfcc_IClassDef", !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}
!26 = distinct !{!26, !20}
!27 = distinct !{!27, !20}
!28 = !{!23, !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.__otfcc_ICoverage = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__otfcc_IClassDef = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otl_PositionValue = type { double, double, double, double }

@otl_iCoverage = external local_unnamed_addr constant %struct.__otfcc_ICoverage, align 8
@otl_iClassDef = external local_unnamed_addr constant %struct.__otfcc_IClassDef, align 8

declare zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8) local_unnamed_addr #0

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

declare ptr @bk_new_Block(i32 noundef, ...) local_unnamed_addr #0

declare ptr @bk_newBlockFromBuffer(ptr noundef) local_unnamed_addr #0

declare ptr @bk_push(ptr noundef, i32 noundef, ...) local_unnamed_addr #0

declare ptr @bk_gpos_value(ptr noundef byval(%struct.otl_PositionValue) align 8, i16 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local ptr @otfcc_build_gpos_pair_classes(ptr nocapture noundef readonly %0) local_unnamed_addr #1 {
  %2 = load ptr, ptr %0, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %2, i64 8
  %4 = load i16, ptr %3, align 8, !tbaa !10
  %5 = add i16 %4, 1
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !14
  %8 = getelementptr inbounds i8, ptr %7, i64 8
  %9 = load i16, ptr %8, align 8, !tbaa !10
  %10 = add i16 %9, 1
  %.not = icmp eq i16 %5, 0
  br i1 %.not, label %._crit_edge56, label %.preheader48.lr.ph

.preheader48.lr.ph:                               ; preds = %1
  %.not64 = icmp eq i16 %10, 0
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  br i1 %.not64, label %._crit_edge56, label %.preheader48.us.preheader

.preheader48.us.preheader:                        ; preds = %.preheader48.lr.ph
  %wide.trip.count74 = zext i16 %5 to i64
  %wide.trip.count = zext i16 %10 to i64
  br label %.preheader48.us

.preheader48.us:                                  ; preds = %.preheader48.us.preheader, %._crit_edge.us
  %indvars.iv71 = phi i64 [ 0, %.preheader48.us.preheader ], [ %indvars.iv.next72, %._crit_edge.us ]
  %.04255.us = phi i16 [ 0, %.preheader48.us.preheader ], [ %20, %._crit_edge.us ]
  %.04553.us = phi i16 [ 0, %.preheader48.us.preheader ], [ %27, %._crit_edge.us ]
  br label %13

13:                                               ; preds = %.preheader48.us, %13
  %indvars.iv = phi i64 [ 0, %.preheader48.us ], [ %indvars.iv.next, %13 ]
  %.151.us = phi i16 [ %.04255.us, %.preheader48.us ], [ %20, %13 ]
  %.14649.us = phi i16 [ %.04553.us, %.preheader48.us ], [ %27, %13 ]
  %14 = load ptr, ptr %11, align 8, !tbaa !15
  %15 = getelementptr inbounds ptr, ptr %14, i64 %indvars.iv71
  %16 = load ptr, ptr %15, align 8, !tbaa !16
  %17 = getelementptr inbounds %struct.otl_PositionValue, ptr %16, i64 %indvars.iv
  %18 = tail call zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8 %17) #2
  %19 = zext i8 %18 to i16
  %20 = or i16 %.151.us, %19
  %21 = load ptr, ptr %12, align 8, !tbaa !17
  %22 = getelementptr inbounds ptr, ptr %21, i64 %indvars.iv71
  %23 = load ptr, ptr %22, align 8, !tbaa !16
  %24 = getelementptr inbounds %struct.otl_PositionValue, ptr %23, i64 %indvars.iv
  %25 = tail call zeroext i8 @required_position_format(ptr noundef byval(%struct.otl_PositionValue) align 8 %24) #2
  %26 = zext i8 %25 to i16
  %27 = or i16 %.14649.us, %26
  %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.us, label %13, !llvm.loop !18

._crit_edge.us:                                   ; preds = %13
  %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1
  %exitcond75.not = icmp eq i64 %indvars.iv.next72, %wide.trip.count74
  br i1 %exitcond75.not, label %._crit_edge56.loopexit68, label %.preheader48.us, !llvm.loop !20

._crit_edge56.loopexit68:                         ; preds = %._crit_edge.us
  %.pre = load ptr, ptr %0, align 8, !tbaa !5
  br label %._crit_edge56

._crit_edge56:                                    ; preds = %.preheader48.lr.ph, %._crit_edge56.loopexit68, %1
  %28 = phi ptr [ %2, %1 ], [ %.pre, %._crit_edge56.loopexit68 ], [ %2, %.preheader48.lr.ph ]
  %.045.lcssa = phi i16 [ 0, %1 ], [ %27, %._crit_edge56.loopexit68 ], [ 0, %.preheader48.lr.ph ]
  %.042.lcssa = phi i16 [ 0, %1 ], [ %20, %._crit_edge56.loopexit68 ], [ 0, %.preheader48.lr.ph ]
  %29 = zext i16 %5 to i32
  %30 = tail call ptr @covFromCD(ptr noundef %28)
  %31 = load ptr, ptr getelementptr inbounds (i8, ptr @otl_iCoverage, i64 96), align 8, !tbaa !21
  %32 = tail call ptr %31(ptr noundef %30) #2
  %33 = tail call ptr @bk_newBlockFromBuffer(ptr noundef %32) #2
  %34 = zext nneg i16 %.042.lcssa to i32
  %35 = zext nneg i16 %.045.lcssa to i32
  %36 = load ptr, ptr getelementptr inbounds (i8, ptr @otl_iClassDef, i64 104), align 8, !tbaa !23
  %37 = load ptr, ptr %0, align 8, !tbaa !5
  %38 = tail call ptr %36(ptr noundef %37) #2
  %39 = tail call ptr @bk_newBlockFromBuffer(ptr noundef %38) #2
  %40 = load ptr, ptr %6, align 8, !tbaa !14
  %41 = tail call ptr %36(ptr noundef %40) #2
  %42 = tail call ptr @bk_newBlockFromBuffer(ptr noundef %41) #2
  %43 = zext i16 %10 to i32
  %44 = tail call ptr (i32, ...) @bk_new_Block(i32 noundef 2, i32 noundef 2, i32 noundef 16, ptr noundef %33, i32 noundef 2, i32 noundef %34, i32 noundef 2, i32 noundef %35, i32 noundef 16, ptr noundef %39, i32 noundef 16, ptr noundef %42, i32 noundef 2, i32 noundef %29, i32 noundef 2, i32 noundef %43, i32 noundef 0) #2
  br i1 %.not, label %._crit_edge62, label %.preheader.lr.ph

.preheader.lr.ph:                                 ; preds = %._crit_edge56
  %.not66 = icmp eq i16 %10, 0
  %45 = getelementptr inbounds i8, ptr %0, i64 16
  %46 = getelementptr inbounds i8, ptr %0, i64 24
  br i1 %.not66, label %._crit_edge62, label %.preheader.us.preheader

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %wide.trip.count84 = zext i16 %5 to i64
  %wide.trip.count79 = zext i16 %10 to i64
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us63
  %indvars.iv81 = phi i64 [ 0, %.preheader.us.preheader ], [ %indvars.iv.next82, %._crit_edge.us63 ]
  br label %47

47:                                               ; preds = %.preheader.us, %47
  %indvars.iv76 = phi i64 [ 0, %.preheader.us ], [ %indvars.iv.next77, %47 ]
  %48 = load ptr, ptr %45, align 8, !tbaa !15
  %49 = getelementptr inbounds ptr, ptr %48, i64 %indvars.iv81
  %50 = load ptr, ptr %49, align 8, !tbaa !16
  %51 = getelementptr inbounds %struct.otl_PositionValue, ptr %50, i64 %indvars.iv76
  %52 = tail call ptr @bk_gpos_value(ptr noundef byval(%struct.otl_PositionValue) align 8 %51, i16 noundef zeroext %.042.lcssa) #2
  %53 = load ptr, ptr %46, align 8, !tbaa !17
  %54 = getelementptr inbounds ptr, ptr %53, i64 %indvars.iv81
  %55 = load ptr, ptr %54, align 8, !tbaa !16
  %56 = getelementptr inbounds %struct.otl_PositionValue, ptr %55, i64 %indvars.iv76
  %57 = tail call ptr @bk_gpos_value(ptr noundef byval(%struct.otl_PositionValue) align 8 %56, i16 noundef zeroext %.045.lcssa) #2
  %58 = tail call ptr (ptr, i32, ...) @bk_push(ptr noundef %44, i32 noundef 255, ptr noundef %52, i32 noundef 255, ptr noundef %57, i32 noundef 0) #2
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond80.not = icmp eq i64 %indvars.iv.next77, %wide.trip.count79
  br i1 %exitcond80.not, label %._crit_edge.us63, label %47, !llvm.loop !25

._crit_edge.us63:                                 ; preds = %47
  %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1
  %exitcond85.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count84
  br i1 %exitcond85.not, label %._crit_edge62, label %.preheader.us, !llvm.loop !26

._crit_edge62:                                    ; preds = %._crit_edge.us63, %.preheader.lr.ph, %._crit_edge56
  %59 = load ptr, ptr getelementptr inbounds (i8, ptr @otl_iCoverage, i64 56), align 8, !tbaa !27
  tail call void %59(ptr noundef %30) #2
  ret ptr %44
}

attributes #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 = { 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 0}
!6 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !12, i64 8}
!11 = !{!"", !12, i64 0, !13, i64 4, !12, i64 8, !7, i64 16, !7, i64 24}
!12 = !{!"short", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!6, !7, i64 8}
!15 = !{!6, !7, i64 16}
!16 = !{!7, !7, i64 0}
!17 = !{!6, !7, i64 24}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = !{!22, !7, i64 96}
!22 = !{!"__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}
!23 = !{!24, !7, i64 104}
!24 = !{!"__otfcc_IClassDef", !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}
!25 = distinct !{!25, !19}
!26 = distinct !{!26, !19}
!27 = !{!22, !7, i64 56}


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