; 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.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.GCRef = type { i32 }
%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.MRef = type { i32 }
%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 }
%union.TValue = type { i64 }
%struct.RecordFFData = type { ptr, i64, i32 }
%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.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 }
%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.GCcdata = type { %struct.GCRef, i8, i8, i16 }
%struct.CType = type { i32, i32, i16, i16, %struct.GCRef }
%struct.anon.1 = type { %union.anon, i32 }
%union.anon = type { %struct.GCRef }

; Function Attrs: nounwind uwtable
define hidden void @recff_cdata_index(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = 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 4, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %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 !9
  %25 = getelementptr inbounds i32, ptr %24, i64 0
  %26 = load i32, ptr %25, align 4, !tbaa !20
  store i32 %26, ptr %6, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 8, ptr %7, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = load i32, ptr %6, align 4, !tbaa !20
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.RecordFFData, ptr %29, i32 0, i32 0
  %31 = load ptr, ptr %30, align 8, !tbaa !22
  %32 = getelementptr inbounds %union.TValue, ptr %31, i64 0
  %33 = call ptr @argv2cdata(ptr noundef %27, i32 noundef %28, ptr noundef %32)
  store ptr %33, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 -800
  %36 = getelementptr inbounds %struct.GG_State, ptr %35, i32 0, i32 1
  %37 = getelementptr inbounds %struct.global_State, ptr %36, i32 0, i32 28
  %38 = getelementptr inbounds %struct.MRef, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !24
  %40 = zext i32 %39 to i64
  %41 = inttoptr i64 %40 to ptr
  store ptr %41, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.GCcdata, ptr %43, i32 0, i32 3
  %45 = load i16, ptr %44, align 2, !tbaa !33
  %46 = zext i16 %45 to i32
  %47 = call ptr @ctype_raw(ptr noundef %42, i32 noundef %46)
  store ptr %47, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !20
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.CType, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 4, !tbaa !35
  %51 = lshr i32 %50, 28
  %52 = icmp eq i32 %51, 2
  br i1 %52, label %53, label %81

53:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.CType, ptr %54, i32 0, i32 1
  %56 = load i32, ptr %55, align 4, !tbaa !37
  %57 = icmp eq i32 %56, 8
  %58 = zext i1 %57 to i64
  %59 = select i1 %57, i32 9, i32 5
  store i32 %59, ptr %12, align 4, !tbaa !20
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.CType, ptr %60, i32 0, i32 0
  %62 = load i32, ptr %61, align 4, !tbaa !35
  %63 = and i32 %62, -260046848
  %64 = icmp eq i32 %63, 545259520
  br i1 %64, label %65, label %69

65:                                               ; preds = %53
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = call ptr @ctype_rawchild(ptr noundef %66, ptr noundef %67)
  store ptr %68, ptr %10, align 8, !tbaa !5
  br label %69

69:                                               ; preds = %65, %53
  %70 = load ptr, ptr %3, align 8, !tbaa !5
  %71 = load i32, ptr %12, align 4, !tbaa !20
  %72 = or i32 17664, %71
  %73 = trunc i32 %72 to i16
  %74 = load i32, ptr %6, align 4, !tbaa !20
  %75 = trunc i32 %74 to i16
  call void @lj_ir_set_(ptr noundef %70, i16 noundef zeroext %73, i16 noundef zeroext %75, i16 noundef zeroext 15)
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = call i32 @lj_opt_fold(ptr noundef %76)
  store i32 %77, ptr %6, align 4, !tbaa !20
  store i64 0, ptr %7, align 8, !tbaa !21
  %78 = load ptr, ptr %3, align 8, !tbaa !5
  %79 = load i32, ptr %6, align 4, !tbaa !20
  %80 = call i32 @crec_reassoc_ofs(ptr noundef %78, i32 noundef %79, ptr noundef %7, i32 noundef 1)
  store i32 %80, ptr %6, align 4, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %81

81:                                               ; preds = %69, %2
  br label %82

82:                                               ; preds = %468, %81
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.jit_State, ptr %83, i32 0, i32 5
  %85 = load ptr, ptr %84, align 8, !tbaa !9
  %86 = getelementptr inbounds i32, ptr %85, i64 1
  %87 = load i32, ptr %86, align 4, !tbaa !20
  store i32 %87, ptr %5, align 4, !tbaa !20
  %88 = load i32, ptr %5, align 4, !tbaa !20
  %89 = lshr i32 %88, 24
  %90 = and i32 %89, 31
  %91 = sub i32 %90, 14
  %92 = icmp ule i32 %91, 5
  br i1 %92, label %93, label %148

93:                                               ; preds = %82
  %94 = load ptr, ptr %3, align 8, !tbaa !5
  %95 = load i32, ptr %5, align 4, !tbaa !20
  %96 = call i32 @lj_opt_narrow_cindex(ptr noundef %94, i32 noundef %95)
  store i32 %96, ptr %5, align 4, !tbaa !20
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.CType, ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 4, !tbaa !35
  %100 = lshr i32 %99, 28
  %101 = lshr i32 %100, 1
  %102 = icmp eq i32 %101, 1
  br i1 %102, label %103, label %147

103:                                              ; preds = %93
  br label %104

104:                                              ; preds = %249, %103
  %105 = load ptr, ptr %10, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.CType, ptr %105, i32 0, i32 0
  %107 = load i32, ptr %106, align 4, !tbaa !35
  %108 = and i32 %107, 67108864
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %119

110:                                              ; preds = %104
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  %112 = load i32, ptr %5, align 4, !tbaa !20
  %113 = trunc i32 %112 to i16
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = call i32 @lj_ir_kint64(ptr noundef %114, i64 noundef 1)
  %116 = trunc i32 %115 to i16
  call void @lj_ir_set_(ptr noundef %111, i16 noundef zeroext 8469, i16 noundef zeroext %113, i16 noundef zeroext %116)
  %117 = load ptr, ptr %3, align 8, !tbaa !5
  %118 = call i32 @lj_opt_fold(ptr noundef %117)
  store i32 %118, ptr %5, align 4, !tbaa !20
  br label %119

119:                                              ; preds = %110, %104
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.CType, ptr %121, i32 0, i32 0
  %123 = load i32, ptr %122, align 4, !tbaa !35
  %124 = and i32 %123, 65535
  store i32 %124, ptr %11, align 4, !tbaa !20
  %125 = call i32 @lj_ctype_size(ptr noundef %120, i32 noundef %124)
  store i32 %125, ptr %13, align 4, !tbaa !20
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = load i32, ptr %5, align 4, !tbaa !20
  %128 = load i32, ptr %13, align 4, !tbaa !20
  %129 = call i32 @crec_reassoc_ofs(ptr noundef %126, i32 noundef %127, ptr noundef %7, i32 noundef %128)
  store i32 %129, ptr %5, align 4, !tbaa !20
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = load i32, ptr %5, align 4, !tbaa !20
  %132 = trunc i32 %131 to i16
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = load i32, ptr %13, align 4, !tbaa !20
  %135 = zext i32 %134 to i64
  %136 = call i32 @lj_ir_kint64(ptr noundef %133, i64 noundef %135)
  %137 = trunc i32 %136 to i16
  call void @lj_ir_set_(ptr noundef %130, i16 noundef zeroext 11029, i16 noundef zeroext %132, i16 noundef zeroext %137)
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = call i32 @lj_opt_fold(ptr noundef %138)
  store i32 %139, ptr %5, align 4, !tbaa !20
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = load i32, ptr %5, align 4, !tbaa !20
  %142 = trunc i32 %141 to i16
  %143 = load i32, ptr %6, align 4, !tbaa !20
  %144 = trunc i32 %143 to i16
  call void @lj_ir_set_(ptr noundef %140, i16 noundef zeroext 10505, i16 noundef zeroext %142, i16 noundef zeroext %144)
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = call i32 @lj_opt_fold(ptr noundef %145)
  store i32 %146, ptr %6, align 4, !tbaa !20
  br label %147

147:                                              ; preds = %119, %93
  br label %442

148:                                              ; preds = %82
  %149 = load i32, ptr %5, align 4, !tbaa !20
  %150 = and i32 %149, 520093696
  %151 = icmp eq i32 %150, 167772160
  br i1 %151, label %152, label %252

152:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.RecordFFData, ptr %153, i32 0, i32 0
  %155 = load ptr, ptr %154, align 8, !tbaa !22
  %156 = getelementptr inbounds %union.TValue, ptr %155, i64 1
  %157 = getelementptr inbounds %struct.anon.1, ptr %156, i32 0, i32 0
  %158 = getelementptr inbounds %struct.GCRef, ptr %157, i32 0, i32 0
  %159 = load i32, ptr %158, align 8, !tbaa !38
  %160 = zext i32 %159 to i64
  %161 = inttoptr i64 %160 to ptr
  store ptr %161, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %162 = load ptr, ptr %9, align 8, !tbaa !5
  %163 = load ptr, ptr %14, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.GCcdata, ptr %163, i32 0, i32 3
  %165 = load i16, ptr %164, align 2, !tbaa !33
  %166 = zext i16 %165 to i32
  %167 = call ptr @ctype_raw(ptr noundef %162, i32 noundef %166)
  store ptr %167, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  %169 = load ptr, ptr %15, align 8, !tbaa !5
  %170 = call i32 @crec_ct2irt(ptr noundef %168, ptr noundef %169)
  store i32 %170, ptr %16, align 4, !tbaa !20
  %171 = load ptr, ptr %10, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.CType, ptr %171, i32 0, i32 0
  %173 = load i32, ptr %172, align 4, !tbaa !35
  %174 = lshr i32 %173, 28
  %175 = lshr i32 %174, 1
  %176 = icmp eq i32 %175, 1
  br i1 %176, label %177, label %248

177:                                              ; preds = %152
  %178 = load i32, ptr %16, align 4, !tbaa !20
  %179 = icmp uge i32 %178, 15
  br i1 %179, label %180, label %248

180:                                              ; preds = %177
  %181 = load i32, ptr %16, align 4, !tbaa !20
  %182 = icmp ule i32 %181, 22
  br i1 %182, label %183, label %248

183:                                              ; preds = %180
  %184 = load ptr, ptr %15, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.CType, ptr %184, i32 0, i32 1
  %186 = load i32, ptr %185, align 4, !tbaa !37
  %187 = icmp eq i32 %186, 8
  br i1 %187, label %188, label %197

188:                                              ; preds = %183
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = load i32, ptr %16, align 4, !tbaa !20
  %191 = or i32 17664, %190
  %192 = trunc i32 %191 to i16
  %193 = load i32, ptr %5, align 4, !tbaa !20
  %194 = trunc i32 %193 to i16
  call void @lj_ir_set_(ptr noundef %189, i16 noundef zeroext %192, i16 noundef zeroext %194, i16 noundef zeroext 17)
  %195 = load ptr, ptr %3, align 8, !tbaa !5
  %196 = call i32 @lj_opt_fold(ptr noundef %195)
  store i32 %196, ptr %5, align 4, !tbaa !20
  br label %229

197:                                              ; preds = %183
  %198 = load ptr, ptr %15, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.CType, ptr %198, i32 0, i32 1
  %200 = load i32, ptr %199, align 4, !tbaa !37
  %201 = icmp eq i32 %200, 4
  br i1 %201, label %202, label %211

202:                                              ; preds = %197
  %203 = load ptr, ptr %3, align 8, !tbaa !5
  %204 = load i32, ptr %16, align 4, !tbaa !20
  %205 = or i32 17664, %204
  %206 = trunc i32 %205 to i16
  %207 = load i32, ptr %5, align 4, !tbaa !20
  %208 = trunc i32 %207 to i16
  call void @lj_ir_set_(ptr noundef %203, i16 noundef zeroext %206, i16 noundef zeroext %208, i16 noundef zeroext 16)
  %209 = load ptr, ptr %3, align 8, !tbaa !5
  %210 = call i32 @lj_opt_fold(ptr noundef %209)
  store i32 %210, ptr %5, align 4, !tbaa !20
  br label %228

211:                                              ; preds = %197
  %212 = load ptr, ptr %3, align 8, !tbaa !5
  %213 = load i32, ptr %5, align 4, !tbaa !20
  %214 = trunc i32 %213 to i16
  %215 = load ptr, ptr %3, align 8, !tbaa !5
  %216 = call i32 @lj_ir_kint64(ptr noundef %215, i64 noundef 8)
  %217 = trunc i32 %216 to i16
  call void @lj_ir_set_(ptr noundef %212, i16 noundef zeroext 10505, i16 noundef zeroext %214, i16 noundef zeroext %217)
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = call i32 @lj_opt_fold(ptr noundef %218)
  store i32 %219, ptr %5, align 4, !tbaa !20
  %220 = load ptr, ptr %3, align 8, !tbaa !5
  %221 = load i32, ptr %16, align 4, !tbaa !20
  %222 = or i32 17920, %221
  %223 = trunc i32 %222 to i16
  %224 = load i32, ptr %5, align 4, !tbaa !20
  %225 = trunc i32 %224 to i16
  call void @lj_ir_set_(ptr noundef %220, i16 noundef zeroext %223, i16 noundef zeroext %225, i16 noundef zeroext 0)
  %226 = load ptr, ptr %3, align 8, !tbaa !5
  %227 = call i32 @lj_opt_fold(ptr noundef %226)
  store i32 %227, ptr %5, align 4, !tbaa !20
  br label %228

228:                                              ; preds = %211, %202
  br label %229

229:                                              ; preds = %228, %188
  %230 = load ptr, ptr %15, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.CType, ptr %230, i32 0, i32 1
  %232 = load i32, ptr %231, align 4, !tbaa !37
  %233 = zext i32 %232 to i64
  %234 = icmp ult i64 %233, 8
  br i1 %234, label %235, label %247

235:                                              ; preds = %229
  %236 = load ptr, ptr %15, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.CType, ptr %236, i32 0, i32 0
  %238 = load i32, ptr %237, align 4, !tbaa !35
  %239 = and i32 %238, 8388608
  %240 = icmp ne i32 %239, 0
  br i1 %240, label %247, label %241

241:                                              ; preds = %235
  %242 = load ptr, ptr %3, align 8, !tbaa !5
  %243 = load i32, ptr %5, align 4, !tbaa !20
  %244 = trunc i32 %243 to i16
  call void @lj_ir_set_(ptr noundef %242, i16 noundef zeroext 23061, i16 noundef zeroext %244, i16 noundef zeroext 2739)
  %245 = load ptr, ptr %3, align 8, !tbaa !5
  %246 = call i32 @lj_opt_fold(ptr noundef %245)
  store i32 %246, ptr %5, align 4, !tbaa !20
  br label %247

247:                                              ; preds = %241, %235, %229
  store i32 3, ptr %17, align 4
  br label %249

248:                                              ; preds = %180, %177, %152
  store i32 0, ptr %17, align 4
  br label %249

249:                                              ; preds = %248, %247
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  %250 = load i32, ptr %17, align 4
  switch i32 %250, label %559 [
    i32 0, label %251
    i32 3, label %104
  ]

251:                                              ; preds = %249
  br label %441

252:                                              ; preds = %148
  %253 = load i32, ptr %5, align 4, !tbaa !20
  %254 = and i32 %253, 520093696
  %255 = icmp eq i32 %254, 67108864
  br i1 %255, label %256, label %440

256:                                              ; preds = %252
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %257 = load ptr, ptr %4, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.RecordFFData, ptr %257, i32 0, i32 0
  %259 = load ptr, ptr %258, align 8, !tbaa !22
  %260 = getelementptr inbounds %union.TValue, ptr %259, i64 1
  %261 = getelementptr inbounds %struct.anon.1, ptr %260, i32 0, i32 0
  %262 = getelementptr inbounds %struct.GCRef, ptr %261, i32 0, i32 0
  %263 = load i32, ptr %262, align 8, !tbaa !38
  %264 = zext i32 %263 to i64
  %265 = inttoptr i64 %264 to ptr
  store ptr %265, ptr %18, align 8, !tbaa !5
  %266 = load ptr, ptr %8, align 8, !tbaa !5
  %267 = icmp ne ptr %266, null
  br i1 %267, label %268, label %281

268:                                              ; preds = %256
  %269 = load ptr, ptr %8, align 8, !tbaa !5
  %270 = getelementptr inbounds %struct.GCcdata, ptr %269, i32 0, i32 3
  %271 = load i16, ptr %270, align 2, !tbaa !33
  %272 = zext i16 %271 to i32
  %273 = icmp eq i32 %272, 21
  br i1 %273, label %274, label %281

274:                                              ; preds = %268
  %275 = load ptr, ptr %9, align 8, !tbaa !5
  %276 = load ptr, ptr %3, align 8, !tbaa !5
  %277 = load ptr, ptr %8, align 8, !tbaa !5
  %278 = load i32, ptr %6, align 4, !tbaa !20
  %279 = call i32 @crec_constructor(ptr noundef %276, ptr noundef %277, i32 noundef %278)
  %280 = call ptr @ctype_raw(ptr noundef %275, i32 noundef %279)
  store ptr %280, ptr %10, align 8, !tbaa !5
  br label %281

281:                                              ; preds = %274, %268, %256
  %282 = load ptr, ptr %10, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.CType, ptr %282, i32 0, i32 0
  %284 = load i32, ptr %283, align 4, !tbaa !35
  %285 = lshr i32 %284, 28
  %286 = icmp eq i32 %285, 1
  br i1 %286, label %287, label %366

287:                                              ; preds = %281
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %288 = load ptr, ptr %9, align 8, !tbaa !5
  %289 = load ptr, ptr %10, align 8, !tbaa !5
  %290 = load ptr, ptr %18, align 8, !tbaa !5
  %291 = call ptr @lj_ctype_getfieldq(ptr noundef %288, ptr noundef %289, ptr noundef %290, ptr noundef %19, ptr noundef null)
  store ptr %291, ptr %20, align 8, !tbaa !5
  %292 = load ptr, ptr %20, align 8, !tbaa !5
  %293 = icmp ne ptr %292, null
  br i1 %293, label %294, label %362

294:                                              ; preds = %287
  %295 = load ptr, ptr %3, align 8, !tbaa !5
  %296 = load i32, ptr %5, align 4, !tbaa !20
  %297 = trunc i32 %296 to i16
  %298 = load ptr, ptr %3, align 8, !tbaa !5
  %299 = load ptr, ptr %18, align 8, !tbaa !5
  %300 = call i32 @lj_ir_kgc(ptr noundef %298, ptr noundef %299, i32 noundef 4)
  %301 = trunc i32 %300 to i16
  call void @lj_ir_set_(ptr noundef %295, i16 noundef zeroext 2180, i16 noundef zeroext %297, i16 noundef zeroext %301)
  %302 = load ptr, ptr %3, align 8, !tbaa !5
  %303 = call i32 @lj_opt_fold(ptr noundef %302)
  %304 = load ptr, ptr %20, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.CType, ptr %304, i32 0, i32 0
  %306 = load i32, ptr %305, align 4, !tbaa !35
  %307 = lshr i32 %306, 28
  %308 = icmp eq i32 %307, 11
  br i1 %308, label %309, label %343

309:                                              ; preds = %294
  %310 = load ptr, ptr %20, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.CType, ptr %310, i32 0, i32 1
  %312 = load i32, ptr %311, align 4, !tbaa !37
  %313 = icmp uge i32 %312, -2147483648
  br i1 %313, label %314, label %333

314:                                              ; preds = %309
  %315 = load ptr, ptr %9, align 8, !tbaa !5
  %316 = load ptr, ptr %20, align 8, !tbaa !5
  %317 = call ptr @ctype_child(ptr noundef %315, ptr noundef %316)
  %318 = getelementptr inbounds %struct.CType, ptr %317, i32 0, i32 0
  %319 = load i32, ptr %318, align 4, !tbaa !35
  %320 = and i32 %319, 8388608
  %321 = icmp ne i32 %320, 0
  br i1 %321, label %322, label %333

322:                                              ; preds = %314
  %323 = load ptr, ptr %3, align 8, !tbaa !5
  %324 = load ptr, ptr %20, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.CType, ptr %324, i32 0, i32 1
  %326 = load i32, ptr %325, align 4, !tbaa !37
  %327 = uitofp i32 %326 to double
  %328 = call i32 @lj_ir_knum(ptr noundef %323, double noundef %327)
  %329 = load ptr, ptr %3, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.jit_State, ptr %329, i32 0, i32 5
  %331 = load ptr, ptr %330, align 8, !tbaa !9
  %332 = getelementptr inbounds i32, ptr %331, i64 0
  store i32 %328, ptr %332, align 4, !tbaa !20
  store i32 1, ptr %17, align 4
  br label %363

333:                                              ; preds = %314, %309
  %334 = load ptr, ptr %3, align 8, !tbaa !5
  %335 = load ptr, ptr %20, align 8, !tbaa !5
  %336 = getelementptr inbounds %struct.CType, ptr %335, i32 0, i32 1
  %337 = load i32, ptr %336, align 4, !tbaa !37
  %338 = call i32 @lj_ir_kint(ptr noundef %334, i32 noundef %337)
  %339 = load ptr, ptr %3, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.jit_State, ptr %339, i32 0, i32 5
  %341 = load ptr, ptr %340, align 8, !tbaa !9
  %342 = getelementptr inbounds i32, ptr %341, i64 0
  store i32 %338, ptr %342, align 4, !tbaa !20
  store i32 1, ptr %17, align 4
  br label %363

343:                                              ; preds = %294
  %344 = load ptr, ptr %20, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct.CType, ptr %344, i32 0, i32 0
  %346 = load i32, ptr %345, align 4, !tbaa !35
  %347 = lshr i32 %346, 28
  %348 = icmp eq i32 %347, 10
  br i1 %348, label %349, label %351

349:                                              ; preds = %343
  %350 = load ptr, ptr %3, align 8, !tbaa !5
  call void @lj_trace_err(ptr noundef %350, i32 noundef 22) #6
  unreachable

351:                                              ; preds = %343
  %352 = load ptr, ptr %20, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.CType, ptr %352, i32 0, i32 0
  %354 = load i32, ptr %353, align 4, !tbaa !35
  %355 = and i32 %354, 65535
  store i32 %355, ptr %11, align 4, !tbaa !20
  br label %356

356:                                              ; preds = %351
  br label %357

357:                                              ; preds = %356
  %358 = load i32, ptr %19, align 4, !tbaa !20
  %359 = zext i32 %358 to i64
  %360 = load i64, ptr %7, align 8, !tbaa !21
  %361 = add nsw i64 %360, %359
  store i64 %361, ptr %7, align 8, !tbaa !21
  br label %362

362:                                              ; preds = %357, %287
  store i32 0, ptr %17, align 4
  br label %363

363:                                              ; preds = %362, %333, %322
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  %364 = load i32, ptr %17, align 4
  switch i32 %364, label %437 [
    i32 0, label %365
  ]

365:                                              ; preds = %363
  br label %436

366:                                              ; preds = %281
  %367 = load ptr, ptr %10, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct.CType, ptr %367, i32 0, i32 0
  %369 = load i32, ptr %368, align 4, !tbaa !35
  %370 = and i32 %369, -201326592
  %371 = icmp eq i32 %370, 872415232
  br i1 %371, label %372, label %435

372:                                              ; preds = %366
  %373 = load ptr, ptr %18, align 8, !tbaa !5
  %374 = getelementptr inbounds %struct.GCstr, ptr %373, i32 0, i32 6
  %375 = load i32, ptr %374, align 4, !tbaa !39
  %376 = icmp eq i32 %375, 2
  br i1 %376, label %377, label %434

377:                                              ; preds = %372
  %378 = load ptr, ptr %18, align 8, !tbaa !5
  %379 = getelementptr inbounds %struct.GCstr, ptr %378, i64 1
  %380 = getelementptr inbounds i8, ptr %379, i64 0
  %381 = load i8, ptr %380, align 1, !tbaa !38
  %382 = sext i8 %381 to i32
  %383 = icmp eq i32 %382, 114
  br i1 %383, label %384, label %391

384:                                              ; preds = %377
  %385 = load ptr, ptr %18, align 8, !tbaa !5
  %386 = getelementptr inbounds %struct.GCstr, ptr %385, i64 1
  %387 = getelementptr inbounds i8, ptr %386, i64 1
  %388 = load i8, ptr %387, align 1, !tbaa !38
  %389 = sext i8 %388 to i32
  %390 = icmp eq i32 %389, 101
  br i1 %390, label %405, label %391

391:                                              ; preds = %384, %377
  %392 = load ptr, ptr %18, align 8, !tbaa !5
  %393 = getelementptr inbounds %struct.GCstr, ptr %392, i64 1
  %394 = getelementptr inbounds i8, ptr %393, i64 0
  %395 = load i8, ptr %394, align 1, !tbaa !38
  %396 = sext i8 %395 to i32
  %397 = icmp eq i32 %396, 105
  br i1 %397, label %398, label %434

398:                                              ; preds = %391
  %399 = load ptr, ptr %18, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.GCstr, ptr %399, i64 1
  %401 = getelementptr inbounds i8, ptr %400, i64 1
  %402 = load i8, ptr %401, align 1, !tbaa !38
  %403 = sext i8 %402 to i32
  %404 = icmp eq i32 %403, 109
  br i1 %404, label %405, label %434

405:                                              ; preds = %398, %384
  %406 = load ptr, ptr %3, align 8, !tbaa !5
  %407 = load i32, ptr %5, align 4, !tbaa !20
  %408 = trunc i32 %407 to i16
  %409 = load ptr, ptr %3, align 8, !tbaa !5
  %410 = load ptr, ptr %18, align 8, !tbaa !5
  %411 = call i32 @lj_ir_kgc(ptr noundef %409, ptr noundef %410, i32 noundef 4)
  %412 = trunc i32 %411 to i16
  call void @lj_ir_set_(ptr noundef %406, i16 noundef zeroext 2180, i16 noundef zeroext %408, i16 noundef zeroext %412)
  %413 = load ptr, ptr %3, align 8, !tbaa !5
  %414 = call i32 @lj_opt_fold(ptr noundef %413)
  %415 = load ptr, ptr %18, align 8, !tbaa !5
  %416 = getelementptr inbounds %struct.GCstr, ptr %415, i64 1
  %417 = getelementptr inbounds i8, ptr %416, i64 0
  %418 = load i8, ptr %417, align 1, !tbaa !38
  %419 = sext i8 %418 to i32
  %420 = icmp eq i32 %419, 105
  br i1 %420, label %421, label %429

421:                                              ; preds = %405
  %422 = load ptr, ptr %10, align 8, !tbaa !5
  %423 = getelementptr inbounds %struct.CType, ptr %422, i32 0, i32 1
  %424 = load i32, ptr %423, align 4, !tbaa !37
  %425 = lshr i32 %424, 1
  %426 = zext i32 %425 to i64
  %427 = load i64, ptr %7, align 8, !tbaa !21
  %428 = add nsw i64 %427, %426
  store i64 %428, ptr %7, align 8, !tbaa !21
  br label %429

429:                                              ; preds = %421, %405
  %430 = load ptr, ptr %10, align 8, !tbaa !5
  %431 = getelementptr inbounds %struct.CType, ptr %430, i32 0, i32 0
  %432 = load i32, ptr %431, align 4, !tbaa !35
  %433 = and i32 %432, 65535
  store i32 %433, ptr %11, align 4, !tbaa !20
  br label %434

434:                                              ; preds = %429, %398, %391, %372
  br label %435

435:                                              ; preds = %434, %366
  br label %436

436:                                              ; preds = %435, %365
  store i32 0, ptr %17, align 4
  br label %437

437:                                              ; preds = %436, %363
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %438 = load i32, ptr %17, align 4
  switch i32 %438, label %556 [
    i32 0, label %439
  ]

439:                                              ; preds = %437
  br label %440

440:                                              ; preds = %439, %252
  br label %441

441:                                              ; preds = %440, %251
  br label %442

442:                                              ; preds = %441, %147
  %443 = load i32, ptr %11, align 4, !tbaa !20
  %444 = icmp ne i32 %443, 0
  br i1 %444, label %476, label %445

445:                                              ; preds = %442
  %446 = load ptr, ptr %10, align 8, !tbaa !5
  %447 = getelementptr inbounds %struct.CType, ptr %446, i32 0, i32 0
  %448 = load i32, ptr %447, align 4, !tbaa !35
  %449 = lshr i32 %448, 28
  %450 = icmp eq i32 %449, 2
  br i1 %450, label %451, label %471

451:                                              ; preds = %445
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %452 = load ptr, ptr %9, align 8, !tbaa !5
  %453 = load ptr, ptr %10, align 8, !tbaa !5
  %454 = call ptr @ctype_rawchild(ptr noundef %452, ptr noundef %453)
  store ptr %454, ptr %21, align 8, !tbaa !5
  %455 = load ptr, ptr %21, align 8, !tbaa !5
  %456 = getelementptr inbounds %struct.CType, ptr %455, i32 0, i32 0
  %457 = load i32, ptr %456, align 4, !tbaa !35
  %458 = lshr i32 %457, 28
  %459 = icmp eq i32 %458, 1
  br i1 %459, label %460, label %467

460:                                              ; preds = %451
  %461 = load ptr, ptr %21, align 8, !tbaa !5
  store ptr %461, ptr %10, align 8, !tbaa !5
  store ptr null, ptr %8, align 8, !tbaa !5
  %462 = load i32, ptr %5, align 4, !tbaa !20
  %463 = and i32 %462, 520093696
  %464 = icmp eq i32 %463, 67108864
  br i1 %464, label %465, label %466

465:                                              ; preds = %460
  store i32 2, ptr %17, align 4
  br label %468

466:                                              ; preds = %460
  br label %467

467:                                              ; preds = %466, %451
  store i32 0, ptr %17, align 4
  br label %468

468:                                              ; preds = %467, %465
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  %469 = load i32, ptr %17, align 4
  switch i32 %469, label %559 [
    i32 0, label %470
    i32 2, label %82
  ]

470:                                              ; preds = %468
  br label %471

471:                                              ; preds = %470, %445
  %472 = load ptr, ptr %3, align 8, !tbaa !5
  %473 = load ptr, ptr %9, align 8, !tbaa !5
  %474 = load ptr, ptr %10, align 8, !tbaa !5
  %475 = load ptr, ptr %4, align 8, !tbaa !5
  call void @crec_index_meta(ptr noundef %472, ptr noundef %473, ptr noundef %474, ptr noundef %475)
  store i32 1, ptr %17, align 4
  br label %556

476:                                              ; preds = %442
  %477 = load i64, ptr %7, align 8, !tbaa !21
  %478 = icmp ne i64 %477, 0
  br i1 %478, label %479, label %489

479:                                              ; preds = %476
  %480 = load ptr, ptr %3, align 8, !tbaa !5
  %481 = load i32, ptr %6, align 4, !tbaa !20
  %482 = trunc i32 %481 to i16
  %483 = load ptr, ptr %3, align 8, !tbaa !5
  %484 = load i64, ptr %7, align 8, !tbaa !21
  %485 = call i32 @lj_ir_kint64(ptr noundef %483, i64 noundef %484)
  %486 = trunc i32 %485 to i16
  call void @lj_ir_set_(ptr noundef %480, i16 noundef zeroext 10505, i16 noundef zeroext %482, i16 noundef zeroext %486)
  %487 = load ptr, ptr %3, align 8, !tbaa !5
  %488 = call i32 @lj_opt_fold(ptr noundef %487)
  store i32 %488, ptr %6, align 4, !tbaa !20
  br label %489

489:                                              ; preds = %479, %476
  %490 = load ptr, ptr %9, align 8, !tbaa !5
  %491 = load i32, ptr %11, align 4, !tbaa !20
  %492 = call ptr @ctype_get(ptr noundef %490, i32 noundef %491)
  store ptr %492, ptr %10, align 8, !tbaa !5
  %493 = load ptr, ptr %10, align 8, !tbaa !5
  %494 = getelementptr inbounds %struct.CType, ptr %493, i32 0, i32 0
  %495 = load i32, ptr %494, align 4, !tbaa !35
  %496 = and i32 %495, -260046848
  %497 = icmp eq i32 %496, 545259520
  br i1 %497, label %498, label %511

498:                                              ; preds = %489
  %499 = load ptr, ptr %3, align 8, !tbaa !5
  %500 = load i32, ptr %6, align 4, !tbaa !20
  %501 = trunc i32 %500 to i16
  call void @lj_ir_set_(ptr noundef %499, i16 noundef zeroext 17929, i16 noundef zeroext %501, i16 noundef zeroext 0)
  %502 = load ptr, ptr %3, align 8, !tbaa !5
  %503 = call i32 @lj_opt_fold(ptr noundef %502)
  store i32 %503, ptr %6, align 4, !tbaa !20
  %504 = load ptr, ptr %10, align 8, !tbaa !5
  %505 = getelementptr inbounds %struct.CType, ptr %504, i32 0, i32 0
  %506 = load i32, ptr %505, align 4, !tbaa !35
  %507 = and i32 %506, 65535
  store i32 %507, ptr %11, align 4, !tbaa !20
  %508 = load ptr, ptr %9, align 8, !tbaa !5
  %509 = load i32, ptr %11, align 4, !tbaa !20
  %510 = call ptr @ctype_get(ptr noundef %508, i32 noundef %509)
  store ptr %510, ptr %10, align 8, !tbaa !5
  br label %511

511:                                              ; preds = %498, %489
  br label %512

512:                                              ; preds = %518, %511
  %513 = load ptr, ptr %10, align 8, !tbaa !5
  %514 = getelementptr inbounds %struct.CType, ptr %513, i32 0, i32 0
  %515 = load i32, ptr %514, align 4, !tbaa !35
  %516 = lshr i32 %515, 28
  %517 = icmp eq i32 %516, 8
  br i1 %517, label %518, label %522

518:                                              ; preds = %512
  %519 = load ptr, ptr %9, align 8, !tbaa !5
  %520 = load ptr, ptr %10, align 8, !tbaa !5
  %521 = call ptr @ctype_child(ptr noundef %519, ptr noundef %520)
  store ptr %521, ptr %10, align 8, !tbaa !5
  br label %512, !llvm.loop !40

522:                                              ; preds = %512
  %523 = load ptr, ptr %4, align 8, !tbaa !5
  %524 = getelementptr inbounds %struct.RecordFFData, ptr %523, i32 0, i32 2
  %525 = load i32, ptr %524, align 8, !tbaa !42
  %526 = icmp eq i32 %525, 0
  br i1 %526, label %527, label %537

527:                                              ; preds = %522
  %528 = load ptr, ptr %3, align 8, !tbaa !5
  %529 = load ptr, ptr %10, align 8, !tbaa !5
  %530 = load i32, ptr %11, align 4, !tbaa !20
  %531 = load i32, ptr %6, align 4, !tbaa !20
  %532 = call i32 @crec_tv_ct(ptr noundef %528, ptr noundef %529, i32 noundef %530, i32 noundef %531)
  %533 = load ptr, ptr %3, align 8, !tbaa !5
  %534 = getelementptr inbounds %struct.jit_State, ptr %533, i32 0, i32 5
  %535 = load ptr, ptr %534, align 8, !tbaa !9
  %536 = getelementptr inbounds i32, ptr %535, i64 0
  store i32 %532, ptr %536, align 4, !tbaa !20
  br label %555

537:                                              ; preds = %522
  %538 = load ptr, ptr %4, align 8, !tbaa !5
  %539 = getelementptr inbounds %struct.RecordFFData, ptr %538, i32 0, i32 1
  store i64 0, ptr %539, align 8, !tbaa !43
  %540 = load ptr, ptr %3, align 8, !tbaa !5
  %541 = getelementptr inbounds %struct.jit_State, ptr %540, i32 0, i32 10
  store i8 1, ptr %541, align 1, !tbaa !44
  %542 = load ptr, ptr %3, align 8, !tbaa !5
  %543 = load ptr, ptr %10, align 8, !tbaa !5
  %544 = load i32, ptr %6, align 4, !tbaa !20
  %545 = load ptr, ptr %3, align 8, !tbaa !5
  %546 = getelementptr inbounds %struct.jit_State, ptr %545, i32 0, i32 5
  %547 = load ptr, ptr %546, align 8, !tbaa !9
  %548 = getelementptr inbounds i32, ptr %547, i64 2
  %549 = load i32, ptr %548, align 4, !tbaa !20
  %550 = load ptr, ptr %4, align 8, !tbaa !5
  %551 = getelementptr inbounds %struct.RecordFFData, ptr %550, i32 0, i32 0
  %552 = load ptr, ptr %551, align 8, !tbaa !22
  %553 = getelementptr inbounds %union.TValue, ptr %552, i64 2
  %554 = call i32 @crec_ct_tv(ptr noundef %542, ptr noundef %543, i32 noundef %544, i32 noundef %549, ptr noundef %553)
  br label %555

555:                                              ; preds = %537, %527
  store i32 0, ptr %17, align 4
  br label %556

556:                                              ; preds = %555, %471, %437
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #5
  %557 = load i32, ptr %17, align 4
  switch i32 %557, label %559 [
    i32 0, label %558
    i32 1, label %558
  ]

558:                                              ; preds = %556, %556
  ret void

559:                                              ; preds = %556, %468, %249
  unreachable
}

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

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

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

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

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

declare hidden i32 @lj_opt_fold(ptr noundef) #3

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

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

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

declare hidden i32 @lj_ir_kint64(ptr noundef, i64 noundef) #3

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

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

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

declare hidden ptr @lj_ctype_getfieldq(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

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

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

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

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

; Function Attrs: noreturn
declare hidden void @lj_trace_err(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind uwtable
declare hidden void @crec_index_meta(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

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

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

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

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 = { 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 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

!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, !6, i64 128}
!10 = !{!"jit_State", !11, 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, !16, i64 150, !7, i64 151, !17, 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, !15, 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, !18, 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, !19, i64 2472, !19, i64 2480, !7, i64 2488, !6, i64 2496, !13, i64 2504, !13, i64 2508}
!11 = !{!"GCtrace", !12, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !13, i64 8, !12, i64 12, !6, i64 16, !13, i64 24, !14, i64 28, !14, i64 30, !6, i64 32, !6, i64 40, !12, i64 48, !15, i64 52, !13, i64 56, !13, i64 60, !6, i64 64, !13, i64 72, !14, i64 76, !14, i64 78, !14, i64 80, !14, i64 82, !14, i64 84, !14, i64 86, !14, i64 88, !7, i64 90, !7, i64 91}
!12 = !{!"GCRef", !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!"MRef", !13, i64 0}
!16 = !{!"IRType1", !7, i64 0}
!17 = !{!"FoldState", !7, i64 0, !7, i64 8, !7, i64 16}
!18 = !{!"ScEvEntry", !15, i64 0, !14, i64 4, !14, i64 6, !14, i64 8, !14, i64 10, !16, i64 12, !7, i64 13}
!19 = !{!"long", !7, i64 0}
!20 = !{!13, !13, i64 0}
!21 = !{!19, !19, i64 0}
!22 = !{!23, !6, i64 0}
!23 = !{!"RecordFFData", !6, i64 0, !19, i64 8, !13, i64 16}
!24 = !{!25, !13, i64 640}
!25 = !{!"GG_State", !26, i64 0, !27, i64 384, !10, i64 800, !7, i64 3312, !7, i64 3440, !7, i64 5384}
!26 = !{!"lua_State", !7, i64 0}
!27 = !{!"global_State", !6, i64 0, !13, i64 8, !13, i64 12, !6, i64 16, !6, i64 24, !28, i64 32, !13, i64 88, !29, i64 92, !30, i64 108, !7, i64 124, !7, i64 125, !7, i64 126, !7, i64 127, !12, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !31, i64 160, !32, i64 184, !13, i64 208, !13, i64 212, !6, i64 216, !6, i64 224, !6, i64 232, !13, i64 240, !13, i64 244, !12, i64 248, !15, i64 252, !15, i64 256, !7, i64 260}
!28 = !{!"GCState", !13, i64 0, !13, i64 4, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !13, i64 12, !12, i64 16, !15, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52}
!29 = !{!"SBuf", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12}
!30 = !{!"GCstr", !12, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !13, i64 8, !13, i64 12}
!31 = !{!"Node", !7, i64 0, !7, i64 8, !15, i64 16, !15, i64 20}
!32 = !{!"GCupval", !12, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !15, i64 16, !13, i64 20}
!33 = !{!34, !14, i64 6}
!34 = !{!"GCcdata", !12, i64 0, !7, i64 4, !7, i64 5, !14, i64 6}
!35 = !{!36, !13, i64 0}
!36 = !{!"CType", !13, i64 0, !13, i64 4, !14, i64 8, !14, i64 10, !12, i64 12}
!37 = !{!36, !13, i64 4}
!38 = !{!7, !7, i64 0}
!39 = !{!30, !13, i64 12}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!23, !13, i64 16}
!43 = !{!23, !19, i64 8}
!44 = !{!10, !7, i64 149}


; 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: nounwind uwtable
define hidden void @recff_cdata_index(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i64, align 8
  %4 = alloca i32, align 4
  %5 = getelementptr inbounds i8, ptr %0, i64 128
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = load i32, ptr %6, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i64 8, ptr %3, align 8, !tbaa !20
  %8 = load ptr, ptr %1, align 8, !tbaa !21
  %9 = tail call ptr @argv2cdata(ptr noundef %0, i32 noundef %7, ptr noundef %8)
  %10 = getelementptr inbounds i8, ptr %0, i64 -160
  %11 = load i32, ptr %10, align 8, !tbaa !23
  %12 = zext i32 %11 to i64
  %13 = inttoptr i64 %12 to ptr
  %14 = getelementptr inbounds i8, ptr %9, i64 6
  %15 = load i16, ptr %14, align 2, !tbaa !32
  %16 = zext i16 %15 to i32
  %17 = tail call ptr @ctype_raw(ptr noundef %13, i32 noundef %16)
  %18 = load i32, ptr %17, align 4, !tbaa !34
  %.mask = and i32 %18, -268435456
  %19 = icmp eq i32 %.mask, 536870912
  br i1 %19, label %20, label %.preheader

20:                                               ; preds = %2
  %21 = getelementptr inbounds i8, ptr %17, i64 4
  %22 = load i32, ptr %21, align 4, !tbaa !36
  %23 = icmp eq i32 %22, 8
  %24 = and i32 %18, 545259520
  %25 = icmp eq i32 %24, 545259520
  br i1 %25, label %26, label %28

26:                                               ; preds = %20
  %27 = tail call ptr @ctype_rawchild(ptr noundef %13, ptr noundef nonnull %17)
  br label %28

28:                                               ; preds = %26, %20
  %.0178 = phi ptr [ %27, %26 ], [ %17, %20 ]
  %29 = select i1 %23, i16 17673, i16 17669
  %30 = trunc i32 %7 to i16
  tail call void @lj_ir_set_(ptr noundef nonnull %0, i16 noundef zeroext %29, i16 noundef zeroext %30, i16 noundef zeroext 15)
  %31 = tail call i32 @lj_opt_fold(ptr noundef nonnull %0) #5
  store i64 0, ptr %3, align 8, !tbaa !20
  %32 = call i32 @crec_reassoc_ofs(ptr noundef nonnull %0, i32 noundef %31, ptr noundef nonnull %3, i32 noundef 1)
  br label %.preheader

.preheader:                                       ; preds = %28, %2
  %.2180.ph = phi ptr [ %17, %2 ], [ %.0178, %28 ]
  %.1167.ph = phi i32 [ %7, %2 ], [ %32, %28 ]
  br label %33

33:                                               ; preds = %.preheader, %189
  %.2180 = phi ptr [ %.6, %189 ], [ %.2180.ph, %.preheader ]
  %.0171 = phi ptr [ %.2173, %189 ], [ %9, %.preheader ]
  %.1167 = phi i32 [ %.2168232, %189 ], [ %.1167.ph, %.preheader ]
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 4
  %36 = load i32, ptr %35, align 4, !tbaa !19
  %37 = lshr i32 %36, 24
  %38 = and i32 %37, 30
  %39 = add nsw i32 %38, -14
  %40 = icmp ult i32 %39, 6
  br i1 %40, label %41, label %65

41:                                               ; preds = %33
  %42 = call i32 @lj_opt_narrow_cindex(ptr noundef nonnull %0, i32 noundef %36) #5
  %43 = load i32, ptr %.2180, align 4, !tbaa !34
  %.mask202 = and i32 %43, -536870912
  %44 = icmp eq i32 %.mask202, 536870912
  br i1 %44, label %.thread, label %.thread225

.thread:                                          ; preds = %91, %98, %101, %41
  %.0 = phi i32 [ %42, %41 ], [ %95, %91 ], [ %103, %101 ], [ %95, %98 ]
  %45 = load i32, ptr %.2180, align 4, !tbaa !34
  %46 = and i32 %45, 67108864
  %.not203 = icmp eq i32 %46, 0
  br i1 %.not203, label %52, label %47

47:                                               ; preds = %.thread
  %48 = trunc i32 %.0 to i16
  %49 = call i32 @lj_ir_kint64(ptr noundef nonnull %0, i64 noundef 1) #5
  %50 = trunc i32 %49 to i16
  call void @lj_ir_set_(ptr noundef nonnull %0, i16 noundef zeroext 8469, i16 noundef zeroext %48, i16 noundef zeroext %50)
  %51 = call i32 @lj_opt_fold(ptr noundef nonnull %0) #5
  %.pre247 = load i32, ptr %.2180, align 4, !tbaa !34
  br label %52

52:                                               ; preds = %47, %.thread
  %53 = phi i32 [ %.pre247, %47 ], [ %45, %.thread ]
  %.1 = phi i32 [ %51, %47 ], [ %.0, %.thread ]
  %54 = and i32 %53, 65535
  %55 = call i32 @lj_ctype_size(ptr noundef %13, i32 noundef %54) #5
  %56 = call i32 @crec_reassoc_ofs(ptr noundef nonnull %0, i32 noundef %.1, ptr noundef nonnull %3, i32 noundef %55)
  %57 = trunc i32 %56 to i16
  %58 = zext i32 %55 to i64
  %59 = call i32 @lj_ir_kint64(ptr noundef nonnull %0, i64 noundef %58) #5
  %60 = trunc i32 %59 to i16
  call void @lj_ir_set_(ptr noundef nonnull %0, i16 noundef zeroext 11029, i16 noundef zeroext %57, i16 noundef zeroext %60)
  %61 = call i32 @lj_opt_fold(ptr noundef nonnull %0) #5
  %62 = trunc i32 %61 to i16
  %63 = trunc i32 %.1167 to i16
  call void @lj_ir_set_(ptr noundef nonnull %0, i16 noundef zeroext 10505, i16 noundef zeroext %62, i16 noundef zeroext %63)
  %64 = call i32 @lj_opt_fold(ptr noundef nonnull %0) #5
  br label %.thread217

65:                                               ; preds = %33
  %66 = and i32 %36, 520093696
  switch i32 %66, label %.thread225 [
    i32 167772160, label %67
    i32 67108864, label %104
  ]

67:                                               ; preds = %65
  %68 = load ptr, ptr %1, align 8, !tbaa !21
  %69 = getelementptr inbounds i8, ptr %68, i64 8
  %70 = load i32, ptr %69, align 8, !tbaa !37
  %71 = zext i32 %70 to i64
  %72 = inttoptr i64 %71 to ptr
  %73 = getelementptr inbounds i8, ptr %72, i64 6
  %74 = load i16, ptr %73, align 2, !tbaa !32
  %75 = zext i16 %74 to i32
  %76 = call ptr @ctype_raw(ptr noundef %13, i32 noundef %75)
  %77 = call i32 @crec_ct2irt(ptr noundef %13, ptr noundef %76)
  %78 = load i32, ptr %.2180, align 4, !tbaa !34
  %.mask200 = and i32 %78, -536870912
  %79 = icmp eq i32 %.mask200, 536870912
  %80 = add i32 %77, -15
  %81 = icmp ult i32 %80, 8
  %or.cond4 = select i1 %79, i1 %81, i1 false
  br i1 %or.cond4, label %82, label %.thread225

82:                                               ; preds = %67
  %83 = getelementptr inbounds i8, ptr %76, i64 4
  %84 = load i32, ptr %83, align 4, !tbaa !36
  switch i32 %84, label %86 [
    i32 8, label %91
    i32 4, label %85
  ]

85:                                               ; preds = %82
  br label %91

86:                                               ; preds = %82
  %87 = trunc i32 %36 to i16
  %88 = call i32 @lj_ir_kint64(ptr noundef nonnull %0, i64 noundef 8) #5
  %89 = trunc i32 %88 to i16
  call void @lj_ir_set_(ptr noundef nonnull %0, i16 noundef zeroext 10505, i16 noundef zeroext %87, i16 noundef zeroext %89)
  %90 = call i32 @lj_opt_fold(ptr noundef nonnull %0) #5
  br label %91

91:                                               ; preds = %82, %85, %86
  %.sink255 = phi i16 [ 17664, %85 ], [ 17920, %86 ], [ 17664, %82 ]
  %.sink253 = phi i32 [ %36, %85 ], [ %90, %86 ], [ %36, %82 ]
  %.sink252 = phi i16 [ 16, %85 ], [ 0, %86 ], [ 17, %82 ]
  %92 = trunc nuw i32 %77 to i16
  %93 = or disjoint i16 %.sink255, %92
  %94 = trunc i32 %.sink253 to i16
  call void @lj_ir_set_(ptr noundef nonnull %0, i16 noundef zeroext %93, i16 noundef zeroext %94, i16 noundef zeroext %.sink252)
  %95 = call i32 @lj_opt_fold(ptr noundef nonnull %0) #5
  %96 = load i32, ptr %83, align 4, !tbaa !36
  %97 = icmp ult i32 %96, 8
  br i1 %97, label %98, label %.thread

98:                                               ; preds = %91
  %99 = load i32, ptr %76, align 4, !tbaa !34
  %100 = and i32 %99, 8388608
  %.not201 = icmp eq i32 %100, 0
  br i1 %.not201, label %101, label %.thread

101:                                              ; preds = %98
  %102 = trunc i32 %95 to i16
  call void @lj_ir_set_(ptr noundef nonnull %0, i16 noundef zeroext 23061, i16 noundef zeroext %102, i16 noundef zeroext 2739)
  %103 = call i32 @lj_opt_fold(ptr noundef nonnull %0) #5
  br label %.thread

104:                                              ; preds = %65
  %105 = load ptr, ptr %1, align 8, !tbaa !21
  %106 = getelementptr inbounds i8, ptr %105, i64 8
  %107 = load i32, ptr %106, align 8, !tbaa !37
  %108 = zext i32 %107 to i64
  %109 = inttoptr i64 %108 to ptr
  %.not = icmp eq ptr %.0171, null
  br i1 %.not, label %117, label %110

110:                                              ; preds = %104
  %111 = getelementptr inbounds i8, ptr %.0171, i64 6
  %112 = load i16, ptr %111, align 2, !tbaa !32
  %113 = icmp eq i16 %112, 21
  br i1 %113, label %114, label %117

114:                                              ; preds = %110
  %115 = call i32 @crec_constructor(ptr noundef %0, ptr noundef nonnull %.0171, i32 noundef %.1167)
  %116 = call ptr @ctype_raw(ptr noundef %13, i32 noundef %115)
  br label %117

117:                                              ; preds = %114, %110, %104
  %.3181 = phi ptr [ %116, %114 ], [ %.2180, %110 ], [ %.2180, %104 ]
  %118 = load i32, ptr %.3181, align 4, !tbaa !34
  %.mask197 = and i32 %118, -268435456
  %119 = icmp eq i32 %.mask197, 268435456
  br i1 %119, label %120, label %150

120:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %121 = call ptr @lj_ctype_getfieldq(ptr noundef %13, ptr noundef nonnull %.3181, ptr noundef %109, ptr noundef nonnull %4, ptr noundef null) #5
  %.not198 = icmp eq ptr %121, null
  br i1 %.not198, label %.thread221, label %122

122:                                              ; preds = %120
  %123 = trunc i32 %36 to i16
  %124 = call i32 @lj_ir_kgc(ptr noundef %0, ptr noundef %109, i32 noundef 4) #5
  %125 = trunc i32 %124 to i16
  call void @lj_ir_set_(ptr noundef %0, i16 noundef zeroext 2180, i16 noundef zeroext %123, i16 noundef zeroext %125)
  %126 = call i32 @lj_opt_fold(ptr noundef %0) #5
  %127 = load i32, ptr %121, align 4, !tbaa !34
  %128 = lshr i32 %127, 28
  switch i32 %128, label %144 [
    i32 11, label %129
    i32 10, label %143
  ]

129:                                              ; preds = %122
  %130 = getelementptr inbounds i8, ptr %121, i64 4
  %131 = load i32, ptr %130, align 4, !tbaa !36
  %132 = icmp slt i32 %131, 0
  br i1 %132, label %133, label %140

133:                                              ; preds = %129
  %134 = call ptr @ctype_child(ptr noundef %13, ptr noundef nonnull %121)
  %135 = load i32, ptr %134, align 4, !tbaa !34
  %136 = and i32 %135, 8388608
  %.not199 = icmp eq i32 %136, 0
  %.pre = load i32, ptr %130, align 4, !tbaa !36
  br i1 %.not199, label %140, label %137

137:                                              ; preds = %133
  %138 = uitofp i32 %.pre to double
  %139 = call i32 @lj_ir_knum(ptr noundef %0, double noundef %138)
  br label %185

140:                                              ; preds = %133, %129
  %141 = phi i32 [ %.pre, %133 ], [ %131, %129 ]
  %142 = call i32 @lj_ir_kint(ptr noundef %0, i32 noundef %141) #5
  br label %185

143:                                              ; preds = %122
  call void @lj_trace_err(ptr noundef %0, i32 noundef 22) #6
  unreachable

144:                                              ; preds = %122
  %145 = and i32 %127, 65535
  %146 = load i32, ptr %4, align 4, !tbaa !19
  %147 = zext i32 %146 to i64
  %148 = load i64, ptr %3, align 8, !tbaa !20
  %149 = add nsw i64 %148, %147
  store i64 %149, ptr %3, align 8, !tbaa !20
  br label %.thread221

150:                                              ; preds = %117
  %151 = and i32 %118, -201326592
  %152 = icmp eq i32 %151, 872415232
  br i1 %152, label %153, label %.thread225

153:                                              ; preds = %150
  %154 = getelementptr inbounds i8, ptr %109, i64 12
  %155 = load i32, ptr %154, align 4, !tbaa !38
  %156 = icmp eq i32 %155, 2
  br i1 %156, label %157, label %.thread225

157:                                              ; preds = %153
  %158 = getelementptr inbounds i8, ptr %109, i64 16
  %159 = load i8, ptr %158, align 1, !tbaa !37
  switch i8 %159, label %.thread225 [
    i8 114, label %160
    i8 105, label %164
  ]

160:                                              ; preds = %157
  %161 = getelementptr inbounds i8, ptr %109, i64 17
  %162 = load i8, ptr %161, align 1, !tbaa !37
  %163 = icmp eq i8 %162, 101
  br i1 %163, label %168, label %.thread225

164:                                              ; preds = %157
  %165 = getelementptr inbounds i8, ptr %109, i64 17
  %166 = load i8, ptr %165, align 1, !tbaa !37
  %167 = icmp eq i8 %166, 109
  br i1 %167, label %168, label %.thread225

168:                                              ; preds = %164, %160
  %169 = trunc i32 %36 to i16
  %170 = call i32 @lj_ir_kgc(ptr noundef %0, ptr noundef nonnull %109, i32 noundef 4) #5
  %171 = trunc i32 %170 to i16
  call void @lj_ir_set_(ptr noundef %0, i16 noundef zeroext 2180, i16 noundef zeroext %169, i16 noundef zeroext %171)
  %172 = call i32 @lj_opt_fold(ptr noundef %0) #5
  %173 = load i8, ptr %158, align 1, !tbaa !37
  %174 = icmp eq i8 %173, 105
  br i1 %174, label %175, label %182

175:                                              ; preds = %168
  %176 = getelementptr inbounds i8, ptr %.3181, i64 4
  %177 = load i32, ptr %176, align 4, !tbaa !36
  %178 = lshr i32 %177, 1
  %179 = zext nneg i32 %178 to i64
  %180 = load i64, ptr %3, align 8, !tbaa !20
  %181 = add nsw i64 %180, %179
  store i64 %181, ptr %3, align 8, !tbaa !20
  br label %182

182:                                              ; preds = %175, %168
  %183 = load i32, ptr %.3181, align 4, !tbaa !34
  %184 = and i32 %183, 65535
  br label %.thread217

.thread221:                                       ; preds = %144, %120
  %.2186.ph = phi i32 [ 0, %120 ], [ %145, %144 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %.thread217

185:                                              ; preds = %137, %140
  %.sink = phi i32 [ %139, %137 ], [ %142, %140 ]
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %.sink, ptr %186, align 4, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  br label %235

.thread217:                                       ; preds = %182, %.thread221, %52
  %.5189 = phi i32 [ %54, %52 ], [ %.2186.ph, %.thread221 ], [ %184, %182 ]
  %.4182 = phi ptr [ %.2180, %52 ], [ %.3181, %.thread221 ], [ %.3181, %182 ]
  %.2168 = phi i32 [ %64, %52 ], [ %.1167, %.thread221 ], [ %.1167, %182 ]
  %.5 = phi i32 [ %61, %52 ], [ %36, %.thread221 ], [ %36, %182 ]
  %.not204 = icmp eq i32 %.5189, 0
  br i1 %.not204, label %.thread225, label %196

.thread225:                                       ; preds = %157, %160, %164, %153, %150, %67, %65, %41, %.thread217
  %.5233 = phi i32 [ %.5, %.thread217 ], [ %36, %67 ], [ %36, %65 ], [ %42, %41 ], [ %36, %150 ], [ %36, %153 ], [ %36, %164 ], [ %36, %160 ], [ %36, %157 ]
  %.2168232 = phi i32 [ %.2168, %.thread217 ], [ %.1167, %67 ], [ %.1167, %65 ], [ %.1167, %41 ], [ %.1167, %150 ], [ %.1167, %153 ], [ %.1167, %164 ], [ %.1167, %160 ], [ %.1167, %157 ]
  %.4182231 = phi ptr [ %.4182, %.thread217 ], [ %.2180, %67 ], [ %.2180, %65 ], [ %.2180, %41 ], [ %.3181, %150 ], [ %.3181, %153 ], [ %.3181, %164 ], [ %.3181, %160 ], [ %.3181, %157 ]
  %187 = load i32, ptr %.4182231, align 4, !tbaa !34
  %.mask205 = and i32 %187, -268435456
  %188 = icmp eq i32 %.mask205, 536870912
  br i1 %188, label %189, label %195

189:                                              ; preds = %.thread225
  %190 = call ptr @ctype_rawchild(ptr noundef %13, ptr noundef nonnull %.4182231)
  %191 = load i32, ptr %190, align 4, !tbaa !34
  %.mask206 = and i32 %191, -268435456
  %192 = icmp ne i32 %.mask206, 268435456
  %193 = and i32 %.5233, 520093696
  %194 = icmp ne i32 %193, 67108864
  %.6 = select i1 %192, ptr %.4182231, ptr %190
  %.not241 = select i1 %192, i1 true, i1 %194
  %.2173 = select i1 %192, ptr %.0171, ptr null
  br i1 %.not241, label %195, label %33

195:                                              ; preds = %189, %.thread225
  %.7 = phi ptr [ %.6, %189 ], [ %.4182231, %.thread225 ]
  call void @crec_index_meta(ptr noundef %0, ptr noundef %13, ptr noundef %.7, ptr noundef nonnull %1)
  br label %235

196:                                              ; preds = %.thread217
  %197 = load i64, ptr %3, align 8, !tbaa !20
  %.not207 = icmp eq i64 %197, 0
  br i1 %.not207, label %203, label %198

198:                                              ; preds = %196
  %199 = trunc i32 %.2168 to i16
  %200 = call i32 @lj_ir_kint64(ptr noundef %0, i64 noundef %197) #5
  %201 = trunc i32 %200 to i16
  call void @lj_ir_set_(ptr noundef %0, i16 noundef zeroext 10505, i16 noundef zeroext %199, i16 noundef zeroext %201)
  %202 = call i32 @lj_opt_fold(ptr noundef %0) #5
  br label %203

203:                                              ; preds = %198, %196
  %.3169 = phi i32 [ %202, %198 ], [ %.2168, %196 ]
  %204 = call ptr @ctype_get(ptr noundef %13, i32 noundef %.5189)
  %205 = load i32, ptr %204, align 4, !tbaa !34
  %206 = and i32 %205, -260046848
  %207 = icmp eq i32 %206, 545259520
  br i1 %207, label %208, label %214

208:                                              ; preds = %203
  %209 = trunc i32 %.3169 to i16
  call void @lj_ir_set_(ptr noundef %0, i16 noundef zeroext 17929, i16 noundef zeroext %209, i16 noundef zeroext 0)
  %210 = call i32 @lj_opt_fold(ptr noundef %0) #5
  %211 = load i32, ptr %204, align 4, !tbaa !34
  %212 = and i32 %211, 65535
  %213 = call ptr @ctype_get(ptr noundef %13, i32 noundef %212)
  %.pre248 = load i32, ptr %213, align 4, !tbaa !34
  br label %214

214:                                              ; preds = %208, %203
  %215 = phi i32 [ %.pre248, %208 ], [ %205, %203 ]
  %.6190 = phi i32 [ %212, %208 ], [ %.5189, %203 ]
  %.8 = phi ptr [ %213, %208 ], [ %204, %203 ]
  %.4170 = phi i32 [ %210, %208 ], [ %.3169, %203 ]
  %.mask208243 = and i32 %215, -268435456
  %216 = icmp eq i32 %.mask208243, -2147483648
  br i1 %216, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %214, %.lr.ph
  %.9244 = phi ptr [ %217, %.lr.ph ], [ %.8, %214 ]
  %217 = call ptr @ctype_child(ptr noundef %13, ptr noundef nonnull %.9244)
  %218 = load i32, ptr %217, align 4, !tbaa !34
  %.mask208 = and i32 %218, -268435456
  %219 = icmp eq i32 %.mask208, -2147483648
  br i1 %219, label %.lr.ph, label %._crit_edge, !llvm.loop !39

._crit_edge:                                      ; preds = %.lr.ph, %214
  %.9.lcssa = phi ptr [ %.8, %214 ], [ %217, %.lr.ph ]
  %220 = getelementptr inbounds i8, ptr %1, i64 16
  %221 = load i32, ptr %220, align 8, !tbaa !41
  %222 = icmp eq i32 %221, 0
  br i1 %222, label %223, label %226

223:                                              ; preds = %._crit_edge
  %224 = call i32 @crec_tv_ct(ptr noundef %0, ptr noundef nonnull %.9.lcssa, i32 noundef %.6190, i32 noundef %.4170)
  %225 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %224, ptr %225, align 4, !tbaa !19
  br label %235

226:                                              ; preds = %._crit_edge
  %227 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 0, ptr %227, align 8, !tbaa !42
  %228 = getelementptr inbounds i8, ptr %0, i64 149
  store i8 1, ptr %228, align 1, !tbaa !43
  %229 = load ptr, ptr %5, align 8, !tbaa !5
  %230 = getelementptr inbounds i8, ptr %229, i64 8
  %231 = load i32, ptr %230, align 4, !tbaa !19
  %232 = load ptr, ptr %1, align 8, !tbaa !21
  %233 = getelementptr inbounds i8, ptr %232, i64 16
  %234 = call i32 @crec_ct_tv(ptr noundef %0, ptr noundef nonnull %.9.lcssa, i32 noundef %.4170, i32 noundef %231, ptr noundef nonnull %233)
  br label %235

235:                                              ; preds = %185, %223, %226, %195
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret void
}

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

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

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

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

; 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 #2

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

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

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

declare hidden i32 @lj_opt_narrow_cindex(ptr noundef, i32 noundef) local_unnamed_addr #3

declare hidden i32 @lj_ir_kint64(ptr noundef, i64 noundef) local_unnamed_addr #3

declare hidden i32 @lj_ctype_size(ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

declare hidden ptr @lj_ctype_getfieldq(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare hidden i32 @lj_ir_kgc(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: noreturn
declare hidden void @lj_trace_err(ptr noundef, i32 noundef) local_unnamed_addr #4

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @crec_tv_ct(ptr noundef, ptr noundef, i32 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 #0

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 willreturn memory(argmem: readwrite) }
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 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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 128}
!6 = !{!"jit_State", !7, i64 0, !12, i64 96, !12, i64 104, !12, i64 112, !12, i64 120, !12, i64 128, !9, i64 136, !9, i64 140, !9, i64 144, !10, i64 148, !10, i64 149, !15, i64 150, !10, i64 151, !16, i64 152, !12, i64 176, !9, i64 184, !9, i64 188, !9, i64 192, !9, i64 196, !9, i64 200, !9, i64 204, !9, i64 208, !14, i64 212, !10, i64 216, !12, i64 256, !9, i64 264, !9, i64 268, !9, i64 272, !9, i64 276, !12, i64 280, !12, i64 288, !9, i64 296, !9, i64 300, !10, i64 304, !12, i64 312, !9, i64 320, !9, i64 324, !12, i64 328, !10, i64 336, !10, i64 536, !10, i64 1556, !10, i64 1616, !10, i64 1744, !9, i64 2256, !9, i64 2260, !10, i64 2264, !9, i64 2392, !17, i64 2396, !12, i64 2416, !9, i64 2424, !9, i64 2428, !12, i64 2432, !9, i64 2440, !9, i64 2444, !12, i64 2448, !12, i64 2456, !12, i64 2464, !18, i64 2472, !18, i64 2480, !10, i64 2488, !12, i64 2496, !9, i64 2504, !9, i64 2508}
!7 = !{!"GCtrace", !8, i64 0, !10, i64 4, !10, i64 5, !10, i64 6, !10, i64 7, !9, i64 8, !8, i64 12, !12, i64 16, !9, i64 24, !13, i64 28, !13, i64 30, !12, i64 32, !12, i64 40, !8, i64 48, !14, i64 52, !9, i64 56, !9, i64 60, !12, i64 64, !9, i64 72, !13, i64 76, !13, i64 78, !13, i64 80, !13, i64 82, !13, i64 84, !13, i64 86, !13, i64 88, !10, i64 90, !10, i64 91}
!8 = !{!"GCRef", !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!"any pointer", !10, i64 0}
!13 = !{!"short", !10, i64 0}
!14 = !{!"MRef", !9, i64 0}
!15 = !{!"IRType1", !10, i64 0}
!16 = !{!"FoldState", !10, i64 0, !10, i64 8, !10, i64 16}
!17 = !{!"ScEvEntry", !14, i64 0, !13, i64 4, !13, i64 6, !13, i64 8, !13, i64 10, !15, i64 12, !10, i64 13}
!18 = !{!"long", !10, i64 0}
!19 = !{!9, !9, i64 0}
!20 = !{!18, !18, i64 0}
!21 = !{!22, !12, i64 0}
!22 = !{!"RecordFFData", !12, i64 0, !18, i64 8, !9, i64 16}
!23 = !{!24, !9, i64 640}
!24 = !{!"GG_State", !25, i64 0, !26, i64 384, !6, i64 800, !10, i64 3312, !10, i64 3440, !10, i64 5384}
!25 = !{!"lua_State", !10, i64 0}
!26 = !{!"global_State", !12, i64 0, !9, i64 8, !9, i64 12, !12, i64 16, !12, i64 24, !27, i64 32, !9, i64 88, !28, i64 92, !29, i64 108, !10, i64 124, !10, i64 125, !10, i64 126, !10, i64 127, !8, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !30, i64 160, !31, i64 184, !9, i64 208, !9, i64 212, !12, i64 216, !12, i64 224, !12, i64 232, !9, i64 240, !9, i64 244, !8, i64 248, !14, i64 252, !14, i64 256, !10, i64 260}
!27 = !{!"GCState", !9, i64 0, !9, i64 4, !10, i64 8, !10, i64 9, !10, i64 10, !10, i64 11, !9, i64 12, !8, i64 16, !14, i64 20, !8, i64 24, !8, i64 28, !8, i64 32, !8, i64 36, !9, i64 40, !9, i64 44, !9, i64 48, !9, i64 52}
!28 = !{!"SBuf", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12}
!29 = !{!"GCstr", !8, i64 0, !10, i64 4, !10, i64 5, !10, i64 6, !10, i64 7, !9, i64 8, !9, i64 12}
!30 = !{!"Node", !10, i64 0, !10, i64 8, !14, i64 16, !14, i64 20}
!31 = !{!"GCupval", !8, i64 0, !10, i64 4, !10, i64 5, !10, i64 6, !10, i64 7, !10, i64 8, !14, i64 16, !9, i64 20}
!32 = !{!33, !13, i64 6}
!33 = !{!"GCcdata", !8, i64 0, !10, i64 4, !10, i64 5, !13, i64 6}
!34 = !{!35, !9, i64 0}
!35 = !{!"CType", !9, i64 0, !9, i64 4, !13, i64 8, !13, i64 10, !8, i64 12}
!36 = !{!35, !9, i64 4}
!37 = !{!10, !10, i64 0}
!38 = !{!29, !9, i64 12}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!22, !9, i64 16}
!42 = !{!22, !18, i64 8}
!43 = !{!6, !10, i64 149}


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