; LLVM IR from seppo0010/rlite :: src (scripting)

; 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.rliteClient = type { i32, ptr, ptr, ptr, ptr, i32 }

@.str.53 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [44 x i8], align 1

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #3

declare i32 @lua_pcall(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #4

declare void @lua_settop(ptr noundef, i32 noundef) #4

declare ptr @lua_tolstring(ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5

declare i32 @luaL_loadbuffer(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @luaCreateFunction(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i64 noundef %4) #6 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca [1024 x i8], align 16
  %19 = alloca i32, align 4
  %20 = alloca [1024 x i8], align 16
  %21 = alloca i32, align 4
  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 i64 %4, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store ptr @.str.53, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store ptr @.str.54, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store ptr @.str.55, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  store i64 42, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %22 = load i64, ptr %11, align 8, !tbaa !9
  %23 = load i64, ptr %15, align 8, !tbaa !9
  %24 = add i64 %22, %23
  %25 = load ptr, ptr %12, align 8, !tbaa !5
  %26 = call i64 @strlen(ptr noundef %25) #8
  %27 = add i64 %24, %26
  %28 = load ptr, ptr %13, align 8, !tbaa !5
  %29 = call i64 @strlen(ptr noundef %28) #8
  %30 = add i64 %27, %29
  %31 = load ptr, ptr %14, align 8, !tbaa !5
  %32 = call i64 @strlen(ptr noundef %31) #8
  %33 = add i64 %30, %32
  %34 = add i64 %33, 1
  store i64 %34, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %35 = load i64, ptr %16, align 8, !tbaa !9
  %36 = mul i64 1, %35
  %37 = call noalias ptr @malloc(i64 noundef %36) #9
  store ptr %37, ptr %17, align 8, !tbaa !5
  %38 = load ptr, ptr %17, align 8, !tbaa !5
  %39 = load ptr, ptr %12, align 8, !tbaa !5
  %40 = call ptr @strcpy(ptr noundef %38, ptr noundef %39) #7
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  %42 = call i64 @strlen(ptr noundef %41) #8
  store i64 %42, ptr %16, align 8, !tbaa !9
  %43 = load ptr, ptr %17, align 8, !tbaa !5
  %44 = load i64, ptr %16, align 8, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %43, i64 %44
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = load i64, ptr %15, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %45, ptr align 1 %46, i64 %47, i1 false)
  %48 = load i64, ptr %15, align 8, !tbaa !9
  %49 = load i64, ptr %16, align 8, !tbaa !9
  %50 = add i64 %49, %48
  store i64 %50, ptr %16, align 8, !tbaa !9
  %51 = load ptr, ptr %17, align 8, !tbaa !5
  %52 = load i64, ptr %16, align 8, !tbaa !9
  %53 = getelementptr inbounds i8, ptr %51, i64 %52
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  %55 = call ptr @strcpy(ptr noundef %53, ptr noundef %54) #7
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = call i64 @strlen(ptr noundef %56) #8
  %58 = load i64, ptr %16, align 8, !tbaa !9
  %59 = add i64 %58, %57
  store i64 %59, ptr %16, align 8, !tbaa !9
  %60 = load ptr, ptr %17, align 8, !tbaa !5
  %61 = load i64, ptr %16, align 8, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %60, i64 %61
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = load i64, ptr %11, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %62, ptr align 1 %63, i64 %64, i1 false)
  %65 = load i64, ptr %11, align 8, !tbaa !9
  %66 = load i64, ptr %16, align 8, !tbaa !9
  %67 = add i64 %66, %65
  store i64 %67, ptr %16, align 8, !tbaa !9
  %68 = load ptr, ptr %17, align 8, !tbaa !5
  %69 = load i64, ptr %16, align 8, !tbaa !9
  %70 = getelementptr inbounds i8, ptr %68, i64 %69
  %71 = load ptr, ptr %14, align 8, !tbaa !5
  %72 = call ptr @strcpy(ptr noundef %70, ptr noundef %71) #7
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = call i64 @strlen(ptr noundef %73) #8
  %75 = load i64, ptr %16, align 8, !tbaa !9
  %76 = add i64 %75, %74
  store i64 %76, ptr %16, align 8, !tbaa !9
  %77 = load ptr, ptr %17, align 8, !tbaa !5
  %78 = load i64, ptr %16, align 8, !tbaa !9
  %79 = getelementptr inbounds i8, ptr %77, i64 %78
  store i8 0, ptr %79, align 1, !tbaa !11
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  %82 = load i64, ptr %16, align 8, !tbaa !9
  %83 = call i32 @luaL_loadbuffer(ptr noundef %80, ptr noundef %81, i64 noundef %82, ptr noundef @.str.56)
  %84 = icmp ne i32 %83, 0
  br i1 %84, label %85, label %96

85:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 1024, ptr %18) #7
  %86 = getelementptr inbounds [1024 x i8], ptr %18, i64 0, i64 0
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = call ptr @lua_tolstring(ptr noundef %87, i32 noundef -1, ptr noundef null)
  %89 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %86, i64 noundef 1024, ptr noundef @.str.57, ptr noundef %88) #7
  %90 = getelementptr inbounds [1024 x i8], ptr %18, i64 0, i64 0
  %91 = call ptr @createErrorObject(ptr noundef %90)
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.rliteClient, ptr %92, i32 0, i32 3
  store ptr %91, ptr %93, align 8, !tbaa !12
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %94, i32 noundef -2)
  %95 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free(ptr noundef %95) #7
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %18) #7
  br label %126

96:                                               ; preds = %5
  %97 = load ptr, ptr %17, align 8, !tbaa !5
  call void @free(ptr noundef %97) #7
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = call i32 @lua_pcall(ptr noundef %98, i32 noundef 0, i32 noundef 0, i32 noundef 0)
  %100 = icmp ne i32 %99, 0
  br i1 %100, label %101, label %113

101:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 1024, ptr %20) #7
  %102 = getelementptr inbounds [1024 x i8], ptr %20, i64 0, i64 0
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  %104 = call ptr @lua_tolstring(ptr noundef %103, i32 noundef -1, ptr noundef null)
  %105 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %102, i64 noundef 1024, ptr noundef @.str.58, ptr noundef %104) #7
  %106 = getelementptr inbounds [1024 x i8], ptr %20, i64 0, i64 0
  %107 = call ptr @createErrorObject(ptr noundef %106)
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.rliteClient, ptr %108, i32 0, i32 3
  store ptr %107, ptr %109, align 8, !tbaa !12
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = call ptr @lua_tolstring(ptr noundef %110, i32 noundef -1, ptr noundef null)
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %112, i32 noundef -2)
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 1024, ptr %20) #7
  br label %126

113:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %114 = load ptr, ptr %7, align 8, !tbaa !5
  %115 = load ptr, ptr %10, align 8, !tbaa !5
  %116 = load i64, ptr %11, align 8, !tbaa !9
  %117 = call i32 @setScript(ptr noundef %114, ptr noundef %115, i64 noundef %116)
  store i32 %117, ptr %21, align 4, !tbaa !15
  %118 = load i32, ptr %21, align 4, !tbaa !15
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %122

120:                                              ; preds = %113
  %121 = load i32, ptr %21, align 4, !tbaa !15
  store i32 %121, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %123

122:                                              ; preds = %113
  store i32 0, ptr %19, align 4
  br label %123

123:                                              ; preds = %122, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  %124 = load i32, ptr %19, align 4
  switch i32 %124, label %126 [
    i32 0, label %125
  ]

125:                                              ; preds = %123
  store i32 0, ptr %6, align 4
  store i32 1, ptr %19, align 4
  br label %126

126:                                              ; preds = %125, %123, %101, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %127 = load i32, ptr %6, align 4
  ret i32 %127
}

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #3

declare ptr @createErrorObject(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare hidden i32 @setScript(ptr noundef, ptr noundef, i64 noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(read) "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 allocsize(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 "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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind allocsize(0) }

!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 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 24}
!13 = !{!"rliteClient", !14, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !14, i64 40}
!14 = !{!"int", !7, i64 0}
!15 = !{!14, !14, i64 0}


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

@.str.53 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.54 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.55 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.56 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.57 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.58 = external hidden unnamed_addr constant [44 x i8], align 1

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

declare i32 @lua_pcall(ptr noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

declare void @lua_settop(ptr noundef, i32 noundef) local_unnamed_addr #5

declare ptr @lua_tolstring(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

declare i32 @luaL_loadbuffer(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local i32 @luaCreateFunction(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr noundef %3, i64 noundef %4) local_unnamed_addr #7 {
  %6 = alloca [1024 x i8], align 16
  %7 = alloca [1024 x i8], align 16
  %8 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @.str.53) #9
  %9 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @.str.54) #9
  %10 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @.str.55) #9
  %11 = add i64 %4, 43
  %12 = add i64 %11, %8
  %13 = add i64 %12, %9
  %14 = add i64 %13, %10
  %15 = tail call noalias ptr @malloc(i64 noundef %14) #10
  %16 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %15, ptr noundef nonnull dereferenceable(1) @.str.53) #11
  %17 = getelementptr inbounds i8, ptr %15, i64 %8
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(42) %17, ptr noundef nonnull align 1 dereferenceable(42) %2, i64 42, i1 false)
  %18 = add i64 %8, 42
  %19 = getelementptr inbounds i8, ptr %15, i64 %18
  %20 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %19, ptr noundef nonnull dereferenceable(1) @.str.54) #11
  %21 = add i64 %18, %9
  %22 = getelementptr inbounds i8, ptr %15, i64 %21
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %22, ptr align 1 %3, i64 %4, i1 false)
  %23 = add i64 %21, %4
  %24 = getelementptr inbounds i8, ptr %15, i64 %23
  %25 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %24, ptr noundef nonnull dereferenceable(1) @.str.55) #11
  %26 = add i64 %23, %10
  %27 = getelementptr inbounds i8, ptr %15, i64 %26
  store i8 0, ptr %27, align 1, !tbaa !5
  %28 = tail call i32 @luaL_loadbuffer(ptr noundef %1, ptr noundef %15, i64 noundef %26, ptr noundef nonnull @.str.56) #11
  %.not = icmp eq i32 %28, 0
  br i1 %.not, label %34, label %29

29:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %6) #11
  %30 = tail call ptr @lua_tolstring(ptr noundef %1, i32 noundef -1, ptr noundef null) #11
  %31 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %6, i64 noundef 1024, ptr noundef nonnull @.str.57, ptr noundef %30) #11
  %32 = call ptr @createErrorObject(ptr noundef nonnull %6) #11
  %33 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %32, ptr %33, align 8, !tbaa !8
  call void @lua_settop(ptr noundef %1, i32 noundef -2) #11
  call void @free(ptr noundef nonnull %15) #11
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %6) #11
  br label %44

34:                                               ; preds = %5
  tail call void @free(ptr noundef nonnull %15) #11
  %35 = tail call i32 @lua_pcall(ptr noundef %1, i32 noundef 0, i32 noundef 0, i32 noundef 0) #11
  %.not53 = icmp eq i32 %35, 0
  br i1 %.not53, label %42, label %36

36:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %7) #11
  %37 = tail call ptr @lua_tolstring(ptr noundef %1, i32 noundef -1, ptr noundef null) #11
  %38 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %7, i64 noundef 1024, ptr noundef nonnull @.str.58, ptr noundef %37) #11
  %39 = call ptr @createErrorObject(ptr noundef nonnull %7) #11
  %40 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %39, ptr %40, align 8, !tbaa !8
  %41 = call ptr @lua_tolstring(ptr noundef %1, i32 noundef -1, ptr noundef null) #11
  call void @lua_settop(ptr noundef %1, i32 noundef -2) #11
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %7) #11
  br label %44

42:                                               ; preds = %34
  %43 = tail call i32 @setScript(ptr noundef %0, ptr noundef %3, i64 noundef %4)
  br label %44

44:                                               ; preds = %42, %36, %29
  %.1 = phi i32 [ -1, %29 ], [ -1, %36 ], [ %43, %42 ]
  ret i32 %.1
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #8

declare ptr @createErrorObject(ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
declare hidden i32 @setScript(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nofree nounwind "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { "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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 #8 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 #9 = { nounwind willreturn memory(read) }
attributes #10 = { nounwind allocsize(0) }
attributes #11 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !11, i64 24}
!9 = !{!"rliteClient", !10, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !10, i64 40}
!10 = !{!"int", !6, i64 0}
!11 = !{!"any pointer", !6, i64 0}


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