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

; 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_gasp_RecordList = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_elementinterface_table_gasp = type { 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.gasp_Record = type { i16, i8, i8, i8, i8 }
%struct.table_gasp = type { i16, %struct.gasp_RecordList }
%struct.gasp_RecordList = 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 }

@gasp_iRecordList = external dso_local constant %struct.__caryll_vectorinterface_gasp_RecordList, align 8
@table_iGasp = external dso_local constant %struct.__caryll_elementinterface_table_gasp, align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @otfcc_readGasp(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 ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i16, align 2
  %15 = alloca i32, align 4
  %16 = alloca %struct.gasp_Record, align 2
  %17 = alloca i16, align 2
  %18 = alloca i48, 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 %19

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

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

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

31:                                               ; preds = %25, %22, %19
  %32 = phi i1 [ false, %22 ], [ false, %19 ], [ %30, %25 ]
  br i1 %32, label %34, label %33

33:                                               ; preds = %31
  store i32 2, ptr %9, align 4
  br label %179

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

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

43:                                               ; preds = %40
  store i32 5, ptr %9, align 4
  br label %169

44:                                               ; preds = %40
  %45 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 0
  %46 = load i32, ptr %45, align 8, !tbaa !16
  %47 = icmp eq i32 %46, 1734439792
  br i1 %47, label %48, label %163

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

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

52:                                               ; preds = %49
  store i32 8, ptr %9, align 4
  br label %160

53:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %54 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %55 = load ptr, ptr %54, align 8, !tbaa !18
  store ptr %55, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %56 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 3
  %57 = load i32, ptr %56, align 4, !tbaa !19
  store i32 %57, ptr %13, align 4, !tbaa !9
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = icmp ult i32 %58, 4
  br i1 %59, label %60, label %61

60:                                               ; preds = %53
  br label %143

61:                                               ; preds = %53
  %62 = load ptr, ptr getelementptr inbounds (%struct.__caryll_elementinterface_table_gasp, ptr @table_iGasp, i32 0, i32 6), align 8, !tbaa !20
  %63 = call ptr (...) %62()
  store ptr %63, ptr %5, align 8, !tbaa !5
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = call zeroext i16 @read_16u(ptr noundef %64)
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.table_gasp, ptr %66, i32 0, i32 0
  store i16 %65, ptr %67, align 8, !tbaa !22
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %68, i64 2
  %70 = call zeroext i16 @read_16u(ptr noundef %69)
  store i16 %70, ptr %14, align 2, !tbaa !26
  %71 = load i32, ptr %13, align 4, !tbaa !9
  %72 = load i16, ptr %14, align 2, !tbaa !26
  %73 = zext i16 %72 to i32
  %74 = mul nsw i32 %73, 4
  %75 = add nsw i32 4, %74
  %76 = icmp ult i32 %71, %75
  br i1 %76, label %77, label %78

77:                                               ; preds = %61
  br label %143

78:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %138, %78
  %80 = load i32, ptr %15, align 4, !tbaa !9
  %81 = load i16, ptr %14, align 2, !tbaa !26
  %82 = zext i16 %81 to i32
  %83 = icmp ult i32 %80, %82
  br i1 %83, label %85, label %84

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

85:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 6, ptr %16) #5
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %86, i64 4
  %88 = load i32, ptr %15, align 4, !tbaa !9
  %89 = mul i32 %88, 4
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds i8, ptr %87, i64 %90
  %92 = call zeroext i16 @read_16u(ptr noundef %91)
  %93 = getelementptr inbounds %struct.gasp_Record, ptr %16, i32 0, i32 0
  store i16 %92, ptr %93, align 2, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 2, ptr %17) #5
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i64 4
  %96 = load i32, ptr %15, align 4, !tbaa !9
  %97 = mul i32 %96, 4
  %98 = zext i32 %97 to i64
  %99 = getelementptr inbounds i8, ptr %95, i64 %98
  %100 = getelementptr inbounds i8, ptr %99, i64 2
  %101 = call zeroext i16 @read_16u(ptr noundef %100)
  store i16 %101, ptr %17, align 2, !tbaa !26
  %102 = load i16, ptr %17, align 2, !tbaa !26
  %103 = zext i16 %102 to i32
  %104 = and i32 %103, 2
  %105 = icmp ne i32 %104, 0
  %106 = xor i1 %105, true
  %107 = xor i1 %106, true
  %108 = getelementptr inbounds %struct.gasp_Record, ptr %16, i32 0, i32 1
  %109 = zext i1 %107 to i8
  store i8 %109, ptr %108, align 2, !tbaa !30
  %110 = load i16, ptr %17, align 2, !tbaa !26
  %111 = zext i16 %110 to i32
  %112 = and i32 %111, 1
  %113 = icmp ne i32 %112, 0
  %114 = xor i1 %113, true
  %115 = xor i1 %114, true
  %116 = getelementptr inbounds %struct.gasp_Record, ptr %16, i32 0, i32 2
  %117 = zext i1 %115 to i8
  store i8 %117, ptr %116, align 1, !tbaa !31
  %118 = load i16, ptr %17, align 2, !tbaa !26
  %119 = zext i16 %118 to i32
  %120 = and i32 %119, 8
  %121 = icmp ne i32 %120, 0
  %122 = xor i1 %121, true
  %123 = xor i1 %122, true
  %124 = getelementptr inbounds %struct.gasp_Record, ptr %16, i32 0, i32 3
  %125 = zext i1 %123 to i8
  store i8 %125, ptr %124, align 2, !tbaa !32
  %126 = load i16, ptr %17, align 2, !tbaa !26
  %127 = zext i16 %126 to i32
  %128 = and i32 %127, 4
  %129 = icmp ne i32 %128, 0
  %130 = xor i1 %129, true
  %131 = xor i1 %130, true
  %132 = getelementptr inbounds %struct.gasp_Record, ptr %16, i32 0, i32 4
  %133 = zext i1 %131 to i8
  store i8 %133, ptr %132, align 1, !tbaa !33
  %134 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_gasp_RecordList, ptr @gasp_iRecordList, i32 0, i32 13), align 8, !tbaa !34
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.table_gasp, ptr %135, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %18, ptr align 2 %16, i64 6, i1 false)
  %137 = load i48, ptr %18, align 8
  call void %134(ptr noundef %136, i48 %137)
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 6, ptr %16) #5
  br label %138

138:                                              ; preds = %85
  %139 = load i32, ptr %15, align 4, !tbaa !9
  %140 = add i32 %139, 1
  store i32 %140, ptr %15, align 4, !tbaa !9
  br label %79, !llvm.loop !36

141:                                              ; preds = %84
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %142, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %156

143:                                              ; preds = %77, %60
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.otfcc_Options, ptr %144, i32 0, i32 24
  %146 = load ptr, ptr %145, align 8, !tbaa !38
  %147 = getelementptr inbounds %struct.otfcc_ILogger, ptr %146, i32 0, i32 6
  %148 = load ptr, ptr %147, align 8, !tbaa !40
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.otfcc_Options, ptr %149, i32 0, i32 24
  %151 = load ptr, ptr %150, align 8, !tbaa !38
  %152 = call ptr @sdsempty()
  %153 = call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %152, ptr noundef @.str)
  call void %148(ptr noundef %151, i8 noundef zeroext 1, i32 noundef 1, ptr noundef %153)
  %154 = load ptr, ptr getelementptr inbounds (%struct.__caryll_elementinterface_table_gasp, ptr @table_iGasp, i32 0, i32 7), align 8, !tbaa !42
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  call void %154(ptr noundef %155)
  store ptr null, ptr %5, align 8, !tbaa !5
  store i32 0, ptr %9, align 4
  br label %156

156:                                              ; preds = %143, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %157 = load i32, ptr %9, align 4
  switch i32 %157, label %160 [
    i32 0, label %158
  ]

158:                                              ; preds = %156
  br label %159

159:                                              ; preds = %158
  store i32 0, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %49, !llvm.loop !43

160:                                              ; preds = %156, %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %161 = load i32, ptr %9, align 4
  switch i32 %161, label %169 [
    i32 8, label %162
  ]

162:                                              ; preds = %160
  br label %163

163:                                              ; preds = %162, %44
  br label %164

164:                                              ; preds = %163
  %165 = load i32, ptr %6, align 4, !tbaa !9
  %166 = icmp ne i32 %165, 0
  %167 = xor i1 %166, true
  %168 = zext i1 %167 to i32
  store i32 %168, ptr %6, align 4, !tbaa !9
  br label %40, !llvm.loop !44

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

171:                                              ; preds = %169
  br label %172

172:                                              ; preds = %171
  %173 = load i32, ptr %6, align 4, !tbaa !9
  %174 = icmp ne i32 %173, 0
  %175 = xor i1 %174, true
  %176 = zext i1 %175 to i32
  store i32 %176, ptr %6, align 4, !tbaa !9
  %177 = load i32, ptr %7, align 4, !tbaa !9
  %178 = add nsw i32 %177, 1
  store i32 %178, ptr %7, align 4, !tbaa !9
  br label %19, !llvm.loop !45

179:                                              ; preds = %169, %33
  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
  %180 = load i32, ptr %9, align 4
  switch i32 %180, label %182 [
    i32 2, label %181
  ]

181:                                              ; preds = %179
  store ptr null, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %182

182:                                              ; preds = %181, %179
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %183 = load ptr, ptr %3, align 8
  ret ptr %183
}

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

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


; 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_gasp_RecordList = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_elementinterface_table_gasp = type { 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 }

@gasp_iRecordList = external dso_local local_unnamed_addr constant %struct.__caryll_vectorinterface_gasp_RecordList, align 8
@table_iGasp = external dso_local local_unnamed_addr constant %struct.__caryll_elementinterface_table_gasp, align 8
@.str = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @otfcc_readGasp(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 = load ptr, ptr getelementptr inbounds (i8, ptr @table_iGasp, i64 48), align 8
  %7 = getelementptr inbounds i8, ptr %1, i64 32
  %8 = load ptr, ptr getelementptr inbounds (i8, ptr @table_iGasp, i64 56), align 8
  %9 = load ptr, ptr getelementptr inbounds (i8, ptr @gasp_iRecordList, i64 104), align 8
  %10 = load ptr, ptr %5, align 8, !tbaa !5
  %11 = zext i16 %4 to i64
  br label %12

12:                                               ; preds = %.lr.ph, %.thread77
  %indvars.iv125 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next126, %.thread77 ]
  %13 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i64 %indvars.iv125
  %.sroa.021.0.copyload = load i32, ptr %13, align 8, !tbaa !12
  %.not140 = icmp eq i32 %.sroa.021.0.copyload, 1734439792
  br i1 %.not140, label %.split.us, label %.thread77

.split.us:                                        ; preds = %12
  %.sroa.423.0..sroa_idx.le = getelementptr inbounds i8, ptr %13, i64 12
  %.sroa.423.0.copyload.le = load i32, ptr %.sroa.423.0..sroa_idx.le, align 4, !tbaa !12
  %.sroa.524.0..sroa_idx.le = getelementptr inbounds i8, ptr %13, i64 16
  %.sroa.524.0.copyload.le = load ptr, ptr %.sroa.524.0..sroa_idx.le, align 8, !tbaa !13
  %14 = getelementptr inbounds i8, ptr %.sroa.524.0.copyload.le, i64 4
  %15 = icmp ult i32 %.sroa.423.0.copyload.le, 4
  br i1 %15, label %.preheader86.us.us, label %.preheader86.us

.preheader86.us.us:                               ; preds = %.split.us
  %16 = load ptr, ptr %7, align 8, !tbaa !14
  %17 = getelementptr inbounds i8, ptr %16, i64 48
  %18 = load ptr, ptr %17, align 8, !tbaa !17
  %19 = tail call ptr @sdsempty() #3
  %20 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %19, ptr noundef nonnull @.str) #3
  tail call void %18(ptr noundef %16, i8 noundef zeroext 1, i32 noundef 1, ptr noundef %20) #3
  tail call void %8(ptr noundef null) #3
  br label %.critedge

.preheader86.us:                                  ; preds = %.split.us
  %21 = getelementptr inbounds i8, ptr %.sroa.524.0.copyload.le, i64 2
  %22 = tail call ptr (...) %6() #3
  %23 = tail call zeroext i16 @read_16u(ptr noundef %.sroa.524.0.copyload.le)
  store i16 %23, ptr %22, align 8, !tbaa !19
  %24 = tail call zeroext i16 @read_16u(ptr noundef nonnull %21)
  %25 = zext i16 %24 to i32
  %26 = shl nuw nsw i32 %25, 2
  %27 = add nuw nsw i32 %26, 4
  %28 = icmp ult i32 %.sroa.423.0.copyload.le, %27
  br i1 %28, label %.lr.ph.us, label %.preheader.us

29:                                               ; preds = %.lr.ph103.us, %29
  %indvars.iv = phi i64 [ 0, %.lr.ph103.us ], [ %indvars.iv.next, %29 ]
  %30 = shl nuw nsw i64 %indvars.iv, 2
  %31 = getelementptr inbounds i8, ptr %14, i64 %30
  %32 = tail call zeroext i16 @read_16u(ptr noundef nonnull %31)
  %33 = getelementptr inbounds i8, ptr %31, i64 2
  %34 = tail call zeroext i16 @read_16u(ptr noundef nonnull %33)
  %35 = trunc i16 %34 to i8
  %36 = lshr i8 %35, 1
  %37 = and i8 %36, 1
  %38 = and i8 %35, 1
  %39 = lshr i8 %35, 3
  %40 = and i8 %39, 1
  %41 = lshr i8 %35, 2
  %42 = and i8 %41, 1
  %.sroa.7.0.insert.ext.us = zext nneg i8 %42 to i48
  %.sroa.7.0.insert.shift.us = shl nuw nsw i48 %.sroa.7.0.insert.ext.us, 40
  %.sroa.6.0.insert.ext.us = zext nneg i8 %40 to i48
  %.sroa.6.0.insert.shift.us = shl nuw nsw i48 %.sroa.6.0.insert.ext.us, 32
  %.sroa.6.0.insert.insert.us = or disjoint i48 %.sroa.7.0.insert.shift.us, %.sroa.6.0.insert.shift.us
  %.sroa.5.0.insert.ext.us = zext nneg i8 %38 to i48
  %.sroa.5.0.insert.shift.us = shl nuw nsw i48 %.sroa.5.0.insert.ext.us, 24
  %.sroa.5.0.insert.insert.us = or disjoint i48 %.sroa.6.0.insert.insert.us, %.sroa.5.0.insert.shift.us
  %.sroa.4.0.insert.ext.us = zext nneg i8 %37 to i48
  %.sroa.4.0.insert.shift.us = shl nuw nsw i48 %.sroa.4.0.insert.ext.us, 16
  %.sroa.4.0.insert.insert.us = or disjoint i48 %.sroa.5.0.insert.insert.us, %.sroa.4.0.insert.shift.us
  %.sroa.0.0.insert.ext.us = zext i16 %32 to i48
  %.sroa.0.0.insert.insert.us = or disjoint i48 %.sroa.4.0.insert.insert.us, %.sroa.0.0.insert.ext.us
  tail call void %9(ptr noundef nonnull %48, i48 %.sroa.0.0.insert.insert.us) #3
  %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 !23

.preheader.us:                                    ; preds = %.preheader86.us
  %.not123 = icmp eq i16 %24, 0
  br i1 %.not123, label %.critedge, label %.lr.ph103.us

.lr.ph.us:                                        ; preds = %.preheader86.us
  %43 = load ptr, ptr %7, align 8, !tbaa !14
  %44 = getelementptr inbounds i8, ptr %43, i64 48
  %45 = load ptr, ptr %44, align 8, !tbaa !17
  %46 = tail call ptr @sdsempty() #3
  %47 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %46, ptr noundef nonnull @.str) #3
  tail call void %45(ptr noundef %43, i8 noundef zeroext 1, i32 noundef 1, ptr noundef %47) #3
  tail call void %8(ptr noundef nonnull %22) #3
  br label %.critedge

.lr.ph103.us:                                     ; preds = %.preheader.us
  %48 = getelementptr inbounds i8, ptr %22, i64 8
  %wide.trip.count = zext i16 %24 to i64
  br label %29

.thread77:                                        ; preds = %12
  %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1
  %49 = icmp ult i64 %indvars.iv.next126, %11
  br i1 %49, label %12, label %.critedge, !llvm.loop !25

.critedge:                                        ; preds = %.thread77, %29, %.lr.ph.us, %.preheader86.us.us, %.preheader.us, %2
  %50 = phi ptr [ null, %2 ], [ %22, %.preheader.us ], [ null, %.preheader86.us.us ], [ null, %.lr.ph.us ], [ %22, %29 ], [ null, %.thread77 ]
  ret ptr %50
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @read_16u(ptr noundef) local_unnamed_addr #1

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, !11, i64 32}
!15 = !{!"", !16, i64 0, !16, i64 1, !16, i64 2, !16, i64 3, !16, i64 4, !16, i64 5, !16, i64 6, !16, i64 7, !16, i64 8, !16, i64 9, !16, i64 10, !16, i64 11, !16, i64 12, !16, i64 13, !16, i64 14, !16, i64 15, !16, i64 16, !16, i64 17, !16, i64 18, !16, i64 19, !16, i64 20, !16, i64 21, !16, i64 22, !11, i64 24, !11, i64 32}
!16 = !{!"_Bool", !8, i64 0}
!17 = !{!18, !11, i64 48}
!18 = !{!"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}
!19 = !{!20, !10, i64 0}
!20 = !{!"", !10, i64 0, !21, i64 8}
!21 = !{!"", !22, i64 0, !22, i64 8, !11, i64 16}
!22 = !{!"long", !8, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}


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