; LLVM IR from paintdream/DontStarveLuaJIT :: src/luajit/src (lj_tab)

; 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.GCtab = type { %struct.GCRef, i8, i8, i8, i8, %struct.MRef, %struct.GCRef, %struct.GCRef, ptr, %struct.MRef, i32, i32 }
%struct.GCRef = type { i32 }
%struct.MRef = type { i32 }
%union.TValue = type { i64 }
%struct.Node = type { %union.TValue, %union.TValue, %struct.MRef, %struct.MRef }

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

; Function Attrs: nounwind uwtable
declare hidden ptr @newtab(ptr noundef, i32 noundef, i32 noundef) #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.ctlz.i32(i32, i1 immarg) #2

; Function Attrs: nounwind uwtable
define hidden ptr @lj_tab_dup(ptr noundef %0, ptr noundef %1) #1 {
  %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 ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.GCtab, ptr %19, i32 0, i32 10
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.GCtab, ptr %22, i32 0, i32 11
  %24 = load i32, ptr %23, align 8, !tbaa !14
  %25 = icmp ugt i32 %24, 0
  br i1 %25, label %26, label %33

26:                                               ; preds = %2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.GCtab, ptr %27, i32 0, i32 11
  %29 = load i32, ptr %28, align 8, !tbaa !14
  %30 = call i32 @llvm.ctlz.i32(i32 %29, i1 true)
  %31 = xor i32 %30, 31
  %32 = add i32 %31, 1
  br label %34

33:                                               ; preds = %2
  br label %34

34:                                               ; preds = %33, %26
  %35 = phi i32 [ %32, %26 ], [ 0, %33 ]
  %36 = call ptr @newtab(ptr noundef %18, i32 noundef %21, i32 noundef %35)
  store ptr %36, ptr %5, align 8, !tbaa !5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.GCtab, ptr %37, i32 0, i32 3
  store i8 0, ptr %38, align 2, !tbaa !15
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.GCtab, ptr %39, i32 0, i32 10
  %41 = load i32, ptr %40, align 4, !tbaa !9
  store i32 %41, ptr %6, align 4, !tbaa !16
  %42 = load i32, ptr %6, align 4, !tbaa !16
  %43 = icmp ugt i32 %42, 0
  br i1 %43, label %44, label %85

44:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.GCtab, ptr %45, i32 0, i32 5
  %47 = getelementptr inbounds %struct.MRef, ptr %46, i32 0, i32 0
  %48 = load i32, ptr %47, align 8, !tbaa !17
  %49 = zext i32 %48 to i64
  %50 = inttoptr i64 %49 to ptr
  store ptr %50, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.GCtab, ptr %51, i32 0, i32 5
  %53 = getelementptr inbounds %struct.MRef, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !17
  %55 = zext i32 %54 to i64
  %56 = inttoptr i64 %55 to ptr
  store ptr %56, ptr %9, align 8, !tbaa !5
  %57 = load i32, ptr %6, align 4, !tbaa !16
  %58 = icmp ult i32 %57, 64
  br i1 %58, label %59, label %78

59:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !16
  br label %60

60:                                               ; preds = %74, %59
  %61 = load i32, ptr %10, align 4, !tbaa !16
  %62 = load i32, ptr %6, align 4, !tbaa !16
  %63 = icmp ult i32 %61, %62
  br i1 %63, label %64, label %77

64:                                               ; preds = %60
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = load i32, ptr %10, align 4, !tbaa !16
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds %union.TValue, ptr %66, i64 %68
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = load i32, ptr %10, align 4, !tbaa !16
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds %union.TValue, ptr %70, i64 %72
  call void @copyTV(ptr noundef %65, ptr noundef %69, ptr noundef %73)
  br label %74

74:                                               ; preds = %64
  %75 = load i32, ptr %10, align 4, !tbaa !16
  %76 = add i32 %75, 1
  store i32 %76, ptr %10, align 4, !tbaa !16
  br label %60, !llvm.loop !18

77:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %84

78:                                               ; preds = %44
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = load i32, ptr %6, align 4, !tbaa !16
  %82 = zext i32 %81 to i64
  %83 = mul i64 %82, 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %79, ptr align 8 %80, i64 %83, i1 false)
  br label %84

84:                                               ; preds = %78, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %85

85:                                               ; preds = %84, %34
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.GCtab, ptr %86, i32 0, i32 11
  %88 = load i32, ptr %87, align 8, !tbaa !14
  store i32 %88, ptr %7, align 4, !tbaa !16
  %89 = load i32, ptr %7, align 4, !tbaa !16
  %90 = icmp ugt i32 %89, 0
  br i1 %90, label %91, label %168

91:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.GCtab, ptr %92, i32 0, i32 9
  %94 = getelementptr inbounds %struct.MRef, ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 8, !tbaa !20
  %96 = zext i32 %95 to i64
  %97 = inttoptr i64 %96 to ptr
  store ptr %97, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.GCtab, ptr %98, i32 0, i32 9
  %100 = getelementptr inbounds %struct.MRef, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 8, !tbaa !20
  %102 = zext i32 %101 to i64
  %103 = inttoptr i64 %102 to ptr
  store ptr %103, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = load ptr, ptr %13, align 8, !tbaa !5
  %106 = ptrtoint ptr %104 to i64
  %107 = ptrtoint ptr %105 to i64
  %108 = sub i64 %106, %107
  store i64 %108, ptr %14, align 8, !tbaa !21
  %109 = load ptr, ptr %13, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.Node, ptr %109, i32 0, i32 3
  %111 = getelementptr inbounds %struct.MRef, ptr %110, i32 0, i32 0
  %112 = load i32, ptr %111, align 4, !tbaa !23
  %113 = zext i32 %112 to i64
  %114 = inttoptr i64 %113 to ptr
  %115 = load i64, ptr %14, align 8, !tbaa !21
  %116 = getelementptr inbounds i8, ptr %114, i64 %115
  %117 = ptrtoint ptr %116 to i64
  %118 = trunc i64 %117 to i32
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.Node, ptr %119, i32 0, i32 3
  %121 = getelementptr inbounds %struct.MRef, ptr %120, i32 0, i32 0
  store i32 %118, ptr %121, align 4, !tbaa !23
  store i32 0, ptr %11, align 4, !tbaa !16
  br label %122

122:                                              ; preds = %164, %91
  %123 = load i32, ptr %11, align 4, !tbaa !16
  %124 = load i32, ptr %7, align 4, !tbaa !16
  %125 = icmp ule i32 %123, %124
  br i1 %125, label %126, label %167

126:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %127 = load ptr, ptr %13, align 8, !tbaa !5
  %128 = load i32, ptr %11, align 4, !tbaa !16
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds %struct.Node, ptr %127, i64 %129
  store ptr %130, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = load i32, ptr %11, align 4, !tbaa !16
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds %struct.Node, ptr %131, i64 %133
  store ptr %134, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %135 = load ptr, ptr %15, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.Node, ptr %135, i32 0, i32 2
  %137 = getelementptr inbounds %struct.MRef, ptr %136, i32 0, i32 0
  %138 = load i32, ptr %137, align 8, !tbaa !25
  %139 = zext i32 %138 to i64
  %140 = inttoptr i64 %139 to ptr
  store ptr %140, ptr %17, align 8, !tbaa !5
  %141 = load ptr, ptr %16, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.Node, ptr %141, i32 0, i32 0
  %143 = load ptr, ptr %15, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.Node, ptr %143, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %142, ptr align 8 %144, i64 8, i1 false), !tbaa.struct !26
  %145 = load ptr, ptr %16, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.Node, ptr %145, i32 0, i32 1
  %147 = load ptr, ptr %15, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.Node, ptr %147, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %146, ptr align 8 %148, i64 8, i1 false), !tbaa.struct !26
  %149 = load ptr, ptr %17, align 8, !tbaa !5
  %150 = icmp eq ptr %149, null
  br i1 %150, label %151, label %153

151:                                              ; preds = %126
  %152 = load ptr, ptr %17, align 8, !tbaa !5
  br label %157

153:                                              ; preds = %126
  %154 = load ptr, ptr %17, align 8, !tbaa !5
  %155 = load i64, ptr %14, align 8, !tbaa !21
  %156 = getelementptr inbounds i8, ptr %154, i64 %155
  br label %157

157:                                              ; preds = %153, %151
  %158 = phi ptr [ %152, %151 ], [ %156, %153 ]
  %159 = ptrtoint ptr %158 to i64
  %160 = trunc i64 %159 to i32
  %161 = load ptr, ptr %16, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.Node, ptr %161, i32 0, i32 2
  %163 = getelementptr inbounds %struct.MRef, ptr %162, i32 0, i32 0
  store i32 %160, ptr %163, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  br label %164

164:                                              ; preds = %157
  %165 = load i32, ptr %11, align 4, !tbaa !16
  %166 = add i32 %165, 1
  store i32 %166, ptr %11, align 4, !tbaa !16
  br label %122, !llvm.loop !28

167:                                              ; preds = %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %168

168:                                              ; preds = %167, %85
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  ret ptr %169
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @copyTV(ptr noundef, ptr noundef, ptr noundef) #3

