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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.__caryll_elementinterface_table_meta = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_vectorinterface_meta_Entries = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.otfcc_Packet = type { i32, i16, i16, i16, i16, ptr }
%struct.otfcc_PacketPiece = type { i32, i32, i32, i32, ptr }
%struct.meta_Entry = type { i32, ptr }
%struct.table_meta = type { i32, i32, %struct.meta_Entries }
%struct.meta_Entries = type { i64, i64, ptr }
%struct.otfcc_Options = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, ptr, ptr }
%struct.otfcc_ILogger = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@table_iMeta = external constant %struct.__caryll_elementinterface_table_meta, align 8
@meta_iEntries = external constant %struct.__caryll_vectorinterface_meta_Entries, align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @otfcc_readMeta(ptr noundef byval(%struct.otfcc_Packet) align 8 %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %struct.otfcc_PacketPiece, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.meta_Entry, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  store i32 1, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  store i32 1, ptr %8, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %181, %2
  %21 = load i32, ptr %8, align 4, !tbaa !9
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %32

23:                                               ; preds = %20
  %24 = load i32, ptr %6, align 4, !tbaa !9
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %32

26:                                               ; preds = %23
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = getelementptr inbounds %struct.otfcc_Packet, ptr %0, i32 0, i32 1
  %29 = load i16, ptr %28, align 4, !tbaa !11
  %30 = zext i16 %29 to i32
  %31 = icmp slt i32 %27, %30
  br label %32

32:                                               ; preds = %26, %23, %20
  %33 = phi i1 [ false, %23 ], [ false, %20 ], [ %31, %26 ]
  br i1 %33, label %35, label %34

34:                                               ; preds = %32
  store i32 2, ptr %9, align 4
  br label %188

35:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  %36 = getelementptr inbounds %struct.otfcc_Packet, ptr %0, i32 0, i32 5
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %37, i64 %39
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %40, i64 24, i1 false), !tbaa.struct !15
  br label %41

41:                                               ; preds = %173, %35
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %45, label %44

44:                                               ; preds = %41
  store i32 5, ptr %9, align 4
  br label %178

45:                                               ; preds = %41
  %46 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !16
  %48 = icmp eq i32 %47, 1835365473
  br i1 %48, label %49, label %172

49:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %168, %49
  %51 = load i32, ptr %11, align 4, !tbaa !9
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  store i32 8, ptr %9, align 4
  br label %169

54:                                               ; preds = %50
  %55 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 3
  %56 = load i32, ptr %55, align 4, !tbaa !18
  %57 = icmp ult i32 %56, 16
  br i1 %57, label %58, label %59

58:                                               ; preds = %54
  br label %155

59:                                               ; preds = %54
  %60 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %61 = load ptr, ptr %60, align 8, !tbaa !19
  %62 = getelementptr inbounds i8, ptr %61, i64 0
  %63 = call i32 @read_32u(ptr noundef %62)
  store i32 %63, ptr %12, align 4, !tbaa !9
  %64 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %65 = load ptr, ptr %64, align 8, !tbaa !19
  %66 = getelementptr inbounds i8, ptr %65, i64 4
  %67 = call i32 @read_32u(ptr noundef %66)
  store i32 %67, ptr %13, align 4, !tbaa !9
  %68 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !19
  %70 = getelementptr inbounds i8, ptr %69, i64 12
  %71 = call i32 @read_32u(ptr noundef %70)
  store i32 %71, ptr %14, align 4, !tbaa !9
  %72 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 3
  %73 = load i32, ptr %72, align 4, !tbaa !18
  %74 = load i32, ptr %14, align 4, !tbaa !9
  %75 = mul i32 12, %74
  %76 = add i32 16, %75
  %77 = icmp ult i32 %73, %76
  br i1 %77, label %78, label %79

78:                                               ; preds = %59
  br label %155

79:                                               ; preds = %59
  %80 = load ptr, ptr getelementptr inbounds (%struct.__caryll_elementinterface_table_meta, ptr @table_iMeta, i32 0, i32 6), align 8, !tbaa !20
  %81 = call ptr (...) %80()
  store ptr %81, ptr %5, align 8, !tbaa !5
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.table_meta, ptr %83, i32 0, i32 0
  store i32 %82, ptr %84, align 8, !tbaa !22
  %85 = load i32, ptr %13, align 4, !tbaa !9
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.table_meta, ptr %86, i32 0, i32 1
  store i32 %85, ptr %87, align 4, !tbaa !26
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %150, %79
  %89 = load i32, ptr %15, align 4, !tbaa !9
  %90 = load i32, ptr %14, align 4, !tbaa !9
  %91 = icmp ult i32 %89, %90
  br i1 %91, label %93, label %92

92:                                               ; preds = %88
  store i32 12, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %153

93:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %94 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %95 = load ptr, ptr %94, align 8, !tbaa !19
  %96 = getelementptr inbounds i8, ptr %95, i64 16
  %97 = load i32, ptr %15, align 4, !tbaa !9
  %98 = mul i32 12, %97
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds i8, ptr %96, i64 %99
  %101 = getelementptr inbounds i8, ptr %100, i64 0
  %102 = call i32 @read_32u(ptr noundef %101)
  store i32 %102, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %103 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !19
  %105 = getelementptr inbounds i8, ptr %104, i64 16
  %106 = load i32, ptr %15, align 4, !tbaa !9
  %107 = mul i32 12, %106
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds i8, ptr %105, i64 %108
  %110 = getelementptr inbounds i8, ptr %109, i64 4
  %111 = call i32 @read_32u(ptr noundef %110)
  store i32 %111, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %112 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %113 = load ptr, ptr %112, align 8, !tbaa !19
  %114 = getelementptr inbounds i8, ptr %113, i64 16
  %115 = load i32, ptr %15, align 4, !tbaa !9
  %116 = mul i32 12, %115
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds i8, ptr %114, i64 %117
  %119 = getelementptr inbounds i8, ptr %118, i64 8
  %120 = call i32 @read_32u(ptr noundef %119)
  store i32 %120, ptr %18, align 4, !tbaa !9
  %121 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 3
  %122 = load i32, ptr %121, align 4, !tbaa !18
  %123 = load i32, ptr %17, align 4, !tbaa !9
  %124 = load i32, ptr %18, align 4, !tbaa !9
  %125 = add i32 %123, %124
  %126 = icmp ult i32 %122, %125
  br i1 %126, label %127, label %128

127:                                              ; preds = %93
  store i32 14, ptr %9, align 4
  br label %147

128:                                              ; preds = %93
  %129 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_meta_Entries, ptr @meta_iEntries, i32 0, i32 13), align 8, !tbaa !27
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.table_meta, ptr %130, i32 0, i32 2
  %132 = getelementptr inbounds %struct.meta_Entry, ptr %19, i32 0, i32 0
  %133 = load i32, ptr %16, align 4, !tbaa !9
  store i32 %133, ptr %132, align 8, !tbaa !29
  %134 = getelementptr inbounds %struct.meta_Entry, ptr %19, i32 0, i32 1
  %135 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %136 = load ptr, ptr %135, align 8, !tbaa !19
  %137 = load i32, ptr %17, align 4, !tbaa !9
  %138 = zext i32 %137 to i64
  %139 = getelementptr inbounds i8, ptr %136, i64 %138
  %140 = load i32, ptr %18, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = call ptr @sdsnewlen(ptr noundef %139, i64 noundef %141)
  store ptr %142, ptr %134, align 8, !tbaa !31
  %143 = getelementptr inbounds { i32, ptr }, ptr %19, i32 0, i32 0
  %144 = load i32, ptr %143, align 8
  %145 = getelementptr inbounds { i32, ptr }, ptr %19, i32 0, i32 1
  %146 = load ptr, ptr %145, align 8
  call void %129(ptr noundef %131, i32 %144, ptr %146)
  store i32 0, ptr %9, align 4
  br label %147

147:                                              ; preds = %128, %127
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  %148 = load i32, ptr %9, align 4
  switch i32 %148, label %194 [
    i32 0, label %149
    i32 14, label %150
  ]

149:                                              ; preds = %147
  br label %150

150:                                              ; preds = %149, %147
  %151 = load i32, ptr %15, align 4, !tbaa !9
  %152 = add i32 %151, 1
  store i32 %152, ptr %15, align 4, !tbaa !9
  br label %88, !llvm.loop !32

153:                                              ; preds = %92
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %154, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %169

155:                                              ; preds = %78, %58
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.otfcc_Options, ptr %156, i32 0, i32 24
  %158 = load ptr, ptr %157, align 8, !tbaa !34
  %159 = getelementptr inbounds %struct.otfcc_ILogger, ptr %158, i32 0, i32 6
  %160 = load ptr, ptr %159, align 8, !tbaa !37
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.otfcc_Options, ptr %161, i32 0, i32 24
  %163 = load ptr, ptr %162, align 8, !tbaa !34
  %164 = call ptr @sdsempty()
  %165 = call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %164, ptr noundef @.str)
  call void %160(ptr noundef %163, i8 noundef zeroext 1, i32 noundef 1, ptr noundef %165)
  %166 = load ptr, ptr getelementptr inbounds (%struct.__caryll_elementinterface_table_meta, ptr @table_iMeta, i32 0, i32 7), align 8, !tbaa !39
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  call void %166(ptr noundef %167)
  store ptr null, ptr %5, align 8, !tbaa !5
  br label %168

168:                                              ; preds = %155
  store i32 0, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %50, !llvm.loop !40

169:                                              ; preds = %153, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %170 = load i32, ptr %9, align 4
  switch i32 %170, label %178 [
    i32 8, label %171
  ]

171:                                              ; preds = %169
  br label %172

172:                                              ; preds = %171, %45
  br label %173

173:                                              ; preds = %172
  %174 = load i32, ptr %6, align 4, !tbaa !9
  %175 = icmp ne i32 %174, 0
  %176 = xor i1 %175, true
  %177 = zext i1 %176 to i32
  store i32 %177, ptr %6, align 4, !tbaa !9
  br label %41, !llvm.loop !41

178:                                              ; preds = %169, %44
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  %179 = load i32, ptr %9, align 4
  switch i32 %179, label %188 [
    i32 5, label %180
  ]

180:                                              ; preds = %178
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %6, align 4, !tbaa !9
  %183 = icmp ne i32 %182, 0
  %184 = xor i1 %183, true
  %185 = zext i1 %184 to i32
  store i32 %185, ptr %6, align 4, !tbaa !9
  %186 = load i32, ptr %7, align 4, !tbaa !9
  %187 = add nsw i32 %186, 1
  store i32 %187, ptr %7, align 4, !tbaa !9
  br label %20, !llvm.loop !42

188:                                              ; preds = %178, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %189 = load i32, ptr %9, align 4
  switch i32 %189, label %192 [
    i32 2, label %190
  ]

190:                                              ; preds = %188
  %191 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %191, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %192

192:                                              ; preds = %190, %188
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %193 = load ptr, ptr %3, align 8
  ret ptr %193

194:                                              ; preds = %147
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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: inlinehint nounwind uwtable
declare hidden i32 @read_32u(ptr noundef) #3

declare ptr @sdsnewlen(ptr noundef, i64 noundef) #4

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

declare ptr @sdscatprintf(ptr noundef, ptr noundef, ...) #4

declare ptr @sdsempty() #4

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

!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, !13, i64 4}
!12 = !{!"", !10, i64 0, !13, i64 4, !13, i64 6, !13, i64 8, !13, i64 10, !6, i64 16}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !6, i64 16}
!15 = !{i64 0, i64 4, !9, i64 4, i64 4, !9, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 8, !5}
!16 = !{!17, !10, i64 0}
!17 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !6, i64 16}
!18 = !{!17, !10, i64 12}
!19 = !{!17, !6, i64 16}
!20 = !{!21, !6, i64 48}
!21 = !{!"__caryll_elementinterface_table_meta", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!22 = !{!23, !10, i64 0}
!23 = !{!"", !10, i64 0, !10, i64 4, !24, i64 8}
!24 = !{!"", !25, i64 0, !25, i64 8, !6, i64 16}
!25 = !{!"long", !7, i64 0}
!26 = !{!23, !10, i64 4}
!27 = !{!28, !6, i64 104}
!28 = !{!"__caryll_vectorinterface_meta_Entries", !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}
!29 = !{!30, !10, i64 0}
!30 = !{!"", !10, i64 0, !6, i64 8}
!31 = !{!30, !6, i64 8}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!35, !6, i64 32}
!35 = !{!"", !36, i64 0, !36, i64 1, !36, i64 2, !36, i64 3, !36, i64 4, !36, i64 5, !36, i64 6, !36, i64 7, !36, i64 8, !36, i64 9, !36, i64 10, !36, i64 11, !36, i64 12, !36, i64 13, !36, i64 14, !36, i64 15, !36, i64 16, !36, i64 17, !36, i64 18, !36, i64 19, !36, i64 20, !36, i64 21, !36, i64 22, !6, i64 24, !6, i64 32}
!36 = !{!"_Bool", !7, i64 0}
!37 = !{!38, !6, i64 48}
!38 = !{!"otfcc_ILogger", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!39 = !{!21, !6, i64 56}
!40 = distinct !{!40, !33}
!41 = distinct !{!41, !33}
!42 = distinct !{!42, !33}


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

@table_iMeta = external local_unnamed_addr constant %struct.__caryll_elementinterface_table_meta, align 8
@meta_iEntries = external local_unnamed_addr constant %struct.__caryll_vectorinterface_meta_Entries, align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef ptr @otfcc_readMeta(ptr nocapture noundef readonly byval(%struct.otfcc_Packet) align 8 %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 4
  %4 = load i16, ptr %3, align 4
  %.not = icmp eq i16 %4, 0
  br i1 %.not, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  %6 = getelementptr inbounds i8, ptr %1, i64 32
  %7 = load ptr, ptr getelementptr inbounds (i8, ptr @table_iMeta, i64 56), align 8
  %8 = load ptr, ptr getelementptr inbounds (i8, ptr @table_iMeta, i64 48), align 8
  %9 = load ptr, ptr getelementptr inbounds (i8, ptr @meta_iEntries, i64 104), align 8
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  %11 = load i16, ptr %3, align 4
  %12 = zext i16 %11 to i64
  br label %13

13:                                               ; preds = %.lr.ph, %.thread74
  %indvars.iv130 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next131, %.thread74 ]
  %14 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i64 %indvars.iv130
  %.sroa.018.0.copyload = load i32, ptr %14, align 8, !tbaa !12
  %15 = icmp eq i32 %.sroa.018.0.copyload, 1835365473
  br i1 %15, label %.split.us, label %.thread74

.split.us:                                        ; preds = %13
  %.sroa.419.0..sroa_idx.le = getelementptr inbounds i8, ptr %14, i64 12
  %.sroa.419.0.copyload.le = load i32, ptr %.sroa.419.0..sroa_idx.le, align 4, !tbaa !12
  %.sroa.7.0..sroa_idx.le = getelementptr inbounds i8, ptr %14, i64 16
  %.sroa.7.0.copyload.le = load ptr, ptr %.sroa.7.0..sroa_idx.le, align 8, !tbaa !13
  %16 = getelementptr inbounds i8, ptr %.sroa.7.0.copyload.le, i64 16
  %17 = icmp ult i32 %.sroa.419.0.copyload.le, 16
  br i1 %17, label %.critedge.sink.split, label %.preheader.us

.preheader.us:                                    ; preds = %.split.us
  %18 = getelementptr inbounds i8, ptr %.sroa.7.0.copyload.le, i64 12
  %19 = getelementptr inbounds i8, ptr %.sroa.7.0.copyload.le, i64 4
  %20 = tail call i32 @read_32u(ptr noundef %.sroa.7.0.copyload.le)
  %21 = tail call i32 @read_32u(ptr noundef nonnull %19)
  %22 = tail call i32 @read_32u(ptr noundef nonnull %18)
  %23 = mul i32 %22, 12
  %24 = add i32 %23, 16
  %25 = icmp ult i32 %.sroa.419.0.copyload.le, %24
  br i1 %25, label %.critedge.sink.split, label %26

26:                                               ; preds = %.preheader.us
  %27 = tail call ptr (...) %8() #3
  store i32 %20, ptr %27, align 8, !tbaa !14
  %28 = getelementptr inbounds i8, ptr %27, i64 4
  store i32 %21, ptr %28, align 4, !tbaa !18
  %.not128 = icmp eq i32 %22, 0
  br i1 %.not128, label %.critedge, label %.lr.ph106.us

29:                                               ; preds = %.lr.ph106.us, %45
  %indvars.iv = phi i64 [ 0, %.lr.ph106.us ], [ %indvars.iv.next, %45 ]
  %30 = mul i64 %indvars.iv, 12
  %31 = and i64 %30, 4294967292
  %32 = getelementptr inbounds i8, ptr %16, i64 %31
  %33 = tail call i32 @read_32u(ptr noundef nonnull %32)
  %34 = getelementptr inbounds i8, ptr %32, i64 4
  %35 = tail call i32 @read_32u(ptr noundef nonnull %34)
  %36 = getelementptr inbounds i8, ptr %32, i64 8
  %37 = tail call i32 @read_32u(ptr noundef nonnull %36)
  %38 = add i32 %37, %35
  %39 = icmp ult i32 %.sroa.419.0.copyload.le, %38
  br i1 %39, label %45, label %40

40:                                               ; preds = %29
  %41 = zext i32 %35 to i64
  %42 = getelementptr inbounds i8, ptr %.sroa.7.0.copyload.le, i64 %41
  %43 = zext i32 %37 to i64
  %44 = tail call ptr @sdsnewlen(ptr noundef %42, i64 noundef %43) #3
  tail call void %9(ptr noundef nonnull %46, i32 %33, ptr %44) #3
  br label %45

45:                                               ; preds = %40, %29
  %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 %.critedge, label %29, !llvm.loop !19

.lr.ph106.us:                                     ; preds = %26
  %46 = getelementptr inbounds i8, ptr %27, i64 8
  %wide.trip.count = zext i32 %22 to i64
  br label %29

.thread74:                                        ; preds = %13
  %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1
  %47 = icmp ult i64 %indvars.iv.next131, %12
  br i1 %47, label %13, label %.critedge, !llvm.loop !21

.critedge.sink.split:                             ; preds = %.preheader.us, %.split.us
  %48 = load ptr, ptr %6, align 8, !tbaa !22
  %49 = getelementptr inbounds i8, ptr %48, i64 48
  %50 = load ptr, ptr %49, align 8, !tbaa !25
  %51 = tail call ptr @sdsempty() #3
  %52 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %51, ptr noundef nonnull @.str) #3
  tail call void %50(ptr noundef %48, i8 noundef zeroext 1, i32 noundef 1, ptr noundef %52) #3
  tail call void %7(ptr noundef null) #3
  br label %.critedge

