; 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 }

@lua_client = external hidden global ptr, align 8
@lua_random_dirty = external hidden global i32, align 4
@lua_write_dirty = external hidden global i32, align 4
@lua_time_start = external hidden global i64, align 8
@lua_time_limit = external hidden global i64, align 8
@lua_timedout = external hidden global i32, align 4
@lua_kill = external hidden global i32, align 4
@lua = external hidden global ptr, align 8
@.str.59 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [5 x i8], align 1
@lua_caller = external hidden global ptr, align 8
@evalGenericCommand.gc_count = external hidden global i64, align 8
@.str.65 = external hidden unnamed_addr constant [39 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
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #1

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

declare void @lua_getfield(ptr noundef, i32 noundef, ptr noundef) #2

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @sha1hex(ptr noundef, ptr noundef, i64 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local void @luaMaskCountHook(ptr noundef, ptr noundef) #3

declare i64 @rl_mstime(...) #2

; Function Attrs: nounwind uwtable
declare dso_local void @scriptingInit() #3

; Function Attrs: nounwind uwtable
declare dso_local void @luaReplyToRedisReply(ptr noundef, ptr noundef) #3

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

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

declare ptr @createErrorObject(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @evalGenericCommand(ptr noundef %0, i32 noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca [43 x i8], align 16
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca [1024 x i8], align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @scriptingInit()
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.rliteClient, ptr %16, i32 0, i32 4
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  %19 = load ptr, ptr @lua_client, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.rliteClient, ptr %19, i32 0, i32 4
  store ptr %18, ptr %20, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 43, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  call void @rliteSrand48(i32 noundef 0)
  store i32 0, ptr @lua_random_dirty, align 4, !tbaa !9
  store i32 0, ptr @lua_write_dirty, align 4, !tbaa !9
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.rliteClient, ptr %22, i32 0, i32 1
  %24 = load ptr, ptr %23, align 8, !tbaa !13
  %25 = getelementptr inbounds ptr, ptr %24, i64 2
  %26 = load ptr, ptr %25, align 8, !tbaa !5
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.rliteClient, ptr %27, i32 0, i32 2
  %29 = load ptr, ptr %28, align 8, !tbaa !14
  %30 = getelementptr inbounds i64, ptr %29, i64 2
  %31 = load i64, ptr %30, align 8, !tbaa !15
  %32 = call i32 @getLongLongFromObjectOrReply(ptr noundef %21, ptr noundef %26, i64 noundef %31, ptr noundef %6, ptr noundef null)
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %35

34:                                               ; preds = %2
  store i32 1, ptr %9, align 4
  br label %267

35:                                               ; preds = %2
  %36 = load i64, ptr %6, align 8, !tbaa !17
  %37 = load ptr, ptr %3, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.rliteClient, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 8, !tbaa !19
  %40 = sub nsw i32 %39, 3
  %41 = sext i32 %40 to i64
  %42 = icmp sgt i64 %36, %41
  br i1 %42, label %43, label %47

43:                                               ; preds = %35
  %44 = call ptr @createErrorObject(ptr noundef @.str.59)
  %45 = load ptr, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.rliteClient, ptr %45, i32 0, i32 3
  store ptr %44, ptr %46, align 8, !tbaa !20
  store i32 1, ptr %9, align 4
  br label %267

47:                                               ; preds = %35
  %48 = load i64, ptr %6, align 8, !tbaa !17
  %49 = icmp slt i64 %48, 0
  br i1 %49, label %50, label %54

50:                                               ; preds = %47
  %51 = call ptr @createErrorObject(ptr noundef @.str.60)
  %52 = load ptr, ptr %3, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.rliteClient, ptr %52, i32 0, i32 3
  store ptr %51, ptr %53, align 8, !tbaa !20
  store i32 1, ptr %9, align 4
  br label %267

54:                                               ; preds = %47
  br label %55

55:                                               ; preds = %54
  %56 = getelementptr inbounds [43 x i8], ptr %5, i64 0, i64 0
  store i8 102, ptr %56, align 16, !tbaa !21
  %57 = getelementptr inbounds [43 x i8], ptr %5, i64 0, i64 1
  store i8 95, ptr %57, align 1, !tbaa !21
  %58 = load i32, ptr %4, align 4, !tbaa !9
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %73, label %60

60:                                               ; preds = %55
  %61 = getelementptr inbounds [43 x i8], ptr %5, i64 0, i64 0
  %62 = getelementptr inbounds i8, ptr %61, i64 2
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.rliteClient, ptr %63, i32 0, i32 1
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = getelementptr inbounds ptr, ptr %65, i64 1
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.rliteClient, ptr %68, i32 0, i32 2
  %70 = load ptr, ptr %69, align 8, !tbaa !14
  %71 = getelementptr inbounds i64, ptr %70, i64 1
  %72 = load i64, ptr %71, align 8, !tbaa !15
  call void @sha1hex(ptr noundef %62, ptr noundef %67, i64 noundef %72)
  br label %146

73:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %74 = load ptr, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.rliteClient, ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !13
  %77 = getelementptr inbounds ptr, ptr %76, i64 1
  %78 = load ptr, ptr %77, align 8, !tbaa !5
  store ptr %78, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %79

79:                                               ; preds = %120, %73
  %80 = load i32, ptr %10, align 4, !tbaa !9
  %81 = icmp slt i32 %80, 40
  br i1 %81, label %82, label %123

82:                                               ; preds = %79
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = load i32, ptr %10, align 4, !tbaa !9
  %85 = sext i32 %84 to i64
  %86 = getelementptr inbounds i8, ptr %83, i64 %85
  %87 = load i8, ptr %86, align 1, !tbaa !21
  %88 = sext i8 %87 to i32
  %89 = icmp sge i32 %88, 65
  br i1 %89, label %90, label %106

90:                                               ; preds = %82
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = load i32, ptr %10, align 4, !tbaa !9
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds i8, ptr %91, i64 %93
  %95 = load i8, ptr %94, align 1, !tbaa !21
  %96 = sext i8 %95 to i32
  %97 = icmp sle i32 %96, 90
  br i1 %97, label %98, label %106

98:                                               ; preds = %90
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = load i32, ptr %10, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds i8, ptr %99, i64 %101
  %103 = load i8, ptr %102, align 1, !tbaa !21
  %104 = sext i8 %103 to i32
  %105 = add nsw i32 %104, 32
  br label %113

106:                                              ; preds = %90, %82
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = load i32, ptr %10, align 4, !tbaa !9
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds i8, ptr %107, i64 %109
  %111 = load i8, ptr %110, align 1, !tbaa !21
  %112 = sext i8 %111 to i32
  br label %113

113:                                              ; preds = %106, %98
  %114 = phi i32 [ %105, %98 ], [ %112, %106 ]
  %115 = trunc i32 %114 to i8
  %116 = load i32, ptr %10, align 4, !tbaa !9
  %117 = add nsw i32 %116, 2
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [43 x i8], ptr %5, i64 0, i64 %118
  store i8 %115, ptr %119, align 1, !tbaa !21
  br label %120

120:                                              ; preds = %113
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %10, align 4, !tbaa !9
  br label %79, !llvm.loop !22

123:                                              ; preds = %79
  %124 = getelementptr inbounds [43 x i8], ptr %5, i64 0, i64 42
  store i8 0, ptr %124, align 2, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %125 = load ptr, ptr %3, align 8, !tbaa !5
  %126 = getelementptr inbounds [43 x i8], ptr %5, i64 0, i64 0
  %127 = getelementptr inbounds i8, ptr %126, i64 2
  %128 = call i32 @getScript(ptr noundef %125, ptr noundef %127, ptr noundef %12, ptr noundef %13)
  store i32 %128, ptr %14, align 4, !tbaa !9
  %129 = load i32, ptr %14, align 4, !tbaa !9
  %130 = icmp ne i32 %129, 0
  br i1 %130, label %131, label %135

131:                                              ; preds = %123
  %132 = call ptr @createErrorObject(ptr noundef @.str.61)
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.rliteClient, ptr %133, i32 0, i32 3
  store ptr %132, ptr %134, align 8, !tbaa !20
  store i32 1, ptr %9, align 4
  br label %143

135:                                              ; preds = %123
  %136 = load ptr, ptr %3, align 8, !tbaa !5
  %137 = load ptr, ptr @lua, align 8, !tbaa !5
  %138 = getelementptr inbounds [43 x i8], ptr %5, i64 0, i64 0
  %139 = load ptr, ptr %12, align 8, !tbaa !5
  %140 = load i64, ptr %13, align 8, !tbaa !15
  %141 = call i32 @luaCreateFunction(ptr noundef %136, ptr noundef %137, ptr noundef %138, ptr noundef %139, i64 noundef %140)
  %142 = load ptr, ptr %12, align 8, !tbaa !5
  call void @free(ptr noundef %142) #4
  store i32 0, ptr %9, align 4
  br label %143

143:                                              ; preds = %135, %131
  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 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  %144 = load i32, ptr %9, align 4
  switch i32 %144, label %267 [
    i32 0, label %145
  ]

145:                                              ; preds = %143
  br label %146

146:                                              ; preds = %145, %60
  %147 = load ptr, ptr @lua, align 8, !tbaa !5
  call void @lua_getfield(ptr noundef %147, i32 noundef -10002, ptr noundef @.str.62)
  %148 = load ptr, ptr @lua, align 8, !tbaa !5
  %149 = getelementptr inbounds [43 x i8], ptr %5, i64 0, i64 0
  call void @lua_getfield(ptr noundef %148, i32 noundef -10002, ptr noundef %149)
  %150 = load ptr, ptr @lua, align 8, !tbaa !5
  %151 = call i32 @lua_type(ptr noundef %150, i32 noundef -1)
  %152 = icmp eq i32 %151, 0
  br i1 %152, label %153, label %188

153:                                              ; preds = %146
  %154 = load ptr, ptr @lua, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %154, i32 noundef -2)
  %155 = load i32, ptr %4, align 4, !tbaa !9
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %162

157:                                              ; preds = %153
  %158 = load ptr, ptr @lua, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %158, i32 noundef -2)
  %159 = call ptr @createErrorObject(ptr noundef @.str.61)
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.rliteClient, ptr %160, i32 0, i32 3
  store ptr %159, ptr %161, align 8, !tbaa !20
  store i32 1, ptr %9, align 4
  br label %267

162:                                              ; preds = %153
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = load ptr, ptr @lua, align 8, !tbaa !5
  %165 = getelementptr inbounds [43 x i8], ptr %5, i64 0, i64 0
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.rliteClient, ptr %166, i32 0, i32 1
  %168 = load ptr, ptr %167, align 8, !tbaa !13
  %169 = getelementptr inbounds ptr, ptr %168, i64 1
  %170 = load ptr, ptr %169, align 8, !tbaa !5
  %171 = load ptr, ptr %3, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.rliteClient, ptr %171, i32 0, i32 2
  %173 = load ptr, ptr %172, align 8, !tbaa !14
  %174 = getelementptr inbounds i64, ptr %173, i64 1
  %175 = load i64, ptr %174, align 8, !tbaa !15
  %176 = call i32 @luaCreateFunction(ptr noundef %163, ptr noundef %164, ptr noundef %165, ptr noundef %170, i64 noundef %175)
  %177 = icmp eq i32 %176, -1
  br i1 %177, label %178, label %180

178:                                              ; preds = %162
  %179 = load ptr, ptr @lua, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %179, i32 noundef -2)
  store i32 1, ptr %9, align 4
  br label %267

180:                                              ; preds = %162
  %181 = load ptr, ptr @lua, align 8, !tbaa !5
  %182 = getelementptr inbounds [43 x i8], ptr %5, i64 0, i64 0
  call void @lua_getfield(ptr noundef %181, i32 noundef -10002, ptr noundef %182)
  %183 = load ptr, ptr @lua, align 8, !tbaa !5
  %184 = call i32 @lua_type(ptr noundef %183, i32 noundef -1)
  %185 = icmp eq i32 %184, 0
  br i1 %185, label %186, label %187

186:                                              ; preds = %180
  store i32 1, ptr %9, align 4
  br label %267

187:                                              ; preds = %180
  br label %188

188:                                              ; preds = %187, %146
  %189 = load ptr, ptr @lua, align 8, !tbaa !5
  %190 = load ptr, ptr %3, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.rliteClient, ptr %190, i32 0, i32 1
  %192 = load ptr, ptr %191, align 8, !tbaa !13
  %193 = getelementptr inbounds ptr, ptr %192, i64 3
  %194 = load ptr, ptr %3, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.rliteClient, ptr %194, i32 0, i32 2
  %196 = load ptr, ptr %195, align 8, !tbaa !14
  %197 = getelementptr inbounds i64, ptr %196, i64 3
  %198 = load i64, ptr %6, align 8, !tbaa !17
  %199 = trunc i64 %198 to i32
  call void @luaSetGlobalArray(ptr noundef %189, ptr noundef @.str.63, ptr noundef %193, ptr noundef %197, i32 noundef %199)
  %200 = load ptr, ptr @lua, align 8, !tbaa !5
  %201 = load ptr, ptr %3, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.rliteClient, ptr %201, i32 0, i32 1
  %203 = load ptr, ptr %202, align 8, !tbaa !13
  %204 = getelementptr inbounds ptr, ptr %203, i64 3
  %205 = load i64, ptr %6, align 8, !tbaa !17
  %206 = getelementptr inbounds ptr, ptr %204, i64 %205
  %207 = load ptr, ptr %3, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.rliteClient, ptr %207, i32 0, i32 2
  %209 = load ptr, ptr %208, align 8, !tbaa !14
  %210 = getelementptr inbounds i64, ptr %209, i64 3
  %211 = load i64, ptr %6, align 8, !tbaa !17
  %212 = getelementptr inbounds i64, ptr %210, i64 %211
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.rliteClient, ptr %213, i32 0, i32 0
  %215 = load i32, ptr %214, align 8, !tbaa !19
  %216 = sub nsw i32 %215, 3
  %217 = sext i32 %216 to i64
  %218 = load i64, ptr %6, align 8, !tbaa !17
  %219 = sub nsw i64 %217, %218
  %220 = trunc i64 %219 to i32
  call void @luaSetGlobalArray(ptr noundef %200, ptr noundef @.str.64, ptr noundef %206, ptr noundef %212, i32 noundef %220)
  %221 = load ptr, ptr %3, align 8, !tbaa !5
  store ptr %221, ptr @lua_caller, align 8, !tbaa !5
  %222 = call i64 (...) @rl_mstime()
  store i64 %222, ptr @lua_time_start, align 8, !tbaa !17
  store i32 0, ptr @lua_kill, align 4, !tbaa !9
  %223 = load i64, ptr @lua_time_limit, align 8, !tbaa !17
  %224 = icmp ugt i64 %223, 0
  br i1 %224, label %225, label %228

225:                                              ; preds = %188
  %226 = load ptr, ptr @lua, align 8, !tbaa !5
  %227 = call i32 @lua_sethook(ptr noundef %226, ptr noundef @luaMaskCountHook, i32 noundef 8, i32 noundef 100000)
  store i32 1, ptr %7, align 4, !tbaa !9
  br label %228

228:                                              ; preds = %225, %188
  %229 = load ptr, ptr @lua, align 8, !tbaa !5
  %230 = call i32 @lua_pcall(ptr noundef %229, i32 noundef 0, i32 noundef 1, i32 noundef -2)
  store i32 %230, ptr %8, align 4, !tbaa !9
  %231 = load i32, ptr %7, align 4, !tbaa !9
  %232 = icmp ne i32 %231, 0
  br i1 %232, label %233, label %236

233:                                              ; preds = %228
  %234 = load ptr, ptr @lua, align 8, !tbaa !5
  %235 = call i32 @lua_sethook(ptr noundef %234, ptr noundef @luaMaskCountHook, i32 noundef 0, i32 noundef 0)
  br label %236

236:                                              ; preds = %233, %228
  %237 = load i32, ptr @lua_timedout, align 4, !tbaa !9
  %238 = icmp ne i32 %237, 0
  br i1 %238, label %239, label %240

239:                                              ; preds = %236
  store i32 0, ptr @lua_timedout, align 4, !tbaa !9
  br label %240

240:                                              ; preds = %239, %236
  store ptr null, ptr @lua_caller, align 8, !tbaa !5
  %241 = load i64, ptr @evalGenericCommand.gc_count, align 8, !tbaa !15
  %242 = add nsw i64 %241, 1
  store i64 %242, ptr @evalGenericCommand.gc_count, align 8, !tbaa !15
  %243 = load i64, ptr @evalGenericCommand.gc_count, align 8, !tbaa !15
  %244 = icmp eq i64 %243, 50
  br i1 %244, label %245, label %248

245:                                              ; preds = %240
  %246 = load ptr, ptr @lua, align 8, !tbaa !5
  %247 = call i32 @lua_gc(ptr noundef %246, i32 noundef 5, i32 noundef 50)
  store i64 0, ptr @evalGenericCommand.gc_count, align 8, !tbaa !15
  br label %248

248:                                              ; preds = %245, %240
  %249 = load i32, ptr %8, align 4, !tbaa !9
  %250 = icmp ne i32 %249, 0
  br i1 %250, label %251, label %262

251:                                              ; preds = %248
  call void @llvm.lifetime.start.p0(i64 1024, ptr %15) #4
  %252 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %253 = getelementptr inbounds [43 x i8], ptr %5, i64 0, i64 0
  %254 = load ptr, ptr @lua, align 8, !tbaa !5
  %255 = call ptr @lua_tolstring(ptr noundef %254, i32 noundef -1, ptr noundef null)
  %256 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %252, i64 noundef 1024, ptr noundef @.str.65, ptr noundef %253, ptr noundef %255) #4
  %257 = getelementptr inbounds [1024 x i8], ptr %15, i64 0, i64 0
  %258 = call ptr @createErrorObject(ptr noundef %257)
  %259 = load ptr, ptr %3, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.rliteClient, ptr %259, i32 0, i32 3
  store ptr %258, ptr %260, align 8, !tbaa !20
  %261 = load ptr, ptr @lua, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %261, i32 noundef -3)
  call void @llvm.lifetime.end.p0(i64 1024, ptr %15) #4
  br label %266

262:                                              ; preds = %248
  %263 = load ptr, ptr %3, align 8, !tbaa !5
  %264 = load ptr, ptr @lua, align 8, !tbaa !5
  call void @luaReplyToRedisReply(ptr noundef %263, ptr noundef %264)
  %265 = load ptr, ptr @lua, align 8, !tbaa !5
  call void @lua_settop(ptr noundef %265, i32 noundef -2)
  br label %266

266:                                              ; preds = %262, %251
  store i32 0, ptr %9, align 4
  br label %267

267:                                              ; preds = %266, %186, %178, %157, %143, %50, %43, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 43, ptr %5) #4
  %268 = load i32, ptr %9, align 4
  switch i32 %268, label %270 [
    i32 0, label %269
    i32 1, label %269
  ]

269:                                              ; preds = %267, %267
  ret void

270:                                              ; preds = %267
  unreachable
}

declare void @rliteSrand48(i32 noundef) #2

declare i32 @getLongLongFromObjectOrReply(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #2

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

declare i32 @lua_sethook(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

declare i32 @lua_gc(ptr noundef, i32 noundef, i32 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 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 32}
!12 = !{!"rliteClient", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40}
!13 = !{!12, !6, i64 8}
!14 = !{!12, !6, i64 16}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"long long", !7, i64 0}
!19 = !{!12, !10, i64 0}
!20 = !{!12, !6, i64 24}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; 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"

@lua_client = external hidden local_unnamed_addr global ptr, align 8
@lua_random_dirty = external hidden local_unnamed_addr global i32, align 4
@lua_write_dirty = external hidden local_unnamed_addr global i32, align 4
@lua_time_start = external hidden local_unnamed_addr global i64, align 8
@lua_time_limit = external hidden local_unnamed_addr global i64, align 8
@lua_timedout = external hidden local_unnamed_addr global i32, align 4
@lua_kill = external hidden local_unnamed_addr global i32, align 4
@lua = external hidden local_unnamed_addr global ptr, align 8
@.str.59 = external hidden unnamed_addr constant [52 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.61 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.62 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.63 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.64 = external hidden unnamed_addr constant [5 x i8], align 1
@lua_caller = external hidden local_unnamed_addr global ptr, align 8
@evalGenericCommand.gc_count = external hidden local_unnamed_addr global i64, align 8
@.str.65 = external hidden unnamed_addr constant [39 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: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

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

declare void @lua_getfield(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @sha1hex(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @luaMaskCountHook(ptr noundef, ptr noundef) #4

declare i64 @rl_mstime(...) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local void @scriptingInit() local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @luaReplyToRedisReply(ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local void @luaSetGlobalArray(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @luaCreateFunction(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #4

declare ptr @createErrorObject(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @evalGenericCommand(ptr noundef %0, i32 noundef %1) local_unnamed_addr #4 {
  %3 = alloca [43 x i8], align 16
  %4 = ptrtoint ptr %3 to i64
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca [1024 x i8], align 16
  tail call void @scriptingInit()
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %11 = load ptr, ptr @lua_client, align 8, !tbaa !11
  %12 = getelementptr inbounds i8, ptr %11, i64 32
  store ptr %10, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 43, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  tail call void @rliteSrand48(i32 noundef 0) #5
  store i32 0, ptr @lua_random_dirty, align 4, !tbaa !12
  store i32 0, ptr @lua_write_dirty, align 4, !tbaa !12
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %14, i64 16
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  %18 = load ptr, ptr %17, align 8, !tbaa !14
  %19 = getelementptr inbounds i8, ptr %18, i64 16
  %20 = load i64, ptr %19, align 8, !tbaa !15
  %21 = call i32 @getLongLongFromObjectOrReply(ptr noundef %0, ptr noundef %16, i64 noundef %20, ptr noundef nonnull %5, ptr noundef null) #5
  %.not = icmp eq i32 %21, 0
  br i1 %.not, label %22, label %176

22:                                               ; preds = %2
  %23 = load i64, ptr %5, align 8, !tbaa !17
  %24 = load i32, ptr %0, align 8, !tbaa !19
  %25 = add nsw i32 %24, -3
  %26 = sext i32 %25 to i64
  %27 = icmp sgt i64 %23, %26
  br i1 %27, label %28, label %31

28:                                               ; preds = %22
  %29 = call ptr @createErrorObject(ptr noundef nonnull @.str.59) #5
  %30 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %29, ptr %30, align 8, !tbaa !20
  br label %176

31:                                               ; preds = %22
  %32 = icmp slt i64 %23, 0
  br i1 %32, label %33, label %36

33:                                               ; preds = %31
  %34 = call ptr @createErrorObject(ptr noundef nonnull @.str.60) #5
  %35 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %34, ptr %35, align 8, !tbaa !20
  br label %176

36:                                               ; preds = %31
  store i8 102, ptr %3, align 16, !tbaa !21
  %37 = getelementptr inbounds i8, ptr %3, i64 1
  store i8 95, ptr %37, align 1, !tbaa !21
  %.not45 = icmp eq i32 %1, 0
  br i1 %.not45, label %38, label %vector.memcheck

38:                                               ; preds = %36
  %39 = getelementptr inbounds i8, ptr %3, i64 2
  %40 = load ptr, ptr %13, align 8, !tbaa !13
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !11
  %43 = load ptr, ptr %17, align 8, !tbaa !14
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load i64, ptr %44, align 8, !tbaa !15
  call void @sha1hex(ptr noundef nonnull %39, ptr noundef %42, i64 noundef %45)
  br label %98

vector.memcheck:                                  ; preds = %36
  %46 = load ptr, ptr %13, align 8, !tbaa !13
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = ptrtoint ptr %48 to i64
  %50 = or disjoint i64 %4, 2
  %51 = sub i64 %50, %49
  %diff.check = icmp ult i64 %51, 16
  br i1 %diff.check, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %vector.memcheck
  %52 = getelementptr inbounds i8, ptr %48, i64 8
  %wide.load = load <8 x i8>, ptr %48, align 1, !tbaa !21
  %wide.load54 = load <8 x i8>, ptr %52, align 1, !tbaa !21
  %53 = add <8 x i8> %wide.load, <i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65>
  %54 = add <8 x i8> %wide.load54, <i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65>
  %55 = icmp ult <8 x i8> %53, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %56 = icmp ult <8 x i8> %54, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %57 = add nuw nsw <8 x i8> %wide.load, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %58 = add nuw nsw <8 x i8> %wide.load54, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %59 = select <8 x i1> %55, <8 x i8> %57, <8 x i8> %wide.load
  %60 = select <8 x i1> %56, <8 x i8> %58, <8 x i8> %wide.load54
  %61 = getelementptr inbounds i8, ptr %3, i64 2
  %62 = getelementptr inbounds i8, ptr %3, i64 10
  store <8 x i8> %59, ptr %61, align 2, !tbaa !21
  store <8 x i8> %60, ptr %62, align 2, !tbaa !21
  %63 = getelementptr inbounds i8, ptr %48, i64 16
  %64 = getelementptr inbounds i8, ptr %48, i64 24
  %wide.load.1 = load <8 x i8>, ptr %63, align 1, !tbaa !21
  %wide.load54.1 = load <8 x i8>, ptr %64, align 1, !tbaa !21
  %65 = add <8 x i8> %wide.load.1, <i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65>
  %66 = add <8 x i8> %wide.load54.1, <i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65, i8 -65>
  %67 = icmp ult <8 x i8> %65, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %68 = icmp ult <8 x i8> %66, <i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26, i8 26>
  %69 = add nuw nsw <8 x i8> %wide.load.1, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %70 = add nuw nsw <8 x i8> %wide.load54.1, <i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32, i8 32>
  %71 = select <8 x i1> %67, <8 x i8> %69, <8 x i8> %wide.load.1
  %72 = select <8 x i1> %68, <8 x i8> %70, <8 x i8> %wide.load54.1
  %73 = getelementptr inbounds i8, ptr %3, i64 18
  %74 = getelementptr inbounds i8, ptr %3, i64 26
  store <8 x i8> %71, ptr %73, align 2, !tbaa !21
  store <8 x i8> %72, ptr %74, align 2, !tbaa !21
  br label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %vector.body, %vector.memcheck
  %indvars.iv.ph = phi i64 [ 0, %vector.memcheck ], [ 32, %vector.body ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph, %scalar.ph.preheader
  %indvars.iv = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.1, %scalar.ph ]
  %75 = getelementptr inbounds i8, ptr %48, i64 %indvars.iv
  %76 = load i8, ptr %75, align 1, !tbaa !21
  %77 = add i8 %76, -65
  %or.cond = icmp ult i8 %77, 26
  %78 = add nuw nsw i8 %76, 32
  %spec.select = select i1 %or.cond, i8 %78, i8 %76
  %79 = add nuw nsw i64 %indvars.iv, 2
  %80 = getelementptr inbounds [43 x i8], ptr %3, i64 0, i64 %79
  store i8 %spec.select, ptr %80, align 2, !tbaa !21
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %81 = getelementptr inbounds i8, ptr %48, i64 %indvars.iv.next
  %82 = load i8, ptr %81, align 1, !tbaa !21
  %83 = add i8 %82, -65
  %or.cond.1 = icmp ult i8 %83, 26
  %84 = add nuw nsw i8 %82, 32
  %spec.select.1 = select i1 %or.cond.1, i8 %84, i8 %82
  %85 = add nuw nsw i64 %indvars.iv, 3
  %86 = getelementptr inbounds [43 x i8], ptr %3, i64 0, i64 %85
  store i8 %spec.select.1, ptr %86, align 1, !tbaa !21
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 40
  br i1 %exitcond.not.1, label %.loopexit, label %scalar.ph, !llvm.loop !22

.loopexit:                                        ; preds = %scalar.ph
  %87 = getelementptr inbounds i8, ptr %3, i64 42
  store i8 0, ptr %87, align 2, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %88 = getelementptr inbounds i8, ptr %3, i64 2
  %89 = call i32 @getScript(ptr noundef nonnull %0, ptr noundef nonnull %88, ptr noundef nonnull %6, ptr noundef nonnull %7)
  %.not46 = icmp eq i32 %89, 0
  br i1 %.not46, label %.thread, label %95

.thread:                                          ; preds = %.loopexit
  %90 = load ptr, ptr @lua, align 8, !tbaa !11
  %91 = load ptr, ptr %6, align 8, !tbaa !11
  %92 = load i64, ptr %7, align 8, !tbaa !15
  %93 = call i32 @luaCreateFunction(ptr noundef nonnull %0, ptr noundef %90, ptr noundef nonnull %3, ptr noundef %91, i64 noundef %92)
  %94 = load ptr, ptr %6, align 8, !tbaa !11
  call void @free(ptr noundef %94) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %98

95:                                               ; preds = %.loopexit
  %96 = call ptr @createErrorObject(ptr noundef nonnull @.str.61) #5
  %97 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %96, ptr %97, align 8, !tbaa !20
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %176

98:                                               ; preds = %.thread, %38
  %99 = load ptr, ptr @lua, align 8, !tbaa !11
  call void @lua_getfield(ptr noundef %99, i32 noundef -10002, ptr noundef nonnull @.str.62) #5
  %100 = load ptr, ptr @lua, align 8, !tbaa !11
  call void @lua_getfield(ptr noundef %100, i32 noundef -10002, ptr noundef nonnull %3) #5
  %101 = load ptr, ptr @lua, align 8, !tbaa !11
  %102 = call i32 @lua_type(ptr noundef %101, i32 noundef -1) #5
  %103 = icmp eq i32 %102, 0
  br i1 %103, label %104, label %125

104:                                              ; preds = %98
  %105 = load ptr, ptr @lua, align 8, !tbaa !11
  call void @lua_settop(ptr noundef %105, i32 noundef -2) #5
  %106 = load ptr, ptr @lua, align 8, !tbaa !11
  br i1 %.not45, label %110, label %107

107:                                              ; preds = %104
  call void @lua_settop(ptr noundef %106, i32 noundef -2) #5
  %108 = call ptr @createErrorObject(ptr noundef nonnull @.str.61) #5
  %109 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %108, ptr %109, align 8, !tbaa !20
  br label %176

110:                                              ; preds = %104
  %111 = load ptr, ptr %13, align 8, !tbaa !13
  %112 = getelementptr inbounds i8, ptr %111, i64 8
  %113 = load ptr, ptr %112, align 8, !tbaa !11
  %114 = load ptr, ptr %17, align 8, !tbaa !14
  %115 = getelementptr inbounds i8, ptr %114, i64 8
  %116 = load i64, ptr %115, align 8, !tbaa !15
  %117 = call i32 @luaCreateFunction(ptr noundef nonnull %0, ptr noundef %106, ptr noundef nonnull %3, ptr noundef %113, i64 noundef %116)
  %118 = icmp eq i32 %117, -1
  %119 = load ptr, ptr @lua, align 8, !tbaa !11
  br i1 %118, label %120, label %121

120:                                              ; preds = %110
  call void @lua_settop(ptr noundef %119, i32 noundef -2) #5
  br label %176

121:                                              ; preds = %110
  call void @lua_getfield(ptr noundef %119, i32 noundef -10002, ptr noundef nonnull %3) #5
  %122 = load ptr, ptr @lua, align 8, !tbaa !11
  %123 = call i32 @lua_type(ptr noundef %122, i32 noundef -1) #5
  %124 = icmp eq i32 %123, 0
  br i1 %124, label %176, label %125

125:                                              ; preds = %121, %98
  %126 = load ptr, ptr @lua, align 8, !tbaa !11
  %127 = load ptr, ptr %13, align 8, !tbaa !13
  %128 = getelementptr inbounds i8, ptr %127, i64 24
  %129 = load ptr, ptr %17, align 8, !tbaa !14
  %130 = getelementptr inbounds i8, ptr %129, i64 24
  %131 = load i64, ptr %5, align 8, !tbaa !17
  %132 = trunc i64 %131 to i32
  call void @luaSetGlobalArray(ptr noundef %126, ptr noundef nonnull @.str.63, ptr noundef nonnull %128, ptr noundef nonnull %130, i32 noundef %132)
  %133 = load ptr, ptr @lua, align 8, !tbaa !11
  %134 = load ptr, ptr %13, align 8, !tbaa !13
  %135 = getelementptr inbounds i8, ptr %134, i64 24
  %136 = load i64, ptr %5, align 8, !tbaa !17
  %137 = getelementptr inbounds ptr, ptr %135, i64 %136
  %138 = load ptr, ptr %17, align 8, !tbaa !14
  %139 = getelementptr inbounds i8, ptr %138, i64 24
  %140 = getelementptr inbounds i64, ptr %139, i64 %136
  %141 = load i32, ptr %0, align 8, !tbaa !19
  %142 = trunc i64 %136 to i32
  %reass.sub = sub i32 %141, %142
  %143 = add i32 %reass.sub, -3
  call void @luaSetGlobalArray(ptr noundef %133, ptr noundef nonnull @.str.64, ptr noundef nonnull %137, ptr noundef nonnull %140, i32 noundef %143)
  store ptr %0, ptr @lua_caller, align 8, !tbaa !11
  %144 = call i64 (...) @rl_mstime() #5
  store i64 %144, ptr @lua_time_start, align 8, !tbaa !17
  store i32 0, ptr @lua_kill, align 4, !tbaa !12
  %145 = load i64, ptr @lua_time_limit, align 8, !tbaa !17
  %.not47 = icmp eq i64 %145, 0
  %146 = load ptr, ptr @lua, align 8, !tbaa !11
  br i1 %.not47, label %.thread51, label %148

.thread51:                                        ; preds = %125
  %147 = call i32 @lua_pcall(ptr noundef %146, i32 noundef 0, i32 noundef 1, i32 noundef -2) #5
  br label %154

148:                                              ; preds = %125
  %149 = call i32 @lua_sethook(ptr noundef %146, ptr noundef nonnull @luaMaskCountHook, i32 noundef 8, i32 noundef 100000) #5
  %150 = load ptr, ptr @lua, align 8, !tbaa !11
  %151 = call i32 @lua_pcall(ptr noundef %150, i32 noundef 0, i32 noundef 1, i32 noundef -2) #5
  %152 = load ptr, ptr @lua, align 8, !tbaa !11
  %153 = call i32 @lua_sethook(ptr noundef %152, ptr noundef nonnull @luaMaskCountHook, i32 noundef 0, i32 noundef 0) #5
  br label %154

154:                                              ; preds = %.thread51, %148
  %155 = phi i32 [ %147, %.thread51 ], [ %151, %148 ]
  %156 = load i32, ptr @lua_timedout, align 4, !tbaa !12
  %.not49 = icmp eq i32 %156, 0
  br i1 %.not49, label %158, label %157

157:                                              ; preds = %154
  store i32 0, ptr @lua_timedout, align 4, !tbaa !12
  br label %158

158:                                              ; preds = %157, %154
  store ptr null, ptr @lua_caller, align 8, !tbaa !11
  %159 = load i64, ptr @evalGenericCommand.gc_count, align 8, !tbaa !15
  %160 = add nsw i64 %159, 1
  store i64 %160, ptr @evalGenericCommand.gc_count, align 8, !tbaa !15
  %161 = icmp eq i64 %160, 50
  br i1 %161, label %162, label %165

162:                                              ; preds = %158
  %163 = load ptr, ptr @lua, align 8, !tbaa !11
  %164 = call i32 @lua_gc(ptr noundef %163, i32 noundef 5, i32 noundef 50) #5
  store i64 0, ptr @evalGenericCommand.gc_count, align 8, !tbaa !15
  br label %165

165:                                              ; preds = %162, %158
  %.not50 = icmp eq i32 %155, 0
  br i1 %.not50, label %173, label %166

166:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %8) #5
  %167 = load ptr, ptr @lua, align 8, !tbaa !11
  %168 = call ptr @lua_tolstring(ptr noundef %167, i32 noundef -1, ptr noundef null) #5
  %169 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %8, i64 noundef 1024, ptr noundef nonnull @.str.65, ptr noundef nonnull %3, ptr noundef %168) #5
  %170 = call ptr @createErrorObject(ptr noundef nonnull %8) #5
  %171 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %170, ptr %171, align 8, !tbaa !20
  %172 = load ptr, ptr @lua, align 8, !tbaa !11
  call void @lua_settop(ptr noundef %172, i32 noundef -3) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %8) #5
  br label %176

173:                                              ; preds = %165
  %174 = load ptr, ptr @lua, align 8, !tbaa !11
  call void @luaReplyToRedisReply(ptr noundef nonnull %0, ptr noundef %174)
  %175 = load ptr, ptr @lua, align 8, !tbaa !11
  call void @lua_settop(ptr noundef %175, i32 noundef -2) #5
  br label %176

176:                                              ; preds = %95, %166, %173, %121, %2, %120, %107, %33, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 43, ptr nonnull %3) #5
  ret void
}

declare void @rliteSrand48(i32 noundef) local_unnamed_addr #3

declare i32 @getLongLongFromObjectOrReply(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i32 @getScript(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @lua_sethook(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

declare i32 @lua_gc(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { "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 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 #5 = { 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, !10, i64 32}
!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 = !{!10, !10, i64 0}
!12 = !{!7, !7, i64 0}
!13 = !{!6, !10, i64 8}
!14 = !{!6, !10, i64 16}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !8, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"long long", !8, i64 0}
!19 = !{!6, !7, i64 0}
!20 = !{!6, !10, i64 24}
!21 = !{!8, !8, i64 0}
!22 = distinct !{!22, !23, !24}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!"llvm.loop.isvectorized", i32 1}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopLoadEliminationPass,LoopRotatePass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass