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

; 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.ASMState = type { [32 x i32], ptr, ptr, ptr, ptr, %struct.x86ModRM, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [32 x i16], [250 x i16] }
%struct.x86ModRM = type { i32, i8, i8, i8 }
%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.SnapShot = type { i16, i16, i8, i8, i8, i8 }

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

declare hidden void @lj_mcode_sync(ptr noundef, ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define hidden void @lj_asm_trace(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.ASMState, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 880, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store ptr %5, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = call i32 @lj_ir_nextins(ptr noundef %10)
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.jit_State, ptr %12, i32 0, i32 0
  %14 = getelementptr inbounds %struct.GCtrace, ptr %13, i32 0, i32 5
  store i32 %11, ptr %14, align 8, !tbaa !9
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.jit_State, ptr %15, i32 0, i32 0
  %17 = getelementptr inbounds %struct.GCtrace, ptr %16, i32 0, i32 7
  %18 = load ptr, ptr %17, align 8, !tbaa !20
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.jit_State, ptr %19, i32 0, i32 0
  %21 = getelementptr inbounds %struct.GCtrace, ptr %20, i32 0, i32 5
  %22 = load i32, ptr %21, align 8, !tbaa !9
  %23 = zext i32 %22 to i64
  %24 = getelementptr inbounds %union.IRIns, ptr %18, i64 %23
  %25 = getelementptr inbounds %struct.anon.0, ptr %24, i32 0, i32 2
  store i8 12, ptr %25, align 1, !tbaa !21
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.ASMState, ptr %27, i32 0, i32 4
  store ptr %26, ptr %28, align 8, !tbaa !22
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.ASMState, ptr %30, i32 0, i32 26
  store ptr %29, ptr %31, align 8, !tbaa !25
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.GCtrace, ptr %32, i32 0, i32 7
  %34 = load ptr, ptr %33, align 8, !tbaa !26
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.ASMState, ptr %35, i32 0, i32 3
  store ptr %34, ptr %36, align 8, !tbaa !27
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.jit_State, ptr %37, i32 0, i32 6
  %39 = load i32, ptr %38, align 8, !tbaa !28
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ASMState, ptr %40, i32 0, i32 10
  store i32 %39, ptr %41, align 8, !tbaa !29
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.jit_State, ptr %42, i32 0, i32 27
  %44 = load i32, ptr %43, align 8, !tbaa !30
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.ASMState, ptr %45, i32 0, i32 23
  store i32 %44, ptr %46, align 4, !tbaa !31
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ASMState, ptr %47, i32 0, i32 33
  store ptr null, ptr %48, align 8, !tbaa !32
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ASMState, ptr %49, i32 0, i32 11
  store i32 0, ptr %50, align 4, !tbaa !33
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.jit_State, ptr %51, i32 0, i32 49
  %53 = load i32, ptr %52, align 8, !tbaa !34
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %68

55:                                               ; preds = %2
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.jit_State, ptr %56, i32 0, i32 34
  %58 = load ptr, ptr %57, align 8, !tbaa !35
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.jit_State, ptr %59, i32 0, i32 49
  %61 = load i32, ptr %60, align 8, !tbaa !34
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds %struct.GCRef, ptr %58, i64 %62
  %64 = getelementptr inbounds %struct.GCRef, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 4, !tbaa !36
  %66 = zext i32 %65 to i64
  %67 = inttoptr i64 %66 to ptr
  br label %69

68:                                               ; preds = %2
  br label %69

69:                                               ; preds = %68, %55
  %70 = phi ptr [ %67, %55 ], [ null, %68 ]
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ASMState, ptr %71, i32 0, i32 27
  store ptr %70, ptr %72, align 8, !tbaa !37
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.ASMState, ptr %74, i32 0, i32 28
  %76 = call ptr @lj_mcode_reserve(ptr noundef %73, ptr noundef %75)
  store ptr %76, ptr %7, align 8, !tbaa !5
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.ASMState, ptr %77, i32 0, i32 29
  store ptr %76, ptr %78, align 8, !tbaa !38
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.ASMState, ptr %79, i32 0, i32 29
  %81 = load ptr, ptr %80, align 8, !tbaa !38
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.ASMState, ptr %82, i32 0, i32 1
  store ptr %81, ptr %83, align 8, !tbaa !39
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ASMState, ptr %84, i32 0, i32 28
  %86 = load ptr, ptr %85, align 8, !tbaa !40
  %87 = getelementptr inbounds i8, ptr %86, i64 64
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.ASMState, ptr %88, i32 0, i32 2
  store ptr %87, ptr %89, align 8, !tbaa !41
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asm_setup_target(ptr noundef %90)
  br label %91

91:                                               ; preds = %205, %69
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ASMState, ptr %92, i32 0, i32 29
  %94 = load ptr, ptr %93, align 8, !tbaa !38
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ASMState, ptr %95, i32 0, i32 1
  store ptr %94, ptr %96, align 8, !tbaa !39
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.GCtrace, ptr %97, i32 0, i32 5
  %99 = load i32, ptr %98, align 8, !tbaa !42
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ASMState, ptr %100, i32 0, i32 14
  store i32 %99, ptr %101, align 8, !tbaa !43
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asm_tail_prep(ptr noundef %102)
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.ASMState, ptr %103, i32 0, i32 30
  store ptr null, ptr %104, align 8, !tbaa !44
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.ASMState, ptr %105, i32 0, i32 32
  store ptr null, ptr %106, align 8, !tbaa !45
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ASMState, ptr %107, i32 0, i32 24
  store i32 0, ptr %108, align 8, !tbaa !46
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ASMState, ptr %109, i32 0, i32 25
  store i32 0, ptr %110, align 4, !tbaa !47
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.ASMState, ptr %111, i32 0, i32 23
  %113 = load i32, ptr %112, align 4, !tbaa !31
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ASMState, ptr %114, i32 0, i32 22
  store i32 %113, ptr %115, align 8, !tbaa !48
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ASMState, ptr %116, i32 0, i32 10
  %118 = load i32, ptr %117, align 8, !tbaa !29
  %119 = and i32 %118, 33554432
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %125

121:                                              ; preds = %91
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ASMState, ptr %122, i32 0, i32 23
  %124 = load i32, ptr %123, align 4, !tbaa !31
  br label %126

125:                                              ; preds = %91
  br label %126

126:                                              ; preds = %125, %121
  %127 = phi i32 [ %124, %121 ], [ -1, %125 ]
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ASMState, ptr %128, i32 0, i32 21
  store i32 %127, ptr %129, align 4, !tbaa !49
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asm_setup_regsp(ptr noundef %130)
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.ASMState, ptr %131, i32 0, i32 23
  %133 = load i32, ptr %132, align 4, !tbaa !31
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %137, label %135

135:                                              ; preds = %126
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asm_tail_link(ptr noundef %136)
  br label %137

137:                                              ; preds = %135, %126
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.ASMState, ptr %138, i32 0, i32 14
  %140 = load i32, ptr %139, align 8, !tbaa !43
  %141 = add i32 %140, -1
  store i32 %141, ptr %139, align 8, !tbaa !43
  br label %142

142:                                              ; preds = %199, %137
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.ASMState, ptr %143, i32 0, i32 14
  %145 = load i32, ptr %144, align 8, !tbaa !43
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.ASMState, ptr %146, i32 0, i32 15
  %148 = load i32, ptr %147, align 4, !tbaa !50
  %149 = icmp ugt i32 %145, %148
  br i1 %149, label %150, label %204

150:                                              ; preds = %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.ASMState, ptr %151, i32 0, i32 3
  %153 = load ptr, ptr %152, align 8, !tbaa !27
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.ASMState, ptr %154, i32 0, i32 14
  %156 = load i32, ptr %155, align 8, !tbaa !43
  %157 = zext i32 %156 to i64
  %158 = getelementptr inbounds %union.IRIns, ptr %153, i64 %157
  store ptr %158, ptr %8, align 8, !tbaa !5
  %159 = load ptr, ptr %8, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.anon.0, ptr %159, i32 0, i32 3
  %161 = load i8, ptr %160, align 2, !tbaa !21
  %162 = zext i8 %161 to i32
  %163 = and i32 %162, 128
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %182

165:                                              ; preds = %150
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.anon.0, ptr %166, i32 0, i32 4
  %168 = load i8, ptr %167, align 1, !tbaa !21
  %169 = zext i8 %168 to i32
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %182, label %171

171:                                              ; preds = %165
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  %173 = call i32 @ir_sideeff(ptr noundef %172)
  %174 = icmp ne i32 %173, 0
  br i1 %174, label %182, label %175

175:                                              ; preds = %171
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.ASMState, ptr %176, i32 0, i32 10
  %178 = load i32, ptr %177, align 8, !tbaa !29
  %179 = and i32 %178, 262144
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %181, label %182

181:                                              ; preds = %175
  store i32 6, ptr %9, align 4
  br label %196

182:                                              ; preds = %175, %171, %165, %150
  %183 = load ptr, ptr %8, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.anon.0, ptr %183, i32 0, i32 1
  %185 = getelementptr inbounds %struct.IRType1, ptr %184, i32 0, i32 0
  %186 = load i8, ptr %185, align 4, !tbaa !21
  %187 = zext i8 %186 to i32
  %188 = and i32 %187, 128
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %192

190:                                              ; preds = %182
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asm_snap_prep(ptr noundef %191)
  br label %192

192:                                              ; preds = %190, %182
  %193 = load ptr, ptr %6, align 8, !tbaa !5
  call void @checkmclim(ptr noundef %193)
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  call void @asm_ir(ptr noundef %194, ptr noundef %195)
  store i32 0, ptr %9, align 4
  br label %196

196:                                              ; preds = %192, %181
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %197 = load i32, ptr %9, align 4
  switch i32 %197, label %303 [
    i32 0, label %198
    i32 6, label %199
  ]

198:                                              ; preds = %196
  br label %199

199:                                              ; preds = %198, %196
  %200 = load ptr, ptr %6, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.ASMState, ptr %200, i32 0, i32 14
  %202 = load i32, ptr %201, align 8, !tbaa !43
  %203 = add i32 %202, -1
  store i32 %203, ptr %201, align 8, !tbaa !43
  br label %142, !llvm.loop !51

204:                                              ; preds = %142
  br label %205

205:                                              ; preds = %204
  %206 = load ptr, ptr %6, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.ASMState, ptr %206, i32 0, i32 33
  %208 = load ptr, ptr %207, align 8, !tbaa !32
  %209 = icmp ne ptr %208, null
  br i1 %209, label %91, label %210, !llvm.loop !53

210:                                              ; preds = %205
  %211 = load ptr, ptr %6, align 8, !tbaa !5
  call void @checkmclim(ptr noundef %211)
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.ASMState, ptr %212, i32 0, i32 25
  %214 = load i32, ptr %213, align 4, !tbaa !47
  %215 = icmp sgt i32 %214, 0
  br i1 %215, label %216, label %230

216:                                              ; preds = %210
  %217 = load ptr, ptr %6, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.ASMState, ptr %217, i32 0, i32 26
  %219 = load ptr, ptr %218, align 8, !tbaa !25
  %220 = getelementptr inbounds %struct.GCtrace, ptr %219, i32 0, i32 11
  %221 = load ptr, ptr %220, align 8, !tbaa !54
  %222 = getelementptr inbounds %struct.SnapShot, ptr %221, i64 0
  %223 = getelementptr inbounds %struct.SnapShot, ptr %222, i32 0, i32 1
  %224 = load i16, ptr %223, align 2, !tbaa !55
  %225 = zext i16 %224 to i32
  %226 = load ptr, ptr %6, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.ASMState, ptr %226, i32 0, i32 14
  store i32 %225, ptr %227, align 8, !tbaa !43
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asm_snap_prep(ptr noundef %228)
  %229 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asm_gc_check(ptr noundef %229)
  br label %230

230:                                              ; preds = %216, %210
  %231 = load ptr, ptr %6, align 8, !tbaa !5
  call void @ra_evictk(ptr noundef %231)
  %232 = load ptr, ptr %6, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.ASMState, ptr %232, i32 0, i32 27
  %234 = load ptr, ptr %233, align 8, !tbaa !37
  %235 = icmp ne ptr %234, null
  br i1 %235, label %236, label %238

236:                                              ; preds = %230
  %237 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asm_head_side(ptr noundef %237)
  br label %240

238:                                              ; preds = %230
  %239 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asm_head_root(ptr noundef %239)
  br label %240

240:                                              ; preds = %238, %236
  %241 = load ptr, ptr %6, align 8, !tbaa !5
  call void @asm_phi_fixup(ptr noundef %241)
  %242 = load ptr, ptr %6, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.ASMState, ptr %242, i32 0, i32 6
  %244 = load i32, ptr %243, align 8, !tbaa !57
  %245 = icmp ne i32 %244, -17
  br i1 %245, label %246, label %250

246:                                              ; preds = %240
  %247 = load ptr, ptr %6, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.ASMState, ptr %247, i32 0, i32 4
  %249 = load ptr, ptr %248, align 8, !tbaa !22
  call void @lj_trace_err(ptr noundef %249, i32 noundef 31) #6
  unreachable

250:                                              ; preds = %240
  %251 = load ptr, ptr %6, align 8, !tbaa !5
  %252 = getelementptr inbounds %struct.ASMState, ptr %251, i32 0, i32 1
  %253 = load ptr, ptr %252, align 8, !tbaa !39
  %254 = load ptr, ptr %4, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.GCtrace, ptr %254, i32 0, i32 17
  store ptr %253, ptr %255, align 8, !tbaa !58
  %256 = load ptr, ptr %6, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct.ASMState, ptr %256, i32 0, i32 30
  %258 = load ptr, ptr %257, align 8, !tbaa !44
  %259 = icmp ne ptr %258, null
  br i1 %259, label %260, label %271

260:                                              ; preds = %250
  %261 = load ptr, ptr %6, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct.ASMState, ptr %261, i32 0, i32 30
  %263 = load ptr, ptr %262, align 8, !tbaa !44
  %264 = load ptr, ptr %6, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.ASMState, ptr %264, i32 0, i32 1
  %266 = load ptr, ptr %265, align 8, !tbaa !39
  %267 = ptrtoint ptr %263 to i64
  %268 = ptrtoint ptr %266 to i64
  %269 = sub i64 %267, %268
  %270 = trunc i64 %269 to i32
  br label %272

271:                                              ; preds = %250
  br label %272

272:                                              ; preds = %271, %260
  %273 = phi i32 [ %270, %260 ], [ 0, %271 ]
  %274 = load ptr, ptr %4, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.GCtrace, ptr %274, i32 0, i32 18
  store i32 %273, ptr %275, align 8, !tbaa !59
  %276 = load ptr, ptr %6, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.ASMState, ptr %276, i32 0, i32 23
  %278 = load i32, ptr %277, align 4, !tbaa !31
  %279 = icmp ne i32 %278, 0
  br i1 %279, label %286, label %280

280:                                              ; preds = %272
  %281 = load ptr, ptr %6, align 8, !tbaa !5
  %282 = load ptr, ptr %4, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.GCtrace, ptr %282, i32 0, i32 22
  %284 = load i16, ptr %283, align 2, !tbaa !60
  %285 = zext i16 %284 to i32
  call void @asm_tail_fixup(ptr noundef %281, i32 noundef %285)
  br label %286

286:                                              ; preds = %280, %272
  %287 = load ptr, ptr %6, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.ASMState, ptr %287, i32 0, i32 29
  %289 = load ptr, ptr %288, align 8, !tbaa !38
  %290 = load ptr, ptr %6, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.ASMState, ptr %290, i32 0, i32 1
  %292 = load ptr, ptr %291, align 8, !tbaa !39
  %293 = ptrtoint ptr %289 to i64
  %294 = ptrtoint ptr %292 to i64
  %295 = sub i64 %293, %294
  %296 = trunc i64 %295 to i32
  %297 = load ptr, ptr %4, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.GCtrace, ptr %297, i32 0, i32 16
  store i32 %296, ptr %298, align 4, !tbaa !61
  %299 = load ptr, ptr %4, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.GCtrace, ptr %299, i32 0, i32 17
  %301 = load ptr, ptr %300, align 8, !tbaa !58
  %302 = load ptr, ptr %7, align 8, !tbaa !5
  call void @lj_mcode_sync(ptr noundef %301, ptr noundef %302)
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 880, ptr %5) #5
  ret void

303:                                              ; preds = %196
  unreachable
}

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

declare hidden ptr @lj_mcode_reserve(ptr noundef, ptr noundef) #1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { alwaysinline nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !13, i64 8}
!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 = !{!10, !6, i64 16}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !6, i64 152}
!23 = !{!"ASMState", !7, i64 0, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !24, i64 160, !13, i64 168, !13, i64 172, !13, i64 176, !13, i64 180, !13, i64 184, !13, i64 188, !13, i64 192, !13, i64 196, !13, i64 200, !13, i64 204, !13, i64 208, !13, i64 212, !13, i64 216, !13, i64 220, !13, i64 224, !13, i64 228, !13, i64 232, !13, i64 236, !13, i64 240, !13, i64 244, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !7, i64 312, !7, i64 376}
!24 = !{!"", !13, i64 0, !7, i64 4, !7, i64 5, !7, i64 6}
!25 = !{!23, !6, i64 248}
!26 = !{!11, !6, i64 16}
!27 = !{!23, !6, i64 144}
!28 = !{!10, !13, i64 136}
!29 = !{!23, !13, i64 184}
!30 = !{!10, !13, i64 272}
!31 = !{!23, !13, i64 236}
!32 = !{!23, !6, i64 304}
!33 = !{!23, !13, i64 188}
!34 = !{!10, !13, i64 2424}
!35 = !{!10, !6, i64 312}
!36 = !{!12, !13, i64 0}
!37 = !{!23, !6, i64 256}
!38 = !{!23, !6, i64 272}
!39 = !{!23, !6, i64 128}
!40 = !{!23, !6, i64 264}
!41 = !{!23, !6, i64 136}
!42 = !{!11, !13, i64 8}
!43 = !{!23, !13, i64 200}
!44 = !{!23, !6, i64 280}
!45 = !{!23, !6, i64 296}
!46 = !{!23, !13, i64 240}
!47 = !{!23, !13, i64 244}
!48 = !{!23, !13, i64 232}
!49 = !{!23, !13, i64 228}
!50 = !{!23, !13, i64 204}
!51 = distinct !{!51, !52}
!52 = !{!"llvm.loop.mustprogress"}
!53 = distinct !{!53, !52}
!54 = !{!11, !6, i64 32}
!55 = !{!56, !14, i64 2}
!56 = !{!"SnapShot", !14, i64 0, !14, i64 2, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7}
!57 = !{!23, !13, i64 168}
!58 = !{!11, !6, i64 64}
!59 = !{!11, !13, i64 72}
!60 = !{!11, !14, i64 82}
!61 = !{!11, !13, i64 60}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ASMState = type { [32 x i32], ptr, ptr, ptr, ptr, %struct.x86ModRM, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [32 x i16], [250 x i16] }
%struct.x86ModRM = type { i32, i8, i8, i8 }
%union.IRIns = type { %struct.anon.0 }
%struct.anon.0 = type { i32, %struct.IRType1, i8, i8, i8 }
%struct.IRType1 = type { i8 }
%struct.GCRef = type { i32 }

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

declare hidden void @lj_mcode_sync(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define hidden void @lj_asm_trace(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca %struct.ASMState, align 8
  call void @llvm.lifetime.start.p0(i64 880, ptr nonnull %3) #5
  %4 = tail call i32 @lj_ir_nextins(ptr noundef %0)
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 %4, ptr %5, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = load ptr, ptr %6, align 8, !tbaa !19
  %8 = zext i32 %4 to i64
  %9 = getelementptr inbounds %union.IRIns, ptr %7, i64 %8, i32 0, i32 2
  store i8 12, ptr %9, align 1, !tbaa !20
  %10 = getelementptr inbounds i8, ptr %3, i64 152
  store ptr %0, ptr %10, align 8, !tbaa !21
  %11 = getelementptr inbounds i8, ptr %3, i64 248
  store ptr %1, ptr %11, align 8, !tbaa !24
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !25
  %14 = getelementptr inbounds i8, ptr %3, i64 144
  store ptr %13, ptr %14, align 8, !tbaa !26
  %15 = getelementptr inbounds i8, ptr %0, i64 136
  %16 = load i32, ptr %15, align 8, !tbaa !27
  %17 = getelementptr inbounds i8, ptr %3, i64 184
  store i32 %16, ptr %17, align 8, !tbaa !28
  %18 = getelementptr inbounds i8, ptr %0, i64 272
  %19 = load i32, ptr %18, align 8, !tbaa !29
  %20 = getelementptr inbounds i8, ptr %3, i64 236
  store i32 %19, ptr %20, align 4, !tbaa !30
  %21 = getelementptr inbounds i8, ptr %3, i64 304
  store ptr null, ptr %21, align 8, !tbaa !31
  %22 = getelementptr inbounds i8, ptr %3, i64 188
  store i32 0, ptr %22, align 4, !tbaa !32
  %23 = getelementptr inbounds i8, ptr %0, i64 2424
  %24 = load i32, ptr %23, align 8, !tbaa !33
  %.not = icmp eq i32 %24, 0
  br i1 %.not, label %33, label %25

25:                                               ; preds = %2
  %26 = getelementptr inbounds i8, ptr %0, i64 312
  %27 = load ptr, ptr %26, align 8, !tbaa !34
  %28 = zext i32 %24 to i64
  %29 = getelementptr inbounds %struct.GCRef, ptr %27, i64 %28
  %30 = load i32, ptr %29, align 4, !tbaa !35
  %31 = zext i32 %30 to i64
  %32 = inttoptr i64 %31 to ptr
  br label %33

33:                                               ; preds = %2, %25
  %34 = phi ptr [ %32, %25 ], [ null, %2 ]
  %35 = getelementptr inbounds i8, ptr %3, i64 256
  store ptr %34, ptr %35, align 8, !tbaa !36
  %36 = getelementptr inbounds i8, ptr %3, i64 264
  %37 = call ptr @lj_mcode_reserve(ptr noundef nonnull %0, ptr noundef nonnull %36) #5
  %38 = getelementptr inbounds i8, ptr %3, i64 272
  store ptr %37, ptr %38, align 8, !tbaa !37
  %39 = getelementptr inbounds i8, ptr %3, i64 128
  store ptr %37, ptr %39, align 8, !tbaa !38
  %40 = load ptr, ptr %36, align 8, !tbaa !39
  %41 = getelementptr inbounds i8, ptr %40, i64 64
  %42 = getelementptr inbounds i8, ptr %3, i64 136
  store ptr %41, ptr %42, align 8, !tbaa !40
  call void @asm_setup_target(ptr noundef nonnull %3)
  %43 = getelementptr inbounds i8, ptr %1, i64 8
  %44 = getelementptr inbounds i8, ptr %3, i64 200
  %45 = getelementptr inbounds i8, ptr %3, i64 280
  %46 = getelementptr inbounds i8, ptr %3, i64 296
  %47 = getelementptr inbounds i8, ptr %3, i64 240
  %48 = getelementptr inbounds i8, ptr %3, i64 244
  %49 = getelementptr inbounds i8, ptr %3, i64 232
  %50 = getelementptr inbounds i8, ptr %3, i64 228
  %51 = getelementptr inbounds i8, ptr %3, i64 204
  br label %52

52:                                               ; preds = %._crit_edge, %33
  %53 = load ptr, ptr %38, align 8, !tbaa !37
  store ptr %53, ptr %39, align 8, !tbaa !38
  %54 = load i32, ptr %43, align 8, !tbaa !41
  store i32 %54, ptr %44, align 8, !tbaa !42
  call void @asm_tail_prep(ptr noundef nonnull %3)
  store ptr null, ptr %45, align 8, !tbaa !43
  store ptr null, ptr %46, align 8, !tbaa !44
  store i32 0, ptr %47, align 8, !tbaa !45
  store i32 0, ptr %48, align 4, !tbaa !46
  %55 = load i32, ptr %20, align 4
  store i32 %55, ptr %49, align 8, !tbaa !47
  %56 = load i32, ptr %17, align 8, !tbaa !28
  %57 = and i32 %56, 33554432
  %.not90 = icmp eq i32 %57, 0
  %spec.select = select i1 %.not90, i32 -1, i32 %55
  store i32 %spec.select, ptr %50, align 4, !tbaa !48
  call void @asm_setup_regsp(ptr noundef nonnull %3)
  %58 = load i32, ptr %20, align 4, !tbaa !30
  %.not91 = icmp eq i32 %58, 0
  br i1 %.not91, label %59, label %60

59:                                               ; preds = %52
  call void @asm_tail_link(ptr noundef nonnull %3)
  br label %60

60:                                               ; preds = %59, %52
  %61 = load i32, ptr %44, align 8, !tbaa !42
  %storemerge104 = add i32 %61, -1
  store i32 %storemerge104, ptr %44, align 8, !tbaa !42
  %62 = load i32, ptr %51, align 4, !tbaa !49
  %63 = icmp ugt i32 %storemerge104, %62
  br i1 %63, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %60, %82
  %storemerge105 = phi i32 [ %storemerge, %82 ], [ %storemerge104, %60 ]
  %64 = load ptr, ptr %14, align 8, !tbaa !26
  %65 = zext i32 %storemerge105 to i64
  %66 = getelementptr inbounds %union.IRIns, ptr %64, i64 %65
  %67 = getelementptr inbounds i8, ptr %66, i64 6
  %68 = load i8, ptr %67, align 2, !tbaa !20
  %.not97 = icmp sgt i8 %68, -1
  br i1 %.not97, label %77, label %69

69:                                               ; preds = %.lr.ph
  %70 = getelementptr inbounds i8, ptr %66, i64 7
  %71 = load i8, ptr %70, align 1, !tbaa !20
  %.not98 = icmp eq i8 %71, 0
  br i1 %.not98, label %72, label %77

72:                                               ; preds = %69
  %73 = call i32 @ir_sideeff(ptr noundef nonnull %66)
  %.not99 = icmp eq i32 %73, 0
  br i1 %.not99, label %74, label %77

74:                                               ; preds = %72
  %75 = load i32, ptr %17, align 8, !tbaa !28
  %76 = and i32 %75, 262144
  %.not100 = icmp eq i32 %76, 0
  br i1 %.not100, label %77, label %82

77:                                               ; preds = %74, %72, %69, %.lr.ph
  %78 = getelementptr inbounds i8, ptr %66, i64 4
  %79 = load i8, ptr %78, align 4, !tbaa !20
  %.not101 = icmp sgt i8 %79, -1
  br i1 %.not101, label %81, label %80

80:                                               ; preds = %77
  call void @asm_snap_prep(ptr noundef nonnull %3)
  br label %81

81:                                               ; preds = %80, %77
  call void @checkmclim(ptr noundef nonnull %3)
  call void @asm_ir(ptr noundef nonnull %3, ptr noundef nonnull %66)
  br label %82

82:                                               ; preds = %74, %81
  %83 = load i32, ptr %44, align 8, !tbaa !42
  %storemerge = add i32 %83, -1
  store i32 %storemerge, ptr %44, align 8, !tbaa !42
  %84 = load i32, ptr %51, align 4, !tbaa !49
  %85 = icmp ugt i32 %storemerge, %84
  br i1 %85, label %.lr.ph, label %._crit_edge, !llvm.loop !50

._crit_edge:                                      ; preds = %82, %60
  %86 = load ptr, ptr %21, align 8, !tbaa !31
  %.not92 = icmp eq ptr %86, null
  br i1 %.not92, label %87, label %52, !llvm.loop !52

87:                                               ; preds = %._crit_edge
  call void @checkmclim(ptr noundef nonnull %3)
  %88 = load i32, ptr %48, align 4, !tbaa !46
  %89 = icmp sgt i32 %88, 0
  br i1 %89, label %90, label %97

90:                                               ; preds = %87
  %91 = load ptr, ptr %11, align 8, !tbaa !24
  %92 = getelementptr inbounds i8, ptr %91, i64 32
  %93 = load ptr, ptr %92, align 8, !tbaa !53
  %94 = getelementptr inbounds i8, ptr %93, i64 2
  %95 = load i16, ptr %94, align 2, !tbaa !54
  %96 = zext i16 %95 to i32
  store i32 %96, ptr %44, align 8, !tbaa !42
  call void @asm_snap_prep(ptr noundef nonnull %3)
  call void @asm_gc_check(ptr noundef nonnull %3)
  br label %97

97:                                               ; preds = %90, %87
  call void @ra_evictk(ptr noundef nonnull %3)
  %98 = load ptr, ptr %35, align 8, !tbaa !36
  %.not93 = icmp eq ptr %98, null
  br i1 %.not93, label %100, label %99

99:                                               ; preds = %97
  call void @asm_head_side(ptr noundef nonnull %3)
  br label %101

100:                                              ; preds = %97
  call void @asm_head_root(ptr noundef nonnull %3)
  br label %101

101:                                              ; preds = %100, %99
  call void @asm_phi_fixup(ptr noundef nonnull %3)
  %102 = getelementptr inbounds i8, ptr %3, i64 168
  %103 = load i32, ptr %102, align 8, !tbaa !56
  %.not94 = icmp eq i32 %103, -17
  br i1 %.not94, label %106, label %104

104:                                              ; preds = %101
  %105 = load ptr, ptr %10, align 8, !tbaa !21
  call void @lj_trace_err(ptr noundef %105, i32 noundef 31) #6
  unreachable

106:                                              ; preds = %101
  %107 = load ptr, ptr %39, align 8
  %108 = getelementptr inbounds i8, ptr %1, i64 64
  store ptr %107, ptr %108, align 8, !tbaa !57
  %109 = load ptr, ptr %45, align 8, !tbaa !43
  %.not95 = icmp eq ptr %109, null
  %110 = ptrtoint ptr %109 to i64
  %111 = ptrtoint ptr %107 to i64
  %112 = sub i64 %110, %111
  %113 = trunc i64 %112 to i32
  %114 = select i1 %.not95, i32 0, i32 %113
  %115 = getelementptr inbounds i8, ptr %1, i64 72
  store i32 %114, ptr %115, align 8, !tbaa !58
  %116 = load i32, ptr %20, align 4, !tbaa !30
  %.not96 = icmp eq i32 %116, 0
  br i1 %.not96, label %117, label %121

117:                                              ; preds = %106
  %118 = getelementptr inbounds i8, ptr %1, i64 82
  %119 = load i16, ptr %118, align 2, !tbaa !59
  %120 = zext i16 %119 to i32
  call void @asm_tail_fixup(ptr noundef nonnull %3, i32 noundef %120)
  %.pre = load ptr, ptr %39, align 8, !tbaa !38
  %.pre106 = load ptr, ptr %108, align 8, !tbaa !57
  %.pre107 = ptrtoint ptr %.pre to i64
  br label %121

121:                                              ; preds = %117, %106
  %.pre-phi = phi i64 [ %.pre107, %117 ], [ %111, %106 ]
  %122 = phi ptr [ %.pre106, %117 ], [ %107, %106 ]
  %123 = load ptr, ptr %38, align 8, !tbaa !37
  %124 = ptrtoint ptr %123 to i64
  %125 = sub i64 %124, %.pre-phi
  %126 = trunc i64 %125 to i32
  %127 = getelementptr inbounds i8, ptr %1, i64 60
  store i32 %126, ptr %127, align 4, !tbaa !60
  call void @lj_mcode_sync(ptr noundef %122, ptr noundef %37) #5
  call void @llvm.lifetime.end.p0(i64 880, ptr nonnull %3) #5
  ret void
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @lj_ir_nextins(ptr noundef) local_unnamed_addr #3

declare hidden ptr @lj_mcode_reserve(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @ir_sideeff(ptr noundef) local_unnamed_addr #3

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

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

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

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

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

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

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { alwaysinline nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !9, i64 8}
!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 = !{!6, !12, i64 16}
!20 = !{!10, !10, i64 0}
!21 = !{!22, !12, i64 152}
!22 = !{!"ASMState", !10, i64 0, !12, i64 128, !12, i64 136, !12, i64 144, !12, i64 152, !23, i64 160, !9, i64 168, !9, i64 172, !9, i64 176, !9, i64 180, !9, i64 184, !9, i64 188, !9, i64 192, !9, i64 196, !9, i64 200, !9, i64 204, !9, i64 208, !9, i64 212, !9, i64 216, !9, i64 220, !9, i64 224, !9, i64 228, !9, i64 232, !9, i64 236, !9, i64 240, !9, i64 244, !12, i64 248, !12, i64 256, !12, i64 264, !12, i64 272, !12, i64 280, !12, i64 288, !12, i64 296, !12, i64 304, !10, i64 312, !10, i64 376}
!23 = !{!"", !9, i64 0, !10, i64 4, !10, i64 5, !10, i64 6}
!24 = !{!22, !12, i64 248}
!25 = !{!7, !12, i64 16}
!26 = !{!22, !12, i64 144}
!27 = !{!6, !9, i64 136}
!28 = !{!22, !9, i64 184}
!29 = !{!6, !9, i64 272}
!30 = !{!22, !9, i64 236}
!31 = !{!22, !12, i64 304}
!32 = !{!22, !9, i64 188}
!33 = !{!6, !9, i64 2424}
!34 = !{!6, !12, i64 312}
!35 = !{!8, !9, i64 0}
!36 = !{!22, !12, i64 256}
!37 = !{!22, !12, i64 272}
!38 = !{!22, !12, i64 128}
!39 = !{!22, !12, i64 264}
!40 = !{!22, !12, i64 136}
!41 = !{!7, !9, i64 8}
!42 = !{!22, !9, i64 200}
!43 = !{!22, !12, i64 280}
!44 = !{!22, !12, i64 296}
!45 = !{!22, !9, i64 240}
!46 = !{!22, !9, i64 244}
!47 = !{!22, !9, i64 232}
!48 = !{!22, !9, i64 228}
!49 = !{!22, !9, i64 204}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}
!52 = distinct !{!52, !51}
!53 = !{!7, !12, i64 32}
!54 = !{!55, !13, i64 2}
!55 = !{!"SnapShot", !13, i64 0, !13, i64 2, !10, i64 4, !10, i64 5, !10, i64 6, !10, i64 7}
!56 = !{!22, !9, i64 168}
!57 = !{!7, !12, i64 64}
!58 = !{!7, !9, i64 72}
!59 = !{!7, !13, i64 82}
!60 = !{!7, !9, i64 60}


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