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

; 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_hdmx = type { i16, i16, i32, ptr }
%struct.table_maxp = type { i32, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
%struct.device_record = type { i8, i8, ptr }

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

16:                                               ; preds = %179, %3
  %17 = load i32, ptr %9, align 4, !tbaa !9
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %19, label %28

19:                                               ; preds = %16
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %28

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

28:                                               ; preds = %22, %19, %16
  %29 = phi i1 [ false, %19 ], [ false, %16 ], [ %27, %22 ]
  br i1 %29, label %31, label %30

30:                                               ; preds = %28
  store i32 2, ptr %10, align 4
  br label %186

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

37:                                               ; preds = %171, %31
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %41, label %40

40:                                               ; preds = %37
  store i32 5, ptr %10, align 4
  br label %176

41:                                               ; preds = %37
  %42 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %11, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !16
  %44 = icmp eq i32 %43, 1751412088
  br i1 %44, label %45, label %170

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

46:                                               ; preds = %166, %45
  %47 = load i32, ptr %12, align 4, !tbaa !9
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %50, label %49

49:                                               ; preds = %46
  store i32 8, ptr %10, align 4
  br label %167

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %51 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %11, i32 0, i32 4
  %52 = load ptr, ptr %51, align 8, !tbaa !18
  store ptr %52, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %53 = call ptr @__caryll_allocate_clean(i64 noundef 16, i64 noundef 20)
  store ptr %53, ptr %14, align 8, !tbaa !5
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  %55 = call zeroext i16 @read_16u(ptr noundef %54)
  %56 = load ptr, ptr %14, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.table_hdmx, ptr %56, i32 0, i32 0
  store i16 %55, ptr %57, align 8, !tbaa !19
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 2
  %60 = call zeroext i16 @read_16u(ptr noundef %59)
  %61 = load ptr, ptr %14, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.table_hdmx, ptr %61, i32 0, i32 1
  store i16 %60, ptr %62, align 2, !tbaa !21
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i64 4
  %65 = call i32 @read_32u(ptr noundef %64)
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.table_hdmx, ptr %66, i32 0, i32 2
  store i32 %65, ptr %67, align 4, !tbaa !22
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.table_hdmx, ptr %68, i32 0, i32 1
  %70 = load i16, ptr %69, align 2, !tbaa !21
  %71 = zext i16 %70 to i64
  %72 = mul i64 16, %71
  %73 = call ptr @__caryll_allocate_clean(i64 noundef %72, i64 noundef 24)
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.table_hdmx, ptr %74, i32 0, i32 3
  store ptr %73, ptr %75, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %76

76:                                               ; preds = %161, %50
  %77 = load i32, ptr %15, align 4, !tbaa !9
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.table_hdmx, ptr %78, i32 0, i32 1
  %80 = load i16, ptr %79, align 2, !tbaa !21
  %81 = zext i16 %80 to i32
  %82 = icmp ult i32 %77, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %76
  store i32 11, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %164

84:                                               ; preds = %76
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = getelementptr inbounds i8, ptr %85, i64 8
  %87 = load i32, ptr %15, align 4, !tbaa !9
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.table_maxp, ptr %88, i32 0, i32 1
  %90 = load i16, ptr %89, align 4, !tbaa !24
  %91 = zext i16 %90 to i32
  %92 = add nsw i32 2, %91
  %93 = mul i32 %87, %92
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds i8, ptr %86, i64 %94
  %96 = load i8, ptr %95, align 1, !tbaa !26
  %97 = load ptr, ptr %14, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.table_hdmx, ptr %97, i32 0, i32 3
  %99 = load ptr, ptr %98, align 8, !tbaa !23
  %100 = load i32, ptr %15, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds %struct.device_record, ptr %99, i64 %101
  %103 = getelementptr inbounds %struct.device_record, ptr %102, i32 0, i32 0
  store i8 %96, ptr %103, align 8, !tbaa !27
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = getelementptr inbounds i8, ptr %104, i64 8
  %106 = load i32, ptr %15, align 4, !tbaa !9
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.table_maxp, ptr %107, i32 0, i32 1
  %109 = load i16, ptr %108, align 4, !tbaa !24
  %110 = zext i16 %109 to i32
  %111 = add nsw i32 2, %110
  %112 = mul i32 %106, %111
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds i8, ptr %105, i64 %113
  %115 = getelementptr inbounds i8, ptr %114, i64 1
  %116 = load i8, ptr %115, align 1, !tbaa !26
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.table_hdmx, ptr %117, i32 0, i32 3
  %119 = load ptr, ptr %118, align 8, !tbaa !23
  %120 = load i32, ptr %15, align 4, !tbaa !9
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds %struct.device_record, ptr %119, i64 %121
  %123 = getelementptr inbounds %struct.device_record, ptr %122, i32 0, i32 1
  store i8 %116, ptr %123, align 1, !tbaa !29
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.table_maxp, ptr %124, i32 0, i32 1
  %126 = load i16, ptr %125, align 4, !tbaa !24
  %127 = zext i16 %126 to i64
  %128 = mul i64 1, %127
  %129 = call ptr @__caryll_allocate_clean(i64 noundef %128, i64 noundef 29)
  %130 = load ptr, ptr %14, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.table_hdmx, ptr %130, i32 0, i32 3
  %132 = load ptr, ptr %131, align 8, !tbaa !23
  %133 = load i32, ptr %15, align 4, !tbaa !9
  %134 = zext i32 %133 to i64
  %135 = getelementptr inbounds %struct.device_record, ptr %132, i64 %134
  %136 = getelementptr inbounds %struct.device_record, ptr %135, i32 0, i32 2
  store ptr %129, ptr %136, align 8, !tbaa !30
  %137 = load ptr, ptr %14, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.table_hdmx, ptr %137, i32 0, i32 3
  %139 = load ptr, ptr %138, align 8, !tbaa !23
  %140 = load i32, ptr %15, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  %142 = getelementptr inbounds %struct.device_record, ptr %139, i64 %141
  %143 = getelementptr inbounds %struct.device_record, ptr %142, i32 0, i32 2
  %144 = load ptr, ptr %143, align 8, !tbaa !30
  %145 = load ptr, ptr %13, align 8, !tbaa !5
  %146 = getelementptr inbounds i8, ptr %145, i64 8
  %147 = load i32, ptr %15, align 4, !tbaa !9
  %148 = load ptr, ptr %6, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.table_maxp, ptr %148, i32 0, i32 1
  %150 = load i16, ptr %149, align 4, !tbaa !24
  %151 = zext i16 %150 to i32
  %152 = add nsw i32 2, %151
  %153 = mul i32 %147, %152
  %154 = zext i32 %153 to i64
  %155 = getelementptr inbounds i8, ptr %146, i64 %154
  %156 = getelementptr inbounds i8, ptr %155, i64 2
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.table_maxp, ptr %157, i32 0, i32 1
  %159 = load i16, ptr %158, align 4, !tbaa !24
  %160 = zext i16 %159 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %144, ptr align 1 %156, i64 %160, i1 false)
  br label %161

161:                                              ; preds = %84
  %162 = load i32, ptr %15, align 4, !tbaa !9
  %163 = add i32 %162, 1
  store i32 %163, ptr %15, align 4, !tbaa !9
  br label %76, !llvm.loop !31

164:                                              ; preds = %83
  %165 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %165, ptr %4, align 8
  store i32 1, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %167

166:                                              ; No predecessors!
  store i32 0, ptr %12, align 4, !tbaa !9
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %46, !llvm.loop !33

167:                                              ; preds = %164, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %168 = load i32, ptr %10, align 4
  switch i32 %168, label %176 [
    i32 8, label %169
  ]

169:                                              ; preds = %167
  br label %170

170:                                              ; preds = %169, %41
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %7, align 4, !tbaa !9
  %173 = icmp ne i32 %172, 0
  %174 = xor i1 %173, true
  %175 = zext i1 %174 to i32
  store i32 %175, ptr %7, align 4, !tbaa !9
  br label %37, !llvm.loop !34

176:                                              ; preds = %167, %40
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #4
  %177 = load i32, ptr %10, align 4
  switch i32 %177, label %186 [
    i32 5, label %178
  ]

178:                                              ; preds = %176
  br label %179

179:                                              ; preds = %178
  %180 = load i32, ptr %7, align 4, !tbaa !9
  %181 = icmp ne i32 %180, 0
  %182 = xor i1 %181, true
  %183 = zext i1 %182 to i32
  store i32 %183, ptr %7, align 4, !tbaa !9
  %184 = load i32, ptr %8, align 4, !tbaa !9
  %185 = add nsw i32 %184, 1
  store i32 %185, ptr %8, align 4, !tbaa !9
  br label %16, !llvm.loop !35

186:                                              ; preds = %176, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %187 = load i32, ptr %10, align 4
  switch i32 %187, label %191 [
    i32 2, label %188
    i32 1, label %189
  ]

188:                                              ; preds = %186
  store ptr null, ptr %4, align 8
  br label %189

189:                                              ; preds = %188, %186
  %190 = load ptr, ptr %4, align 8
  ret ptr %190

191:                                              ; preds = %186
  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 ptr @__caryll_allocate_clean(i64 noundef, i64 noundef) #3

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

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

; 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 = { 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 = !{!20, !13, i64 0}
!20 = !{!"", !13, i64 0, !13, i64 2, !10, i64 4, !6, i64 8}
!21 = !{!20, !13, i64 2}
!22 = !{!20, !10, i64 4}
!23 = !{!20, !6, i64 8}
!24 = !{!25, !13, i64 4}
!25 = !{!"", !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}
!26 = !{!7, !7, i64 0}
!27 = !{!28, !7, i64 0}
!28 = !{!"", !7, i64 0, !7, i64 1, !6, i64 8}
!29 = !{!28, !7, i64 1}
!30 = !{!28, !6, i64 8}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = distinct !{!34, !32}
!35 = distinct !{!35, !32}


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

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

.lr.ph66:                                         ; preds = %3
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %2, i64 4
  %wide.trip.count = zext i16 %5 to i64
  br label %9

9:                                                ; preds = %.lr.ph66, %.thread
  %indvars.iv = phi i64 [ 0, %.lr.ph66 ], [ %indvars.iv.next, %.thread ]
  %10 = getelementptr inbounds %struct.otfcc_PacketPiece, ptr %7, i64 %indvars.iv
  %.sroa.0.0.copyload = load i32, ptr %10, align 8, !tbaa !12
  %.sroa.0.0.copyload.fr = freeze i32 %.sroa.0.0.copyload
  %11 = icmp eq i32 %.sroa.0.0.copyload.fr, 1751412088
  br i1 %11, label %.split61.us, label %.thread, !llvm.loop !13

.split61.us:                                      ; preds = %9
  %.sroa.428.0..sroa_idx.le = getelementptr inbounds i8, ptr %10, i64 16
  %.sroa.428.0.copyload.le = load ptr, ptr %.sroa.428.0..sroa_idx.le, align 8, !tbaa !15
  %12 = tail call ptr @__caryll_allocate_clean(i64 noundef 16, i64 noundef 20)
  %13 = tail call zeroext i16 @read_16u(ptr noundef %.sroa.428.0.copyload.le)
  store i16 %13, ptr %12, align 8, !tbaa !16
  %14 = getelementptr inbounds i8, ptr %.sroa.428.0.copyload.le, i64 2
  %15 = tail call zeroext i16 @read_16u(ptr noundef nonnull %14)
  %16 = getelementptr inbounds i8, ptr %12, i64 2
  store i16 %15, ptr %16, align 2, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %.sroa.428.0.copyload.le, i64 4
  %18 = tail call i32 @read_32u(ptr noundef nonnull %17)
  %19 = getelementptr inbounds i8, ptr %12, i64 4
  store i32 %18, ptr %19, align 4, !tbaa !19
  %20 = load i16, ptr %16, align 2, !tbaa !18
  %21 = zext i16 %20 to i64
  %22 = shl nuw nsw i64 %21, 4
  %23 = tail call ptr @__caryll_allocate_clean(i64 noundef %22, i64 noundef 24)
  %24 = getelementptr inbounds i8, ptr %12, i64 8
  store ptr %23, ptr %24, align 8, !tbaa !20
  %25 = load i16, ptr %16, align 2, !tbaa !18
  %.not69 = icmp eq i16 %25, 0
  br i1 %.not69, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.split61.us
  %26 = getelementptr inbounds i8, ptr %.sroa.428.0.copyload.le, i64 8
  %invariant.gep = getelementptr inbounds i8, ptr %.sroa.428.0.copyload.le, i64 10
  br label %27

27:                                               ; preds = %.lr.ph, %27
  %indvars.iv73 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next74, %27 ]
  %28 = load i16, ptr %8, align 4, !tbaa !21
  %29 = zext i16 %28 to i64
  %30 = add nuw nsw i64 %29, 2
  %31 = mul nuw nsw i64 %30, %indvars.iv73
  %32 = getelementptr inbounds i8, ptr %26, i64 %31
  %33 = load i8, ptr %32, align 1, !tbaa !23
  %34 = load ptr, ptr %24, align 8, !tbaa !20
  %35 = getelementptr inbounds %struct.device_record, ptr %34, i64 %indvars.iv73
  store i8 %33, ptr %35, align 8, !tbaa !24
  %36 = getelementptr inbounds i8, ptr %32, i64 1
  %37 = load i8, ptr %36, align 1, !tbaa !23
  %38 = getelementptr inbounds %struct.device_record, ptr %34, i64 %indvars.iv73, i32 1
  store i8 %37, ptr %38, align 1, !tbaa !26
  %39 = zext i16 %28 to i64
  %40 = tail call ptr @__caryll_allocate_clean(i64 noundef %39, i64 noundef 29)
  %41 = load ptr, ptr %24, align 8, !tbaa !20
  %42 = getelementptr inbounds %struct.device_record, ptr %41, i64 %indvars.iv73, i32 2
  store ptr %40, ptr %42, align 8, !tbaa !27
  %43 = load i16, ptr %8, align 4, !tbaa !21
  %44 = zext i16 %43 to i64
  %45 = add nuw nsw i64 %44, 2
  %46 = mul nuw nsw i64 %45, %indvars.iv73
  %gep = getelementptr inbounds i8, ptr %invariant.gep, i64 %46
  %47 = zext i16 %43 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %40, ptr nonnull align 1 %gep, i64 %47, i1 false)
  %indvars.iv.next74 = add nuw nsw i64 %indvars.iv73, 1
  %48 = load i16, ptr %16, align 2, !tbaa !18
  %49 = zext i16 %48 to i64
  %50 = icmp ult i64 %indvars.iv.next74, %49
  br i1 %50, label %27, label %.critedge, !llvm.loop !28

.thread:                                          ; preds = %9
  %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 %9, !llvm.loop !29

.critedge:                                        ; preds = %.thread, %27, %.split61.us, %3
  %spec.select = phi ptr [ null, %3 ], [ %12, %.split61.us ], [ %12, %27 ], [ null, %.thread ]
  ret ptr %spec.select
}

; Function Attrs: mustprogress 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) #1

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @read_32u(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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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" }

!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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !10, i64 0}
!17 = !{!"", !10, i64 0, !10, i64 2, !7, i64 4, !11, i64 8}
!18 = !{!17, !10, i64 2}
!19 = !{!17, !7, i64 4}
!20 = !{!17, !11, i64 8}
!21 = !{!22, !10, i64 4}
!22 = !{!"", !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}
!23 = !{!8, !8, i64 0}
!24 = !{!25, !8, i64 0}
!25 = !{!"", !8, i64 0, !8, i64 1, !11, i64 8}
!26 = !{!25, !8, i64 1}
!27 = !{!25, !11, i64 8}
!28 = distinct !{!28, !14}
!29 = distinct !{!29, !14}


; 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