.critedge:                                        ; preds = %.thread74, %45, %.critedge.sink.split, %26, %2
  %53 = phi ptr [ null, %2 ], [ %27, %26 ], [ null, %.critedge.sink.split ], [ %27, %45 ], [ null, %.thread74 ]
  ret ptr %53
}

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

declare ptr @sdsnewlen(ptr noundef, i64 noundef) local_unnamed_addr #2

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

declare ptr @sdsempty() local_unnamed_addr #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !11, i64 16}
!6 = !{!"", !7, i64 0, !10, i64 4, !10, i64 6, !10, i64 8, !10, i64 10, !11, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!15, !7, i64 0}
!15 = !{!"", !7, i64 0, !7, i64 4, !16, i64 8}
!16 = !{!"", !17, i64 0, !17, i64 8, !11, i64 16}
!17 = !{!"long", !8, i64 0}
!18 = !{!15, !7, i64 4}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}
!22 = !{!23, !11, i64 32}
!23 = !{!"", !24, i64 0, !24, i64 1, !24, i64 2, !24, i64 3, !24, i64 4, !24, i64 5, !24, i64 6, !24, i64 7, !24, i64 8, !24, i64 9, !24, i64 10, !24, i64 11, !24, i64 12, !24, i64 13, !24, i64 14, !24, i64 15, !24, i64 16, !24, i64 17, !24, i64 18, !24, i64 19, !24, i64 20, !24, i64 21, !24, i64 22, !11, i64 24, !11, i64 32}
!24 = !{!"_Bool", !8, i64 0}
!25 = !{!26, !11, i64 48}
!26 = !{!"otfcc_ILogger", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88}


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