; LLVM IR from ejoy/ejoy2d :: lua (lparser)

; 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.LexState = type { i32, i32, i32, %struct.Token, %struct.Token, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8 }
%struct.Token = type { i32, %union.SemInfo }
%union.SemInfo = type { double }
%struct.FuncState = type { ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i16, i8, i8, i8 }
%struct.lua_State = type { ptr, i8, i8, i8, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.CallInfo, ptr, i64, i32, i32, i32, i16, i16, i8, i8 }
%struct.CallInfo = type { ptr, ptr, ptr, ptr, %union.anon, i64, i16, i8 }
%union.anon = type { %struct.anon.0 }
%struct.anon.0 = type { ptr, i64, i64 }
%struct.lua_TValue = type { %union.Value, i32 }
%union.Value = type { ptr }
%struct.LClosure = type { ptr, i8, i8, i8, ptr, ptr, [1 x ptr] }
%struct.Proto = type { ptr, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.Dyndata = type { %struct.anon.1, %struct.Labellist, %struct.Labellist }
%struct.anon.1 = type { ptr, i32, i32 }
%struct.Labellist = type { ptr, i32, i32 }

; Function Attrs: nounwind uwtable
define hidden ptr @luaY_parser(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) #0 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.LexState, align 8
  %14 = alloca %struct.FuncState, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store i32 %5, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 120, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call ptr @luaF_newLclosure(ptr noundef %20, i32 noundef 1)
  store ptr %21, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.lua_State, ptr %22, i32 0, i32 4
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  store ptr %24, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %25 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %25, ptr %17, align 8, !tbaa !5
  %26 = load ptr, ptr %17, align 8, !tbaa !5
  %27 = load ptr, ptr %16, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.lua_TValue, ptr %27, i32 0, i32 0
  store ptr %26, ptr %28, align 8, !tbaa !16
  %29 = load ptr, ptr %16, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.lua_TValue, ptr %29, i32 0, i32 1
  store i32 70, ptr %30, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.lua_State, ptr %31, i32 0, i32 4
  %33 = load ptr, ptr %32, align 8, !tbaa !11
  %34 = getelementptr inbounds %struct.lua_TValue, ptr %33, i32 1
  store ptr %34, ptr %32, align 8, !tbaa !11
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.lua_State, ptr %35, i32 0, i32 8
  %37 = load ptr, ptr %36, align 8, !tbaa !19
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.lua_State, ptr %38, i32 0, i32 4
  %40 = load ptr, ptr %39, align 8, !tbaa !11
  %41 = ptrtoint ptr %37 to i64
  %42 = ptrtoint ptr %40 to i64
  %43 = sub i64 %41, %42
  %44 = sdiv exact i64 %43, 16
  %45 = icmp sle i64 %44, 0
  br i1 %45, label %46, label %48

46:                                               ; preds = %6
  %47 = load ptr, ptr %7, align 8, !tbaa !5
  call void @luaD_growstack(ptr noundef %47, i32 noundef 0)
  br label %49

48:                                               ; preds = %6
  br label %49

49:                                               ; preds = %48, %46
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = call ptr @luaH_new(ptr noundef %50)
  %52 = getelementptr inbounds %struct.LexState, ptr %13, i32 0, i32 9
  store ptr %51, ptr %52, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.lua_State, ptr %53, i32 0, i32 4
  %55 = load ptr, ptr %54, align 8, !tbaa !11
  store ptr %55, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %56 = getelementptr inbounds %struct.LexState, ptr %13, i32 0, i32 9
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  store ptr %57, ptr %19, align 8, !tbaa !5
  %58 = load ptr, ptr %19, align 8, !tbaa !5
  %59 = load ptr, ptr %18, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.lua_TValue, ptr %59, i32 0, i32 0
  store ptr %58, ptr %60, align 8, !tbaa !16
  %61 = load ptr, ptr %18, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.lua_TValue, ptr %61, i32 0, i32 1
  store i32 69, ptr %62, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.lua_State, ptr %63, i32 0, i32 4
  %65 = load ptr, ptr %64, align 8, !tbaa !11
  %66 = getelementptr inbounds %struct.lua_TValue, ptr %65, i32 1
  store ptr %66, ptr %64, align 8, !tbaa !11
  %67 = load ptr, ptr %7, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.lua_State, ptr %67, i32 0, i32 8
  %69 = load ptr, ptr %68, align 8, !tbaa !19
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.lua_State, ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !11
  %73 = ptrtoint ptr %69 to i64
  %74 = ptrtoint ptr %72 to i64
  %75 = sub i64 %73, %74
  %76 = sdiv exact i64 %75, 16
  %77 = icmp sle i64 %76, 0
  br i1 %77, label %78, label %80

78:                                               ; preds = %49
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  call void @luaD_growstack(ptr noundef %79, i32 noundef 0)
  br label %81

80:                                               ; preds = %49
  br label %81

81:                                               ; preds = %80, %78
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = call ptr @luaF_newproto(ptr noundef %82)
  %84 = load ptr, ptr %15, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.LClosure, ptr %84, i32 0, i32 5
  store ptr %83, ptr %85, align 8, !tbaa !23
  %86 = getelementptr inbounds %struct.FuncState, ptr %14, i32 0, i32 0
  store ptr %83, ptr %86, align 8, !tbaa !25
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load ptr, ptr %11, align 8, !tbaa !5
  %89 = call ptr @luaS_new(ptr noundef %87, ptr noundef %88)
  %90 = getelementptr inbounds %struct.FuncState, ptr %14, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !25
  %92 = getelementptr inbounds %struct.Proto, ptr %91, i32 0, i32 21
  store ptr %89, ptr %92, align 8, !tbaa !27
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.LexState, ptr %13, i32 0, i32 8
  store ptr %93, ptr %94, align 8, !tbaa !29
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.LexState, ptr %13, i32 0, i32 10
  store ptr %95, ptr %96, align 8, !tbaa !30
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.Dyndata, ptr %97, i32 0, i32 2
  %99 = getelementptr inbounds %struct.Labellist, ptr %98, i32 0, i32 1
  store i32 0, ptr %99, align 8, !tbaa !31
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.Dyndata, ptr %100, i32 0, i32 1
  %102 = getelementptr inbounds %struct.Labellist, ptr %101, i32 0, i32 1
  store i32 0, ptr %102, align 8, !tbaa !35
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.Dyndata, ptr %103, i32 0, i32 0
  %105 = getelementptr inbounds %struct.anon.1, ptr %104, i32 0, i32 1
  store i32 0, ptr %105, align 8, !tbaa !36
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.FuncState, ptr %14, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !25
  %110 = getelementptr inbounds %struct.Proto, ptr %109, i32 0, i32 21
  %111 = load ptr, ptr %110, align 8, !tbaa !27
  %112 = load i32, ptr %12, align 4, !tbaa !9
  call void @luaX_setinput(ptr noundef %106, ptr noundef %13, ptr noundef %107, ptr noundef %111, i32 noundef %112)
  call void @mainfunc(ptr noundef %13, ptr noundef %14)
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.lua_State, ptr %113, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !11
  %116 = getelementptr inbounds %struct.lua_TValue, ptr %115, i32 -1
  store ptr %116, ptr %114, align 8, !tbaa !11
  %117 = load ptr, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 120, ptr %13) #3
  ret ptr %117
}

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

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

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

declare hidden void @luaD_growstack(ptr noundef, i32 noundef) #2

declare hidden ptr @luaH_new(ptr noundef) #2

declare hidden ptr @luaF_newproto(ptr noundef) #2

declare hidden ptr @luaS_new(ptr noundef, ptr noundef) #2

declare hidden void @luaX_setinput(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @mainfunc(ptr 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 16}
!12 = !{!"lua_State", !6, i64 0, !7, i64 8, !7, i64 9, !7, i64 10, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !13, i64 96, !6, i64 168, !14, i64 176, !10, i64 184, !10, i64 188, !10, i64 192, !15, i64 196, !15, i64 198, !7, i64 200, !7, i64 201}
!13 = !{!"CallInfo", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !14, i64 56, !15, i64 64, !7, i64 66}
!14 = !{!"long", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !10, i64 8}
!18 = !{!"lua_TValue", !7, i64 0, !10, i64 8}
!19 = !{!12, !6, i64 48}
!20 = !{!21, !6, i64 80}
!21 = !{!"LexState", !10, i64 0, !10, i64 4, !10, i64 8, !22, i64 16, !22, i64 32, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !7, i64 112}
!22 = !{!"Token", !10, i64 0, !7, i64 8}
!23 = !{!24, !6, i64 24}
!24 = !{!"LClosure", !6, i64 0, !7, i64 8, !7, i64 9, !7, i64 10, !6, i64 16, !6, i64 24, !7, i64 32}
!25 = !{!26, !6, i64 0}
!26 = !{!"FuncState", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !15, i64 56, !7, i64 58, !7, i64 59, !7, i64 60}
!27 = !{!28, !6, i64 104}
!28 = !{!"Proto", !6, i64 0, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !7, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112}
!29 = !{!21, !6, i64 72}
!30 = !{!21, !6, i64 88}
!31 = !{!32, !10, i64 40}
!32 = !{!"Dyndata", !33, i64 0, !34, i64 16, !34, i64 32}
!33 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12}
!34 = !{!"Labellist", !6, i64 0, !10, i64 8, !10, i64 12}
!35 = !{!32, !10, i64 24}
!36 = !{!32, !10, i64 8}


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

%struct.LexState = type { i32, i32, i32, %struct.Token, %struct.Token, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8 }
%struct.Token = type { i32, %union.SemInfo }
%union.SemInfo = type { double }
%struct.FuncState = type { ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i16, i8, i8, i8 }

; Function Attrs: nounwind uwtable
define hidden ptr @luaY_parser(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5) local_unnamed_addr #0 {
  %7 = alloca %struct.LexState, align 8
  %8 = alloca %struct.FuncState, align 8
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #3
  %9 = tail call ptr @luaF_newLclosure(ptr noundef %0, i32 noundef 1) #3
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %9, ptr %11, align 8, !tbaa !14
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  store i32 70, ptr %12, align 8, !tbaa !15
  %13 = load ptr, ptr %10, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  store ptr %14, ptr %10, align 8, !tbaa !5
  %15 = getelementptr inbounds i8, ptr %0, i64 48
  %16 = load ptr, ptr %15, align 8, !tbaa !17
  %17 = ptrtoint ptr %16 to i64
  %18 = ptrtoint ptr %14 to i64
  %19 = sub i64 %17, %18
  %20 = icmp slt i64 %19, 16
  br i1 %20, label %21, label %22

21:                                               ; preds = %6
  tail call void @luaD_growstack(ptr noundef nonnull %0, i32 noundef 0) #3
  br label %22

22:                                               ; preds = %6, %21
  %23 = tail call ptr @luaH_new(ptr noundef nonnull %0) #3
  %24 = getelementptr inbounds i8, ptr %7, i64 80
  store ptr %23, ptr %24, align 8, !tbaa !18
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %23, ptr %25, align 8, !tbaa !14
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  store i32 69, ptr %26, align 8, !tbaa !15
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  store ptr %28, ptr %10, align 8, !tbaa !5
  %29 = load ptr, ptr %15, align 8, !tbaa !17
  %30 = ptrtoint ptr %29 to i64
  %31 = ptrtoint ptr %28 to i64
  %32 = sub i64 %30, %31
  %33 = icmp slt i64 %32, 16
  br i1 %33, label %34, label %35

34:                                               ; preds = %22
  tail call void @luaD_growstack(ptr noundef nonnull %0, i32 noundef 0) #3
  br label %35

35:                                               ; preds = %22, %34
  %36 = tail call ptr @luaF_newproto(ptr noundef nonnull %0) #3
  %37 = getelementptr inbounds i8, ptr %9, i64 24
  store ptr %36, ptr %37, align 8, !tbaa !21
  store ptr %36, ptr %8, align 8, !tbaa !23
  %38 = tail call ptr @luaS_new(ptr noundef nonnull %0, ptr noundef %4) #3
  %39 = getelementptr inbounds i8, ptr %36, i64 104
  store ptr %38, ptr %39, align 8, !tbaa !25
  %40 = getelementptr inbounds i8, ptr %7, i64 72
  store ptr %2, ptr %40, align 8, !tbaa !27
  %41 = getelementptr inbounds i8, ptr %7, i64 88
  store ptr %3, ptr %41, align 8, !tbaa !28
  %42 = getelementptr inbounds i8, ptr %3, i64 40
  store i32 0, ptr %42, align 8, !tbaa !29
  %43 = getelementptr inbounds i8, ptr %3, i64 24
  store i32 0, ptr %43, align 8, !tbaa !33
  %44 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 0, ptr %44, align 8, !tbaa !34
  call void @luaX_setinput(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef %1, ptr noundef %38, i32 noundef %5) #3
  call void @mainfunc(ptr noundef nonnull %7, ptr noundef nonnull %8)
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 -16
  store ptr %46, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %7) #3
  ret ptr %9
}

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

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

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

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

declare hidden ptr @luaH_new(ptr noundef) local_unnamed_addr #2

declare hidden ptr @luaF_newproto(ptr noundef) local_unnamed_addr #2

declare hidden ptr @luaS_new(ptr noundef, ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare hidden void @mainfunc(ptr 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 = { "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, !7, i64 16}
!6 = !{!"lua_State", !7, i64 0, !8, i64 8, !8, i64 9, !8, i64 10, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !10, i64 96, !7, i64 168, !11, i64 176, !13, i64 184, !13, i64 188, !13, i64 192, !12, i64 196, !12, i64 198, !8, i64 200, !8, i64 201}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"CallInfo", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !8, i64 32, !11, i64 56, !12, i64 64, !8, i64 66}
!11 = !{!"long", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!8, !8, i64 0}
!15 = !{!16, !13, i64 8}
!16 = !{!"lua_TValue", !8, i64 0, !13, i64 8}
!17 = !{!6, !7, i64 48}
!18 = !{!19, !7, i64 80}
!19 = !{!"LexState", !13, i64 0, !13, i64 4, !13, i64 8, !20, i64 16, !20, i64 32, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !8, i64 112}
!20 = !{!"Token", !13, i64 0, !8, i64 8}
!21 = !{!22, !7, i64 24}
!22 = !{!"LClosure", !7, i64 0, !8, i64 8, !8, i64 9, !8, i64 10, !7, i64 16, !7, i64 24, !8, i64 32}
!23 = !{!24, !7, i64 0}
!24 = !{!"FuncState", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !12, i64 56, !8, i64 58, !8, i64 59, !8, i64 60}
!25 = !{!26, !7, i64 104}
!26 = !{!"Proto", !7, i64 0, !8, i64 8, !8, i64 9, !8, i64 10, !8, i64 11, !8, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112}
!27 = !{!19, !7, i64 72}
!28 = !{!19, !7, i64 88}
!29 = !{!30, !13, i64 40}
!30 = !{!"Dyndata", !31, i64 0, !32, i64 16, !32, i64 32}
!31 = !{!"", !7, i64 0, !13, i64 8, !13, i64 12}
!32 = !{!"Labellist", !7, i64 0, !13, i64 8, !13, i64 12}
!33 = !{!30, !13, i64 24}
!34 = !{!30, !13, i64 8}


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