; 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 }
%struct.rliteReply = type { i32, i64, i32, ptr, i64, ptr }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

declare void @lua_pushnumber(ptr noundef, double noundef) #0

declare void @lua_pushstring(ptr noundef, ptr noundef) #0

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

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

declare void @lua_gettable(ptr noundef, i32 noundef) #0

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

; Function Attrs: nounwind allocsize(1)
declare ptr @realloc(ptr noundef, i64 noundef) #2

declare i32 @lua_type(ptr noundef, i32 noundef) #0

declare double @lua_tonumber(ptr noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @luaReplyToStringReply(i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @luaReplyToRedisReply(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #4
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = call i32 @lua_type(ptr noundef %10, i32 noundef -1)
  store i32 %11, ptr %5, align 4, !tbaa !9
  %12 = load i32, ptr %5, align 4, !tbaa !9
  switch i32 %12, label %133 [
    i32 4, label %13
    i32 1, label %22
    i32 3, label %35
    i32 5, label %42
  ]

13:                                               ; preds = %2
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = call ptr @lua_tolstring(ptr noundef %14, i32 noundef -1, ptr noundef null)
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = call i64 @lua_objlen(ptr noundef %16, i32 noundef -1)
  %18 = trunc i64 %17 to i32
  %19 = call ptr @createStringObject(ptr noundef %15, i32 noundef %18)
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.rliteClient, ptr %20, i32 0, i32 3
  store ptr %19, ptr %21, align 8, !tbaa !11
  br label %137

22:                                               ; preds = %2
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = call i32 @lua_toboolean(ptr noundef %23, i32 noundef -1)
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %30

26:                                               ; preds = %22
  %27 = call ptr @createLongLongObject(i64 noundef 1)
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.rliteClient, ptr %28, i32 0, i32 3
  store ptr %27, ptr %29, align 8, !tbaa !11
  br label %34

30:                                               ; preds = %22
  %31 = call ptr (...) @createNullReplyObject()
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.rliteClient, ptr %32, i32 0, i32 3
  store ptr %31, ptr %33, align 8, !tbaa !11
  br label %34

34:                                               ; preds = %30, %26
  br label %137

35:                                               ; preds = %2
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = call double @lua_tonumber(ptr noundef %36, i32 noundef -1)
  %38 = fptosi double %37 to i64
  %39 = call ptr @createLongLongObject(i64 noundef %38)
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.rliteClient, ptr %40, i32 0, i32 3
  store ptr %39, ptr %41, align 8, !tbaa !11
  br label %137

42:                                               ; preds = %2
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  call void @lua_pushstring(ptr noundef %43, ptr noundef @.str.1)
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  call void @lua_gettable(ptr noundef %44, i32 noundef -2)
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = call i32 @lua_type(ptr noundef %45, i32 noundef -1)
  store i32 %46, ptr %5, align 4, !tbaa !9
  %47 = load i32, ptr %5, align 4, !tbaa !9
  %48 = icmp eq i32 %47, 4
  br i1 %48, label %49, label %54

49:                                               ; preds = %42
  %50 = call ptr @luaReplyToStringReply(i32 noundef 6)
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.rliteClient, ptr %51, i32 0, i32 3
  store ptr %50, ptr %52, align 8, !tbaa !11
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %53, i32 noundef -3)
  store i32 1, ptr %6, align 4
  br label %139

54:                                               ; preds = %42
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %55, i32 noundef -2)
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  call void @lua_pushstring(ptr noundef %56, ptr noundef @.str)
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  call void @lua_gettable(ptr noundef %57, i32 noundef -2)
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = call i32 @lua_type(ptr noundef %58, i32 noundef -1)
  store i32 %59, ptr %5, align 4, !tbaa !9
  %60 = load i32, ptr %5, align 4, !tbaa !9
  %61 = icmp eq i32 %60, 4
  br i1 %61, label %62, label %67

62:                                               ; preds = %54
  %63 = call ptr @luaReplyToStringReply(i32 noundef 5)
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.rliteClient, ptr %64, i32 0, i32 3
  store ptr %63, ptr %65, align 8, !tbaa !11
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %66, i32 noundef -2)
  br label %132

67:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %68 = call ptr @createArrayObject(i64 noundef 2)
  store ptr %68, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 1, ptr %9, align 8, !tbaa !13
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %69, i32 noundef -2)
  br label %70

70:                                               ; preds = %111, %67
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = load i64, ptr %9, align 8, !tbaa !13
  %74 = add i64 %73, 1
  store i64 %74, ptr %9, align 8, !tbaa !13
  %75 = uitofp i64 %73 to double
  call void @lua_pushnumber(ptr noundef %72, double noundef %75)
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  call void @lua_gettable(ptr noundef %76, i32 noundef -2)
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = call i32 @lua_type(ptr noundef %77, i32 noundef -1)
  store i32 %78, ptr %5, align 4, !tbaa !9
  %79 = load i32, ptr %5, align 4, !tbaa !9
  %80 = icmp eq i32 %79, 0
  br i1 %80, label %81, label %83

81:                                               ; preds = %71
  %82 = load ptr, ptr %4, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %82, i32 noundef -2)
  br label %121

83:                                               ; preds = %71
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  call void @luaReplyToRedisReply(ptr noundef %84, ptr noundef %85)
  %86 = load i64, ptr %9, align 8, !tbaa !13
  %87 = sub i64 %86, 2
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.rliteReply, ptr %88, i32 0, i32 4
  %90 = load i64, ptr %89, align 8, !tbaa !15
  %91 = icmp eq i64 %87, %90
  br i1 %91, label %92, label %111

92:                                               ; preds = %83
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.rliteReply, ptr %93, i32 0, i32 5
  %95 = load ptr, ptr %94, align 8, !tbaa !18
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.rliteReply, ptr %96, i32 0, i32 4
  %98 = load i64, ptr %97, align 8, !tbaa !15
  %99 = mul i64 8, %98
  %100 = mul i64 %99, 2
  %101 = call ptr @realloc(ptr noundef %95, i64 noundef %100) #5
  store ptr %101, ptr %8, align 8, !tbaa !5
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %107, label %104

104:                                              ; preds = %92
  %105 = load ptr, ptr %3, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.rliteClient, ptr %105, i32 0, i32 3
  store ptr null, ptr %106, align 8, !tbaa !11
  store i32 1, ptr %6, align 4
  br label %129

107:                                              ; preds = %92
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.rliteReply, ptr %109, i32 0, i32 5
  store ptr %108, ptr %110, align 8, !tbaa !18
  br label %111

111:                                              ; preds = %107, %83
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.rliteClient, ptr %112, i32 0, i32 3
  %114 = load ptr, ptr %113, align 8, !tbaa !11
  %115 = load ptr, ptr %7, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.rliteReply, ptr %115, i32 0, i32 5
  %117 = load ptr, ptr %116, align 8, !tbaa !18
  %118 = load i64, ptr %9, align 8, !tbaa !13
  %119 = sub i64 %118, 2
  %120 = getelementptr inbounds ptr, ptr %117, i64 %119
  store ptr %114, ptr %120, align 8, !tbaa !5
  br label %70

121:                                              ; preds = %81
  %122 = load i64, ptr %9, align 8, !tbaa !13
  %123 = sub i64 %122, 2
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.rliteReply, ptr %124, i32 0, i32 4
  store i64 %123, ptr %125, align 8, !tbaa !15
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.rliteClient, ptr %127, i32 0, i32 3
  store ptr %126, ptr %128, align 8, !tbaa !11
  store i32 0, ptr %6, align 4
  br label %129

129:                                              ; preds = %121, %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %130 = load i32, ptr %6, align 4
  switch i32 %130, label %139 [
    i32 0, label %131
  ]

131:                                              ; preds = %129
  br label %132

132:                                              ; preds = %131, %62
  br label %137

133:                                              ; preds = %2
  %134 = call ptr (...) @createNullReplyObject()
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.rliteClient, ptr %135, i32 0, i32 3
  store ptr %134, ptr %136, align 8, !tbaa !11
  br label %137

137:                                              ; preds = %133, %132, %35, %34, %13
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %138, i32 noundef -2)
  store i32 0, ptr %6, align 4
  br label %139

139:                                              ; preds = %137, %129, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #4
  %140 = load i32, ptr %6, align 4
  switch i32 %140, label %142 [
    i32 0, label %141
    i32 1, label %141
  ]

141:                                              ; preds = %139, %139
  ret void

142:                                              ; preds = %139
  unreachable
}

declare ptr @createStringObject(ptr noundef, i32 noundef) #0

declare i64 @lua_objlen(ptr noundef, i32 noundef) #0

declare i32 @lua_toboolean(ptr noundef, i32 noundef) #0

declare ptr @createLongLongObject(i64 noundef) #0

declare ptr @createNullReplyObject(...) #0

declare ptr @createArrayObject(i64 noundef) #0

attributes #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 = { nounwind allocsize(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 #3 = { 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 }
attributes #5 = { nounwind allocsize(1) }

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


; 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 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1

declare void @lua_pushnumber(ptr noundef, double noundef) local_unnamed_addr #0

declare void @lua_pushstring(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @lua_gettable(ptr noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite)
declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #1

declare i32 @lua_type(ptr noundef, i32 noundef) local_unnamed_addr #0

declare double @lua_tonumber(ptr noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @luaReplyToStringReply(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @luaReplyToRedisReply(ptr nocapture noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = tail call i32 @lua_type(ptr noundef %1, i32 noundef -1) #3
  switch i32 %3, label %62 [
    i32 4, label %4
    i32 1, label %10
    i32 3, label %17
    i32 5, label %22
  ]

4:                                                ; preds = %2
  %5 = tail call ptr @lua_tolstring(ptr noundef %1, i32 noundef -1, ptr noundef null) #3
  %6 = tail call i64 @lua_objlen(ptr noundef %1, i32 noundef -1) #3
  %7 = trunc i64 %6 to i32
  %8 = tail call ptr @createStringObject(ptr noundef %5, i32 noundef %7) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %8, ptr %9, align 8, !tbaa !5
  br label %65

10:                                               ; preds = %2
  %11 = tail call i32 @lua_toboolean(ptr noundef %1, i32 noundef -1) #3
  %.not52 = icmp eq i32 %11, 0
  %12 = getelementptr inbounds i8, ptr %0, i64 24
  br i1 %.not52, label %15, label %13

13:                                               ; preds = %10
  %14 = tail call ptr @createLongLongObject(i64 noundef 1) #3
  store ptr %14, ptr %12, align 8, !tbaa !5
  br label %65

15:                                               ; preds = %10
  %16 = tail call ptr (...) @createNullReplyObject() #3
  store ptr %16, ptr %12, align 8, !tbaa !5
  br label %65

17:                                               ; preds = %2
  %18 = tail call double @lua_tonumber(ptr noundef %1, i32 noundef -1) #3
  %19 = fptosi double %18 to i64
  %20 = tail call ptr @createLongLongObject(i64 noundef %19) #3
  %21 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %20, ptr %21, align 8, !tbaa !5
  br label %65

22:                                               ; preds = %2
  tail call void @lua_pushstring(ptr noundef %1, ptr noundef nonnull @.str.1) #3
  tail call void @lua_gettable(ptr noundef %1, i32 noundef -2) #3
  %23 = tail call i32 @lua_type(ptr noundef %1, i32 noundef -1) #3
  %24 = icmp eq i32 %23, 4
  br i1 %24, label %25, label %28

25:                                               ; preds = %22
  %26 = tail call ptr @luaReplyToStringReply(i32 noundef 6)
  %27 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %26, ptr %27, align 8, !tbaa !5
  tail call void @lua_settop(ptr noundef %1, i32 noundef -3) #3
  br label %66

28:                                               ; preds = %22
  tail call void @lua_settop(ptr noundef %1, i32 noundef -2) #3
  tail call void @lua_pushstring(ptr noundef %1, ptr noundef nonnull @.str) #3
  tail call void @lua_gettable(ptr noundef %1, i32 noundef -2) #3
  %29 = tail call i32 @lua_type(ptr noundef %1, i32 noundef -1) #3
  %30 = icmp eq i32 %29, 4
  br i1 %30, label %31, label %34

31:                                               ; preds = %28
  %32 = tail call ptr @luaReplyToStringReply(i32 noundef 5)
  %33 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %32, ptr %33, align 8, !tbaa !5
  tail call void @lua_settop(ptr noundef %1, i32 noundef -2) #3
  br label %65

34:                                               ; preds = %28
  %35 = tail call ptr @createArrayObject(i64 noundef 2) #3
  tail call void @lua_settop(ptr noundef %1, i32 noundef -2) #3
  tail call void @lua_pushnumber(ptr noundef %1, double noundef 1.000000e+00) #3
  tail call void @lua_gettable(ptr noundef %1, i32 noundef -2) #3
  %36 = tail call i32 @lua_type(ptr noundef %1, i32 noundef -1) #3
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %.thread, label %.lr.ph

.lr.ph:                                           ; preds = %34
  %38 = getelementptr inbounds i8, ptr %35, i64 32
  %39 = getelementptr inbounds i8, ptr %35, i64 40
  %40 = getelementptr inbounds i8, ptr %0, i64 24
  br label %44

.thread.loopexit:                                 ; preds = %53
  %41 = add i64 %45, -1
  br label %.thread

.thread:                                          ; preds = %.thread.loopexit, %34
  %.0.lcssa = phi i64 [ 0, %34 ], [ %41, %.thread.loopexit ]
  tail call void @lua_settop(ptr noundef %1, i32 noundef -2) #3
  %42 = getelementptr inbounds i8, ptr %35, i64 32
  store i64 %.0.lcssa, ptr %42, align 8, !tbaa !11
  %43 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %35, ptr %43, align 8, !tbaa !5
  br label %65

44:                                               ; preds = %.lr.ph, %53
  %45 = phi i64 [ 2, %.lr.ph ], [ %57, %53 ]
  %.054 = phi i64 [ 1, %.lr.ph ], [ %45, %53 ]
  tail call void @luaReplyToRedisReply(ptr noundef %0, ptr noundef %1)
  %46 = add i64 %.054, -1
  %47 = load i64, ptr %38, align 8, !tbaa !11
  %48 = icmp eq i64 %46, %47
  %.pre = load ptr, ptr %39, align 8, !tbaa !15
  br i1 %48, label %49, label %53

49:                                               ; preds = %44
  %50 = shl i64 %46, 4
  %51 = tail call ptr @realloc(ptr noundef %.pre, i64 noundef %50) #4
  %.not = icmp eq ptr %51, null
  br i1 %.not, label %61, label %52

52:                                               ; preds = %49
  store ptr %51, ptr %39, align 8, !tbaa !15
  br label %53

53:                                               ; preds = %52, %44
  %54 = phi ptr [ %51, %52 ], [ %.pre, %44 ]
  %55 = load ptr, ptr %40, align 8, !tbaa !5
  %56 = getelementptr inbounds ptr, ptr %54, i64 %46
  store ptr %55, ptr %56, align 8, !tbaa !16
  %57 = add i64 %45, 1
  %58 = uitofp i64 %45 to double
  tail call void @lua_pushnumber(ptr noundef %1, double noundef %58) #3
  tail call void @lua_gettable(ptr noundef %1, i32 noundef -2) #3
  %59 = tail call i32 @lua_type(ptr noundef %1, i32 noundef -1) #3
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %.thread.loopexit, label %44

61:                                               ; preds = %49
  store ptr null, ptr %40, align 8, !tbaa !5
  br label %66

62:                                               ; preds = %2
  %63 = tail call ptr (...) @createNullReplyObject() #3
  %64 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %63, ptr %64, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %.thread, %31, %13, %15, %62, %17, %4
  tail call void @lua_settop(ptr noundef %1, i32 noundef -2) #3
  br label %66

66:                                               ; preds = %61, %65, %25
  ret void
}

declare ptr @createStringObject(ptr noundef, i32 noundef) local_unnamed_addr #0

declare i64 @lua_objlen(ptr noundef, i32 noundef) local_unnamed_addr #0

declare i32 @lua_toboolean(ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @createLongLongObject(i64 noundef) local_unnamed_addr #0

declare ptr @createNullReplyObject(...) local_unnamed_addr #0

declare ptr @createArrayObject(i64 noundef) local_unnamed_addr #0

attributes #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 nounwind willreturn allockind("realloc") allocsize(1) 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 #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 = { nounwind }
attributes #4 = { nounwind allocsize(1) }

!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, !10, i64 24}
!6 = !{!"rliteClient", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !7, i64 40}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !14, i64 32}
!12 = !{!"rliteReply", !7, i64 0, !13, i64 8, !7, i64 16, !10, i64 24, !14, i64 32, !10, i64 40}
!13 = !{!"long long", !8, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!12, !10, i64 40}
!16 = !{!10, !10, i64 0}


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