; LLVM IR from jingweizhanghuai/Morn :: src/ptc (morn_message)

; 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.MHandle = type { i32, i32, ptr, ptr }
%struct.HandleProcTopic = type { [256 x i8], i32, i32, i32, i32, ptr, i64 }
%struct.ProcTopicInfo = type { i32, i32, i32, i32, i32, i32, i64, [128 x %struct.ProcCommunicateState], [0 x i8] }
%struct.ProcCommunicateState = type { i32, i32 }

@.str = external hidden unnamed_addr constant [78 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@__FUNCTION__.m_ProcTopicWrite = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @endProcTopic(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: nounwind
declare i32 @flock(i32 noundef, i32 noundef) #2

; Function Attrs: nounwind
declare i64 @lseek(i32 noundef, i64 noundef, i32 noundef) #2

declare void @m_Exception(i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ...) #3

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

declare i64 @read(i32 noundef, ptr noundef, i64 noundef) #3

declare i64 @write(i32 noundef, ptr noundef, i64 noundef) #3

declare i32 @usleep(i32 noundef) #3

; Function Attrs: nounwind
declare i32 @remove(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local ptr @m_ProcTopicWrite(ptr noundef %0, ptr noundef %1, i32 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca [128 x i8], align 16
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %36

35:                                               ; preds = %3
  store ptr @.str.4, ptr %4, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %35, %3
  br label %37

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = icmp eq ptr %38, null
  %40 = zext i1 %39 to i32
  store i32 %40, ptr %7, align 4, !tbaa !9
  %41 = load i32, ptr %7, align 4, !tbaa !9
  %42 = icmp ne i32 %41, 0
  br i1 %42, label %43, label %45

43:                                               ; preds = %37
  %44 = load i32, ptr %7, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %44, i32 noundef -1, ptr noundef @.str, i32 noundef 133, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.5)
  br label %45

45:                                               ; preds = %43, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  br label %46

46:                                               ; preds = %45
  %47 = load i32, ptr %6, align 4, !tbaa !9
  %48 = icmp slt i32 %47, 0
  br i1 %48, label %49, label %54

49:                                               ; preds = %46
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = call i64 @strlen(ptr noundef %50) #7
  %52 = add i64 %51, 1
  %53 = trunc i64 %52 to i32
  store i32 %53, ptr %6, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %49, %46
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %55 = load i32, ptr %6, align 4, !tbaa !9
  %56 = add nsw i32 %55, 7
  %57 = ashr i32 %56, 3
  %58 = shl i32 %57, 3
  store i32 %58, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = call ptr @mMornObject(ptr noundef %59, i32 noundef -1)
  %61 = call ptr @GetHandle(ptr noundef %60, i32 noundef 288, i32 noundef 1928559086, ptr noundef @endProcTopic)
  store ptr %61, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.MHandle, ptr %62, i32 0, i32 3
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  store ptr %64, ptr %11, align 8, !tbaa !5
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = call i32 @mHandleValid(ptr noundef %65)
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %415, label %68

68:                                               ; preds = %54
  %69 = call i32 @getpid() #6
  %70 = mul nsw i32 %69, 1000
  %71 = call i32 (...) @mThreadOrder()
  %72 = add nsw i32 %70, %71
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.HandleProcTopic, ptr %73, i32 0, i32 1
  store i32 %72, ptr %74, align 8, !tbaa !13
  br label %75

75:                                               ; preds = %68
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = call ptr @mMornObject(ptr noundef %76, i32 noundef -1)
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  call void @m_PropertyFunction(ptr noundef %77, ptr noundef @.str.6, ptr noundef @mornObjectRemove, ptr noundef %78)
  br label %79

79:                                               ; preds = %75
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = call ptr @mMornObject(ptr noundef %81, i32 noundef -1)
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.HandleProcTopic, ptr %83, i32 0, i32 4
  call void @m_PropertyVariate(ptr noundef %82, ptr noundef @.str.7, ptr noundef %84, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 128, ptr %12) #6
  %85 = call i32 @umask(i32 noundef 0) #6
  %86 = getelementptr inbounds [128 x i8], ptr %12, i64 0, i64 0
  %87 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %86, ptr noundef @.str.8) #6
  %88 = getelementptr inbounds [128 x i8], ptr %12, i64 0, i64 0
  %89 = call i32 @access(ptr noundef %88, i32 noundef 0) #6
  %90 = icmp slt i32 %89, 0
  br i1 %90, label %91, label %94

91:                                               ; preds = %80
  %92 = getelementptr inbounds [128 x i8], ptr %12, i64 0, i64 0
  %93 = call i32 @mkdir(ptr noundef %92, i32 noundef 511) #6
  br label %94

94:                                               ; preds = %91, %80
  %95 = load ptr, ptr %11, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.HandleProcTopic, ptr %95, i32 0, i32 0
  %97 = getelementptr inbounds [256 x i8], ptr %96, i64 0, i64 0
  %98 = getelementptr inbounds [128 x i8], ptr %12, i64 0, i64 0
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %97, ptr noundef @.str.9, ptr noundef %98, ptr noundef %99) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.HandleProcTopic, ptr %101, i32 0, i32 0
  %103 = getelementptr inbounds [256 x i8], ptr %102, i64 0, i64 0
  %104 = call i32 @access(ptr noundef %103, i32 noundef 0) #6
  store i32 %104, ptr %13, align 4, !tbaa !9
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.HandleProcTopic, ptr %105, i32 0, i32 0
  %107 = getelementptr inbounds [256 x i8], ptr %106, i64 0, i64 0
  %108 = call i32 (ptr, i32, ...) @open(ptr noundef %107, i32 noundef 66, i32 noundef 438)
  %109 = load ptr, ptr %11, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.HandleProcTopic, ptr %109, i32 0, i32 2
  store i32 %108, ptr %110, align 4, !tbaa !16
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = icmp sge i32 %111, 0
  br i1 %112, label %113, label %122

113:                                              ; preds = %94
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.HandleProcTopic, ptr %114, i32 0, i32 2
  %116 = load i32, ptr %115, align 4, !tbaa !16
  %117 = call i64 @lseek(i32 noundef %116, i64 noundef 1, i32 noundef 2) #6
  %118 = sub i64 %117, 1056
  %119 = trunc i64 %118 to i32
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.HandleProcTopic, ptr %120, i32 0, i32 3
  store i32 %119, ptr %121, align 8, !tbaa !17
  br label %122

122:                                              ; preds = %113, %94
  %123 = load i32, ptr %13, align 4, !tbaa !9
  %124 = icmp slt i32 %123, 0
  br i1 %124, label %125, label %190

125:                                              ; preds = %122
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.HandleProcTopic, ptr %126, i32 0, i32 4
  %128 = load i32, ptr %127, align 4, !tbaa !18
  %129 = icmp eq i32 %128, 0
  br i1 %129, label %130, label %142

130:                                              ; preds = %125
  %131 = load i32, ptr %8, align 4, !tbaa !9
  %132 = mul nsw i32 %131, 2
  %133 = icmp sgt i32 %132, 1024
  br i1 %133, label %134, label %137

134:                                              ; preds = %130
  %135 = load i32, ptr %8, align 4, !tbaa !9
  %136 = mul nsw i32 %135, 2
  br label %138

137:                                              ; preds = %130
  br label %138

138:                                              ; preds = %137, %134
  %139 = phi i32 [ %136, %134 ], [ 1024, %137 ]
  %140 = load ptr, ptr %11, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.HandleProcTopic, ptr %140, i32 0, i32 4
  store i32 %139, ptr %141, align 4, !tbaa !18
  br label %142

142:                                              ; preds = %138, %125
  %143 = load ptr, ptr %11, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.HandleProcTopic, ptr %143, i32 0, i32 4
  %145 = load i32, ptr %144, align 4, !tbaa !18
  %146 = mul nsw i32 %145, 16
  %147 = load ptr, ptr %11, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.HandleProcTopic, ptr %147, i32 0, i32 3
  store i32 %146, ptr %148, align 8, !tbaa !17
  br label %149

149:                                              ; preds = %142
  br label %150

150:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %151 = load ptr, ptr %11, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.HandleProcTopic, ptr %151, i32 0, i32 2
  %153 = load i32, ptr %152, align 4, !tbaa !16
  %154 = load ptr, ptr %11, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.HandleProcTopic, ptr %154, i32 0, i32 3
  %156 = load i32, ptr %155, align 8, !tbaa !17
  %157 = sext i32 %156 to i64
  %158 = add i64 %157, 1056
  %159 = call i64 @lseek(i32 noundef %153, i64 noundef %158, i32 noundef 0) #6
  %160 = load ptr, ptr %11, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.HandleProcTopic, ptr %160, i32 0, i32 3
  %162 = load i32, ptr %161, align 8, !tbaa !17
  %163 = sext i32 %162 to i64
  %164 = add i64 %163, 1056
  %165 = icmp ne i64 %159, %164
  %166 = zext i1 %165 to i32
  store i32 %166, ptr %14, align 4, !tbaa !9
  %167 = load i32, ptr %14, align 4, !tbaa !9
  %168 = icmp ne i32 %167, 0
  br i1 %168, label %169, label %171

169:                                              ; preds = %150
  %170 = load i32, ptr %14, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %170, i32 noundef -1, ptr noundef @.str, i32 noundef 171, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.1)
  br label %171

171:                                              ; preds = %169, %150
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %172

172:                                              ; preds = %171
  br label %173

173:                                              ; preds = %172
  br label %174

174:                                              ; preds = %173
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %175 = load ptr, ptr %11, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.HandleProcTopic, ptr %175, i32 0, i32 2
  %177 = load i32, ptr %176, align 4, !tbaa !16
  %178 = call i64 @write(i32 noundef %177, ptr noundef %9, i64 noundef 4)
  %179 = icmp ne i64 %178, 4
  %180 = zext i1 %179 to i32
  store i32 %180, ptr %15, align 4, !tbaa !9
  %181 = load i32, ptr %15, align 4, !tbaa !9
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %185

183:                                              ; preds = %174
  %184 = load i32, ptr %15, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %184, i32 noundef -1, ptr noundef @.str, i32 noundef 171, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.3)
  br label %185

185:                                              ; preds = %183, %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %186

186:                                              ; preds = %185
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  br label %189

189:                                              ; preds = %188
  br label %190

190:                                              ; preds = %189, %122
  br label %191

191:                                              ; preds = %190
  %192 = load ptr, ptr %11, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.HandleProcTopic, ptr %192, i32 0, i32 3
  %194 = load i32, ptr %193, align 8, !tbaa !17
  %195 = sext i32 %194 to i64
  %196 = add i64 %195, 1056
  %197 = load ptr, ptr %11, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.HandleProcTopic, ptr %197, i32 0, i32 2
  %199 = load i32, ptr %198, align 4, !tbaa !16
  %200 = call ptr @mmap(ptr noundef null, i64 noundef %196, i32 noundef 3, i32 noundef 1, i32 noundef %199, i64 noundef 0) #6
  %201 = load ptr, ptr %11, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.HandleProcTopic, ptr %201, i32 0, i32 5
  store ptr %200, ptr %202, align 8, !tbaa !19
  br label %203

203:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %204 = load ptr, ptr %11, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.HandleProcTopic, ptr %204, i32 0, i32 5
  %206 = load ptr, ptr %205, align 8, !tbaa !19
  %207 = icmp eq ptr %206, null
  %208 = zext i1 %207 to i32
  store i32 %208, ptr %16, align 4, !tbaa !9
  %209 = load i32, ptr %16, align 4, !tbaa !9
  %210 = icmp ne i32 %209, 0
  br i1 %210, label %211, label %213

211:                                              ; preds = %203
  %212 = load i32, ptr %16, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %212, i32 noundef -1, ptr noundef @.str, i32 noundef 174, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.10)
  br label %213

213:                                              ; preds = %211, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %214

214:                                              ; preds = %213
  br label %215

215:                                              ; preds = %214
  br label %216

216:                                              ; preds = %215
  br label %217

217:                                              ; preds = %216
  %218 = load i32, ptr %13, align 4, !tbaa !9
  %219 = icmp slt i32 %218, 0
  br i1 %219, label %220, label %262

220:                                              ; preds = %217
  %221 = load ptr, ptr %11, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.HandleProcTopic, ptr %221, i32 0, i32 5
  %223 = load ptr, ptr %222, align 8, !tbaa !19
  %224 = getelementptr inbounds %struct.ProcTopicInfo, ptr %223, i32 0, i32 3
  store volatile i32 0, ptr %224, align 4, !tbaa !20
  %225 = load ptr, ptr %11, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.HandleProcTopic, ptr %225, i32 0, i32 5
  %227 = load ptr, ptr %226, align 8, !tbaa !19
  %228 = getelementptr inbounds %struct.ProcTopicInfo, ptr %227, i32 0, i32 6
  store volatile i64 0, ptr %228, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  %229 = load ptr, ptr %11, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.HandleProcTopic, ptr %229, i32 0, i32 3
  %231 = load i32, ptr %230, align 8, !tbaa !17
  %232 = sdiv i32 %231, 8
  store i32 %232, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %233

233:                                              ; preds = %258, %220
  %234 = load i32, ptr %18, align 4, !tbaa !9
  %235 = icmp slt i32 %234, 8
  br i1 %235, label %237, label %236

236:                                              ; preds = %233
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %261

237:                                              ; preds = %233
  %238 = load i32, ptr %17, align 4, !tbaa !9
  %239 = load i32, ptr %18, align 4, !tbaa !9
  %240 = mul nsw i32 %238, %239
  %241 = load ptr, ptr %11, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct.HandleProcTopic, ptr %241, i32 0, i32 5
  %243 = load ptr, ptr %242, align 8, !tbaa !19
  %244 = getelementptr inbounds %struct.ProcTopicInfo, ptr %243, i32 0, i32 7
  %245 = load i32, ptr %18, align 4, !tbaa !9
  %246 = sext i32 %245 to i64
  %247 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %244, i64 0, i64 %246
  %248 = getelementptr inbounds %struct.ProcCommunicateState, ptr %247, i32 0, i32 0
  store volatile i32 %240, ptr %248, align 8, !tbaa !23
  %249 = load i32, ptr %17, align 4, !tbaa !9
  %250 = load ptr, ptr %11, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.HandleProcTopic, ptr %250, i32 0, i32 5
  %252 = load ptr, ptr %251, align 8, !tbaa !19
  %253 = getelementptr inbounds %struct.ProcTopicInfo, ptr %252, i32 0, i32 7
  %254 = load i32, ptr %18, align 4, !tbaa !9
  %255 = sext i32 %254 to i64
  %256 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %253, i64 0, i64 %255
  %257 = getelementptr inbounds %struct.ProcCommunicateState, ptr %256, i32 0, i32 1
  store volatile i32 %249, ptr %257, align 4, !tbaa !25
  br label %258

258:                                              ; preds = %237
  %259 = load i32, ptr %18, align 4, !tbaa !9
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %18, align 4, !tbaa !9
  br label %233, !llvm.loop !26

261:                                              ; preds = %236
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %262

262:                                              ; preds = %261, %217
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 0, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  store i32 0, ptr %20, align 4, !tbaa !9
  %263 = load ptr, ptr %11, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.HandleProcTopic, ptr %263, i32 0, i32 2
  %265 = load i32, ptr %264, align 4, !tbaa !16
  %266 = call i32 @flock(i32 noundef %265, i32 noundef 2) #6
  %267 = load i32, ptr %13, align 4, !tbaa !9
  %268 = icmp sge i32 %267, 0
  br i1 %268, label %269, label %332

269:                                              ; preds = %262
  br label %270

270:                                              ; preds = %269
  br label %271

271:                                              ; preds = %270
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  %272 = load ptr, ptr %11, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.HandleProcTopic, ptr %272, i32 0, i32 2
  %274 = load i32, ptr %273, align 4, !tbaa !16
  %275 = call i64 @lseek(i32 noundef %274, i64 noundef 4, i32 noundef 0) #6
  %276 = icmp ne i64 %275, 4
  %277 = zext i1 %276 to i32
  store i32 %277, ptr %21, align 4, !tbaa !9
  %278 = load i32, ptr %21, align 4, !tbaa !9
  %279 = icmp ne i32 %278, 0
  br i1 %279, label %280, label %282

280:                                              ; preds = %271
  %281 = load i32, ptr %21, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %281, i32 noundef -1, ptr noundef @.str, i32 noundef 192, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.1)
  br label %282

282:                                              ; preds = %280, %271
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %283

283:                                              ; preds = %282
  br label %284

284:                                              ; preds = %283
  br label %285

285:                                              ; preds = %284
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %286 = load ptr, ptr %11, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.HandleProcTopic, ptr %286, i32 0, i32 2
  %288 = load i32, ptr %287, align 4, !tbaa !16
  %289 = call i64 @read(i32 noundef %288, ptr noundef %19, i64 noundef 4)
  %290 = icmp ne i64 %289, 4
  %291 = zext i1 %290 to i32
  store i32 %291, ptr %22, align 4, !tbaa !9
  %292 = load i32, ptr %22, align 4, !tbaa !9
  %293 = icmp ne i32 %292, 0
  br i1 %293, label %294, label %296

294:                                              ; preds = %285
  %295 = load i32, ptr %22, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %295, i32 noundef -1, ptr noundef @.str, i32 noundef 192, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.2)
  br label %296

296:                                              ; preds = %294, %285
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %297

297:                                              ; preds = %296
  br label %298

298:                                              ; preds = %297
  br label %299

299:                                              ; preds = %298
  br label %300

300:                                              ; preds = %299
  br label %301

301:                                              ; preds = %300
  br label %302

302:                                              ; preds = %301
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  %303 = load ptr, ptr %11, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.HandleProcTopic, ptr %303, i32 0, i32 2
  %305 = load i32, ptr %304, align 4, !tbaa !16
  %306 = call i64 @lseek(i32 noundef %305, i64 noundef 8, i32 noundef 0) #6
  %307 = icmp ne i64 %306, 8
  %308 = zext i1 %307 to i32
  store i32 %308, ptr %23, align 4, !tbaa !9
  %309 = load i32, ptr %23, align 4, !tbaa !9
  %310 = icmp ne i32 %309, 0
  br i1 %310, label %311, label %313

311:                                              ; preds = %302
  %312 = load i32, ptr %23, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %312, i32 noundef -1, ptr noundef @.str, i32 noundef 193, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.1)
  br label %313

313:                                              ; preds = %311, %302
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %314

314:                                              ; preds = %313
  br label %315

315:                                              ; preds = %314
  br label %316

316:                                              ; preds = %315
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %317 = load ptr, ptr %11, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.HandleProcTopic, ptr %317, i32 0, i32 2
  %319 = load i32, ptr %318, align 4, !tbaa !16
  %320 = call i64 @read(i32 noundef %319, ptr noundef %20, i64 noundef 4)
  %321 = icmp ne i64 %320, 4
  %322 = zext i1 %321 to i32
  store i32 %322, ptr %24, align 4, !tbaa !9
  %323 = load i32, ptr %24, align 4, !tbaa !9
  %324 = icmp ne i32 %323, 0
  br i1 %324, label %325, label %327

325:                                              ; preds = %316
  %326 = load i32, ptr %24, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %326, i32 noundef -1, ptr noundef @.str, i32 noundef 193, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.2)
  br label %327

327:                                              ; preds = %325, %316
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %328

328:                                              ; preds = %327
  br label %329

329:                                              ; preds = %328
  br label %330

330:                                              ; preds = %329
  br label %331

331:                                              ; preds = %330
  br label %332

332:                                              ; preds = %331, %262
  %333 = load i32, ptr %19, align 4, !tbaa !9
  %334 = add nsw i32 %333, 1
  store i32 %334, ptr %19, align 4, !tbaa !9
  br label %335

335:                                              ; preds = %332
  br label %336

336:                                              ; preds = %335
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %337 = load ptr, ptr %11, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.HandleProcTopic, ptr %337, i32 0, i32 2
  %339 = load i32, ptr %338, align 4, !tbaa !16
  %340 = call i64 @lseek(i32 noundef %339, i64 noundef 4, i32 noundef 0) #6
  %341 = icmp ne i64 %340, 4
  %342 = zext i1 %341 to i32
  store i32 %342, ptr %25, align 4, !tbaa !9
  %343 = load i32, ptr %25, align 4, !tbaa !9
  %344 = icmp ne i32 %343, 0
  br i1 %344, label %345, label %347

345:                                              ; preds = %336
  %346 = load i32, ptr %25, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %346, i32 noundef -1, ptr noundef @.str, i32 noundef 195, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.1)
  br label %347

347:                                              ; preds = %345, %336
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %348

348:                                              ; preds = %347
  br label %349

349:                                              ; preds = %348
  br label %350

350:                                              ; preds = %349
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %351 = load ptr, ptr %11, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.HandleProcTopic, ptr %351, i32 0, i32 2
  %353 = load i32, ptr %352, align 4, !tbaa !16
  %354 = call i64 @write(i32 noundef %353, ptr noundef %19, i64 noundef 4)
  %355 = icmp ne i64 %354, 4
  %356 = zext i1 %355 to i32
  store i32 %356, ptr %26, align 4, !tbaa !9
  %357 = load i32, ptr %26, align 4, !tbaa !9
  %358 = icmp ne i32 %357, 0
  br i1 %358, label %359, label %361

359:                                              ; preds = %350
  %360 = load i32, ptr %26, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %360, i32 noundef -1, ptr noundef @.str, i32 noundef 195, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.3)
  br label %361

361:                                              ; preds = %359, %350
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %362

362:                                              ; preds = %361
  br label %363

363:                                              ; preds = %362
  br label %364

364:                                              ; preds = %363
  br label %365

365:                                              ; preds = %364
  %366 = load i32, ptr %19, align 4, !tbaa !9
  %367 = load ptr, ptr %11, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct.HandleProcTopic, ptr %367, i32 0, i32 5
  %369 = load ptr, ptr %368, align 8, !tbaa !19
  %370 = getelementptr inbounds %struct.ProcTopicInfo, ptr %369, i32 0, i32 1
  store volatile i32 %366, ptr %370, align 4, !tbaa !28
  %371 = load i32, ptr %20, align 4, !tbaa !9
  %372 = add nsw i32 %371, 1
  store i32 %372, ptr %20, align 4, !tbaa !9
  br label %373

373:                                              ; preds = %365
  br label %374

374:                                              ; preds = %373
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %375 = load ptr, ptr %11, align 8, !tbaa !5
  %376 = getelementptr inbounds %struct.HandleProcTopic, ptr %375, i32 0, i32 2
  %377 = load i32, ptr %376, align 4, !tbaa !16
  %378 = call i64 @lseek(i32 noundef %377, i64 noundef 8, i32 noundef 0) #6
  %379 = icmp ne i64 %378, 8
  %380 = zext i1 %379 to i32
  store i32 %380, ptr %27, align 4, !tbaa !9
  %381 = load i32, ptr %27, align 4, !tbaa !9
  %382 = icmp ne i32 %381, 0
  br i1 %382, label %383, label %385

383:                                              ; preds = %374
  %384 = load i32, ptr %27, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %384, i32 noundef -1, ptr noundef @.str, i32 noundef 196, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.1)
  br label %385

385:                                              ; preds = %383, %374
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %386

386:                                              ; preds = %385
  br label %387

387:                                              ; preds = %386
  br label %388

388:                                              ; preds = %387
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  %389 = load ptr, ptr %11, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.HandleProcTopic, ptr %389, i32 0, i32 2
  %391 = load i32, ptr %390, align 4, !tbaa !16
  %392 = call i64 @write(i32 noundef %391, ptr noundef %20, i64 noundef 4)
  %393 = icmp ne i64 %392, 4
  %394 = zext i1 %393 to i32
  store i32 %394, ptr %28, align 4, !tbaa !9
  %395 = load i32, ptr %28, align 4, !tbaa !9
  %396 = icmp ne i32 %395, 0
  br i1 %396, label %397, label %399

397:                                              ; preds = %388
  %398 = load i32, ptr %28, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %398, i32 noundef -1, ptr noundef @.str, i32 noundef 196, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.3)
  br label %399

399:                                              ; preds = %397, %388
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %400

400:                                              ; preds = %399
  br label %401

401:                                              ; preds = %400
  br label %402

402:                                              ; preds = %401
  br label %403

403:                                              ; preds = %402
  %404 = load i32, ptr %20, align 4, !tbaa !9
  %405 = load ptr, ptr %11, align 8, !tbaa !5
  %406 = getelementptr inbounds %struct.HandleProcTopic, ptr %405, i32 0, i32 5
  %407 = load ptr, ptr %406, align 8, !tbaa !19
  %408 = getelementptr inbounds %struct.ProcTopicInfo, ptr %407, i32 0, i32 2
  store volatile i32 %404, ptr %408, align 8, !tbaa !29
  %409 = load ptr, ptr %11, align 8, !tbaa !5
  %410 = getelementptr inbounds %struct.HandleProcTopic, ptr %409, i32 0, i32 2
  %411 = load i32, ptr %410, align 4, !tbaa !16
  %412 = call i32 @flock(i32 noundef %411, i32 noundef 8) #6
  %413 = load ptr, ptr %10, align 8, !tbaa !5
  %414 = getelementptr inbounds %struct.MHandle, ptr %413, i32 0, i32 1
  store volatile i32 1, ptr %414, align 4, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %12) #6
  br label %415

415:                                              ; preds = %403, %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %416 = load ptr, ptr %11, align 8, !tbaa !5
  %417 = getelementptr inbounds %struct.HandleProcTopic, ptr %416, i32 0, i32 5
  %418 = load ptr, ptr %417, align 8, !tbaa !19
  store ptr %418, ptr %29, align 8, !tbaa !5
  %419 = load i32, ptr %8, align 4, !tbaa !9
  %420 = load ptr, ptr %11, align 8, !tbaa !5
  %421 = getelementptr inbounds %struct.HandleProcTopic, ptr %420, i32 0, i32 3
  %422 = load i32, ptr %421, align 8, !tbaa !17
  %423 = sdiv i32 %422, 2
  %424 = icmp sgt i32 %419, %423
  br i1 %424, label %425, label %442

425:                                              ; preds = %415
  %426 = load ptr, ptr %11, align 8, !tbaa !5
  call void @endProcTopic(ptr noundef %426)
  %427 = load ptr, ptr %11, align 8, !tbaa !5
  %428 = getelementptr inbounds %struct.HandleProcTopic, ptr %427, i32 0, i32 5
  store ptr null, ptr %428, align 8, !tbaa !19
  %429 = call i32 @usleep(i32 noundef 10000)
  %430 = load ptr, ptr %11, align 8, !tbaa !5
  %431 = getelementptr inbounds %struct.HandleProcTopic, ptr %430, i32 0, i32 0
  %432 = getelementptr inbounds [256 x i8], ptr %431, i64 0, i64 0
  %433 = call i32 @remove(ptr noundef %432) #6
  br label %434

434:                                              ; preds = %425
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 1, ptr %30, align 4, !tbaa !9
  %435 = load i32, ptr %30, align 4, !tbaa !9
  %436 = icmp ne i32 %435, 0
  br i1 %436, label %437, label %439

437:                                              ; preds = %434
  %438 = load i32, ptr %30, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %438, i32 noundef -1, ptr noundef @.str, i32 noundef 208, ptr noundef @__FUNCTION__.m_ProcTopicWrite, ptr noundef @.str.11)
  br label %439

439:                                              ; preds = %437, %434
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %440

440:                                              ; preds = %439
  br label %441

441:                                              ; preds = %440
  br label %442

442:                                              ; preds = %441, %415
  %443 = load ptr, ptr %29, align 8, !tbaa !5
  %444 = getelementptr inbounds %struct.ProcTopicInfo, ptr %443, i32 0, i32 2
  %445 = load volatile i32, ptr %444, align 8, !tbaa !29
  %446 = icmp sgt i32 %445, 1
  br i1 %446, label %447, label %497

447:                                              ; preds = %442
  br label %448

448:                                              ; preds = %491, %447
  br label %449

449:                                              ; preds = %448
  %450 = load ptr, ptr %11, align 8, !tbaa !5
  %451 = getelementptr inbounds %struct.HandleProcTopic, ptr %450, i32 0, i32 2
  %452 = load i32, ptr %451, align 4, !tbaa !16
  %453 = call i32 @flock(i32 noundef %452, i32 noundef 2) #6
  %454 = load ptr, ptr %29, align 8, !tbaa !5
  %455 = getelementptr inbounds %struct.ProcTopicInfo, ptr %454, i32 0, i32 4
  %456 = load volatile i32, ptr %455, align 8, !tbaa !31
  %457 = icmp eq i32 %456, 0
  br i1 %457, label %463, label %458

458:                                              ; preds = %449
  %459 = load ptr, ptr %29, align 8, !tbaa !5
  %460 = getelementptr inbounds %struct.ProcTopicInfo, ptr %459, i32 0, i32 0
  %461 = load volatile i32, ptr %460, align 8, !tbaa !32
  %462 = icmp eq i32 %461, 0
  br i1 %462, label %463, label %475

463:                                              ; preds = %458, %449
  %464 = load ptr, ptr %29, align 8, !tbaa !5
  %465 = getelementptr inbounds %struct.ProcTopicInfo, ptr %464, i32 0, i32 4
  store volatile i32 1, ptr %465, align 8, !tbaa !31
  %466 = load ptr, ptr %11, align 8, !tbaa !5
  %467 = getelementptr inbounds %struct.HandleProcTopic, ptr %466, i32 0, i32 1
  %468 = load i32, ptr %467, align 8, !tbaa !13
  %469 = load ptr, ptr %29, align 8, !tbaa !5
  %470 = getelementptr inbounds %struct.ProcTopicInfo, ptr %469, i32 0, i32 0
  store volatile i32 %468, ptr %470, align 8, !tbaa !32
  %471 = load ptr, ptr %11, align 8, !tbaa !5
  %472 = getelementptr inbounds %struct.HandleProcTopic, ptr %471, i32 0, i32 2
  %473 = load i32, ptr %472, align 4, !tbaa !16
  %474 = call i32 @flock(i32 noundef %473, i32 noundef 8) #6
  br label %496

475:                                              ; preds = %458
  %476 = load ptr, ptr %29, align 8, !tbaa !5
  %477 = getelementptr inbounds %struct.ProcTopicInfo, ptr %476, i32 0, i32 0
  %478 = load volatile i32, ptr %477, align 8, !tbaa !32
  %479 = sdiv i32 %478, 1000
  %480 = call i32 @kill(i32 noundef %479, i32 noundef 0) #6
  %481 = icmp eq i32 %480, 0
  %482 = zext i1 %481 to i32
  %483 = icmp eq i32 %482, 0
  br i1 %483, label %484, label %491

484:                                              ; preds = %475
  %485 = load ptr, ptr %29, align 8, !tbaa !5
  %486 = getelementptr inbounds %struct.ProcTopicInfo, ptr %485, i32 0, i32 2
  %487 = load volatile i32, ptr %486, align 8, !tbaa !29
  %488 = sub nsw i32 %487, 1
  store volatile i32 %488, ptr %486, align 8, !tbaa !29
  %489 = load ptr, ptr %29, align 8, !tbaa !5
  %490 = getelementptr inbounds %struct.ProcTopicInfo, ptr %489, i32 0, i32 0
  store volatile i32 0, ptr %490, align 8, !tbaa !32
  br label %491

491:                                              ; preds = %484, %475
  %492 = load ptr, ptr %11, align 8, !tbaa !5
  %493 = getelementptr inbounds %struct.HandleProcTopic, ptr %492, i32 0, i32 2
  %494 = load i32, ptr %493, align 4, !tbaa !16
  %495 = call i32 @flock(i32 noundef %494, i32 noundef 8) #6
  br label %448

496:                                              ; preds = %463
  br label %497

497:                                              ; preds = %496, %442
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %498 = load ptr, ptr %29, align 8, !tbaa !5
  %499 = getelementptr inbounds %struct.ProcTopicInfo, ptr %498, i32 0, i32 6
  %500 = load volatile i64, ptr %499, align 8, !tbaa !22
  %501 = srem i64 %500, 8
  %502 = trunc i64 %501 to i32
  store i32 %502, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  %503 = load ptr, ptr %29, align 8, !tbaa !5
  %504 = getelementptr inbounds %struct.ProcTopicInfo, ptr %503, i32 0, i32 3
  %505 = load volatile i32, ptr %504, align 4, !tbaa !20
  store i32 %505, ptr %32, align 4, !tbaa !9
  %506 = load i32, ptr %32, align 4, !tbaa !9
  %507 = load i32, ptr %8, align 4, !tbaa !9
  %508 = add nsw i32 %506, %507
  %509 = load ptr, ptr %11, align 8, !tbaa !5
  %510 = getelementptr inbounds %struct.HandleProcTopic, ptr %509, i32 0, i32 3
  %511 = load i32, ptr %510, align 8, !tbaa !17
  %512 = icmp sgt i32 %508, %511
  br i1 %512, label %513, label %514

513:                                              ; preds = %497
  store i32 0, ptr %32, align 4, !tbaa !9
  br label %514

514:                                              ; preds = %513, %497
  %515 = load i32, ptr %6, align 4, !tbaa !9
  %516 = load ptr, ptr %29, align 8, !tbaa !5
  %517 = getelementptr inbounds %struct.ProcTopicInfo, ptr %516, i32 0, i32 7
  %518 = load i32, ptr %31, align 4, !tbaa !9
  %519 = sext i32 %518 to i64
  %520 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %517, i64 0, i64 %519
  %521 = getelementptr inbounds %struct.ProcCommunicateState, ptr %520, i32 0, i32 1
  store volatile i32 %515, ptr %521, align 4, !tbaa !25
  %522 = load i32, ptr %32, align 4, !tbaa !9
  %523 = load ptr, ptr %29, align 8, !tbaa !5
  %524 = getelementptr inbounds %struct.ProcTopicInfo, ptr %523, i32 0, i32 7
  %525 = load i32, ptr %31, align 4, !tbaa !9
  %526 = sext i32 %525 to i64
  %527 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %524, i64 0, i64 %526
  %528 = getelementptr inbounds %struct.ProcCommunicateState, ptr %527, i32 0, i32 0
  store volatile i32 %522, ptr %528, align 8, !tbaa !23
  %529 = load ptr, ptr %29, align 8, !tbaa !5
  %530 = getelementptr inbounds %struct.ProcTopicInfo, ptr %529, i32 0, i32 8
  %531 = getelementptr inbounds [0 x i8], ptr %530, i64 0, i64 0
  %532 = load i32, ptr %32, align 4, !tbaa !9
  %533 = sext i32 %532 to i64
  %534 = getelementptr inbounds i8, ptr %531, i64 %533
  %535 = load ptr, ptr %5, align 8, !tbaa !5
  %536 = load i32, ptr %6, align 4, !tbaa !9
  %537 = sext i32 %536 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %534, ptr align 1 %535, i64 %537, i1 false)
  %538 = load i32, ptr %32, align 4, !tbaa !9
  %539 = load i32, ptr %8, align 4, !tbaa !9
  %540 = add nsw i32 %538, %539
  %541 = load ptr, ptr %29, align 8, !tbaa !5
  %542 = getelementptr inbounds %struct.ProcTopicInfo, ptr %541, i32 0, i32 3
  store volatile i32 %540, ptr %542, align 4, !tbaa !20
  %543 = load ptr, ptr %29, align 8, !tbaa !5
  %544 = getelementptr inbounds %struct.ProcTopicInfo, ptr %543, i32 0, i32 6
  %545 = load volatile i64, ptr %544, align 8, !tbaa !22
  %546 = add nsw i64 %545, 1
  store volatile i64 %546, ptr %544, align 8, !tbaa !22
  %547 = load ptr, ptr %29, align 8, !tbaa !5
  %548 = getelementptr inbounds %struct.ProcTopicInfo, ptr %547, i32 0, i32 2
  %549 = load volatile i32, ptr %548, align 8, !tbaa !29
  %550 = icmp sgt i32 %549, 1
  br i1 %550, label %551, label %554

551:                                              ; preds = %514
  %552 = load ptr, ptr %29, align 8, !tbaa !5
  %553 = getelementptr inbounds %struct.ProcTopicInfo, ptr %552, i32 0, i32 4
  store volatile i32 0, ptr %553, align 8, !tbaa !31
  br label %554

554:                                              ; preds = %551, %514
  %555 = load ptr, ptr %29, align 8, !tbaa !5
  %556 = getelementptr inbounds %struct.ProcTopicInfo, ptr %555, i32 0, i32 8
  %557 = getelementptr inbounds [0 x i8], ptr %556, i64 0, i64 0
  %558 = load i32, ptr %32, align 4, !tbaa !9
  %559 = sext i32 %558 to i64
  %560 = getelementptr inbounds i8, ptr %557, i64 %559
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  ret ptr %560
}

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

declare ptr @GetHandle(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #3

declare ptr @mMornObject(ptr noundef, i32 noundef) #3

declare i32 @mHandleValid(ptr noundef) #3

; Function Attrs: nounwind
declare i32 @getpid() #2

declare i32 @mThreadOrder(...) #3

declare void @m_PropertyFunction(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare void @mornObjectRemove(ptr noundef, ptr noundef) #3

declare void @m_PropertyVariate(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind
declare i32 @umask(i32 noundef) #2

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #2

; Function Attrs: nounwind
declare i32 @access(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind
declare i32 @mkdir(ptr noundef, i32 noundef) #2

declare i32 @open(ptr noundef, i32 noundef, ...) #3

; Function Attrs: nounwind
declare ptr @mmap(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) #2

; Function Attrs: nounwind
declare i32 @kill(i32 noundef, i32 noundef) #2

; 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

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 = { 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 #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 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"MHandle", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!13 = !{!14, !10, i64 256}
!14 = !{!"HandleProcTopic", !7, i64 0, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !6, i64 272, !15, i64 280}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !10, i64 260}
!17 = !{!14, !10, i64 264}
!18 = !{!14, !10, i64 268}
!19 = !{!14, !6, i64 272}
!20 = !{!21, !10, i64 12}
!21 = !{!"ProcTopicInfo", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !15, i64 24, !7, i64 32, !7, i64 1056}
!22 = !{!21, !15, i64 24}
!23 = !{!24, !10, i64 0}
!24 = !{!"ProcCommunicateState", !10, i64 0, !10, i64 4}
!25 = !{!24, !10, i64 4}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!21, !10, i64 4}
!29 = !{!21, !10, i64 8}
!30 = !{!12, !10, i64 4}
!31 = !{!21, !10, i64 16}
!32 = !{!21, !10, 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"

%struct.ProcCommunicateState = type { i32, i32 }

@.str = external hidden unnamed_addr constant [78 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@__FUNCTION__.m_ProcTopicWrite = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @endProcTopic(ptr noundef) #0

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

; Function Attrs: nounwind
declare i32 @flock(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i64 @lseek(i32 noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

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

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

; Function Attrs: nofree
declare noundef i64 @read(i32 noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #4

; Function Attrs: nofree
declare noundef i64 @write(i32 noundef, ptr nocapture noundef readonly, i64 noundef) local_unnamed_addr #4

declare i32 @usleep(i32 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind
declare noundef i32 @remove(ptr nocapture noundef readonly) local_unnamed_addr #5

; Function Attrs: nounwind uwtable
define dso_local nonnull ptr @m_ProcTopicWrite(ptr noundef %0, ptr noundef readonly %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = alloca i32, align 4
  %5 = alloca [128 x i8], align 16
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = icmp eq ptr %0, null
  %spec.store.select = select i1 %8, ptr @.str.4, ptr %0
  %9 = icmp eq ptr %1, null
  br i1 %9, label %10, label %11

10:                                               ; preds = %3
  tail call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 133, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.5) #9
  br label %11

11:                                               ; preds = %10, %3
  %12 = icmp slt i32 %2, 0
  br i1 %12, label %13, label %17

13:                                               ; preds = %11
  %14 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %1) #10
  %15 = trunc i64 %14 to i32
  %16 = add i32 %15, 1
  br label %17

17:                                               ; preds = %13, %11
  %.0 = phi i32 [ %16, %13 ], [ %2, %11 ]
  %18 = add nsw i32 %.0, 7
  %19 = and i32 %18, -8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #9
  store i32 0, ptr %4, align 4, !tbaa !5
  %20 = tail call ptr @mMornObject(ptr noundef nonnull %spec.store.select, i32 noundef -1) #9
  %21 = tail call ptr @GetHandle(ptr noundef %20, i32 noundef 288, i32 noundef 1928559086, ptr noundef nonnull @endProcTopic) #9
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  %24 = tail call i32 @mHandleValid(ptr noundef %21) #9
  %.not = icmp eq i32 %24, 0
  br i1 %.not, label %25, label %158

25:                                               ; preds = %17
  %26 = tail call i32 @getpid() #9
  %27 = mul nsw i32 %26, 1000
  %28 = tail call i32 (...) @mThreadOrder() #9
  %29 = add nsw i32 %27, %28
  %30 = getelementptr inbounds i8, ptr %23, i64 256
  store i32 %29, ptr %30, align 8, !tbaa !12
  %31 = tail call ptr @mMornObject(ptr noundef nonnull %spec.store.select, i32 noundef -1) #9
  tail call void @m_PropertyFunction(ptr noundef %31, ptr noundef nonnull @.str.6, ptr noundef nonnull @mornObjectRemove, ptr noundef nonnull %spec.store.select) #9
  %32 = tail call ptr @mMornObject(ptr noundef nonnull %spec.store.select, i32 noundef -1) #9
  %33 = getelementptr inbounds i8, ptr %23, i64 268
  tail call void @m_PropertyVariate(ptr noundef %32, ptr noundef nonnull @.str.7, ptr noundef nonnull %33, i32 noundef 4) #9
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %5) #9
  %34 = tail call i32 @umask(i32 noundef 0) #9
  %35 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %5, ptr noundef nonnull dereferenceable(1) @.str.8) #9
  %36 = call i32 @access(ptr noundef nonnull %5, i32 noundef 0) #9
  %37 = icmp slt i32 %36, 0
  br i1 %37, label %38, label %40

38:                                               ; preds = %25
  %39 = call i32 @mkdir(ptr noundef nonnull %5, i32 noundef 511) #9
  br label %40

40:                                               ; preds = %38, %25
  %41 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %23, ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull %5, ptr noundef nonnull %spec.store.select) #9
  %42 = call i32 @access(ptr noundef nonnull %23, i32 noundef 0) #9
  %43 = call i32 (ptr, i32, ...) @open(ptr noundef nonnull %23, i32 noundef 66, i32 noundef 438) #9
  %44 = getelementptr inbounds i8, ptr %23, i64 260
  store i32 %43, ptr %44, align 4, !tbaa !15
  %45 = icmp slt i32 %42, 0
  br i1 %45, label %51, label %46

46:                                               ; preds = %40
  %47 = call i64 @lseek(i32 noundef %43, i64 noundef 1, i32 noundef 2) #9
  %48 = trunc i64 %47 to i32
  %49 = add i32 %48, -1056
  %50 = getelementptr inbounds i8, ptr %23, i64 264
  store i32 %49, ptr %50, align 8, !tbaa !16
  br label %72

51:                                               ; preds = %40
  %52 = load i32, ptr %33, align 4, !tbaa !17
  %53 = icmp eq i32 %52, 0
  br i1 %53, label %54, label %57

54:                                               ; preds = %51
  %55 = shl nsw i32 %19, 1
  %56 = call i32 @llvm.smax.i32(i32 %55, i32 1024)
  store i32 %56, ptr %33, align 4, !tbaa !17
  br label %57

57:                                               ; preds = %54, %51
  %58 = phi i32 [ %56, %54 ], [ %52, %51 ]
  %59 = shl nsw i32 %58, 4
  %60 = getelementptr inbounds i8, ptr %23, i64 264
  store i32 %59, ptr %60, align 8, !tbaa !16
  %61 = sext i32 %59 to i64
  %62 = add nsw i64 %61, 1056
  %63 = call i64 @lseek(i32 noundef %43, i64 noundef %62, i32 noundef 0) #9
  %64 = load i32, ptr %60, align 8, !tbaa !16
  %65 = sext i32 %64 to i64
  %66 = add nsw i64 %65, 1056
  %.not133 = icmp eq i64 %63, %66
  br i1 %.not133, label %68, label %67

67:                                               ; preds = %57
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 171, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.1) #9
  br label %68

68:                                               ; preds = %67, %57
  %69 = load i32, ptr %44, align 4, !tbaa !15
  %70 = call i64 @write(i32 noundef %69, ptr noundef nonnull %4, i64 noundef 4) #9
  %.not134 = icmp eq i64 %70, 4
  br i1 %.not134, label %72, label %71

71:                                               ; preds = %68
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 171, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.3) #9
  br label %72

72:                                               ; preds = %46, %68, %71
  %73 = getelementptr inbounds i8, ptr %23, i64 264
  %74 = load i32, ptr %73, align 8, !tbaa !16
  %75 = sext i32 %74 to i64
  %76 = add nsw i64 %75, 1056
  %77 = load i32, ptr %44, align 4, !tbaa !15
  %78 = call ptr @mmap(ptr noundef null, i64 noundef %76, i32 noundef 3, i32 noundef 1, i32 noundef %77, i64 noundef 0) #9
  %79 = getelementptr inbounds i8, ptr %23, i64 272
  store ptr %78, ptr %79, align 8, !tbaa !18
  %80 = icmp eq ptr %78, null
  br i1 %80, label %81, label %82

81:                                               ; preds = %72
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 174, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.10) #9
  br label %82

82:                                               ; preds = %81, %72
  br i1 %45, label %83, label %.critedge

83:                                               ; preds = %82
  %84 = load ptr, ptr %79, align 8, !tbaa !18
  %85 = getelementptr inbounds i8, ptr %84, i64 12
  store volatile i32 0, ptr %85, align 4, !tbaa !19
  %86 = getelementptr inbounds i8, ptr %84, i64 24
  store volatile i64 0, ptr %86, align 8, !tbaa !21
  %87 = load i32, ptr %73, align 8, !tbaa !16
  %88 = sdiv i32 %87, 8
  %89 = getelementptr inbounds i8, ptr %84, i64 32
  store volatile i32 0, ptr %89, align 8, !tbaa !22
  %90 = getelementptr inbounds i8, ptr %84, i64 36
  store volatile i32 %88, ptr %90, align 4, !tbaa !24
  %91 = getelementptr inbounds i8, ptr %84, i64 40
  store volatile i32 %88, ptr %91, align 8, !tbaa !22
  %92 = getelementptr inbounds i8, ptr %84, i64 44
  store volatile i32 %88, ptr %92, align 4, !tbaa !24
  %93 = shl nsw i32 %88, 1
  %94 = getelementptr inbounds i8, ptr %84, i64 48
  store volatile i32 %93, ptr %94, align 8, !tbaa !22
  %95 = getelementptr inbounds i8, ptr %84, i64 52
  store volatile i32 %88, ptr %95, align 4, !tbaa !24
  %96 = mul nsw i32 %88, 3
  %97 = getelementptr inbounds i8, ptr %84, i64 56
  store volatile i32 %96, ptr %97, align 8, !tbaa !22
  %98 = getelementptr inbounds i8, ptr %84, i64 60
  store volatile i32 %88, ptr %98, align 4, !tbaa !24
  %99 = shl nsw i32 %88, 2
  %100 = getelementptr inbounds i8, ptr %84, i64 64
  store volatile i32 %99, ptr %100, align 8, !tbaa !22
  %101 = getelementptr inbounds i8, ptr %84, i64 68
  store volatile i32 %88, ptr %101, align 4, !tbaa !24
  %102 = mul nsw i32 %88, 5
  %103 = getelementptr inbounds i8, ptr %84, i64 72
  store volatile i32 %102, ptr %103, align 8, !tbaa !22
  %104 = getelementptr inbounds i8, ptr %84, i64 76
  store volatile i32 %88, ptr %104, align 4, !tbaa !24
  %105 = mul nsw i32 %88, 6
  %106 = getelementptr inbounds i8, ptr %84, i64 80
  store volatile i32 %105, ptr %106, align 8, !tbaa !22
  %107 = getelementptr inbounds i8, ptr %84, i64 84
  store volatile i32 %88, ptr %107, align 4, !tbaa !24
  %108 = mul nsw i32 %88, 7
  %109 = getelementptr inbounds i8, ptr %84, i64 88
  store volatile i32 %108, ptr %109, align 8, !tbaa !22
  %110 = getelementptr inbounds i8, ptr %84, i64 92
  store volatile i32 %88, ptr %110, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  store i32 0, ptr %7, align 4, !tbaa !5
  %111 = load i32, ptr %44, align 4, !tbaa !15
  %112 = call i32 @flock(i32 noundef %111, i32 noundef 2) #9
  br label %130

.critedge:                                        ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  store i32 0, ptr %7, align 4, !tbaa !5
  %113 = load i32, ptr %44, align 4, !tbaa !15
  %114 = call i32 @flock(i32 noundef %113, i32 noundef 2) #9
  %115 = load i32, ptr %44, align 4, !tbaa !15
  %116 = call i64 @lseek(i32 noundef %115, i64 noundef 4, i32 noundef 0) #9
  %.not135 = icmp eq i64 %116, 4
  br i1 %.not135, label %118, label %117

117:                                              ; preds = %.critedge
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 192, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.1) #9
  br label %118

118:                                              ; preds = %117, %.critedge
  %119 = load i32, ptr %44, align 4, !tbaa !15
  %120 = call i64 @read(i32 noundef %119, ptr noundef nonnull %6, i64 noundef 4) #9
  %.not136 = icmp eq i64 %120, 4
  br i1 %.not136, label %122, label %121

121:                                              ; preds = %118
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 192, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.2) #9
  br label %122

122:                                              ; preds = %121, %118
  %123 = load i32, ptr %44, align 4, !tbaa !15
  %124 = call i64 @lseek(i32 noundef %123, i64 noundef 8, i32 noundef 0) #9
  %.not137 = icmp eq i64 %124, 8
  br i1 %.not137, label %126, label %125

125:                                              ; preds = %122
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 193, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.1) #9
  br label %126

126:                                              ; preds = %125, %122
  %127 = load i32, ptr %44, align 4, !tbaa !15
  %128 = call i64 @read(i32 noundef %127, ptr noundef nonnull %7, i64 noundef 4) #9
  %.not138 = icmp eq i64 %128, 4
  br i1 %.not138, label %130, label %129

129:                                              ; preds = %126
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 193, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.2) #9
  br label %130

130:                                              ; preds = %83, %126, %129
  %131 = load i32, ptr %6, align 4, !tbaa !5
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %6, align 4, !tbaa !5
  %133 = load i32, ptr %44, align 4, !tbaa !15
  %134 = call i64 @lseek(i32 noundef %133, i64 noundef 4, i32 noundef 0) #9
  %.not139 = icmp eq i64 %134, 4
  br i1 %.not139, label %136, label %135

135:                                              ; preds = %130
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 195, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.1) #9
  br label %136

136:                                              ; preds = %135, %130
  %137 = load i32, ptr %44, align 4, !tbaa !15
  %138 = call i64 @write(i32 noundef %137, ptr noundef nonnull %6, i64 noundef 4) #9
  %.not140 = icmp eq i64 %138, 4
  br i1 %.not140, label %140, label %139

139:                                              ; preds = %136
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 195, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.3) #9
  br label %140

140:                                              ; preds = %139, %136
  %141 = load ptr, ptr %79, align 8, !tbaa !18
  %142 = getelementptr inbounds i8, ptr %141, i64 4
  store volatile i32 %132, ptr %142, align 4, !tbaa !25
  %143 = load i32, ptr %7, align 4, !tbaa !5
  %144 = add nsw i32 %143, 1
  store i32 %144, ptr %7, align 4, !tbaa !5
  %145 = load i32, ptr %44, align 4, !tbaa !15
  %146 = call i64 @lseek(i32 noundef %145, i64 noundef 8, i32 noundef 0) #9
  %.not141 = icmp eq i64 %146, 8
  br i1 %.not141, label %148, label %147

147:                                              ; preds = %140
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 196, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.1) #9
  br label %148

148:                                              ; preds = %147, %140
  %149 = load i32, ptr %44, align 4, !tbaa !15
  %150 = call i64 @write(i32 noundef %149, ptr noundef nonnull %7, i64 noundef 4) #9
  %.not142 = icmp eq i64 %150, 4
  br i1 %.not142, label %152, label %151

151:                                              ; preds = %148
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 196, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.3) #9
  br label %152

152:                                              ; preds = %151, %148
  %153 = load ptr, ptr %79, align 8, !tbaa !18
  %154 = getelementptr inbounds i8, ptr %153, i64 8
  store volatile i32 %144, ptr %154, align 8, !tbaa !26
  %155 = load i32, ptr %44, align 4, !tbaa !15
  %156 = call i32 @flock(i32 noundef %155, i32 noundef 8) #9
  %157 = getelementptr inbounds i8, ptr %21, i64 4
  store volatile i32 1, ptr %157, align 4, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %5) #9
  br label %158

158:                                              ; preds = %152, %17
  %159 = getelementptr inbounds i8, ptr %23, i64 272
  %160 = load ptr, ptr %159, align 8, !tbaa !18
  %161 = getelementptr inbounds i8, ptr %23, i64 264
  %162 = load i32, ptr %161, align 8, !tbaa !16
  %163 = sdiv i32 %162, 2
  %164 = icmp sgt i32 %19, %163
  br i1 %164, label %165, label %168

165:                                              ; preds = %158
  call void @endProcTopic(ptr noundef nonnull %23)
  store ptr null, ptr %159, align 8, !tbaa !18
  %166 = call i32 @usleep(i32 noundef 10000) #9
  %167 = call i32 @remove(ptr noundef nonnull %23) #9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 208, ptr noundef nonnull @__FUNCTION__.m_ProcTopicWrite, ptr noundef nonnull @.str.11) #9
  br label %168

168:                                              ; preds = %165, %158
  %169 = getelementptr inbounds i8, ptr %160, i64 8
  %170 = load volatile i32, ptr %169, align 8, !tbaa !26
  %171 = icmp sgt i32 %170, 1
  br i1 %171, label %.preheader, label %198

.preheader:                                       ; preds = %168
  %172 = getelementptr inbounds i8, ptr %23, i64 260
  %173 = load i32, ptr %172, align 4, !tbaa !15
  %174 = call i32 @flock(i32 noundef %173, i32 noundef 2) #9
  %175 = getelementptr inbounds i8, ptr %160, i64 16
  %176 = load volatile i32, ptr %175, align 8, !tbaa !28
  %177 = icmp eq i32 %176, 0
  br i1 %177, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %191
  %178 = load volatile i32, ptr %160, align 8, !tbaa !29
  %179 = icmp eq i32 %178, 0
  br i1 %179, label %._crit_edge, label %184

._crit_edge:                                      ; preds = %191, %.lr.ph, %.preheader
  store volatile i32 1, ptr %175, align 8, !tbaa !28
  %180 = getelementptr inbounds i8, ptr %23, i64 256
  %181 = load i32, ptr %180, align 8, !tbaa !12
  store volatile i32 %181, ptr %160, align 8, !tbaa !29
  %182 = load i32, ptr %172, align 4, !tbaa !15
  %183 = call i32 @flock(i32 noundef %182, i32 noundef 8) #9
  br label %198

184:                                              ; preds = %.lr.ph
  %185 = load volatile i32, ptr %160, align 8, !tbaa !29
  %186 = sdiv i32 %185, 1000
  %187 = call i32 @kill(i32 noundef %186, i32 noundef 0) #9
  %.not132 = icmp eq i32 %187, 0
  br i1 %.not132, label %191, label %188

188:                                              ; preds = %184
  %189 = load volatile i32, ptr %169, align 8, !tbaa !26
  %190 = add nsw i32 %189, -1
  store volatile i32 %190, ptr %169, align 8, !tbaa !26
  store volatile i32 0, ptr %160, align 8, !tbaa !29
  br label %191

191:                                              ; preds = %188, %184
  %192 = load i32, ptr %172, align 4, !tbaa !15
  %193 = call i32 @flock(i32 noundef %192, i32 noundef 8) #9
  %194 = load i32, ptr %172, align 4, !tbaa !15
  %195 = call i32 @flock(i32 noundef %194, i32 noundef 2) #9
  %196 = load volatile i32, ptr %175, align 8, !tbaa !28
  %197 = icmp eq i32 %196, 0
  br i1 %197, label %._crit_edge, label %.lr.ph

198:                                              ; preds = %._crit_edge, %168
  %199 = getelementptr inbounds i8, ptr %160, i64 24
  %200 = load volatile i64, ptr %199, align 8, !tbaa !21
  %201 = srem i64 %200, 8
  %202 = getelementptr inbounds i8, ptr %160, i64 12
  %203 = load volatile i32, ptr %202, align 4, !tbaa !19
  %204 = add nsw i32 %203, %19
  %205 = load i32, ptr %161, align 8, !tbaa !16
  %206 = icmp sgt i32 %204, %205
  %spec.store.select1 = select i1 %206, i32 0, i32 %203
  %207 = getelementptr inbounds i8, ptr %160, i64 32
  %208 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %207, i64 0, i64 %201
  %209 = getelementptr inbounds i8, ptr %208, i64 4
  store volatile i32 %.0, ptr %209, align 4, !tbaa !24
  store volatile i32 %spec.store.select1, ptr %208, align 8, !tbaa !22
  %210 = getelementptr inbounds i8, ptr %160, i64 1056
  %211 = sext i32 %spec.store.select1 to i64
  %212 = getelementptr inbounds i8, ptr %210, i64 %211
  %213 = sext i32 %.0 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %212, ptr align 1 %1, i64 %213, i1 false)
  %214 = add nsw i32 %spec.store.select1, %19
  store volatile i32 %214, ptr %202, align 4, !tbaa !19
  %215 = load volatile i64, ptr %199, align 8, !tbaa !21
  %216 = add nsw i64 %215, 1
  store volatile i64 %216, ptr %199, align 8, !tbaa !21
  %217 = load volatile i32, ptr %169, align 8, !tbaa !26
  %218 = icmp sgt i32 %217, 1
  br i1 %218, label %219, label %221

219:                                              ; preds = %198
  %220 = getelementptr inbounds i8, ptr %160, i64 16
  store volatile i32 0, ptr %220, align 8, !tbaa !28
  br label %221

221:                                              ; preds = %219, %198
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #9
  ret ptr %212
}

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

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

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

declare i32 @mHandleValid(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i32 @getpid() local_unnamed_addr #2

declare i32 @mThreadOrder(...) local_unnamed_addr #3

declare void @m_PropertyFunction(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @mornObjectRemove(ptr noundef, ptr noundef) #3

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

; Function Attrs: nounwind
declare i32 @umask(i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nofree nounwind
declare noundef i32 @access(ptr nocapture noundef readonly, i32 noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @mkdir(ptr nocapture noundef readonly, i32 noundef) local_unnamed_addr #5

; Function Attrs: nofree
declare noundef i32 @open(ptr nocapture noundef readonly, i32 noundef, ...) local_unnamed_addr #4

; Function Attrs: nounwind
declare ptr @mmap(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @kill(i32 noundef, i32 noundef) local_unnamed_addr #2

; 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) #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #8

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

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 16}
!10 = !{!"MHandle", !6, i64 0, !6, i64 4, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !6, i64 256}
!13 = !{!"HandleProcTopic", !7, i64 0, !6, i64 256, !6, i64 260, !6, i64 264, !6, i64 268, !11, i64 272, !14, i64 280}
!14 = !{!"long", !7, i64 0}
!15 = !{!13, !6, i64 260}
!16 = !{!13, !6, i64 264}
!17 = !{!13, !6, i64 268}
!18 = !{!13, !11, i64 272}
!19 = !{!20, !6, i64 12}
!20 = !{!"ProcTopicInfo", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20, !14, i64 24, !7, i64 32, !7, i64 1056}
!21 = !{!20, !14, i64 24}
!22 = !{!23, !6, i64 0}
!23 = !{!"ProcCommunicateState", !6, i64 0, !6, i64 4}
!24 = !{!23, !6, i64 4}
!25 = !{!20, !6, i64 4}
!26 = !{!20, !6, i64 8}
!27 = !{!10, !6, i64 4}
!28 = !{!20, !6, i64 16}
!29 = !{!20, !6, i64 0}


; Effective O3 passes: BDCEPass,ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass