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

; 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_svg_Assignment = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.__caryll_vectorinterface_table_SVG = 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.svg_Assignment = type { i16, i16, ptr }

@svg_iAssignment = external dso_local constant %struct.__caryll_elementinterface_svg_Assignment, align 8
@table_iSVG = external dso_local constant %struct.__caryll_vectorinterface_table_SVG, align 8

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

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 = %173, %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 %178

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, 1398163232
  br i1 %47, label %48, label %172

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 = %168, %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 %169

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

57:                                               ; preds = %53
  br label %165

58:                                               ; preds = %53
  %59 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %60 = load ptr, ptr %59, align 8, !tbaa !19
  %61 = getelementptr inbounds i8, ptr %60, i64 2
  %62 = call i32 @read_32u(ptr noundef %61)
  store i32 %62, ptr %12, align 4, !tbaa !9
  %63 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 3
  %64 = load i32, ptr %63, align 4, !tbaa !18
  %65 = load i32, ptr %12, align 4, !tbaa !9
  %66 = add i32 %65, 2
  %67 = icmp ult i32 %64, %66
  br i1 %67, label %68, label %69

68:                                               ; preds = %58
  br label %165

69:                                               ; preds = %58
  %70 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %71 = load ptr, ptr %70, align 8, !tbaa !19
  %72 = load i32, ptr %12, align 4, !tbaa !9
  %73 = zext i32 %72 to i64
  %74 = getelementptr inbounds i8, ptr %71, i64 %73
  %75 = call zeroext i16 @read_16u(ptr noundef %74)
  store i16 %75, ptr %13, align 2, !tbaa !20
  %76 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 3
  %77 = load i32, ptr %76, align 4, !tbaa !18
  %78 = load i32, ptr %12, align 4, !tbaa !9
  %79 = add i32 %78, 2
  %80 = load i16, ptr %13, align 2, !tbaa !20
  %81 = zext i16 %80 to i32
  %82 = mul nsw i32 12, %81
  %83 = add i32 %79, %82
  %84 = icmp ult i32 %77, %83
  br i1 %84, label %85, label %86

85:                                               ; preds = %69
  br label %165

86:                                               ; preds = %69
  %87 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_table_SVG, ptr @table_iSVG, i32 0, i32 6), align 8, !tbaa !21
  %88 = call ptr (...) %87()
  store ptr %88, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %14) #5
  store i16 0, ptr %14, align 2, !tbaa !20
  br label %89

89:                                               ; preds = %160, %86
  %90 = load i16, ptr %14, align 2, !tbaa !20
  %91 = zext i16 %90 to i32
  %92 = load i16, ptr %13, align 2, !tbaa !20
  %93 = zext i16 %92 to i32
  %94 = icmp slt i32 %91, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %89
  store i32 12, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 2, ptr %14) #5
  br label %163

96:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %97 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !19
  %99 = load i32, ptr %12, align 4, !tbaa !9
  %100 = zext i32 %99 to i64
  %101 = getelementptr inbounds i8, ptr %98, i64 %100
  %102 = getelementptr inbounds i8, ptr %101, i64 2
  %103 = load i16, ptr %14, align 2, !tbaa !20
  %104 = zext i16 %103 to i32
  %105 = mul nsw i32 12, %104
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %102, i64 %106
  store ptr %107, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %108 = load ptr, ptr getelementptr inbounds (%struct.__caryll_elementinterface_svg_Assignment, ptr @svg_iAssignment, i32 0, i32 6), align 8, !tbaa !23
  %109 = call { i64, ptr } (...) %108()
  %110 = getelementptr inbounds { i64, ptr }, ptr %16, i32 0, i32 0
  %111 = extractvalue { i64, ptr } %109, 0
  store i64 %111, ptr %110, align 8
  %112 = getelementptr inbounds { i64, ptr }, ptr %16, i32 0, i32 1
  %113 = extractvalue { i64, ptr } %109, 1
  store ptr %113, ptr %112, align 8
  %114 = load ptr, ptr %15, align 8, !tbaa !5
  %115 = call zeroext i16 @read_16u(ptr noundef %114)
  %116 = getelementptr inbounds %struct.svg_Assignment, ptr %16, i32 0, i32 0
  store i16 %115, ptr %116, align 8, !tbaa !25
  %117 = load ptr, ptr %15, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i64 2
  %119 = call zeroext i16 @read_16u(ptr noundef %118)
  %120 = getelementptr inbounds %struct.svg_Assignment, ptr %16, i32 0, i32 1
  store i16 %119, ptr %120, align 2, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %121 = load ptr, ptr %15, align 8, !tbaa !5
  %122 = getelementptr inbounds i8, ptr %121, i64 4
  %123 = call i32 @read_32u(ptr noundef %122)
  store i32 %123, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = getelementptr inbounds i8, ptr %124, i64 8
  %126 = call i32 @read_32u(ptr noundef %125)
  store i32 %126, ptr %18, align 4, !tbaa !9
  %127 = load i32, ptr %12, align 4, !tbaa !9
  %128 = load i32, ptr %17, align 4, !tbaa !9
  %129 = add i32 %127, %128
  %130 = load i32, ptr %18, align 4, !tbaa !9
  %131 = add i32 %129, %130
  %132 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 3
  %133 = load i32, ptr %132, align 4, !tbaa !18
  %134 = icmp ule i32 %131, %133
  br i1 %134, label %135, label %150

135:                                              ; preds = %96
  %136 = call ptr (...) @bufnew()
  %137 = getelementptr inbounds %struct.svg_Assignment, ptr %16, i32 0, i32 2
  store ptr %136, ptr %137, align 8, !tbaa !28
  %138 = getelementptr inbounds %struct.svg_Assignment, ptr %16, i32 0, i32 2
  %139 = load ptr, ptr %138, align 8, !tbaa !28
  %140 = load i32, ptr %18, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %143 = load ptr, ptr %142, align 8, !tbaa !19
  %144 = load i32, ptr %12, align 4, !tbaa !9
  %145 = zext i32 %144 to i64
  %146 = getelementptr inbounds i8, ptr %143, i64 %145
  %147 = load i32, ptr %17, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds i8, ptr %146, i64 %148
  call void @bufwrite_bytes(ptr noundef %139, i64 noundef %141, ptr noundef %149)
  br label %153

150:                                              ; preds = %96
  %151 = call ptr (...) @bufnew()
  %152 = getelementptr inbounds %struct.svg_Assignment, ptr %16, i32 0, i32 2
  store ptr %151, ptr %152, align 8, !tbaa !28
  br label %153

153:                                              ; preds = %150, %135
  %154 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_table_SVG, ptr @table_iSVG, i32 0, i32 13), align 8, !tbaa !29
  %155 = load ptr, ptr %5, align 8, !tbaa !5
  %156 = getelementptr inbounds { i64, ptr }, ptr %16, i32 0, i32 0
  %157 = load i64, ptr %156, align 8
  %158 = getelementptr inbounds { i64, ptr }, ptr %16, i32 0, i32 1
  %159 = load ptr, ptr %158, align 8
  call void %154(ptr noundef %155, i64 %157, ptr %159)
  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 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %160

160:                                              ; preds = %153
  %161 = load i16, ptr %14, align 2, !tbaa !20
  %162 = add i16 %161, 1
  store i16 %162, ptr %14, align 2, !tbaa !20
  br label %89, !llvm.loop !30

163:                                              ; preds = %95
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %164, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %169

165:                                              ; preds = %85, %68, %57
  %166 = load ptr, ptr getelementptr inbounds (%struct.__caryll_vectorinterface_table_SVG, ptr @table_iSVG, i32 0, i32 3), align 8, !tbaa !32
  %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 = %165
  store i32 0, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %49, !llvm.loop !33

169:                                              ; preds = %163, %52
  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, %44
  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 %40, !llvm.loop !34

178:                                              ; preds = %169, %43
  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 %19, !llvm.loop !35

188:                                              ; preds = %178, %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
  %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
}

; 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

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

declare ptr @bufnew(...) #4

declare void @bufwrite_bytes(ptr noundef, i64 noundef, ptr noundef) #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 = { 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 = !{!13, !13, i64 0}
!21 = !{!22, !6, i64 48}
!22 = !{!"__caryll_vectorinterface_table_SVG", !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}
!23 = !{!24, !6, i64 48}
!24 = !{!"__caryll_elementinterface_svg_Assignment", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!25 = !{!26, !13, i64 0}
!26 = !{!"", !13, i64 0, !13, i64 2, !6, i64 8}
!27 = !{!26, !13, i64 2}
!28 = !{!26, !6, i64 8}
!29 = !{!22, !6, i64 104}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!22, !6, i64 24}
!33 = distinct !{!33, !31}
!34 = distinct !{!34, !31}
!35 = distinct !{!35, !31}


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

@svg_iAssignment = external dso_local local_unnamed_addr constant %struct.__caryll_elementinterface_svg_Assignment, align 8
@table_iSVG = external dso_local local_unnamed_addr constant %struct.__caryll_vectorinterface_table_SVG, align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @otfcc_readSVG(ptr nocapture noundef readonly byval(%struct.otfcc_Packet) align 8 %0, ptr nocapture noundef readnone %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_iSVG, i64 24), align 8
  %7 = load ptr, ptr getelementptr inbounds (i8, ptr @table_iSVG, i64 48), align 8
  %8 = load ptr, ptr getelementptr inbounds (i8, ptr @svg_iAssignment, i64 48), align 8
  %9 = load ptr, ptr getelementptr inbounds (i8, ptr @table_iSVG, 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, %.thread77
  %indvars.iv126 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next127, %.thread77 ]
  %14 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i64 %indvars.iv126
  %.sroa.023.0.copyload = load i32, ptr %14, align 8, !tbaa !12
  %15 = icmp eq i32 %.sroa.023.0.copyload, 1398163232
  br i1 %15, label %.split.us, label %.thread77

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

.preheader.us:                                    ; preds = %.split.us
  %17 = getelementptr inbounds i8, ptr %.sroa.8.0.copyload.le, i64 2
  %18 = tail call i32 @read_32u(ptr noundef nonnull %17)
  %19 = add i32 %18, 2
  %20 = icmp ult i32 %.sroa.424.0.copyload.le, %19
  br i1 %20, label %.critedge.sink.split, label %21

21:                                               ; preds = %.preheader.us
  %22 = zext i32 %18 to i64
  %23 = getelementptr inbounds i8, ptr %.sroa.8.0.copyload.le, i64 %22
  %24 = tail call zeroext i16 @read_16u(ptr noundef %23)
  %25 = zext i16 %24 to i32
  %26 = mul nuw nsw i32 %25, 12
  %27 = add i32 %26, %19
  %28 = icmp ult i32 %.sroa.424.0.copyload.le, %27
  br i1 %28, label %.critedge.sink.split, label %29

29:                                               ; preds = %21
  %30 = tail call ptr (...) %7() #3
  %.not124 = icmp eq i16 %24, 0
  br i1 %.not124, label %.critedge, label %.lr.ph.us

31:                                               ; preds = %.lr.ph.us, %50
  %indvars.iv = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next, %50 ]
  %32 = mul nuw nsw i64 %indvars.iv, 12
  %33 = getelementptr inbounds i8, ptr %51, i64 %32
  %34 = tail call { i64, ptr } (...) %8() #3
  %35 = extractvalue { i64, ptr } %34, 0
  %36 = tail call zeroext i16 @read_16u(ptr noundef nonnull %33)
  %.sroa.0.0.insert.ext.us = zext i16 %36 to i64
  %.sroa.0.0.insert.mask.us = and i64 %35, -4294967296
  %.sroa.0.0.insert.insert.us = or disjoint i64 %.sroa.0.0.insert.mask.us, %.sroa.0.0.insert.ext.us
  %37 = getelementptr inbounds i8, ptr %33, i64 2
  %38 = tail call zeroext i16 @read_16u(ptr noundef nonnull %37)
  %.sroa.0.2.insert.ext.us = zext i16 %38 to i64
  %.sroa.0.2.insert.shift.us = shl nuw nsw i64 %.sroa.0.2.insert.ext.us, 16
  %.sroa.0.2.insert.insert.us = or disjoint i64 %.sroa.0.2.insert.shift.us, %.sroa.0.0.insert.insert.us
  %39 = getelementptr inbounds i8, ptr %33, i64 4
  %40 = tail call i32 @read_32u(ptr noundef nonnull %39)
  %41 = getelementptr inbounds i8, ptr %33, i64 8
  %42 = tail call i32 @read_32u(ptr noundef nonnull %41)
  %43 = add i32 %40, %18
  %44 = add i32 %43, %42
  %.not70.us = icmp ugt i32 %44, %.sroa.424.0.copyload.le
  %45 = tail call ptr (...) @bufnew() #3
  br i1 %.not70.us, label %50, label %46

46:                                               ; preds = %31
  %47 = zext i32 %42 to i64
  %48 = zext i32 %40 to i64
  %49 = getelementptr inbounds i8, ptr %23, i64 %48
  tail call void @bufwrite_bytes(ptr noundef %45, i64 noundef %47, ptr noundef %49) #3
  br label %50

50:                                               ; preds = %31, %46
  tail call void %9(ptr noundef %30, i64 %.sroa.0.2.insert.insert.us, ptr %45) #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 %31, !llvm.loop !14

.lr.ph.us:                                        ; preds = %29
  %51 = getelementptr inbounds i8, ptr %23, i64 2
  %wide.trip.count = zext i16 %24 to i64
  br label %31

.thread77:                                        ; preds = %13
  %indvars.iv.next127 = add nuw nsw i64 %indvars.iv126, 1
  %52 = icmp ult i64 %indvars.iv.next127, %12
  br i1 %52, label %13, label %.critedge, !llvm.loop !16

.critedge.sink.split:                             ; preds = %.preheader.us, %21, %.split.us
  tail call void %6(ptr noundef null) #3
  br label %.critedge

.critedge:                                        ; preds = %.thread77, %50, %.critedge.sink.split, %29, %2
  %53 = phi ptr [ null, %2 ], [ %30, %29 ], [ null, %.critedge.sink.split ], [ %30, %50 ], [ null, %.thread77 ]
  ret ptr %53
}

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

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

declare ptr @bufnew(...) local_unnamed_addr #2

declare void @bufwrite_bytes(ptr noundef, i64 noundef, ptr noundef) 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 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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