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

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

@.str = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @otfcc_readVhea(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 i64, 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 %14

14:                                               ; preds = %156, %2
  %15 = load i32, ptr %8, align 4, !tbaa !9
  %16 = icmp ne i32 %15, 0
  br i1 %16, label %17, label %26

17:                                               ; preds = %14
  %18 = load i32, ptr %6, align 4, !tbaa !9
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %20, label %26

20:                                               ; preds = %17
  %21 = load i32, ptr %7, align 4, !tbaa !9
  %22 = getelementptr inbounds %struct.otfcc_Packet, ptr %0, i32 0, i32 1
  %23 = load i16, ptr %22, align 4, !tbaa !11
  %24 = zext i16 %23 to i32
  %25 = icmp slt i32 %21, %24
  br label %26

26:                                               ; preds = %20, %17, %14
  %27 = phi i1 [ false, %17 ], [ false, %14 ], [ %25, %20 ]
  br i1 %27, label %29, label %28

28:                                               ; preds = %26
  store i32 2, ptr %9, align 4
  br label %163

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

35:                                               ; preds = %148, %29
  %36 = load i32, ptr %6, align 4, !tbaa !9
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  store i32 5, ptr %9, align 4
  br label %153

39:                                               ; preds = %35
  %40 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 0
  %41 = load i32, ptr %40, align 8, !tbaa !16
  %42 = icmp eq i32 %41, 1986553185
  br i1 %42, label %43, label %147

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

44:                                               ; preds = %143, %43
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = icmp ne i32 %45, 0
  br i1 %46, label %48, label %47

47:                                               ; preds = %44
  store i32 8, ptr %9, align 4
  br label %144

48:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %49 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 4
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  store ptr %50, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %51 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %10, i32 0, i32 3
  %52 = load i32, ptr %51, align 4, !tbaa !19
  %53 = zext i32 %52 to i64
  store i64 %53, ptr %13, align 8, !tbaa !20
  %54 = load i64, ptr %13, align 8, !tbaa !20
  %55 = icmp uge i64 %54, 36
  br i1 %55, label %56, label %128

56:                                               ; preds = %48
  %57 = call ptr @__caryll_allocate_clean(i64 noundef 36, i64 noundef 20)
  store ptr %57, ptr %5, align 8, !tbaa !5
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = call i32 @read_32s(ptr noundef %58)
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.table_vhea, ptr %60, i32 0, i32 0
  store i32 %59, ptr %61, align 4, !tbaa !22
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 4
  %64 = call signext i16 @read_16s(ptr noundef %63)
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.table_vhea, ptr %65, i32 0, i32 1
  store i16 %64, ptr %66, align 4, !tbaa !24
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = getelementptr inbounds i8, ptr %67, i64 6
  %69 = call signext i16 @read_16s(ptr noundef %68)
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.table_vhea, ptr %70, i32 0, i32 2
  store i16 %69, ptr %71, align 2, !tbaa !25
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 8
  %74 = call signext i16 @read_16s(ptr noundef %73)
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.table_vhea, ptr %75, i32 0, i32 3
  store i16 %74, ptr %76, align 4, !tbaa !26
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = getelementptr inbounds i8, ptr %77, i64 10
  %79 = call signext i16 @read_16s(ptr noundef %78)
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.table_vhea, ptr %80, i32 0, i32 4
  store i16 %79, ptr %81, align 2, !tbaa !27
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %82, i64 12
  %84 = call signext i16 @read_16s(ptr noundef %83)
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.table_vhea, ptr %85, i32 0, i32 5
  store i16 %84, ptr %86, align 4, !tbaa !28
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %87, i64 14
  %89 = call signext i16 @read_16s(ptr noundef %88)
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.table_vhea, ptr %90, i32 0, i32 6
  store i16 %89, ptr %91, align 2, !tbaa !29
  %92 = load ptr, ptr %12, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i64 16
  %94 = call signext i16 @read_16s(ptr noundef %93)
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.table_vhea, ptr %95, i32 0, i32 7
  store i16 %94, ptr %96, align 4, !tbaa !30
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i64 18
  %99 = call signext i16 @read_16s(ptr noundef %98)
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.table_vhea, ptr %100, i32 0, i32 8
  store i16 %99, ptr %101, align 2, !tbaa !31
  %102 = load ptr, ptr %12, align 8, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %102, i64 20
  %104 = call signext i16 @read_16s(ptr noundef %103)
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.table_vhea, ptr %105, i32 0, i32 9
  store i16 %104, ptr %106, align 4, !tbaa !32
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i64 22
  %109 = call signext i16 @read_16s(ptr noundef %108)
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.table_vhea, ptr %110, i32 0, i32 10
  store i16 %109, ptr %111, align 2, !tbaa !33
  %112 = load ptr, ptr %5, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.table_vhea, ptr %112, i32 0, i32 11
  store i16 0, ptr %113, align 4, !tbaa !34
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.table_vhea, ptr %114, i32 0, i32 12
  store i16 0, ptr %115, align 2, !tbaa !35
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.table_vhea, ptr %116, i32 0, i32 13
  store i16 0, ptr %117, align 4, !tbaa !36
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.table_vhea, ptr %118, i32 0, i32 14
  store i16 0, ptr %119, align 2, !tbaa !37
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.table_vhea, ptr %120, i32 0, i32 15
  store i16 0, ptr %121, align 4, !tbaa !38
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %122, i64 34
  %124 = call zeroext i16 @read_16u(ptr noundef %123)
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.table_vhea, ptr %125, i32 0, i32 16
  store i16 %124, ptr %126, align 2, !tbaa !39
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %127, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %140

128:                                              ; preds = %48
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.otfcc_Options, ptr %129, i32 0, i32 24
  %131 = load ptr, ptr %130, align 8, !tbaa !40
  %132 = getelementptr inbounds %struct.otfcc_ILogger, ptr %131, i32 0, i32 6
  %133 = load ptr, ptr %132, align 8, !tbaa !43
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.otfcc_Options, ptr %134, i32 0, i32 24
  %136 = load ptr, ptr %135, align 8, !tbaa !40
  %137 = call ptr @sdsempty()
  %138 = call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %137, ptr noundef @.str)
  call void %133(ptr noundef %136, i8 noundef zeroext 1, i32 noundef 1, ptr noundef %138)
  br label %139

139:                                              ; preds = %128
  store i32 0, ptr %9, align 4
  br label %140

140:                                              ; preds = %139, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %141 = load i32, ptr %9, align 4
  switch i32 %141, label %144 [
    i32 0, label %142
  ]

142:                                              ; preds = %140
  br label %143

143:                                              ; preds = %142
  store i32 0, ptr %11, align 4, !tbaa !9
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %44, !llvm.loop !45

144:                                              ; preds = %140, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %145 = load i32, ptr %9, align 4
  switch i32 %145, label %153 [
    i32 8, label %146
  ]

146:                                              ; preds = %144
  br label %147

147:                                              ; preds = %146, %39
  br label %148

148:                                              ; preds = %147
  %149 = load i32, ptr %6, align 4, !tbaa !9
  %150 = icmp ne i32 %149, 0
  %151 = xor i1 %150, true
  %152 = zext i1 %151 to i32
  store i32 %152, ptr %6, align 4, !tbaa !9
  br label %35, !llvm.loop !47

153:                                              ; preds = %144, %38
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  %154 = load i32, ptr %9, align 4
  switch i32 %154, label %163 [
    i32 5, label %155
  ]

155:                                              ; preds = %153
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %6, align 4, !tbaa !9
  %158 = icmp ne i32 %157, 0
  %159 = xor i1 %158, true
  %160 = zext i1 %159 to i32
  store i32 %160, ptr %6, align 4, !tbaa !9
  %161 = load i32, ptr %7, align 4, !tbaa !9
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %7, align 4, !tbaa !9
  br label %14, !llvm.loop !48

163:                                              ; preds = %153, %28
  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
  %164 = load i32, ptr %9, align 4
  switch i32 %164, label %166 [
    i32 2, label %165
  ]

165:                                              ; preds = %163
  store ptr null, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %166

166:                                              ; preds = %165, %163
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %167 = load ptr, ptr %3, align 8
  ret ptr %167
}

; 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 ptr @__caryll_allocate_clean(i64 noundef, i64 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @read_32s(ptr noundef) #3

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

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

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

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


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

@.str = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local ptr @otfcc_readVhea(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 %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %1, i64 32
  %8 = zext i16 %4 to i64
  br label %9

9:                                                ; preds = %.lr.ph, %.thread72
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %.thread72 ]
  %10 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %6, i64 %indvars.iv
  %.sroa.0.0.copyload = load i32, ptr %10, align 8, !tbaa !12
  %.not101 = icmp eq i32 %.sroa.0.0.copyload, 1986553185
  br i1 %.not101, label %.split.us, label %.thread72

.split.us:                                        ; preds = %9
  %.sroa.417.0..sroa_idx = getelementptr inbounds i8, ptr %10, i64 12
  %.sroa.417.0.copyload = load i32, ptr %.sroa.417.0..sroa_idx, align 4, !tbaa !12
  %11 = icmp ult i32 %.sroa.417.0.copyload, 36
  br i1 %11, label %.thread72.thread, label %.preheader.split.split.us

.thread72.thread:                                 ; preds = %.split.us
  %12 = load ptr, ptr %7, align 8, !tbaa !13
  %13 = getelementptr inbounds i8, ptr %12, i64 48
  %14 = load ptr, ptr %13, align 8, !tbaa !16
  %15 = tail call ptr @sdsempty() #4
  %16 = tail call ptr (ptr, ptr, ...) @sdscatprintf(ptr noundef %15, ptr noundef nonnull @.str) #4
  tail call void %14(ptr noundef %12, i8 noundef zeroext 1, i32 noundef 1, ptr noundef %16) #4
  br label %.critedge

.preheader.split.split.us:                        ; preds = %.split.us
  %.sroa.5.0..sroa_idx.le = getelementptr inbounds i8, ptr %10, i64 16
  %.sroa.5.0.copyload.le = load ptr, ptr %.sroa.5.0..sroa_idx.le, align 8, !tbaa !18
  %17 = tail call ptr @__caryll_allocate_clean(i64 noundef 36, i64 noundef 20)
  %18 = tail call i32 @read_32s(ptr noundef %.sroa.5.0.copyload.le)
  store i32 %18, ptr %17, align 4, !tbaa !19
  %19 = getelementptr inbounds i8, ptr %.sroa.5.0.copyload.le, i64 4
  %20 = tail call signext i16 @read_16s(ptr noundef nonnull %19)
  %21 = getelementptr inbounds i8, ptr %17, i64 4
  store i16 %20, ptr %21, align 4, !tbaa !21
  %22 = getelementptr inbounds i8, ptr %.sroa.5.0.copyload.le, i64 6
  %23 = tail call signext i16 @read_16s(ptr noundef nonnull %22)
  %24 = getelementptr inbounds i8, ptr %17, i64 6
  store i16 %23, ptr %24, align 2, !tbaa !22
  %25 = getelementptr inbounds i8, ptr %.sroa.5.0.copyload.le, i64 8
  %26 = tail call signext i16 @read_16s(ptr noundef nonnull %25)
  %27 = getelementptr inbounds i8, ptr %17, i64 8
  store i16 %26, ptr %27, align 4, !tbaa !23
  %28 = getelementptr inbounds i8, ptr %.sroa.5.0.copyload.le, i64 10
  %29 = tail call signext i16 @read_16s(ptr noundef nonnull %28)
  %30 = getelementptr inbounds i8, ptr %17, i64 10
  store i16 %29, ptr %30, align 2, !tbaa !24
  %31 = getelementptr inbounds i8, ptr %.sroa.5.0.copyload.le, i64 12
  %32 = tail call signext i16 @read_16s(ptr noundef nonnull %31)
  %33 = getelementptr inbounds i8, ptr %17, i64 12
  store i16 %32, ptr %33, align 4, !tbaa !25
  %34 = getelementptr inbounds i8, ptr %.sroa.5.0.copyload.le, i64 14
  %35 = tail call signext i16 @read_16s(ptr noundef nonnull %34)
  %36 = getelementptr inbounds i8, ptr %17, i64 14
  store i16 %35, ptr %36, align 2, !tbaa !26
  %37 = getelementptr inbounds i8, ptr %.sroa.5.0.copyload.le, i64 16
  %38 = tail call signext i16 @read_16s(ptr noundef nonnull %37)
  %39 = getelementptr inbounds i8, ptr %17, i64 16
  store i16 %38, ptr %39, align 4, !tbaa !27
  %40 = getelementptr inbounds i8, ptr %.sroa.5.0.copyload.le, i64 18
  %41 = tail call signext i16 @read_16s(ptr noundef nonnull %40)
  %42 = getelementptr inbounds i8, ptr %17, i64 18
  store i16 %41, ptr %42, align 2, !tbaa !28
  %43 = getelementptr inbounds i8, ptr %.sroa.5.0.copyload.le, i64 20
  %44 = tail call signext i16 @read_16s(ptr noundef nonnull %43)
  %45 = getelementptr inbounds i8, ptr %17, i64 20
  store i16 %44, ptr %45, align 4, !tbaa !29
  %46 = getelementptr inbounds i8, ptr %.sroa.5.0.copyload.le, i64 22
  %47 = tail call signext i16 @read_16s(ptr noundef nonnull %46)
  %48 = getelementptr inbounds i8, ptr %17, i64 22
  store i16 %47, ptr %48, align 2, !tbaa !30
  %49 = getelementptr inbounds i8, ptr %17, i64 24
  %50 = getelementptr inbounds i8, ptr %.sroa.5.0.copyload.le, i64 34
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(10) %49, i8 0, i64 10, i1 false)
  %51 = tail call zeroext i16 @read_16u(ptr noundef nonnull %50)
  %52 = getelementptr inbounds i8, ptr %17, i64 34
  store i16 %51, ptr %52, align 2, !tbaa !31
  br label %.critedge

.thread72:                                        ; preds = %9
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %53 = icmp ult i64 %indvars.iv.next, %8
  br i1 %53, label %9, label %.critedge, !llvm.loop !32

.critedge:                                        ; preds = %.thread72, %.thread72.thread, %.preheader.split.split.us, %2
  %54 = phi ptr [ %17, %.preheader.split.split.us ], [ null, %2 ], [ null, %.thread72.thread ], [ null, %.thread72 ]
  ret ptr %54
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @__caryll_allocate_clean(i64 noundef, i64 noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden signext i16 @read_16s(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 @sdscatprintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #2

declare ptr @sdsempty() local_unnamed_addr #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = !{!14, !11, i64 32}
!14 = !{!"", !15, i64 0, !15, i64 1, !15, i64 2, !15, i64 3, !15, i64 4, !15, i64 5, !15, i64 6, !15, i64 7, !15, i64 8, !15, i64 9, !15, i64 10, !15, i64 11, !15, i64 12, !15, i64 13, !15, i64 14, !15, i64 15, !15, i64 16, !15, i64 17, !15, i64 18, !15, i64 19, !15, i64 20, !15, i64 21, !15, i64 22, !11, i64 24, !11, i64 32}
!15 = !{!"_Bool", !8, i64 0}
!16 = !{!17, !11, i64 48}
!17 = !{!"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}
!18 = !{!11, !11, i64 0}
!19 = !{!20, !7, i64 0}
!20 = !{!"", !7, i64 0, !10, i64 4, !10, i64 6, !10, i64 8, !10, i64 10, !10, i64 12, !10, i64 14, !10, i64 16, !10, i64 18, !10, i64 20, !10, i64 22, !10, i64 24, !10, i64 26, !10, i64 28, !10, i64 30, !10, i64 32, !10, i64 34}
!21 = !{!20, !10, i64 4}
!22 = !{!20, !10, i64 6}
!23 = !{!20, !10, i64 8}
!24 = !{!20, !10, i64 10}
!25 = !{!20, !10, i64 12}
!26 = !{!20, !10, i64 14}
!27 = !{!20, !10, i64 16}
!28 = !{!20, !10, i64 18}
!29 = !{!20, !10, i64 20}
!30 = !{!20, !10, i64 22}
!31 = !{!20, !10, i64 34}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}


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