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

; 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.GChead = type { %struct.GCRef, i8, i8, i8, i8, %struct.GCRef, %struct.GCRef, %struct.GCRef }
%struct.GCRef = type { i32 }
%struct.GCtab = type { %struct.GCRef, i8, i8, i8, i8, %struct.MRef, %struct.GCRef, %struct.GCRef, ptr, %struct.MRef, i32, i32 }
%struct.MRef = type { i32 }
%struct.lua_State = type { %union.anon }
%union.anon = type { %struct.anon, [320 x i8] }
%struct.anon = type { %struct.GCRef, i8, i8, i8, i8, %struct.MRef, %struct.GCRef, ptr, ptr, %struct.MRef, %struct.MRef, %struct.GCRef, %struct.GCRef, ptr, 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.0, %struct.MRef, i32 }
%union.anon.0 = type { %union.TValue }
%struct.anon.3 = type { %struct.GCRef, %union.FrameLink }
%union.FrameLink = type { i32 }
%struct.GCfuncC = type { %struct.GCRef, i8, i8, i8, i8, %struct.GCRef, %struct.GCRef, %struct.MRef, ptr, [1 x %union.TValue] }
%struct.GCfuncL = type { %struct.GCRef, i8, i8, i8, i8, %struct.GCRef, %struct.GCRef, %struct.MRef, [1 x %struct.GCRef] }
%struct.GCproto = type { %struct.GCRef, i8, i8, i8, i8, i32, %struct.GCRef, %struct.MRef, %struct.MRef, i32, i32, i32, i8, i8, i16, %struct.GCRef, i32, i32, %struct.MRef, %struct.MRef, %struct.MRef }

@lj_vm_asm_begin = external hidden global [0 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
define hidden ptr @lj_meta_equal(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %15 = load ptr, ptr %7, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.GChead, ptr %15, i32 0, i32 7
  %17 = getelementptr inbounds %struct.GCRef, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 8, !tbaa !11
  %19 = zext i32 %18 to i64
  %20 = inttoptr i64 %19 to ptr
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %23

22:                                               ; preds = %4
  br label %59

23:                                               ; preds = %4
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.GChead, ptr %24, i32 0, i32 7
  %26 = getelementptr inbounds %struct.GCRef, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 8, !tbaa !11
  %28 = zext i32 %27 to i64
  %29 = inttoptr i64 %28 to ptr
  %30 = getelementptr inbounds %struct.GCtab, ptr %29, i32 0, i32 3
  %31 = load i8, ptr %30, align 2, !tbaa !11
  %32 = zext i8 %31 to i32
  %33 = and i32 %32, 16
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %36

35:                                               ; preds = %23
  br label %57

36:                                               ; preds = %23
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.GChead, ptr %37, i32 0, i32 7
  %39 = getelementptr inbounds %struct.GCRef, ptr %38, i32 0, i32 0
  %40 = load i32, ptr %39, align 8, !tbaa !11
  %41 = zext i32 %40 to i64
  %42 = inttoptr i64 %41 to ptr
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.lua_State, ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds %struct.anon, ptr %44, i32 0, i32 5
  %46 = getelementptr inbounds %struct.MRef, ptr %45, i32 0, i32 0
  %47 = load i32, ptr %46, align 8, !tbaa !11
  %48 = zext i32 %47 to i64
  %49 = inttoptr i64 %48 to ptr
  %50 = getelementptr inbounds %struct.global_State, ptr %49, i32 0, i32 29
  %51 = getelementptr inbounds [38 x %struct.GCRef], ptr %50, i64 0, i64 4
  %52 = getelementptr inbounds %struct.GCRef, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 4, !tbaa !12
  %54 = zext i32 %53 to i64
  %55 = inttoptr i64 %54 to ptr
  %56 = call ptr @lj_meta_cache(ptr noundef %42, i32 noundef 4, ptr noundef %55)
  br label %57

57:                                               ; preds = %36, %35
  %58 = phi ptr [ null, %35 ], [ %56, %36 ]
  br label %59

59:                                               ; preds = %57, %22
  %60 = phi ptr [ null, %22 ], [ %58, %57 ]
  store ptr %60, ptr %10, align 8, !tbaa !5
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %63, label %215

63:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %64 = load ptr, ptr %7, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.GChead, ptr %64, i32 0, i32 7
  %66 = getelementptr inbounds %struct.GCRef, ptr %65, i32 0, i32 0
  %67 = load i32, ptr %66, align 8, !tbaa !11
  %68 = zext i32 %67 to i64
  %69 = inttoptr i64 %68 to ptr
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.GChead, ptr %70, i32 0, i32 7
  %72 = getelementptr inbounds %struct.GCRef, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 8, !tbaa !11
  %74 = zext i32 %73 to i64
  %75 = inttoptr i64 %74 to ptr
  %76 = icmp ne ptr %69, %75
  br i1 %76, label %77, label %139

77:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.GChead, ptr %78, i32 0, i32 7
  %80 = getelementptr inbounds %struct.GCRef, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 8, !tbaa !11
  %82 = zext i32 %81 to i64
  %83 = inttoptr i64 %82 to ptr
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %86

85:                                               ; preds = %77
  br label %122

86:                                               ; preds = %77
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.GChead, ptr %87, i32 0, i32 7
  %89 = getelementptr inbounds %struct.GCRef, ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 8, !tbaa !11
  %91 = zext i32 %90 to i64
  %92 = inttoptr i64 %91 to ptr
  %93 = getelementptr inbounds %struct.GCtab, ptr %92, i32 0, i32 3
  %94 = load i8, ptr %93, align 2, !tbaa !11
  %95 = zext i8 %94 to i32
  %96 = and i32 %95, 16
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %86
  br label %120

99:                                               ; preds = %86
  %100 = load ptr, ptr %8, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.GChead, ptr %100, i32 0, i32 7
  %102 = getelementptr inbounds %struct.GCRef, ptr %101, i32 0, i32 0
  %103 = load i32, ptr %102, align 8, !tbaa !11
  %104 = zext i32 %103 to i64
  %105 = inttoptr i64 %104 to ptr
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.lua_State, ptr %106, i32 0, i32 0
  %108 = getelementptr inbounds %struct.anon, ptr %107, i32 0, i32 5
  %109 = getelementptr inbounds %struct.MRef, ptr %108, i32 0, i32 0
  %110 = load i32, ptr %109, align 8, !tbaa !11
  %111 = zext i32 %110 to i64
  %112 = inttoptr i64 %111 to ptr
  %113 = getelementptr inbounds %struct.global_State, ptr %112, i32 0, i32 29
  %114 = getelementptr inbounds [38 x %struct.GCRef], ptr %113, i64 0, i64 4
  %115 = getelementptr inbounds %struct.GCRef, ptr %114, i32 0, i32 0
  %116 = load i32, ptr %115, align 4, !tbaa !12
  %117 = zext i32 %116 to i64
  %118 = inttoptr i64 %117 to ptr
  %119 = call ptr @lj_meta_cache(ptr noundef %105, i32 noundef 4, ptr noundef %118)
  br label %120

120:                                              ; preds = %99, %98
  %121 = phi ptr [ null, %98 ], [ %119, %99 ]
  br label %122

122:                                              ; preds = %120, %85
  %123 = phi ptr [ null, %85 ], [ %121, %120 ]
  store ptr %123, ptr %13, align 8, !tbaa !5
  %124 = load ptr, ptr %13, align 8, !tbaa !5
  %125 = icmp eq ptr %124, null
  br i1 %125, label %131, label %126

126:                                              ; preds = %122
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = load ptr, ptr %13, align 8, !tbaa !5
  %129 = call i32 @lj_obj_equal(ptr noundef %127, ptr noundef %128)
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %135, label %131

131:                                              ; preds = %126, %122
  %132 = load i32, ptr %9, align 4, !tbaa !9
  %133 = sext i32 %132 to i64
  %134 = inttoptr i64 %133 to ptr
  store ptr %134, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %136

135:                                              ; preds = %126
  store i32 0, ptr %14, align 4
  br label %136

136:                                              ; preds = %135, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  %137 = load i32, ptr %14, align 4
  switch i32 %137, label %214 [
    i32 0, label %138
  ]

138:                                              ; preds = %136
  br label %139

139:                                              ; preds = %138, %63
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.lua_State, ptr %140, i32 0, i32 0
  %142 = getelementptr inbounds %struct.anon, ptr %141, i32 0, i32 7
  %143 = load ptr, ptr %142, align 8, !tbaa !11
  %144 = getelementptr inbounds %union.TValue, ptr %143, i64 -1
  %145 = getelementptr inbounds %struct.anon.3, ptr %144, i32 0, i32 0
  %146 = getelementptr inbounds %struct.GCRef, ptr %145, i32 0, i32 0
  %147 = load i32, ptr %146, align 8, !tbaa !11
  %148 = zext i32 %147 to i64
  %149 = inttoptr i64 %148 to ptr
  %150 = getelementptr inbounds %struct.GCfuncC, ptr %149, i32 0, i32 3
  %151 = load i8, ptr %150, align 2, !tbaa !11
  %152 = zext i8 %151 to i32
  %153 = icmp eq i32 %152, 0
  br i1 %153, label %154, label %180

154:                                              ; preds = %139
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.lua_State, ptr %155, i32 0, i32 0
  %157 = getelementptr inbounds %struct.anon, ptr %156, i32 0, i32 7
  %158 = load ptr, ptr %157, align 8, !tbaa !11
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.lua_State, ptr %159, i32 0, i32 0
  %161 = getelementptr inbounds %struct.anon, ptr %160, i32 0, i32 7
  %162 = load ptr, ptr %161, align 8, !tbaa !11
  %163 = getelementptr inbounds %union.TValue, ptr %162, i64 -1
  %164 = getelementptr inbounds %struct.anon.3, ptr %163, i32 0, i32 0
  %165 = getelementptr inbounds %struct.GCRef, ptr %164, i32 0, i32 0
  %166 = load i32, ptr %165, align 8, !tbaa !11
  %167 = zext i32 %166 to i64
  %168 = inttoptr i64 %167 to ptr
  %169 = getelementptr inbounds %struct.GCfuncL, ptr %168, i32 0, i32 7
  %170 = getelementptr inbounds %struct.MRef, ptr %169, i32 0, i32 0
  %171 = load i32, ptr %170, align 8, !tbaa !11
  %172 = zext i32 %171 to i64
  %173 = inttoptr i64 %172 to ptr
  %174 = getelementptr inbounds i8, ptr %173, i64 -64
  %175 = getelementptr inbounds %struct.GCproto, ptr %174, i32 0, i32 4
  %176 = load i8, ptr %175, align 1, !tbaa !14
  %177 = zext i8 %176 to i32
  %178 = sext i32 %177 to i64
  %179 = getelementptr inbounds %union.TValue, ptr %158, i64 %178
  br label %185

180:                                              ; preds = %139
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.lua_State, ptr %181, i32 0, i32 0
  %183 = getelementptr inbounds %struct.anon, ptr %182, i32 0, i32 8
  %184 = load ptr, ptr %183, align 8, !tbaa !11
  br label %185

185:                                              ; preds = %180, %154
  %186 = phi ptr [ %179, %154 ], [ %184, %180 ]
  store ptr %186, ptr %11, align 8, !tbaa !5
  %187 = load i32, ptr %9, align 4, !tbaa !9
  %188 = icmp ne i32 %187, 0
  %189 = zext i1 %188 to i64
  %190 = select i1 %188, ptr @lj_cont_condf, ptr @lj_cont_condt
  %191 = ptrtoint ptr %190 to i64
  %192 = sub i64 %191, ptrtoint (ptr @lj_vm_asm_begin to i64)
  %193 = load ptr, ptr %11, align 8, !tbaa !5
  %194 = getelementptr inbounds %union.TValue, ptr %193, i32 1
  store ptr %194, ptr %11, align 8, !tbaa !5
  store i64 %192, ptr %193, align 8, !tbaa !11
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = load ptr, ptr %11, align 8, !tbaa !5
  %197 = getelementptr inbounds %union.TValue, ptr %196, i32 1
  store ptr %197, ptr %11, align 8, !tbaa !5
  %198 = load ptr, ptr %10, align 8, !tbaa !5
  call void @copyTV(ptr noundef %195, ptr noundef %196, ptr noundef %198)
  %199 = load ptr, ptr %7, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.GChead, ptr %199, i32 0, i32 2
  %201 = load i8, ptr %200, align 1, !tbaa !11
  %202 = zext i8 %201 to i32
  %203 = xor i32 %202, -1
  store i32 %203, ptr %12, align 4, !tbaa !9
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = load ptr, ptr %11, align 8, !tbaa !5
  %206 = load ptr, ptr %7, align 8, !tbaa !5
  %207 = load i32, ptr %12, align 4, !tbaa !9
  call void @setgcV(ptr noundef %204, ptr noundef %205, ptr noundef %206, i32 noundef %207)
  %208 = load ptr, ptr %6, align 8, !tbaa !5
  %209 = load ptr, ptr %11, align 8, !tbaa !5
  %210 = getelementptr inbounds %union.TValue, ptr %209, i64 1
  %211 = load ptr, ptr %8, align 8, !tbaa !5
  %212 = load i32, ptr %12, align 4, !tbaa !9
  call void @setgcV(ptr noundef %208, ptr noundef %210, ptr noundef %211, i32 noundef %212)
  %213 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %213, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %214

214:                                              ; preds = %185, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %219

215:                                              ; preds = %59
  %216 = load i32, ptr %9, align 4, !tbaa !9
  %217 = sext i32 %216 to i64
  %218 = inttoptr i64 %217 to ptr
  store ptr %218, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %219

219:                                              ; preds = %215, %214
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  %220 = load ptr, ptr %5, align 8
  ret ptr %220
}

declare hidden i32 @lj_obj_equal(ptr noundef, ptr noundef) #3

declare hidden void @lj_cont_condf() #3

declare hidden void @lj_cont_condt() #3

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

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 = { 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 = { "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 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"GCRef", !10, i64 0}
!14 = !{!15, !7, i64 7}
!15 = !{!"GCproto", !13, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !10, i64 8, !13, i64 12, !16, i64 16, !16, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !7, i64 36, !7, i64 37, !17, i64 38, !13, i64 40, !10, i64 44, !10, i64 48, !16, i64 52, !16, i64 56, !16, i64 60}
!16 = !{!"MRef", !10, i64 0}
!17 = !{!"short", !7, i64 0}


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

@lj_vm_asm_begin = external hidden global [0 x i8], align 1

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

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

; Function Attrs: nounwind uwtable
define hidden ptr @lj_meta_equal(ptr noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %1, i64 16
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = zext i32 %6 to i64
  %8 = inttoptr i64 %7 to ptr
  %9 = icmp eq i32 %6, 0
  br i1 %9, label %.thread, label %10

10:                                               ; preds = %4
  %11 = getelementptr inbounds i8, ptr %8, i64 6
  %12 = load i8, ptr %11, align 2, !tbaa !5
  %13 = and i8 %12, 16
  %.not = icmp eq i8 %13, 0
  br i1 %.not, label %14, label %.thread

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load i32, ptr %15, align 8, !tbaa !5
  %17 = zext i32 %16 to i64
  %18 = inttoptr i64 %17 to ptr
  %19 = getelementptr inbounds i8, ptr %18, i64 276
  %20 = load i32, ptr %19, align 4, !tbaa !8
  %21 = zext i32 %20 to i64
  %22 = inttoptr i64 %21 to ptr
  %23 = tail call ptr @lj_meta_cache(ptr noundef nonnull %8, i32 noundef 4, ptr noundef %22)
  %.not41 = icmp eq ptr %23, null
  br i1 %.not41, label %.thread, label %24

24:                                               ; preds = %14
  %25 = load i32, ptr %5, align 8, !tbaa !5
  %26 = zext i32 %25 to i64
  %27 = inttoptr i64 %26 to ptr
  %28 = getelementptr inbounds i8, ptr %2, i64 16
  %29 = load i32, ptr %28, align 8, !tbaa !5
  %30 = zext i32 %29 to i64
  %31 = inttoptr i64 %30 to ptr
  %.not42 = icmp eq ptr %27, %31
  br i1 %.not42, label %.thread49, label %32

32:                                               ; preds = %24
  %33 = icmp eq i32 %29, 0
  br i1 %33, label %.thread48, label %34

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %31, i64 6
  %36 = load i8, ptr %35, align 2, !tbaa !5
  %37 = and i8 %36, 16
  %.not43 = icmp eq i8 %37, 0
  br i1 %.not43, label %38, label %.thread48

38:                                               ; preds = %34
  %39 = load i32, ptr %15, align 8, !tbaa !5
  %40 = zext i32 %39 to i64
  %41 = inttoptr i64 %40 to ptr
  %42 = getelementptr inbounds i8, ptr %41, i64 276
  %43 = load i32, ptr %42, align 4, !tbaa !8
  %44 = zext i32 %43 to i64
  %45 = inttoptr i64 %44 to ptr
  %46 = tail call ptr @lj_meta_cache(ptr noundef nonnull %31, i32 noundef 4, ptr noundef %45)
  %47 = icmp eq ptr %46, null
  br i1 %47, label %.thread48, label %48

48:                                               ; preds = %38
  %49 = tail call i32 @lj_obj_equal(ptr noundef nonnull %23, ptr noundef nonnull %46) #3
  %.not44 = icmp eq i32 %49, 0
  br i1 %.not44, label %.thread48, label %.thread49

.thread48:                                        ; preds = %34, %32, %38, %48
  %50 = sext i32 %3 to i64
  %51 = inttoptr i64 %50 to ptr
  br label %85

.thread49:                                        ; preds = %48, %24
  %52 = getelementptr inbounds i8, ptr %0, i64 16
  %53 = load ptr, ptr %52, align 8, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %53, i64 -8
  %55 = load i32, ptr %54, align 8, !tbaa !5
  %56 = zext i32 %55 to i64
  %57 = inttoptr i64 %56 to ptr
  %58 = getelementptr inbounds i8, ptr %57, i64 6
  %59 = load i8, ptr %58, align 2, !tbaa !5
  %60 = icmp eq i8 %59, 0
  br i1 %60, label %61, label %70

61:                                               ; preds = %.thread49
  %62 = getelementptr inbounds i8, ptr %57, i64 16
  %63 = load i32, ptr %62, align 8, !tbaa !5
  %64 = zext i32 %63 to i64
  %65 = inttoptr i64 %64 to ptr
  %66 = getelementptr inbounds i8, ptr %65, i64 -57
  %67 = load i8, ptr %66, align 1, !tbaa !11
  %68 = zext i8 %67 to i64
  %69 = getelementptr inbounds %union.TValue, ptr %53, i64 %68
  br label %73

70:                                               ; preds = %.thread49
  %71 = getelementptr inbounds i8, ptr %0, i64 24
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  br label %73

73:                                               ; preds = %70, %61
  %74 = phi ptr [ %69, %61 ], [ %72, %70 ]
  %.not45 = icmp eq i32 %3, 0
  %75 = select i1 %.not45, i64 sub (i64 ptrtoint (ptr @lj_cont_condt to i64), i64 ptrtoint (ptr @lj_vm_asm_begin to i64)), i64 sub (i64 ptrtoint (ptr @lj_cont_condf to i64), i64 ptrtoint (ptr @lj_vm_asm_begin to i64))
  %76 = getelementptr inbounds i8, ptr %74, i64 8
  store i64 %75, ptr %74, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %74, i64 16
  tail call void @copyTV(ptr noundef nonnull %0, ptr noundef nonnull %76, ptr noundef nonnull %23)
  %78 = getelementptr inbounds i8, ptr %1, i64 5
  %79 = load i8, ptr %78, align 1, !tbaa !5
  %80 = zext i8 %79 to i32
  %81 = xor i32 %80, -1
  tail call void @setgcV(ptr noundef nonnull %0, ptr noundef nonnull %77, ptr noundef nonnull %1, i32 noundef %81)
  %82 = getelementptr inbounds i8, ptr %74, i64 24
  tail call void @setgcV(ptr noundef nonnull %0, ptr noundef nonnull %82, ptr noundef nonnull %2, i32 noundef %81)
  br label %85

.thread:                                          ; preds = %10, %4, %14
  %83 = sext i32 %3 to i64
  %84 = inttoptr i64 %83 to ptr
  br label %85

85:                                               ; preds = %.thread48, %73, %.thread
  %.2 = phi ptr [ %84, %.thread ], [ %77, %73 ], [ %51, %.thread48 ]
  ret ptr %.2
}

declare hidden i32 @lj_obj_equal(ptr noundef, ptr noundef) local_unnamed_addr #2

declare hidden void @lj_cont_condf() #2

declare hidden void @lj_cont_condt() #2

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @setgcV(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #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 = { 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 }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"GCRef", !10, i64 0}
!10 = !{!"int", !6, i64 0}
!11 = !{!12, !6, i64 7}
!12 = !{!"GCproto", !9, i64 0, !6, i64 4, !6, i64 5, !6, i64 6, !6, i64 7, !10, i64 8, !9, i64 12, !13, i64 16, !13, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !6, i64 36, !6, i64 37, !14, i64 38, !9, i64 40, !10, i64 44, !10, i64 48, !13, i64 52, !13, i64 56, !13, i64 60}
!13 = !{!"MRef", !10, i64 0}
!14 = !{!"short", !6, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass