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

; 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.GG_State = type { %struct.lua_State, %struct.global_State, %struct.jit_State, [64 x i16], [243 x ptr], [57 x i32] }
%struct.lua_State = type { %union.anon.4 }
%union.anon.4 = type { %struct.anon.5, [320 x i8] }
%struct.anon.5 = type { %struct.GCRef, i8, i8, i8, i8, %struct.MRef, %struct.GCRef, ptr, ptr, %struct.MRef, %struct.MRef, %struct.GCRef, %struct.GCRef, ptr, i32 }
%struct.MRef = type { i32 }
%struct.GCRef = type { i32 }
%struct.global_State = type { ptr, i32, i32, ptr, ptr, %struct.GCState, i32, %struct.SBuf, %struct.GCstr, i8, i8, i8, i8, %struct.GCRef, %union.TValue, %union.TValue, %union.TValue, %struct.Node, %struct.GCupval, i32, i32, ptr, ptr, ptr, i32, i32, %struct.GCRef, %struct.MRef, %struct.MRef, [38 x %struct.GCRef] }
%struct.GCState = type { i32, i32, i8, i8, i8, i8, i32, %struct.GCRef, %struct.MRef, %struct.GCRef, %struct.GCRef, %struct.GCRef, %struct.GCRef, i32, i32, i32, i32 }
%struct.SBuf = type { %struct.MRef, %struct.MRef, %struct.MRef, %struct.MRef }
%struct.GCstr = type { %struct.GCRef, i8, i8, i8, i8, i32, i32 }
%union.TValue = type { i64 }
%struct.Node = type { %union.TValue, %union.TValue, %struct.MRef, %struct.MRef }
%struct.GCupval = type { %struct.GCRef, i8, i8, i8, i8, %union.anon.6, %struct.MRef, i32 }
%union.anon.6 = type { %union.TValue }
%struct.jit_State = type { %struct.GCtrace, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i8, i8, %struct.IRType1, i8, %struct.FoldState, ptr, i32, i32, i32, i32, i32, i32, i32, %struct.MRef, [5 x %union.TValue], ptr, i32, i32, i32, i32, ptr, ptr, i32, i32, i8, ptr, i32, i32, ptr, [100 x i16], [255 x i32], [15 x i32], [16 x ptr], [64 x %struct.HotPenalty], i32, i32, [16 x %struct.BPropEntry], i32, %struct.ScEvEntry, ptr, i32, i32, ptr, i32, i32, ptr, ptr, ptr, i64, i64, %union.TValue, ptr, i32, i32 }
%struct.GCtrace = type { %struct.GCRef, i8, i8, i8, i8, i32, %struct.GCRef, ptr, i32, i16, i16, ptr, ptr, %struct.GCRef, %struct.MRef, i32, i32, ptr, i32, i16, i16, i16, i16, i16, i16, i16, i8, i8 }
%struct.IRType1 = type { i8 }
%struct.FoldState = type { %union.IRIns, %union.IRIns, %union.IRIns }
%union.IRIns = type { %struct.anon.0 }
%struct.anon.0 = type { i32, %struct.IRType1, i8, i8, i8 }
%struct.HotPenalty = type { %struct.MRef, i16, i16 }
%struct.BPropEntry = type { i16, i16, i32 }
%struct.ScEvEntry = type { %struct.MRef, i16, i16, i16, i16, %struct.IRType1, i8 }
%struct.RecordFFData = type { ptr, i64, i32 }

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @lj_ir_set_(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) #1

declare hidden i32 @lj_opt_fold(ptr noundef) #2

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

declare hidden i32 @lj_ir_kint(ptr noundef, i32 noundef) #2

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

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

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