; 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) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { alwaysinline 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !12, i64 36}
!10 = !{!"GCtab", !11, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !13, i64 8, !11, i64 12, !11, i64 16, !6, i64 24, !13, i64 32, !12, i64 36, !12, i64 40}
!11 = !{!"GCRef", !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"MRef", !12, i64 0}
!14 = !{!10, !12, i64 40}
!15 = !{!10, !7, i64 6}
!16 = !{!12, !12, i64 0}
!17 = !{!10, !12, i64 8}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!10, !12, i64 32}
!21 = !{!22, !22, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!24, !12, i64 20}
!24 = !{!"Node", !7, i64 0, !7, i64 8, !13, i64 16, !13, i64 20}
!25 = !{!24, !12, i64 16}
!26 = !{i64 0, i64 8, !27}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !19}


; 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"

%union.TValue = type { i64 }
%struct.Node = type { %union.TValue, %union.TValue, %struct.MRef, %struct.MRef }
%struct.MRef = type { i32 }

; Function Attrs: nounwind uwtable
declare hidden ptr @newtab(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.ctlz.i32(i32, i1 immarg) #1

; Function Attrs: nounwind uwtable
define hidden ptr @lj_tab_dup(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %1, i64 36
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 40
  %6 = load i32, ptr %5, align 8, !tbaa !13
  %.not = icmp eq i32 %6, 0
  %7 = tail call range(i32 0, 33) i32 @llvm.ctlz.i32(i32 %6, i1 true)
  %8 = sub nuw nsw i32 32, %7
  %9 = select i1 %.not, i32 0, i32 %8
  %10 = tail call ptr @newtab(ptr noundef %0, i32 noundef %4, i32 noundef %9)
  %11 = getelementptr inbounds i8, ptr %10, i64 6
  store i8 0, ptr %11, align 2, !tbaa !14
  %12 = load i32, ptr %3, align 4, !tbaa !5
  %.not51 = icmp eq i32 %12, 0
  br i1 %.not51, label %.loopexit54, label %13

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %10, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !15
  %16 = zext i32 %15 to i64
  %17 = inttoptr i64 %16 to ptr
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  %19 = load i32, ptr %18, align 8, !tbaa !15
  %20 = zext i32 %19 to i64
  %21 = inttoptr i64 %20 to ptr
  %22 = icmp ult i32 %12, 64
  %wide.trip.count = zext i32 %12 to i64
  br i1 %22, label %.preheader, label %25

.preheader:                                       ; preds = %13, %.preheader
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader ], [ 0, %13 ]
  %23 = getelementptr inbounds %union.TValue, ptr %17, i64 %indvars.iv
  %24 = getelementptr inbounds %union.TValue, ptr %21, i64 %indvars.iv
  tail call void @copyTV(ptr noundef %0, ptr noundef %23, ptr noundef %24)
  %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 %.loopexit54, label %.preheader, !llvm.loop !16

25:                                               ; preds = %13
  %26 = shl nuw nsw i64 %wide.trip.count, 3
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %21, i64 %26, i1 false)
  br label %.loopexit54

.loopexit54:                                      ; preds = %.preheader, %25, %2
  %27 = load i32, ptr %5, align 8, !tbaa !13
  %.not52 = icmp eq i32 %27, 0
  br i1 %.not52, label %.loopexit, label %28

28:                                               ; preds = %.loopexit54
  %29 = getelementptr inbounds i8, ptr %10, i64 32
  %30 = load i32, ptr %29, align 8, !tbaa !18
  %31 = zext i32 %30 to i64
  %32 = inttoptr i64 %31 to ptr
  %33 = getelementptr inbounds i8, ptr %1, i64 32
  %34 = load i32, ptr %33, align 8, !tbaa !18
  %35 = zext i32 %34 to i64
  %36 = inttoptr i64 %35 to ptr
  %37 = sub i32 %30, %34
  %38 = getelementptr inbounds i8, ptr %36, i64 20
  %39 = load i32, ptr %38, align 4, !tbaa !19
  %40 = add i32 %39, %37
  %41 = getelementptr inbounds i8, ptr %32, i64 20
  store i32 %40, ptr %41, align 4, !tbaa !19
  %42 = add i32 %27, 1
  %umax = tail call i32 @llvm.umax.i32(i32 %42, i32 1)
  %wide.trip.count61 = zext i32 %umax to i64
  %xtraiter = and i64 %wide.trip.count61, 1
  %43 = icmp eq i32 %umax, 1
  br i1 %43, label %.loopexit.loopexit.unr-lcssa, label %.new

.new:                                             ; preds = %28
  %unroll_iter = and i64 %wide.trip.count61, 4294967294
  br label %44

44:                                               ; preds = %44, %.new
  %indvars.iv58 = phi i64 [ 0, %.new ], [ %indvars.iv.next59.1, %44 ]
  %niter = phi i64 [ 0, %.new ], [ %niter.next.1, %44 ]
  %45 = getelementptr inbounds %struct.Node, ptr %36, i64 %indvars.iv58
  %46 = getelementptr inbounds %struct.Node, ptr %32, i64 %indvars.iv58
  %47 = getelementptr inbounds i8, ptr %45, i64 16
  %48 = load i32, ptr %47, align 8, !tbaa !21
  %49 = load i64, ptr %45, align 8, !tbaa !22
  store i64 %49, ptr %46, align 8, !tbaa !22
  %50 = getelementptr inbounds i8, ptr %46, i64 8
  %51 = getelementptr inbounds i8, ptr %45, i64 8
  %52 = load i64, ptr %51, align 8, !tbaa !22
  store i64 %52, ptr %50, align 8, !tbaa !22
  %53 = icmp eq i32 %48, 0
  %54 = add i32 %48, %37
  %55 = select i1 %53, i32 0, i32 %54
  %56 = getelementptr inbounds i8, ptr %46, i64 16
  store i32 %55, ptr %56, align 8, !tbaa !21
  %indvars.iv.next59 = or disjoint i64 %indvars.iv58, 1
  %57 = getelementptr inbounds %struct.Node, ptr %36, i64 %indvars.iv.next59
  %58 = getelementptr inbounds %struct.Node, ptr %32, i64 %indvars.iv.next59
  %59 = getelementptr inbounds i8, ptr %57, i64 16
  %60 = load i32, ptr %59, align 8, !tbaa !21
  %61 = load i64, ptr %57, align 8, !tbaa !22
  store i64 %61, ptr %58, align 8, !tbaa !22
  %62 = getelementptr inbounds i8, ptr %58, i64 8
  %63 = getelementptr inbounds i8, ptr %57, i64 8
  %64 = load i64, ptr %63, align 8, !tbaa !22
  store i64 %64, ptr %62, align 8, !tbaa !22
  %65 = icmp eq i32 %60, 0
  %66 = add i32 %60, %37
  %67 = select i1 %65, i32 0, i32 %66
  %68 = getelementptr inbounds i8, ptr %58, i64 16
  store i32 %67, ptr %68, align 8, !tbaa !21
  %indvars.iv.next59.1 = add nuw nsw i64 %indvars.iv58, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %44, !llvm.loop !23

.loopexit.loopexit.unr-lcssa:                     ; preds = %44, %28
  %indvars.iv58.unr = phi i64 [ 0, %28 ], [ %indvars.iv.next59.1, %44 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit, label %.loopexit.loopexit.epilog-lcssa

.loopexit.loopexit.epilog-lcssa:                  ; preds = %.loopexit.loopexit.unr-lcssa
  %69 = getelementptr inbounds %struct.Node, ptr %36, i64 %indvars.iv58.unr
  %70 = getelementptr inbounds %struct.Node, ptr %32, i64 %indvars.iv58.unr
  %71 = getelementptr inbounds i8, ptr %69, i64 16
  %72 = load i32, ptr %71, align 8, !tbaa !21
  %73 = load i64, ptr %69, align 8, !tbaa !22
  store i64 %73, ptr %70, align 8, !tbaa !22
  %74 = getelementptr inbounds i8, ptr %70, i64 8
  %75 = getelementptr inbounds i8, ptr %69, i64 8
  %76 = load i64, ptr %75, align 8, !tbaa !22
  store i64 %76, ptr %74, align 8, !tbaa !22
  %77 = icmp eq i32 %72, 0
  %78 = add i32 %72, %37
  %79 = select i1 %77, i32 0, i32 %78
  %80 = getelementptr inbounds i8, ptr %70, i64 16
  store i32 %79, ptr %80, align 8, !tbaa !21
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit.epilog-lcssa, %.loopexit.loopexit.unr-lcssa, %.loopexit54
  ret ptr %10
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @copyTV(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; 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) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { alwaysinline 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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, !8, i64 36}
!6 = !{!"GCtab", !7, i64 0, !9, i64 4, !9, i64 5, !9, i64 6, !9, i64 7, !11, i64 8, !7, i64 12, !7, i64 16, !12, i64 24, !11, i64 32, !8, i64 36, !8, i64 40}
!7 = !{!"GCRef", !8, i64 0}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"MRef", !8, i64 0}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!6, !8, i64 40}
!14 = !{!6, !9, i64 6}
!15 = !{!6, !8, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!6, !8, i64 32}
!19 = !{!20, !8, i64 20}
!20 = !{!"Node", !9, i64 0, !9, i64 8, !11, i64 16, !11, i64 20}
!21 = !{!20, !8, i64 16}
!22 = !{!9, !9, i64 0}
!23 = distinct !{!23, !17}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass