; 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.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.MRef = type { i32 }
%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.IRType1 = type { i8 }
%struct.FoldState = type { %union.IRIns, %union.IRIns, %union.IRIns }
%union.IRIns = type { %struct.anon.0 }
%struct.anon.0 = type { i32, %struct.IRType1, i8, i8, i8 }
%struct.HotPenalty = type { %struct.MRef, i16, i16 }
%struct.BPropEntry = type { i16, i16, i32 }
%struct.ScEvEntry = type { %struct.MRef, i16, i16, i16, i16, %struct.IRType1, i8 }
%union.TValue = type { i64 }
%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 }

; Function Attrs: nounwind uwtable
define hidden void @lj_asm_patchexit(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.GCtrace, ptr %15, i32 0, i32 17
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  store ptr %17, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = load ptr, ptr %9, align 8, !tbaa !5
  %20 = call ptr @lj_mcode_patch(ptr noundef %18, ptr noundef %19, i32 noundef 0)
  store ptr %20, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.GCtrace, ptr %21, i32 0, i32 16
  %23 = load i32, ptr %22, align 4, !tbaa !16
  store i32 %23, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.jit_State, ptr %24, i32 0, i32 41
  %26 = getelementptr inbounds [16 x ptr], ptr %25, i64 0, i64 0
  %27 = load i32, ptr %7, align 4, !tbaa !9
  %28 = call ptr @exitstub_addr_(ptr noundef %26, i32 noundef %27)
  %29 = getelementptr inbounds i8, ptr %28, i64 -6
  store ptr %29, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %30 = load ptr, ptr %9, align 8, !tbaa !5
  %31 = load i32, ptr %11, align 4, !tbaa !9
  %32 = zext i32 %31 to i64
  %33 = getelementptr inbounds i8, ptr %30, i64 %32
  %34 = getelementptr inbounds i8, ptr %33, i64 -6
  store ptr %34, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %35, i64 -800
  %37 = getelementptr inbounds %struct.GG_State, ptr %36, i32 0, i32 1
  %38 = getelementptr inbounds %struct.global_State, ptr %37, i32 0, i32 6
  %39 = ptrtoint ptr %38 to i64
  %40 = trunc i64 %39 to i32
  store i32 %40, ptr %14, align 4, !tbaa !9
  %41 = load i32, ptr %11, align 4, !tbaa !9
  %42 = icmp ugt i32 %41, 5
  br i1 %42, label %43, label %80

43:                                               ; preds = %4
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = sub i32 %45, 5
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds i8, ptr %44, i64 %47
  %49 = load i8, ptr %48, align 1, !tbaa !17
  %50 = zext i8 %49 to i32
  %51 = icmp eq i32 %50, 233
  br i1 %51, label %52, label %80

52:                                               ; preds = %43
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load i32, ptr %11, align 4, !tbaa !9
  %55 = zext i32 %54 to i64
  %56 = getelementptr inbounds i8, ptr %53, i64 %55
  %57 = getelementptr inbounds i8, ptr %56, i64 -6
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  %59 = load i32, ptr %11, align 4, !tbaa !9
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds i8, ptr %58, i64 %60
  %62 = getelementptr inbounds i8, ptr %61, i64 -4
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i8, ptr %57, i64 %64
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = icmp eq ptr %65, %66
  br i1 %67, label %68, label %80

68:                                               ; preds = %52
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = load i32, ptr %11, align 4, !tbaa !9
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds i8, ptr %69, i64 %71
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  %74 = call i32 @jmprel(ptr noundef %72, ptr noundef %73)
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = load i32, ptr %11, align 4, !tbaa !9
  %77 = zext i32 %76 to i64
  %78 = getelementptr inbounds i8, ptr %75, i64 %77
  %79 = getelementptr inbounds i8, ptr %78, i64 -4
  store i32 %74, ptr %79, align 4, !tbaa !9
  br label %80

80:                                               ; preds = %68, %52, %43, %4
  br label %81

81:                                               ; preds = %101, %80
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = icmp ult ptr %82, %83
  br i1 %84, label %85, label %104

85:                                               ; preds = %81
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %86, i64 3
  %88 = load i32, ptr %87, align 4, !tbaa !9
  %89 = load i32, ptr %14, align 4, !tbaa !9
  %90 = icmp eq i32 %88, %89
  br i1 %90, label %91, label %100

91:                                               ; preds = %85
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i64 0
  %94 = load i8, ptr %93, align 1, !tbaa !17
  %95 = zext i8 %94 to i32
  %96 = icmp eq i32 %95, 199
  br i1 %96, label %97, label %100

97:                                               ; preds = %91
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds i8, ptr %98, i64 11
  store ptr %99, ptr %9, align 8, !tbaa !5
  br label %104

100:                                              ; preds = %91, %85
  br label %101

101:                                              ; preds = %100
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %102, i32 1
  store ptr %103, ptr %9, align 8, !tbaa !5
  br label %81, !llvm.loop !18

104:                                              ; preds = %97, %81
  br label %105

105:                                              ; preds = %134, %104
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = load ptr, ptr %13, align 8, !tbaa !5
  %108 = icmp ult ptr %106, %107
  br i1 %108, label %109, label %137

109:                                              ; preds = %105
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = load i16, ptr %110, align 2, !tbaa !20
  %112 = zext i16 %111 to i32
  %113 = and i32 %112, 61695
  %114 = icmp eq i32 %113, 32783
  br i1 %114, label %115, label %133

115:                                              ; preds = %109
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i64 2
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds i8, ptr %116, i64 %120
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = icmp eq ptr %121, %122
  br i1 %123, label %124, label %133

124:                                              ; preds = %115
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = getelementptr inbounds i8, ptr %125, i64 6
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = call i32 @jmprel(ptr noundef %126, ptr noundef %127)
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = getelementptr inbounds i8, ptr %129, i64 2
  store i32 %128, ptr %130, align 4, !tbaa !9
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds i8, ptr %131, i64 5
  store ptr %132, ptr %9, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %124, %115, %109
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = getelementptr inbounds i8, ptr %135, i32 1
  store ptr %136, ptr %9, align 8, !tbaa !5
  br label %105, !llvm.loop !21

137:                                              ; preds = %105
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.GCtrace, ptr %138, i32 0, i32 17
  %140 = load ptr, ptr %139, align 8, !tbaa !11
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.GCtrace, ptr %141, i32 0, i32 17
  %143 = load ptr, ptr %142, align 8, !tbaa !11
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.GCtrace, ptr %144, i32 0, i32 16
  %146 = load i32, ptr %145, align 4, !tbaa !16
  %147 = zext i32 %146 to i64
  %148 = getelementptr inbounds i8, ptr %143, i64 %147
  call void @lj_mcode_sync(ptr noundef %140, ptr noundef %148)
  %149 = load ptr, ptr %5, align 8, !tbaa !5
  %150 = load ptr, ptr %10, align 8, !tbaa !5
  %151 = call ptr @lj_mcode_patch(ptr noundef %149, ptr noundef %150, i32 noundef 1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret void
}

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

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

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 64}
!12 = !{!"GCtrace", !13, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !10, i64 8, !13, i64 12, !6, i64 16, !10, i64 24, !14, i64 28, !14, i64 30, !6, i64 32, !6, i64 40, !13, i64 48, !15, i64 52, !10, i64 56, !10, i64 60, !6, i64 64, !10, 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}
!13 = !{!"GCRef", !10, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!"MRef", !10, i64 0}
!16 = !{!12, !10, i64 60}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!14, !14, i64 0}
!21 = distinct !{!21, !19}


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

; Function Attrs: nounwind uwtable
define hidden void @lj_asm_patchexit(ptr noundef %0, ptr nocapture noundef readonly %1, i32 noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %1, i64 64
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = tail call ptr @lj_mcode_patch(ptr noundef %0, ptr noundef %6, i32 noundef 0) #3
  %8 = getelementptr inbounds i8, ptr %1, i64 60
  %9 = load i32, ptr %8, align 4, !tbaa !14
  %10 = getelementptr inbounds i8, ptr %0, i64 1616
  %11 = tail call ptr @exitstub_addr_(ptr noundef nonnull %10, i32 noundef %2)
  %12 = getelementptr inbounds i8, ptr %11, i64 -6
  %13 = zext i32 %9 to i64
  %14 = getelementptr i8, ptr %6, i64 %13
  %15 = getelementptr i8, ptr %14, i64 -6
  %16 = getelementptr inbounds i8, ptr %0, i64 -328
  %17 = ptrtoint ptr %16 to i64
  %18 = trunc i64 %17 to i32
  %19 = icmp ugt i32 %9, 5
  br i1 %19, label %20, label %34

20:                                               ; preds = %4
  %21 = add i32 %9, -5
  %22 = zext i32 %21 to i64
  %23 = getelementptr inbounds i8, ptr %6, i64 %22
  %24 = load i8, ptr %23, align 1, !tbaa !15
  %25 = icmp eq i8 %24, -23
  br i1 %25, label %26, label %34

26:                                               ; preds = %20
  %27 = getelementptr inbounds i8, ptr %14, i64 -4
  %28 = load i32, ptr %27, align 4, !tbaa !16
  %29 = sext i32 %28 to i64
  %30 = getelementptr inbounds i8, ptr %15, i64 %29
  %31 = icmp eq ptr %30, %12
  br i1 %31, label %32, label %34

32:                                               ; preds = %26
  %33 = tail call i32 @jmprel(ptr noundef nonnull %14, ptr noundef %3)
  store i32 %33, ptr %27, align 4, !tbaa !16
  br label %34

34:                                               ; preds = %32, %26, %20, %4
  %35 = icmp ult ptr %6, %15
  br i1 %35, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %34, %44
  %.046 = phi ptr [ %45, %44 ], [ %6, %34 ]
  %36 = getelementptr inbounds i8, ptr %.046, i64 3
  %37 = load i32, ptr %36, align 4, !tbaa !16
  %38 = icmp eq i32 %37, %18
  br i1 %38, label %39, label %44

39:                                               ; preds = %.lr.ph
  %40 = load i8, ptr %.046, align 1, !tbaa !15
  %41 = icmp eq i8 %40, -57
  br i1 %41, label %42, label %44

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %.046, i64 11
  br label %.loopexit

44:                                               ; preds = %.lr.ph, %39
  %45 = getelementptr inbounds i8, ptr %.046, i64 1
  %exitcond.not = icmp eq ptr %45, %15
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !17

.loopexit:                                        ; preds = %34, %42
  %.1 = phi ptr [ %43, %42 ], [ %6, %34 ]
  %46 = icmp ult ptr %.1, %15
  br i1 %46, label %.lr.ph48, label %._crit_edge

.lr.ph48:                                         ; preds = %.loopexit, %60
  %.247 = phi ptr [ %61, %60 ], [ %.1, %.loopexit ]
  %47 = load i16, ptr %.247, align 2, !tbaa !19
  %48 = and i16 %47, -3841
  %49 = icmp eq i16 %48, -32753
  br i1 %49, label %50, label %60

50:                                               ; preds = %.lr.ph48
  %51 = getelementptr inbounds i8, ptr %.247, i64 2
  %52 = load i32, ptr %51, align 4, !tbaa !16
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds i8, ptr %.247, i64 %53
  %55 = icmp eq ptr %54, %12
  br i1 %55, label %56, label %60

56:                                               ; preds = %50
  %57 = getelementptr inbounds i8, ptr %.247, i64 6
  %58 = tail call i32 @jmprel(ptr noundef nonnull %57, ptr noundef %3)
  store i32 %58, ptr %51, align 4, !tbaa !16
  %59 = getelementptr inbounds i8, ptr %.247, i64 5
  br label %60

60:                                               ; preds = %.lr.ph48, %50, %56
  %.3 = phi ptr [ %59, %56 ], [ %.247, %50 ], [ %.247, %.lr.ph48 ]
  %61 = getelementptr inbounds i8, ptr %.3, i64 1
  %62 = icmp ult ptr %61, %15
  br i1 %62, label %.lr.ph48, label %._crit_edge, !llvm.loop !20

._crit_edge:                                      ; preds = %44, %60, %.loopexit
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = load i32, ptr %8, align 4, !tbaa !14
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds i8, ptr %63, i64 %65
  tail call void @lj_mcode_sync(ptr noundef %63, ptr noundef %66) #3
  %67 = tail call ptr @lj_mcode_patch(ptr noundef %0, ptr noundef %7, i32 noundef 1) #3
  ret void
}

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { alwaysinline nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !11, i64 64}
!6 = !{!"GCtrace", !7, i64 0, !9, i64 4, !9, i64 5, !9, i64 6, !9, i64 7, !8, i64 8, !7, i64 12, !11, i64 16, !8, i64 24, !12, i64 28, !12, i64 30, !11, i64 32, !11, i64 40, !7, i64 48, !13, i64 52, !8, i64 56, !8, i64 60, !11, i64 64, !8, i64 72, !12, i64 76, !12, i64 78, !12, i64 80, !12, i64 82, !12, i64 84, !12, i64 86, !12, i64 88, !9, i64 90, !9, i64 91}
!7 = !{!"GCRef", !8, i64 0}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"any pointer", !9, i64 0}
!12 = !{!"short", !9, i64 0}
!13 = !{!"MRef", !8, i64 0}
!14 = !{!6, !8, i64 60}
!15 = !{!9, !9, i64 0}
!16 = !{!8, !8, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!12, !12, i64 0}
!20 = distinct !{!20, !18}


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