; Function Attrs: nounwind uwtable
define hidden void @recff_ffi_copy(ptr noundef %0, ptr noundef %1) #3 {
  %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
  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) #4
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 -800
  %11 = getelementptr inbounds %struct.GG_State, ptr %10, i32 0, i32 1
  %12 = getelementptr inbounds %struct.global_State, ptr %11, i32 0, i32 28
  %13 = getelementptr inbounds %struct.MRef, ptr %12, i32 0, i32 0
  %14 = load i32, ptr %13, align 8, !tbaa !9
  %15 = zext i32 %14 to i64
  %16 = inttoptr i64 %15 to ptr
  store ptr %16, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.jit_State, ptr %17, i32 0, i32 5
  %19 = load ptr, ptr %18, align 8, !tbaa !28
  %20 = getelementptr inbounds i32, ptr %19, i64 0
  %21 = load i32, ptr %20, align 4, !tbaa !29
  store i32 %21, ptr %6, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.jit_State, ptr %22, i32 0, i32 5
  %24 = load ptr, ptr %23, align 8, !tbaa !28
  %25 = getelementptr inbounds i32, ptr %24, i64 1
  %26 = load i32, ptr %25, align 4, !tbaa !29
  store i32 %26, ptr %7, align 4, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.jit_State, ptr %27, i32 0, i32 5
  %29 = load ptr, ptr %28, align 8, !tbaa !28
  %30 = getelementptr inbounds i32, ptr %29, i64 2
  %31 = load i32, ptr %30, align 4, !tbaa !29
  store i32 %31, ptr %8, align 4, !tbaa !29
  %32 = load i32, ptr %6, align 4, !tbaa !29
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %99

34:                                               ; preds = %2
  %35 = load i32, ptr %7, align 4, !tbaa !29
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %99

37:                                               ; preds = %34
  %38 = load i32, ptr %8, align 4, !tbaa !29
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %44, label %40

40:                                               ; preds = %37
  %41 = load i32, ptr %7, align 4, !tbaa !29
  %42 = and i32 %41, 520093696
  %43 = icmp eq i32 %42, 67108864
  br i1 %43, label %44, label %99

44:                                               ; preds = %40, %37
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = call ptr @ctype_get(ptr noundef %46, i32 noundef 17)
  %48 = load i32, ptr %6, align 4, !tbaa !29
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.RecordFFData, ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !30
  %52 = getelementptr inbounds %union.TValue, ptr %51, i64 0
  %53 = call i32 @crec_ct_tv(ptr noundef %45, ptr noundef %47, i32 noundef 0, i32 noundef %48, ptr noundef %52)
  store i32 %53, ptr %6, align 4, !tbaa !29
  %54 = load ptr, ptr %3, align 8, !tbaa !5
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = call ptr @ctype_get(ptr noundef %55, i32 noundef 18)
  %57 = load i32, ptr %7, align 4, !tbaa !29
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.RecordFFData, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !30
  %61 = getelementptr inbounds %union.TValue, ptr %60, i64 1
  %62 = call i32 @crec_ct_tv(ptr noundef %54, ptr noundef %56, i32 noundef 0, i32 noundef %57, ptr noundef %61)
  store i32 %62, ptr %7, align 4, !tbaa !29
  %63 = load i32, ptr %8, align 4, !tbaa !29
  %64 = icmp ne i32 %63, 0
  br i1 %64, label %65, label %74

65:                                               ; preds = %44
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = load i32, ptr %8, align 4, !tbaa !29
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.RecordFFData, ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !30
  %72 = getelementptr inbounds %union.TValue, ptr %71, i64 2
  %73 = call i32 @crec_toint(ptr noundef %66, ptr noundef %67, i32 noundef %68, ptr noundef %72)
  store i32 %73, ptr %8, align 4, !tbaa !29
  br label %92

74:                                               ; preds = %44
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.jit_State, ptr %76, i32 0, i32 5
  %78 = load ptr, ptr %77, align 8, !tbaa !28
  %79 = getelementptr inbounds i32, ptr %78, i64 1
  %80 = load i32, ptr %79, align 4, !tbaa !29
  %81 = trunc i32 %80 to i16
  call void @lj_ir_set_(ptr noundef %75, i16 noundef zeroext 17683, i16 noundef zeroext %81, i16 noundef zeroext 0)
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = call i32 @lj_opt_fold(ptr noundef %82)
  store i32 %83, ptr %8, align 4, !tbaa !29
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = load i32, ptr %8, align 4, !tbaa !29
  %86 = trunc i32 %85 to i16
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = call i32 @lj_ir_kint(ptr noundef %87, i32 noundef 1)
  %89 = trunc i32 %88 to i16
  call void @lj_ir_set_(ptr noundef %84, i16 noundef zeroext 10515, i16 noundef zeroext %86, i16 noundef zeroext %89)
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = call i32 @lj_opt_fold(ptr noundef %90)
  store i32 %91, ptr %8, align 4, !tbaa !29
  br label %92

92:                                               ; preds = %74, %65
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.RecordFFData, ptr %93, i32 0, i32 1
  store i64 0, ptr %94, align 8, !tbaa !32
  %95 = load ptr, ptr %3, align 8, !tbaa !5
  %96 = load i32, ptr %6, align 4, !tbaa !29
  %97 = load i32, ptr %7, align 4, !tbaa !29
  %98 = load i32, ptr %8, align 4, !tbaa !29
  call void @crec_copy(ptr noundef %95, i32 noundef %96, i32 noundef %97, i32 noundef %98, ptr noundef null)
  br label %99

99:                                               ; preds = %92, %40, %34, %2
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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, !13, i64 640}
!10 = !{!"GG_State", !11, i64 0, !12, i64 384, !21, i64 800, !7, i64 3312, !7, i64 3440, !7, i64 5384}
!11 = !{!"lua_State", !7, i64 0}
!12 = !{!"global_State", !6, i64 0, !13, i64 8, !13, i64 12, !6, i64 16, !6, i64 24, !14, i64 32, !13, i64 88, !17, i64 92, !18, i64 108, !7, i64 124, !7, i64 125, !7, i64 126, !7, i64 127, !15, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !19, i64 160, !20, i64 184, !13, i64 208, !13, i64 212, !6, i64 216, !6, i64 224, !6, i64 232, !13, i64 240, !13, i64 244, !15, i64 248, !16, i64 252, !16, i64 256, !7, i64 260}
!13 = !{!"int", !7, i64 0}
!14 = !{!"GCState", !13, i64 0, !13, i64 4, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !13, i64 12, !15, i64 16, !16, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52}
!15 = !{!"GCRef", !13, i64 0}
!16 = !{!"MRef", !13, i64 0}
!17 = !{!"SBuf", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12}
!18 = !{!"GCstr", !15, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !13, i64 8, !13, i64 12}
!19 = !{!"Node", !7, i64 0, !7, i64 8, !16, i64 16, !16, i64 20}
!20 = !{!"GCupval", !15, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !16, i64 16, !13, i64 20}
!21 = !{!"jit_State", !22, i64 0, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !13, i64 136, !13, i64 140, !13, i64 144, !7, i64 148, !7, i64 149, !24, i64 150, !7, i64 151, !25, i64 152, !6, i64 176, !13, i64 184, !13, i64 188, !13, i64 192, !13, i64 196, !13, i64 200, !13, i64 204, !13, i64 208, !16, i64 212, !7, i64 216, !6, i64 256, !13, i64 264, !13, i64 268, !13, i64 272, !13, i64 276, !6, i64 280, !6, i64 288, !13, i64 296, !13, i64 300, !7, i64 304, !6, i64 312, !13, i64 320, !13, i64 324, !6, i64 328, !7, i64 336, !7, i64 536, !7, i64 1556, !7, i64 1616, !7, i64 1744, !13, i64 2256, !13, i64 2260, !7, i64 2264, !13, i64 2392, !26, i64 2396, !6, i64 2416, !13, i64 2424, !13, i64 2428, !6, i64 2432, !13, i64 2440, !13, i64 2444, !6, i64 2448, !6, i64 2456, !6, i64 2464, !27, i64 2472, !27, i64 2480, !7, i64 2488, !6, i64 2496, !13, i64 2504, !13, i64 2508}
!22 = !{!"GCtrace", !15, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !13, i64 8, !15, i64 12, !6, i64 16, !13, i64 24, !23, i64 28, !23, i64 30, !6, i64 32, !6, i64 40, !15, i64 48, !16, i64 52, !13, i64 56, !13, i64 60, !6, i64 64, !13, i64 72, !23, i64 76, !23, i64 78, !23, i64 80, !23, i64 82, !23, i64 84, !23, i64 86, !23, i64 88, !7, i64 90, !7, i64 91}
!23 = !{!"short", !7, i64 0}
!24 = !{!"IRType1", !7, i64 0}
!25 = !{!"FoldState", !7, i64 0, !7, i64 8, !7, i64 16}
!26 = !{!"ScEvEntry", !16, i64 0, !23, i64 4, !23, i64 6, !23, i64 8, !23, i64 10, !24, i64 12, !7, i64 13}
!27 = !{!"long", !7, i64 0}
!28 = !{!21, !6, i64 128}
!29 = !{!13, !13, i64 0}
!30 = !{!31, !6, i64 0}
!31 = !{!"RecordFFData", !6, i64 0, !27, i64 8, !13, i64 16}
!32 = !{!31, !27, i64 8}


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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @lj_ir_set_(ptr noundef, i16 noundef zeroext, i16 noundef zeroext, i16 noundef zeroext) local_unnamed_addr #0

declare hidden i32 @lj_opt_fold(ptr noundef) local_unnamed_addr #1

declare hidden i32 @lj_ir_kint(ptr noundef, i32 noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: nounwind uwtable
define hidden void @recff_ffi_copy(ptr noundef %0, ptr nocapture noundef %1) local_unnamed_addr #2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 -160
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = zext i32 %4 to i64
  %6 = inttoptr i64 %5 to ptr
  %7 = getelementptr inbounds i8, ptr %0, i64 128
  %8 = load ptr, ptr %7, align 8, !tbaa !27
  %9 = load i32, ptr %8, align 4, !tbaa !28
  %10 = getelementptr inbounds i8, ptr %8, i64 4
  %11 = load i32, ptr %10, align 4, !tbaa !28
  %12 = getelementptr inbounds i8, ptr %8, i64 8
  %13 = load i32, ptr %12, align 4, !tbaa !28
  %14 = icmp ne i32 %9, 0
  %15 = icmp ne i32 %11, 0
  %or.cond = select i1 %14, i1 %15, i1 false
  br i1 %or.cond, label %16, label %43

16:                                               ; preds = %2
  %.not = icmp ne i32 %13, 0
  %17 = and i32 %11, 520093696
  %18 = icmp eq i32 %17, 67108864
  %or.cond37 = select i1 %.not, i1 true, i1 %18
  br i1 %or.cond37, label %19, label %43

19:                                               ; preds = %16
  %20 = tail call ptr @ctype_get(ptr noundef %6, i32 noundef 17)
  %21 = load ptr, ptr %1, align 8, !tbaa !29
  %22 = tail call i32 @crec_ct_tv(ptr noundef nonnull %0, ptr noundef %20, i32 noundef 0, i32 noundef %9, ptr noundef %21)
  %23 = tail call ptr @ctype_get(ptr noundef %6, i32 noundef 18)
  %24 = load ptr, ptr %1, align 8, !tbaa !29
  %25 = getelementptr inbounds i8, ptr %24, i64 8
  %26 = tail call i32 @crec_ct_tv(ptr noundef nonnull %0, ptr noundef %23, i32 noundef 0, i32 noundef %11, ptr noundef nonnull %25)
  br i1 %.not, label %27, label %31

27:                                               ; preds = %19
  %28 = load ptr, ptr %1, align 8, !tbaa !29
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %30 = tail call i32 @crec_toint(ptr noundef nonnull %0, ptr noundef %6, i32 noundef %13, ptr noundef nonnull %29)
  br label %41

31:                                               ; preds = %19
  %32 = load ptr, ptr %7, align 8, !tbaa !27
  %33 = getelementptr inbounds i8, ptr %32, i64 4
  %34 = load i32, ptr %33, align 4, !tbaa !28
  %35 = trunc i32 %34 to i16
  tail call void @lj_ir_set_(ptr noundef nonnull %0, i16 noundef zeroext 17683, i16 noundef zeroext %35, i16 noundef zeroext 0)
  %36 = tail call i32 @lj_opt_fold(ptr noundef nonnull %0) #3
  %37 = trunc i32 %36 to i16
  %38 = tail call i32 @lj_ir_kint(ptr noundef nonnull %0, i32 noundef 1) #3
  %39 = trunc i32 %38 to i16
  tail call void @lj_ir_set_(ptr noundef nonnull %0, i16 noundef zeroext 10515, i16 noundef zeroext %37, i16 noundef zeroext %39)
  %40 = tail call i32 @lj_opt_fold(ptr noundef nonnull %0) #3
  br label %41

41:                                               ; preds = %31, %27
  %.0 = phi i32 [ %30, %27 ], [ %40, %31 ]
  %42 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 0, ptr %42, align 8, !tbaa !31
  tail call void @crec_copy(ptr noundef nonnull %0, i32 noundef %22, i32 noundef %26, i32 noundef %.0, ptr noundef null)
  br label %43

43:                                               ; preds = %16, %41, %2
  ret void
}

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

attributes #0 = { 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 #1 = { "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 = { 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 = { 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, !12, i64 640}
!6 = !{!"GG_State", !7, i64 0, !10, i64 384, !20, i64 800, !8, i64 3312, !8, i64 3440, !8, i64 5384}
!7 = !{!"lua_State", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"global_State", !11, i64 0, !12, i64 8, !12, i64 12, !11, i64 16, !11, i64 24, !13, i64 32, !12, i64 88, !16, i64 92, !17, i64 108, !8, i64 124, !8, i64 125, !8, i64 126, !8, i64 127, !14, i64 128, !8, i64 136, !8, i64 144, !8, i64 152, !18, i64 160, !19, i64 184, !12, i64 208, !12, i64 212, !11, i64 216, !11, i64 224, !11, i64 232, !12, i64 240, !12, i64 244, !14, i64 248, !15, i64 252, !15, i64 256, !8, i64 260}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!"GCState", !12, i64 0, !12, i64 4, !8, i64 8, !8, i64 9, !8, i64 10, !8, i64 11, !12, i64 12, !14, i64 16, !15, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52}
!14 = !{!"GCRef", !12, i64 0}
!15 = !{!"MRef", !12, i64 0}
!16 = !{!"SBuf", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!17 = !{!"GCstr", !14, i64 0, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !12, i64 8, !12, i64 12}
!18 = !{!"Node", !8, i64 0, !8, i64 8, !15, i64 16, !15, i64 20}
!19 = !{!"GCupval", !14, i64 0, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !8, i64 8, !15, i64 16, !12, i64 20}
!20 = !{!"jit_State", !21, i64 0, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !12, i64 136, !12, i64 140, !12, i64 144, !8, i64 148, !8, i64 149, !23, i64 150, !8, i64 151, !24, i64 152, !11, i64 176, !12, i64 184, !12, i64 188, !12, i64 192, !12, i64 196, !12, i64 200, !12, i64 204, !12, i64 208, !15, i64 212, !8, i64 216, !11, i64 256, !12, i64 264, !12, i64 268, !12, i64 272, !12, i64 276, !11, i64 280, !11, i64 288, !12, i64 296, !12, i64 300, !8, i64 304, !11, i64 312, !12, i64 320, !12, i64 324, !11, i64 328, !8, i64 336, !8, i64 536, !8, i64 1556, !8, i64 1616, !8, i64 1744, !12, i64 2256, !12, i64 2260, !8, i64 2264, !12, i64 2392, !25, i64 2396, !11, i64 2416, !12, i64 2424, !12, i64 2428, !11, i64 2432, !12, i64 2440, !12, i64 2444, !11, i64 2448, !11, i64 2456, !11, i64 2464, !26, i64 2472, !26, i64 2480, !8, i64 2488, !11, i64 2496, !12, i64 2504, !12, i64 2508}
!21 = !{!"GCtrace", !14, i64 0, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !12, i64 8, !14, i64 12, !11, i64 16, !12, i64 24, !22, i64 28, !22, i64 30, !11, i64 32, !11, i64 40, !14, i64 48, !15, i64 52, !12, i64 56, !12, i64 60, !11, i64 64, !12, i64 72, !22, i64 76, !22, i64 78, !22, i64 80, !22, i64 82, !22, i64 84, !22, i64 86, !22, i64 88, !8, i64 90, !8, i64 91}
!22 = !{!"short", !8, i64 0}
!23 = !{!"IRType1", !8, i64 0}
!24 = !{!"FoldState", !8, i64 0, !8, i64 8, !8, i64 16}
!25 = !{!"ScEvEntry", !15, i64 0, !22, i64 4, !22, i64 6, !22, i64 8, !22, i64 10, !23, i64 12, !8, i64 13}
!26 = !{!"long", !8, i64 0}
!27 = !{!20, !11, i64 128}
!28 = !{!12, !12, i64 0}
!29 = !{!30, !11, i64 0}
!30 = !{!"RecordFFData", !11, i64 0, !26, i64 8, !12, i64 16}
!31 = !{!30, !26, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass