; 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.HandleProcMessage = type { [256 x i8], i32, i32, i32, i32, i64, ptr }
%struct.ProcMessageInfo = type { i32, i32, i32, i32, i32, i32, i64, i32, i32, i32, [256 x i32], [256 x 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.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 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.12 = external hidden unnamed_addr constant [13 x i8], align 1
@__FUNCTION__.m_ProcMessageWrite = external hidden unnamed_addr constant [19 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 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: nounwind
declare i32 @flock(i32 noundef, i32 noundef) #1

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

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

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

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

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

declare i32 @usleep(i32 noundef) #2

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

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

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

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

declare i32 @mHandleValid(ptr noundef) #2

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

declare i32 @mThreadOrder(...) #2

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @endProcMessage(ptr noundef) #5

; Function Attrs: nounwind uwtable
define dso_local ptr @m_ProcMessageWrite(ptr noundef %0, ptr noundef %1, i32 noundef %2) #5 {
  %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 ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca [128 x i8], align 16
  %12 = alloca i32, align 4
  %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
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = 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
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %39

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

39:                                               ; preds = %38, %3
  br label %40

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

46:                                               ; preds = %40
  %47 = load i32, ptr %7, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %47, i32 noundef -1, ptr noundef @.str, i32 noundef 379, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.5)
  br label %48

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

49:                                               ; preds = %48
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = icmp slt i32 %50, 0
  br i1 %51, label %52, label %57

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

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

71:                                               ; preds = %57
  %72 = call i32 @getpid() #6
  %73 = mul nsw i32 %72, 1000
  %74 = call i32 (...) @mThreadOrder()
  %75 = add nsw i32 %73, %74
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.HandleProcMessage, ptr %76, i32 0, i32 1
  store i32 %75, ptr %77, align 8, !tbaa !13
  br label %78

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

82:                                               ; preds = %78
  br label %83

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

94:                                               ; preds = %83
  %95 = getelementptr inbounds [128 x i8], ptr %11, i64 0, i64 0
  %96 = call i32 @mkdir(ptr noundef %95, i32 noundef 511) #6
  br label %97

97:                                               ; preds = %94, %83
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.HandleProcMessage, ptr %98, i32 0, i32 0
  %100 = getelementptr inbounds [256 x i8], ptr %99, i64 0, i64 0
  %101 = getelementptr inbounds [128 x i8], ptr %11, i64 0, i64 0
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %100, ptr noundef @.str.9, ptr noundef %101, ptr noundef %102) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.HandleProcMessage, ptr %104, i32 0, i32 0
  %106 = getelementptr inbounds [256 x i8], ptr %105, i64 0, i64 0
  %107 = call i32 @access(ptr noundef %106, i32 noundef 0) #6
  store i32 %107, ptr %12, align 4, !tbaa !9
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.HandleProcMessage, ptr %108, i32 0, i32 0
  %110 = getelementptr inbounds [256 x i8], ptr %109, i64 0, i64 0
  %111 = call i32 (ptr, i32, ...) @open(ptr noundef %110, i32 noundef 66, i32 noundef 438)
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.HandleProcMessage, ptr %112, i32 0, i32 2
  store i32 %111, ptr %113, align 4, !tbaa !16
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.HandleProcMessage, ptr %114, i32 0, i32 2
  %116 = load i32, ptr %115, align 4, !tbaa !16
  %117 = call i32 @flock(i32 noundef %116, i32 noundef 2) #6
  %118 = load i32, ptr %12, align 4, !tbaa !9
  %119 = icmp sge i32 %118, 0
  br i1 %119, label %120, label %129

120:                                              ; preds = %97
  %121 = load ptr, ptr %10, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.HandleProcMessage, ptr %121, i32 0, i32 2
  %123 = load i32, ptr %122, align 4, !tbaa !16
  %124 = call i64 @lseek(i32 noundef %123, i64 noundef 1, i32 noundef 2) #6
  %125 = sub i64 %124, 4144
  %126 = trunc i64 %125 to i32
  %127 = load ptr, ptr %10, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.HandleProcMessage, ptr %127, i32 0, i32 3
  store i32 %126, ptr %128, align 8, !tbaa !17
  br label %129

129:                                              ; preds = %120, %97
  %130 = load i32, ptr %12, align 4, !tbaa !9
  %131 = icmp slt i32 %130, 0
  br i1 %131, label %132, label %197

132:                                              ; preds = %129
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.HandleProcMessage, ptr %133, i32 0, i32 4
  %135 = load i32, ptr %134, align 4, !tbaa !18
  %136 = icmp eq i32 %135, 0
  br i1 %136, label %137, label %149

137:                                              ; preds = %132
  %138 = load i32, ptr %8, align 4, !tbaa !9
  %139 = mul nsw i32 %138, 2
  %140 = icmp sgt i32 %139, 1024
  br i1 %140, label %141, label %144

141:                                              ; preds = %137
  %142 = load i32, ptr %8, align 4, !tbaa !9
  %143 = mul nsw i32 %142, 2
  br label %145

144:                                              ; preds = %137
  br label %145

145:                                              ; preds = %144, %141
  %146 = phi i32 [ %143, %141 ], [ 1024, %144 ]
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.HandleProcMessage, ptr %147, i32 0, i32 4
  store i32 %146, ptr %148, align 4, !tbaa !18
  br label %149

149:                                              ; preds = %145, %132
  %150 = load ptr, ptr %10, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.HandleProcMessage, ptr %150, i32 0, i32 4
  %152 = load i32, ptr %151, align 4, !tbaa !18
  %153 = mul nsw i32 %152, 256
  %154 = load ptr, ptr %10, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.HandleProcMessage, ptr %154, i32 0, i32 3
  store i32 %153, ptr %155, align 8, !tbaa !17
  br label %156

156:                                              ; preds = %149
  br label %157

157:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %158 = load ptr, ptr %10, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.HandleProcMessage, ptr %158, i32 0, i32 2
  %160 = load i32, ptr %159, align 4, !tbaa !16
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.HandleProcMessage, ptr %161, i32 0, i32 3
  %163 = load i32, ptr %162, align 8, !tbaa !17
  %164 = sext i32 %163 to i64
  %165 = add i64 %164, 4144
  %166 = call i64 @lseek(i32 noundef %160, i64 noundef %165, i32 noundef 0) #6
  %167 = load ptr, ptr %10, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.HandleProcMessage, ptr %167, i32 0, i32 3
  %169 = load i32, ptr %168, align 8, !tbaa !17
  %170 = sext i32 %169 to i64
  %171 = add i64 %170, 4144
  %172 = icmp ne i64 %166, %171
  %173 = zext i1 %172 to i32
  store i32 %173, ptr %13, align 4, !tbaa !9
  %174 = load i32, ptr %13, align 4, !tbaa !9
  %175 = icmp ne i32 %174, 0
  br i1 %175, label %176, label %178

176:                                              ; preds = %157
  %177 = load i32, ptr %13, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %177, i32 noundef -1, ptr noundef @.str, i32 noundef 414, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.1)
  br label %178

178:                                              ; preds = %176, %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %179

179:                                              ; preds = %178
  br label %180

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %182 = load ptr, ptr %10, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.HandleProcMessage, ptr %182, i32 0, i32 2
  %184 = load i32, ptr %183, align 4, !tbaa !16
  %185 = call i64 @write(i32 noundef %184, ptr noundef %12, i64 noundef 4)
  %186 = icmp ne i64 %185, 4
  %187 = zext i1 %186 to i32
  store i32 %187, ptr %14, align 4, !tbaa !9
  %188 = load i32, ptr %14, align 4, !tbaa !9
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %192

190:                                              ; preds = %181
  %191 = load i32, ptr %14, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %191, i32 noundef -1, ptr noundef @.str, i32 noundef 414, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.3)
  br label %192

192:                                              ; preds = %190, %181
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %193

193:                                              ; preds = %192
  br label %194

194:                                              ; preds = %193
  br label %195

195:                                              ; preds = %194
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196, %129
  br label %198

198:                                              ; preds = %197
  %199 = load ptr, ptr %10, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.HandleProcMessage, ptr %199, i32 0, i32 3
  %201 = load i32, ptr %200, align 8, !tbaa !17
  %202 = sext i32 %201 to i64
  %203 = add i64 %202, 4144
  %204 = load ptr, ptr %10, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.HandleProcMessage, ptr %204, i32 0, i32 2
  %206 = load i32, ptr %205, align 4, !tbaa !16
  %207 = call ptr @mmap(ptr noundef null, i64 noundef %203, i32 noundef 3, i32 noundef 1, i32 noundef %206, i64 noundef 0) #6
  %208 = load ptr, ptr %10, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.HandleProcMessage, ptr %208, i32 0, i32 6
  store ptr %207, ptr %209, align 8, !tbaa !19
  br label %210

210:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %211 = load ptr, ptr %10, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.HandleProcMessage, ptr %211, i32 0, i32 6
  %213 = load ptr, ptr %212, align 8, !tbaa !19
  %214 = icmp eq ptr %213, null
  %215 = zext i1 %214 to i32
  store i32 %215, ptr %15, align 4, !tbaa !9
  %216 = load i32, ptr %15, align 4, !tbaa !9
  %217 = icmp ne i32 %216, 0
  br i1 %217, label %218, label %220

218:                                              ; preds = %210
  %219 = load i32, ptr %15, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %219, i32 noundef -1, ptr noundef @.str, i32 noundef 416, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.10)
  br label %220

220:                                              ; preds = %218, %210
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %221

221:                                              ; preds = %220
  br label %222

222:                                              ; preds = %221
  br label %223

223:                                              ; preds = %222
  br label %224

224:                                              ; preds = %223
  %225 = load i32, ptr %12, align 4, !tbaa !9
  %226 = icmp slt i32 %225, 0
  br i1 %226, label %227, label %311

227:                                              ; preds = %224
  %228 = load ptr, ptr %10, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.HandleProcMessage, ptr %228, i32 0, i32 1
  %230 = load i32, ptr %229, align 8, !tbaa !13
  %231 = load ptr, ptr %10, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.HandleProcMessage, ptr %231, i32 0, i32 6
  %233 = load ptr, ptr %232, align 8, !tbaa !19
  %234 = getelementptr inbounds %struct.ProcMessageInfo, ptr %233, i32 0, i32 0
  store volatile i32 %230, ptr %234, align 8, !tbaa !20
  %235 = load ptr, ptr %10, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.HandleProcMessage, ptr %235, i32 0, i32 6
  %237 = load ptr, ptr %236, align 8, !tbaa !19
  %238 = getelementptr inbounds %struct.ProcMessageInfo, ptr %237, i32 0, i32 3
  store volatile i32 0, ptr %238, align 4, !tbaa !22
  %239 = load ptr, ptr %10, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.HandleProcMessage, ptr %239, i32 0, i32 6
  %241 = load ptr, ptr %240, align 8, !tbaa !19
  %242 = getelementptr inbounds %struct.ProcMessageInfo, ptr %241, i32 0, i32 6
  store volatile i64 0, ptr %242, align 8, !tbaa !23
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %243 = load ptr, ptr %10, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.HandleProcMessage, ptr %243, i32 0, i32 3
  %245 = load i32, ptr %244, align 8, !tbaa !17
  %246 = sdiv i32 %245, 128
  store i32 %246, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %247

247:                                              ; preds = %272, %227
  %248 = load i32, ptr %17, align 4, !tbaa !9
  %249 = icmp slt i32 %248, 128
  br i1 %249, label %251, label %250

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

251:                                              ; preds = %247
  %252 = load i32, ptr %16, align 4, !tbaa !9
  %253 = load i32, ptr %17, align 4, !tbaa !9
  %254 = mul nsw i32 %252, %253
  %255 = load ptr, ptr %10, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.HandleProcMessage, ptr %255, i32 0, i32 6
  %257 = load ptr, ptr %256, align 8, !tbaa !19
  %258 = getelementptr inbounds %struct.ProcMessageInfo, ptr %257, i32 0, i32 12
  %259 = load i32, ptr %17, align 4, !tbaa !9
  %260 = sext i32 %259 to i64
  %261 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %258, i64 0, i64 %260
  %262 = getelementptr inbounds %struct.ProcCommunicateState, ptr %261, i32 0, i32 0
  store volatile i32 %254, ptr %262, align 8, !tbaa !24
  %263 = load i32, ptr %16, align 4, !tbaa !9
  %264 = load ptr, ptr %10, align 8, !tbaa !5
  %265 = getelementptr inbounds %struct.HandleProcMessage, ptr %264, i32 0, i32 6
  %266 = load ptr, ptr %265, align 8, !tbaa !19
  %267 = getelementptr inbounds %struct.ProcMessageInfo, ptr %266, i32 0, i32 12
  %268 = load i32, ptr %17, align 4, !tbaa !9
  %269 = sext i32 %268 to i64
  %270 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %267, i64 0, i64 %269
  %271 = getelementptr inbounds %struct.ProcCommunicateState, ptr %270, i32 0, i32 1
  store volatile i32 %263, ptr %271, align 4, !tbaa !26
  br label %272

272:                                              ; preds = %251
  %273 = load i32, ptr %17, align 4, !tbaa !9
  %274 = add nsw i32 %273, 1
  store i32 %274, ptr %17, align 4, !tbaa !9
  br label %247, !llvm.loop !27

275:                                              ; preds = %250
  %276 = load ptr, ptr %10, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.HandleProcMessage, ptr %276, i32 0, i32 6
  %278 = load ptr, ptr %277, align 8, !tbaa !19
  %279 = getelementptr inbounds %struct.ProcMessageInfo, ptr %278, i32 0, i32 7
  store volatile i32 0, ptr %279, align 8, !tbaa !29
  %280 = load ptr, ptr %10, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.HandleProcMessage, ptr %280, i32 0, i32 6
  %282 = load ptr, ptr %281, align 8, !tbaa !19
  %283 = getelementptr inbounds %struct.ProcMessageInfo, ptr %282, i32 0, i32 8
  store volatile i32 0, ptr %283, align 4, !tbaa !30
  %284 = load ptr, ptr %10, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.HandleProcMessage, ptr %284, i32 0, i32 6
  %286 = load ptr, ptr %285, align 8, !tbaa !19
  %287 = getelementptr inbounds %struct.ProcMessageInfo, ptr %286, i32 0, i32 9
  store volatile i32 0, ptr %287, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %288

288:                                              ; preds = %307, %275
  %289 = load i32, ptr %18, align 4, !tbaa !9
  %290 = icmp slt i32 %289, 256
  br i1 %290, label %292, label %291

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

292:                                              ; preds = %288
  %293 = load ptr, ptr %10, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.HandleProcMessage, ptr %293, i32 0, i32 6
  %295 = load ptr, ptr %294, align 8, !tbaa !19
  %296 = getelementptr inbounds %struct.ProcMessageInfo, ptr %295, i32 0, i32 10
  %297 = load i32, ptr %18, align 4, !tbaa !9
  %298 = sext i32 %297 to i64
  %299 = getelementptr inbounds [256 x i32], ptr %296, i64 0, i64 %298
  store volatile i32 0, ptr %299, align 4, !tbaa !9
  %300 = load ptr, ptr %10, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.HandleProcMessage, ptr %300, i32 0, i32 6
  %302 = load ptr, ptr %301, align 8, !tbaa !19
  %303 = getelementptr inbounds %struct.ProcMessageInfo, ptr %302, i32 0, i32 11
  %304 = load i32, ptr %18, align 4, !tbaa !9
  %305 = sext i32 %304 to i64
  %306 = getelementptr inbounds [256 x i64], ptr %303, i64 0, i64 %305
  store volatile i64 -1, ptr %306, align 8, !tbaa !32
  br label %307

307:                                              ; preds = %292
  %308 = load i32, ptr %18, align 4, !tbaa !9
  %309 = add nsw i32 %308, 1
  store i32 %309, ptr %18, align 4, !tbaa !9
  br label %288, !llvm.loop !33

310:                                              ; preds = %291
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  br label %311

311:                                              ; preds = %310, %224
  %312 = load ptr, ptr %10, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.HandleProcMessage, ptr %312, i32 0, i32 5
  store i64 -1, ptr %313, align 8, !tbaa !34
  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
  %314 = load i32, ptr %12, align 4, !tbaa !9
  %315 = icmp sge i32 %314, 0
  br i1 %315, label %316, label %379

316:                                              ; preds = %311
  br label %317

317:                                              ; preds = %316
  br label %318

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

327:                                              ; preds = %318
  %328 = load i32, ptr %21, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %328, i32 noundef -1, ptr noundef @.str, i32 noundef 440, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.1)
  br label %329

329:                                              ; preds = %327, %318
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  br label %330

330:                                              ; preds = %329
  br label %331

331:                                              ; preds = %330
  br label %332

332:                                              ; preds = %331
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %333 = load ptr, ptr %10, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.HandleProcMessage, ptr %333, i32 0, i32 2
  %335 = load i32, ptr %334, align 4, !tbaa !16
  %336 = call i64 @read(i32 noundef %335, ptr noundef %19, i64 noundef 4)
  %337 = icmp ne i64 %336, 4
  %338 = zext i1 %337 to i32
  store i32 %338, ptr %22, align 4, !tbaa !9
  %339 = load i32, ptr %22, align 4, !tbaa !9
  %340 = icmp ne i32 %339, 0
  br i1 %340, label %341, label %343

341:                                              ; preds = %332
  %342 = load i32, ptr %22, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %342, i32 noundef -1, ptr noundef @.str, i32 noundef 440, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.2)
  br label %343

343:                                              ; preds = %341, %332
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %344

344:                                              ; preds = %343
  br label %345

345:                                              ; preds = %344
  br label %346

346:                                              ; preds = %345
  br label %347

347:                                              ; preds = %346
  br label %348

348:                                              ; preds = %347
  br label %349

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

358:                                              ; preds = %349
  %359 = load i32, ptr %23, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %359, i32 noundef -1, ptr noundef @.str, i32 noundef 441, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.1)
  br label %360

360:                                              ; preds = %358, %349
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  br label %361

361:                                              ; preds = %360
  br label %362

362:                                              ; preds = %361
  br label %363

363:                                              ; preds = %362
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #6
  %364 = load ptr, ptr %10, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct.HandleProcMessage, ptr %364, i32 0, i32 2
  %366 = load i32, ptr %365, align 4, !tbaa !16
  %367 = call i64 @read(i32 noundef %366, ptr noundef %20, i64 noundef 4)
  %368 = icmp ne i64 %367, 4
  %369 = zext i1 %368 to i32
  store i32 %369, ptr %24, align 4, !tbaa !9
  %370 = load i32, ptr %24, align 4, !tbaa !9
  %371 = icmp ne i32 %370, 0
  br i1 %371, label %372, label %374

372:                                              ; preds = %363
  %373 = load i32, ptr %24, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %373, i32 noundef -1, ptr noundef @.str, i32 noundef 441, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.2)
  br label %374

374:                                              ; preds = %372, %363
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #6
  br label %375

375:                                              ; preds = %374
  br label %376

376:                                              ; preds = %375
  br label %377

377:                                              ; preds = %376
  br label %378

378:                                              ; preds = %377
  br label %379

379:                                              ; preds = %378, %311
  %380 = load i32, ptr %19, align 4, !tbaa !9
  %381 = add nsw i32 %380, 1
  store i32 %381, ptr %19, align 4, !tbaa !9
  br label %382

382:                                              ; preds = %379
  br label %383

383:                                              ; preds = %382
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #6
  %384 = load ptr, ptr %10, align 8, !tbaa !5
  %385 = getelementptr inbounds %struct.HandleProcMessage, ptr %384, i32 0, i32 2
  %386 = load i32, ptr %385, align 4, !tbaa !16
  %387 = call i64 @lseek(i32 noundef %386, i64 noundef 4, i32 noundef 0) #6
  %388 = icmp ne i64 %387, 4
  %389 = zext i1 %388 to i32
  store i32 %389, ptr %25, align 4, !tbaa !9
  %390 = load i32, ptr %25, align 4, !tbaa !9
  %391 = icmp ne i32 %390, 0
  br i1 %391, label %392, label %394

392:                                              ; preds = %383
  %393 = load i32, ptr %25, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %393, i32 noundef -1, ptr noundef @.str, i32 noundef 443, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.1)
  br label %394

394:                                              ; preds = %392, %383
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #6
  br label %395

395:                                              ; preds = %394
  br label %396

396:                                              ; preds = %395
  br label %397

397:                                              ; preds = %396
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #6
  %398 = load ptr, ptr %10, align 8, !tbaa !5
  %399 = getelementptr inbounds %struct.HandleProcMessage, ptr %398, i32 0, i32 2
  %400 = load i32, ptr %399, align 4, !tbaa !16
  %401 = call i64 @write(i32 noundef %400, ptr noundef %19, i64 noundef 4)
  %402 = icmp ne i64 %401, 4
  %403 = zext i1 %402 to i32
  store i32 %403, ptr %26, align 4, !tbaa !9
  %404 = load i32, ptr %26, align 4, !tbaa !9
  %405 = icmp ne i32 %404, 0
  br i1 %405, label %406, label %408

406:                                              ; preds = %397
  %407 = load i32, ptr %26, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %407, i32 noundef -1, ptr noundef @.str, i32 noundef 443, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.3)
  br label %408

408:                                              ; preds = %406, %397
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #6
  br label %409

409:                                              ; preds = %408
  br label %410

410:                                              ; preds = %409
  br label %411

411:                                              ; preds = %410
  br label %412

412:                                              ; preds = %411
  %413 = load i32, ptr %19, align 4, !tbaa !9
  %414 = load ptr, ptr %10, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct.HandleProcMessage, ptr %414, i32 0, i32 6
  %416 = load ptr, ptr %415, align 8, !tbaa !19
  %417 = getelementptr inbounds %struct.ProcMessageInfo, ptr %416, i32 0, i32 1
  store volatile i32 %413, ptr %417, align 4, !tbaa !35
  %418 = load i32, ptr %20, align 4, !tbaa !9
  %419 = add nsw i32 %418, 1
  store i32 %419, ptr %20, align 4, !tbaa !9
  br label %420

420:                                              ; preds = %412
  br label %421

421:                                              ; preds = %420
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #6
  %422 = load ptr, ptr %10, align 8, !tbaa !5
  %423 = getelementptr inbounds %struct.HandleProcMessage, ptr %422, i32 0, i32 2
  %424 = load i32, ptr %423, align 4, !tbaa !16
  %425 = call i64 @lseek(i32 noundef %424, i64 noundef 8, i32 noundef 0) #6
  %426 = icmp ne i64 %425, 8
  %427 = zext i1 %426 to i32
  store i32 %427, ptr %27, align 4, !tbaa !9
  %428 = load i32, ptr %27, align 4, !tbaa !9
  %429 = icmp ne i32 %428, 0
  br i1 %429, label %430, label %432

430:                                              ; preds = %421
  %431 = load i32, ptr %27, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %431, i32 noundef -1, ptr noundef @.str, i32 noundef 444, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.1)
  br label %432

432:                                              ; preds = %430, %421
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #6
  br label %433

433:                                              ; preds = %432
  br label %434

434:                                              ; preds = %433
  br label %435

435:                                              ; preds = %434
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  %436 = load ptr, ptr %10, align 8, !tbaa !5
  %437 = getelementptr inbounds %struct.HandleProcMessage, ptr %436, i32 0, i32 2
  %438 = load i32, ptr %437, align 4, !tbaa !16
  %439 = call i64 @write(i32 noundef %438, ptr noundef %20, i64 noundef 4)
  %440 = icmp ne i64 %439, 4
  %441 = zext i1 %440 to i32
  store i32 %441, ptr %28, align 4, !tbaa !9
  %442 = load i32, ptr %28, align 4, !tbaa !9
  %443 = icmp ne i32 %442, 0
  br i1 %443, label %444, label %446

444:                                              ; preds = %435
  %445 = load i32, ptr %28, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %445, i32 noundef -1, ptr noundef @.str, i32 noundef 444, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.3)
  br label %446

446:                                              ; preds = %444, %435
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  br label %447

447:                                              ; preds = %446
  br label %448

448:                                              ; preds = %447
  br label %449

449:                                              ; preds = %448
  br label %450

450:                                              ; preds = %449
  %451 = load i32, ptr %20, align 4, !tbaa !9
  %452 = load ptr, ptr %10, align 8, !tbaa !5
  %453 = getelementptr inbounds %struct.HandleProcMessage, ptr %452, i32 0, i32 6
  %454 = load ptr, ptr %453, align 8, !tbaa !19
  %455 = getelementptr inbounds %struct.ProcMessageInfo, ptr %454, i32 0, i32 2
  store volatile i32 %451, ptr %455, align 8, !tbaa !36
  %456 = load ptr, ptr %10, align 8, !tbaa !5
  %457 = getelementptr inbounds %struct.HandleProcMessage, ptr %456, i32 0, i32 2
  %458 = load i32, ptr %457, align 4, !tbaa !16
  %459 = call i32 @flock(i32 noundef %458, i32 noundef 8) #6
  %460 = load ptr, ptr %9, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct.MHandle, ptr %460, i32 0, i32 1
  store volatile i32 1, ptr %461, align 4, !tbaa !37
  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 %12) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %11) #6
  br label %462

462:                                              ; preds = %450, %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #6
  %463 = load ptr, ptr %10, align 8, !tbaa !5
  %464 = getelementptr inbounds %struct.HandleProcMessage, ptr %463, i32 0, i32 6
  %465 = load ptr, ptr %464, align 8, !tbaa !19
  store ptr %465, ptr %29, align 8, !tbaa !5
  %466 = load i32, ptr %8, align 4, !tbaa !9
  %467 = load ptr, ptr %10, align 8, !tbaa !5
  %468 = getelementptr inbounds %struct.HandleProcMessage, ptr %467, i32 0, i32 3
  %469 = load i32, ptr %468, align 8, !tbaa !17
  %470 = sdiv i32 %469, 16
  %471 = icmp sgt i32 %466, %470
  br i1 %471, label %472, label %489

472:                                              ; preds = %462
  %473 = load ptr, ptr %10, align 8, !tbaa !5
  call void @endProcMessage(ptr noundef %473)
  %474 = load ptr, ptr %10, align 8, !tbaa !5
  %475 = getelementptr inbounds %struct.HandleProcMessage, ptr %474, i32 0, i32 6
  store ptr null, ptr %475, align 8, !tbaa !19
  %476 = call i32 @usleep(i32 noundef 10000)
  %477 = load ptr, ptr %10, align 8, !tbaa !5
  %478 = getelementptr inbounds %struct.HandleProcMessage, ptr %477, i32 0, i32 0
  %479 = getelementptr inbounds [256 x i8], ptr %478, i64 0, i64 0
  %480 = call i32 @remove(ptr noundef %479) #6
  br label %481

481:                                              ; preds = %472
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  store i32 1, ptr %30, align 4, !tbaa !9
  %482 = load i32, ptr %30, align 4, !tbaa !9
  %483 = icmp ne i32 %482, 0
  br i1 %483, label %484, label %486

484:                                              ; preds = %481
  %485 = load i32, ptr %30, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %485, i32 noundef -1, ptr noundef @.str, i32 noundef 456, ptr noundef @__FUNCTION__.m_ProcMessageWrite, ptr noundef @.str.15)
  br label %486

486:                                              ; preds = %484, %481
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %487

487:                                              ; preds = %486
  br label %488

488:                                              ; preds = %487
  br label %489

489:                                              ; preds = %488, %462
  br label %490

490:                                              ; preds = %530, %489
  %491 = load ptr, ptr %29, align 8, !tbaa !5
  %492 = getelementptr inbounds %struct.ProcMessageInfo, ptr %491, i32 0, i32 2
  %493 = load volatile i32, ptr %492, align 8, !tbaa !36
  %494 = icmp sgt i32 %493, 1
  br i1 %494, label %495, label %536

495:                                              ; preds = %490
  %496 = load ptr, ptr %10, align 8, !tbaa !5
  %497 = getelementptr inbounds %struct.HandleProcMessage, ptr %496, i32 0, i32 2
  %498 = load i32, ptr %497, align 4, !tbaa !16
  %499 = call i32 @flock(i32 noundef %498, i32 noundef 2) #6
  %500 = load ptr, ptr %29, align 8, !tbaa !5
  %501 = getelementptr inbounds %struct.ProcMessageInfo, ptr %500, i32 0, i32 4
  %502 = load volatile i32, ptr %501, align 8, !tbaa !38
  %503 = icmp eq i32 %502, 0
  br i1 %503, label %509, label %504

504:                                              ; preds = %495
  %505 = load ptr, ptr %29, align 8, !tbaa !5
  %506 = getelementptr inbounds %struct.ProcMessageInfo, ptr %505, i32 0, i32 0
  %507 = load volatile i32, ptr %506, align 8, !tbaa !20
  %508 = icmp eq i32 %507, 0
  br i1 %508, label %509, label %516

509:                                              ; preds = %504, %495
  %510 = load ptr, ptr %29, align 8, !tbaa !5
  %511 = getelementptr inbounds %struct.ProcMessageInfo, ptr %510, i32 0, i32 4
  store volatile i32 1, ptr %511, align 8, !tbaa !38
  %512 = load ptr, ptr %10, align 8, !tbaa !5
  %513 = getelementptr inbounds %struct.HandleProcMessage, ptr %512, i32 0, i32 2
  %514 = load i32, ptr %513, align 4, !tbaa !16
  %515 = call i32 @flock(i32 noundef %514, i32 noundef 8) #6
  br label %536

516:                                              ; preds = %504
  %517 = load ptr, ptr %29, align 8, !tbaa !5
  %518 = getelementptr inbounds %struct.ProcMessageInfo, ptr %517, i32 0, i32 0
  %519 = load volatile i32, ptr %518, align 8, !tbaa !20
  %520 = sdiv i32 %519, 1000
  %521 = call i32 @kill(i32 noundef %520, i32 noundef 0) #6
  %522 = icmp eq i32 %521, 0
  %523 = zext i1 %522 to i32
  %524 = icmp eq i32 %523, 0
  br i1 %524, label %525, label %530

525:                                              ; preds = %516
  %526 = load ptr, ptr %29, align 8, !tbaa !5
  %527 = getelementptr inbounds %struct.ProcMessageInfo, ptr %526, i32 0, i32 2
  %528 = load volatile i32, ptr %527, align 8, !tbaa !36
  %529 = sub nsw i32 %528, 1
  store volatile i32 %529, ptr %527, align 8, !tbaa !36
  br label %530

530:                                              ; preds = %525, %516
  %531 = load ptr, ptr %10, align 8, !tbaa !5
  %532 = getelementptr inbounds %struct.HandleProcMessage, ptr %531, i32 0, i32 2
  %533 = load i32, ptr %532, align 4, !tbaa !16
  %534 = call i32 @flock(i32 noundef %533, i32 noundef 8) #6
  %535 = call i32 @usleep(i32 noundef 1000)
  br label %490, !llvm.loop !39

536:                                              ; preds = %509, %490
  %537 = load ptr, ptr %10, align 8, !tbaa !5
  %538 = getelementptr inbounds %struct.HandleProcMessage, ptr %537, i32 0, i32 1
  %539 = load i32, ptr %538, align 8, !tbaa !13
  %540 = load ptr, ptr %29, align 8, !tbaa !5
  %541 = getelementptr inbounds %struct.ProcMessageInfo, ptr %540, i32 0, i32 0
  store volatile i32 %539, ptr %541, align 8, !tbaa !20
  %542 = load ptr, ptr %29, align 8, !tbaa !5
  %543 = getelementptr inbounds %struct.ProcMessageInfo, ptr %542, i32 0, i32 3
  %544 = load volatile i32, ptr %543, align 4, !tbaa !22
  %545 = load i32, ptr %8, align 4, !tbaa !9
  %546 = add nsw i32 %544, %545
  %547 = load ptr, ptr %10, align 8, !tbaa !5
  %548 = getelementptr inbounds %struct.HandleProcMessage, ptr %547, i32 0, i32 3
  %549 = load i32, ptr %548, align 8, !tbaa !17
  %550 = icmp sgt i32 %546, %549
  br i1 %550, label %551, label %554

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

554:                                              ; preds = %551, %536
  br label %555

555:                                              ; preds = %665, %554
  %556 = load ptr, ptr %29, align 8, !tbaa !5
  %557 = getelementptr inbounds %struct.ProcMessageInfo, ptr %556, i32 0, i32 3
  %558 = load volatile i32, ptr %557, align 4, !tbaa !22
  %559 = load ptr, ptr %29, align 8, !tbaa !5
  %560 = getelementptr inbounds %struct.ProcMessageInfo, ptr %559, i32 0, i32 8
  %561 = load volatile i32, ptr %560, align 4, !tbaa !30
  %562 = icmp slt i32 %558, %561
  br i1 %562, label %563, label %573

563:                                              ; preds = %555
  %564 = load ptr, ptr %29, align 8, !tbaa !5
  %565 = getelementptr inbounds %struct.ProcMessageInfo, ptr %564, i32 0, i32 3
  %566 = load volatile i32, ptr %565, align 4, !tbaa !22
  %567 = load i32, ptr %8, align 4, !tbaa !9
  %568 = add nsw i32 %566, %567
  %569 = load ptr, ptr %29, align 8, !tbaa !5
  %570 = getelementptr inbounds %struct.ProcMessageInfo, ptr %569, i32 0, i32 8
  %571 = load volatile i32, ptr %570, align 4, !tbaa !30
  %572 = icmp sgt i32 %568, %571
  br i1 %572, label %583, label %573

573:                                              ; preds = %563, %555
  %574 = load ptr, ptr %29, align 8, !tbaa !5
  %575 = getelementptr inbounds %struct.ProcMessageInfo, ptr %574, i32 0, i32 6
  %576 = load volatile i64, ptr %575, align 8, !tbaa !23
  %577 = load ptr, ptr %29, align 8, !tbaa !5
  %578 = getelementptr inbounds %struct.ProcMessageInfo, ptr %577, i32 0, i32 9
  %579 = load volatile i32, ptr %578, align 8, !tbaa !31
  %580 = sext i32 %579 to i64
  %581 = sub nsw i64 %576, %580
  %582 = icmp sge i64 %581, 128
  br label %583

583:                                              ; preds = %573, %563
  %584 = phi i1 [ true, %563 ], [ %582, %573 ]
  br i1 %584, label %585, label %684

585:                                              ; preds = %583
  %586 = load ptr, ptr %29, align 8, !tbaa !5
  %587 = getelementptr inbounds %struct.ProcMessageInfo, ptr %586, i32 0, i32 7
  %588 = load volatile i32, ptr %587, align 8, !tbaa !29
  %589 = icmp eq i32 %588, 0
  br i1 %589, label %590, label %591

590:                                              ; preds = %585
  br label %684

591:                                              ; preds = %585
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %592 = load ptr, ptr %29, align 8, !tbaa !5
  %593 = getelementptr inbounds %struct.ProcMessageInfo, ptr %592, i32 0, i32 9
  %594 = load volatile i32, ptr %593, align 8, !tbaa !31
  %595 = add nsw i32 %594, 128
  store i32 %595, ptr %31, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  store i32 0, ptr %32, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  store i32 0, ptr %33, align 4, !tbaa !9
  br label %596

596:                                              ; preds = %662, %591
  %597 = load i32, ptr %33, align 4, !tbaa !9
  %598 = load ptr, ptr %29, align 8, !tbaa !5
  %599 = getelementptr inbounds %struct.ProcMessageInfo, ptr %598, i32 0, i32 7
  %600 = load volatile i32, ptr %599, align 8, !tbaa !29
  %601 = icmp slt i32 %597, %600
  br i1 %601, label %603, label %602

602:                                              ; preds = %596
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  br label %665

603:                                              ; preds = %596
  %604 = load ptr, ptr %29, align 8, !tbaa !5
  %605 = getelementptr inbounds %struct.ProcMessageInfo, ptr %604, i32 0, i32 11
  %606 = load i32, ptr %33, align 4, !tbaa !9
  %607 = sext i32 %606 to i64
  %608 = getelementptr inbounds [256 x i64], ptr %605, i64 0, i64 %607
  %609 = load volatile i64, ptr %608, align 8, !tbaa !32
  %610 = icmp eq i64 %609, -1
  br i1 %610, label %611, label %612

611:                                              ; preds = %603
  br label %662

612:                                              ; preds = %603
  %613 = load ptr, ptr %29, align 8, !tbaa !5
  %614 = getelementptr inbounds %struct.ProcMessageInfo, ptr %613, i32 0, i32 10
  %615 = load i32, ptr %33, align 4, !tbaa !9
  %616 = sext i32 %615 to i64
  %617 = getelementptr inbounds [256 x i32], ptr %614, i64 0, i64 %616
  %618 = load volatile i32, ptr %617, align 4, !tbaa !9
  %619 = sdiv i32 %618, 1000
  %620 = call i32 @kill(i32 noundef %619, i32 noundef 0) #6
  %621 = icmp eq i32 %620, 0
  %622 = zext i1 %621 to i32
  %623 = icmp eq i32 %622, 0
  br i1 %623, label %624, label %630

624:                                              ; preds = %612
  %625 = load ptr, ptr %29, align 8, !tbaa !5
  %626 = getelementptr inbounds %struct.ProcMessageInfo, ptr %625, i32 0, i32 11
  %627 = load i32, ptr %33, align 4, !tbaa !9
  %628 = sext i32 %627 to i64
  %629 = getelementptr inbounds [256 x i64], ptr %626, i64 0, i64 %628
  store volatile i64 -1, ptr %629, align 8, !tbaa !32
  br label %662

630:                                              ; preds = %612
  %631 = load ptr, ptr %29, align 8, !tbaa !5
  %632 = getelementptr inbounds %struct.ProcMessageInfo, ptr %631, i32 0, i32 11
  %633 = load i32, ptr %33, align 4, !tbaa !9
  %634 = sext i32 %633 to i64
  %635 = getelementptr inbounds [256 x i64], ptr %632, i64 0, i64 %634
  %636 = load volatile i64, ptr %635, align 8, !tbaa !32
  %637 = load i32, ptr %31, align 4, !tbaa !9
  %638 = sext i32 %637 to i64
  %639 = icmp ult i64 %636, %638
  br i1 %639, label %640, label %647

640:                                              ; preds = %630
  %641 = load ptr, ptr %29, align 8, !tbaa !5
  %642 = getelementptr inbounds %struct.ProcMessageInfo, ptr %641, i32 0, i32 11
  %643 = load i32, ptr %33, align 4, !tbaa !9
  %644 = sext i32 %643 to i64
  %645 = getelementptr inbounds [256 x i64], ptr %642, i64 0, i64 %644
  %646 = load volatile i64, ptr %645, align 8, !tbaa !32
  br label %650

647:                                              ; preds = %630
  %648 = load i32, ptr %31, align 4, !tbaa !9
  %649 = sext i32 %648 to i64
  br label %650

650:                                              ; preds = %647, %640
  %651 = phi i64 [ %646, %640 ], [ %649, %647 ]
  %652 = trunc i64 %651 to i32
  store i32 %652, ptr %31, align 4, !tbaa !9
  %653 = load i32, ptr %33, align 4, !tbaa !9
  %654 = load i32, ptr %32, align 4, !tbaa !9
  %655 = icmp sgt i32 %653, %654
  br i1 %655, label %656, label %658

656:                                              ; preds = %650
  %657 = load i32, ptr %33, align 4, !tbaa !9
  br label %660

658:                                              ; preds = %650
  %659 = load i32, ptr %32, align 4, !tbaa !9
  br label %660

660:                                              ; preds = %658, %656
  %661 = phi i32 [ %657, %656 ], [ %659, %658 ]
  store i32 %661, ptr %32, align 4, !tbaa !9
  br label %662

662:                                              ; preds = %660, %624, %611
  %663 = load i32, ptr %33, align 4, !tbaa !9
  %664 = add nsw i32 %663, 1
  store i32 %664, ptr %33, align 4, !tbaa !9
  br label %596, !llvm.loop !40

665:                                              ; preds = %602
  %666 = load i32, ptr %32, align 4, !tbaa !9
  %667 = add nsw i32 %666, 1
  %668 = load ptr, ptr %29, align 8, !tbaa !5
  %669 = getelementptr inbounds %struct.ProcMessageInfo, ptr %668, i32 0, i32 7
  store volatile i32 %667, ptr %669, align 8, !tbaa !29
  %670 = load i32, ptr %31, align 4, !tbaa !9
  %671 = load ptr, ptr %29, align 8, !tbaa !5
  %672 = getelementptr inbounds %struct.ProcMessageInfo, ptr %671, i32 0, i32 9
  store volatile i32 %670, ptr %672, align 8, !tbaa !31
  %673 = load ptr, ptr %29, align 8, !tbaa !5
  %674 = getelementptr inbounds %struct.ProcMessageInfo, ptr %673, i32 0, i32 12
  %675 = load i32, ptr %31, align 4, !tbaa !9
  %676 = srem i32 %675, 128
  %677 = sext i32 %676 to i64
  %678 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %674, i64 0, i64 %677
  %679 = getelementptr inbounds %struct.ProcCommunicateState, ptr %678, i32 0, i32 0
  %680 = load volatile i32, ptr %679, align 8, !tbaa !24
  %681 = load ptr, ptr %29, align 8, !tbaa !5
  %682 = getelementptr inbounds %struct.ProcMessageInfo, ptr %681, i32 0, i32 8
  store volatile i32 %680, ptr %682, align 4, !tbaa !30
  %683 = call i32 @usleep(i32 noundef 1000)
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  br label %555, !llvm.loop !41

684:                                              ; preds = %590, %583
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #6
  %685 = load ptr, ptr %29, align 8, !tbaa !5
  %686 = getelementptr inbounds %struct.ProcMessageInfo, ptr %685, i32 0, i32 6
  %687 = load volatile i64, ptr %686, align 8, !tbaa !23
  %688 = srem i64 %687, 128
  %689 = trunc i64 %688 to i32
  store i32 %689, ptr %34, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #6
  %690 = load ptr, ptr %29, align 8, !tbaa !5
  %691 = getelementptr inbounds %struct.ProcMessageInfo, ptr %690, i32 0, i32 3
  %692 = load volatile i32, ptr %691, align 4, !tbaa !22
  store i32 %692, ptr %35, align 4, !tbaa !9
  %693 = load i32, ptr %35, align 4, !tbaa !9
  %694 = load i32, ptr %8, align 4, !tbaa !9
  %695 = add nsw i32 %693, %694
  %696 = load ptr, ptr %10, align 8, !tbaa !5
  %697 = getelementptr inbounds %struct.HandleProcMessage, ptr %696, i32 0, i32 3
  %698 = load i32, ptr %697, align 8, !tbaa !17
  %699 = icmp sgt i32 %695, %698
  br i1 %699, label %700, label %701

700:                                              ; preds = %684
  store i32 0, ptr %35, align 4, !tbaa !9
  br label %701

701:                                              ; preds = %700, %684
  %702 = load i32, ptr %6, align 4, !tbaa !9
  %703 = load ptr, ptr %29, align 8, !tbaa !5
  %704 = getelementptr inbounds %struct.ProcMessageInfo, ptr %703, i32 0, i32 12
  %705 = load i32, ptr %34, align 4, !tbaa !9
  %706 = sext i32 %705 to i64
  %707 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %704, i64 0, i64 %706
  %708 = getelementptr inbounds %struct.ProcCommunicateState, ptr %707, i32 0, i32 1
  store volatile i32 %702, ptr %708, align 4, !tbaa !26
  %709 = load i32, ptr %35, align 4, !tbaa !9
  %710 = load ptr, ptr %29, align 8, !tbaa !5
  %711 = getelementptr inbounds %struct.ProcMessageInfo, ptr %710, i32 0, i32 12
  %712 = load i32, ptr %34, align 4, !tbaa !9
  %713 = sext i32 %712 to i64
  %714 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %711, i64 0, i64 %713
  %715 = getelementptr inbounds %struct.ProcCommunicateState, ptr %714, i32 0, i32 0
  store volatile i32 %709, ptr %715, align 8, !tbaa !24
  %716 = load ptr, ptr %29, align 8, !tbaa !5
  %717 = getelementptr inbounds %struct.ProcMessageInfo, ptr %716, i32 0, i32 13
  %718 = getelementptr inbounds [0 x i8], ptr %717, i64 0, i64 0
  %719 = load i32, ptr %35, align 4, !tbaa !9
  %720 = sext i32 %719 to i64
  %721 = getelementptr inbounds i8, ptr %718, i64 %720
  %722 = load ptr, ptr %5, align 8, !tbaa !5
  %723 = load i32, ptr %6, align 4, !tbaa !9
  %724 = sext i32 %723 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %721, ptr align 1 %722, i64 %724, i1 false)
  %725 = load i32, ptr %35, align 4, !tbaa !9
  %726 = load i32, ptr %8, align 4, !tbaa !9
  %727 = add nsw i32 %725, %726
  %728 = load ptr, ptr %29, align 8, !tbaa !5
  %729 = getelementptr inbounds %struct.ProcMessageInfo, ptr %728, i32 0, i32 3
  store volatile i32 %727, ptr %729, align 4, !tbaa !22
  %730 = load ptr, ptr %29, align 8, !tbaa !5
  %731 = getelementptr inbounds %struct.ProcMessageInfo, ptr %730, i32 0, i32 6
  %732 = load volatile i64, ptr %731, align 8, !tbaa !23
  %733 = add nsw i64 %732, 1
  store volatile i64 %733, ptr %731, align 8, !tbaa !23
  %734 = load ptr, ptr %29, align 8, !tbaa !5
  %735 = getelementptr inbounds %struct.ProcMessageInfo, ptr %734, i32 0, i32 4
  store volatile i32 0, ptr %735, align 8, !tbaa !38
  %736 = load ptr, ptr %29, align 8, !tbaa !5
  %737 = getelementptr inbounds %struct.ProcMessageInfo, ptr %736, i32 0, i32 13
  %738 = getelementptr inbounds [0 x i8], ptr %737, i64 0, i64 0
  %739 = load i32, ptr %35, align 4, !tbaa !9
  %740 = sext i32 %739 to i64
  %741 = getelementptr inbounds i8, ptr %738, i64 %740
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  ret ptr %741
}

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 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #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 = !{!"HandleProcMessage", !7, i64 0, !10, i64 256, !10, i64 260, !10, i64 264, !10, i64 268, !15, i64 272, !6, 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 280}
!20 = !{!21, !10, i64 0}
!21 = !{!"ProcMessageInfo", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !15, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !7, i64 44, !7, i64 1072, !7, i64 3120, !7, i64 4144}
!22 = !{!21, !10, i64 12}
!23 = !{!21, !15, i64 24}
!24 = !{!25, !10, i64 0}
!25 = !{!"ProcCommunicateState", !10, i64 0, !10, i64 4}
!26 = !{!25, !10, i64 4}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!21, !10, i64 32}
!30 = !{!21, !10, i64 36}
!31 = !{!21, !10, i64 40}
!32 = !{!15, !15, i64 0}
!33 = distinct !{!33, !28}
!34 = !{!14, !15, i64 272}
!35 = !{!21, !10, i64 4}
!36 = !{!21, !10, i64 8}
!37 = !{!12, !10, i64 4}
!38 = !{!21, !10, i64 16}
!39 = distinct !{!39, !28}
!40 = distinct !{!40, !28}
!41 = distinct !{!41, !28}


; 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.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [5 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.12 = external hidden unnamed_addr constant [13 x i8], align 1
@__FUNCTION__.m_ProcMessageWrite = external hidden unnamed_addr constant [19 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 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: nounwind
declare i32 @flock(i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

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

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

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

declare i32 @usleep(i32 noundef) local_unnamed_addr #2

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

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

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

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

declare i32 @mHandleValid(ptr noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local void @endProcMessage(ptr noundef) #7

; Function Attrs: nounwind uwtable
define dso_local nonnull ptr @m_ProcMessageWrite(ptr noundef %0, ptr noundef readonly %1, i32 noundef %2) local_unnamed_addr #7 {
  %4 = alloca [128 x i8], align 16
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = icmp eq ptr %0, null
  %spec.store.select = select i1 %8, ptr @.str.12, 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 379, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, 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
  %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 -1138036864, ptr noundef nonnull @endProcMessage) #9
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %23 = load ptr, ptr %22, align 8, !tbaa !5
  %24 = tail call i32 @mHandleValid(ptr noundef %21) #9
  %.not = icmp eq i32 %24, 0
  br i1 %.not, label %25, label %172

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 !11
  %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.13, ptr noundef nonnull %33, i32 noundef 4) #9
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #9
  %34 = tail call i32 @umask(i32 noundef 0) #9
  %35 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.14) #9
  %36 = call i32 @access(ptr noundef nonnull %4, 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 %4, 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 %4, ptr noundef nonnull %spec.store.select) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #9
  %42 = call i32 @access(ptr noundef nonnull %23, i32 noundef 0) #9
  store i32 %42, ptr %5, align 4, !tbaa !14
  %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 = call i32 @flock(i32 noundef %43, i32 noundef 2) #9
  %46 = icmp slt i32 %42, 0
  br i1 %46, label %53, label %47

47:                                               ; preds = %40
  %48 = load i32, ptr %44, align 4, !tbaa !15
  %49 = call i64 @lseek(i32 noundef %48, i64 noundef 1, i32 noundef 2) #9
  %50 = trunc i64 %49 to i32
  %51 = add i32 %50, -4144
  %52 = getelementptr inbounds i8, ptr %23, i64 264
  store i32 %51, ptr %52, align 8, !tbaa !16
  br label %75

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

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

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

70:                                               ; preds = %59
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 414, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.1) #9
  br label %71

71:                                               ; preds = %70, %59
  %72 = load i32, ptr %44, align 4, !tbaa !15
  %73 = call i64 @write(i32 noundef %72, ptr noundef nonnull %5, i64 noundef 4) #9
  %.not186 = icmp eq i64 %73, 4
  br i1 %.not186, label %75, label %74

74:                                               ; preds = %71
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 414, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.3) #9
  br label %75

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

84:                                               ; preds = %75
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 416, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.10) #9
  br label %85

85:                                               ; preds = %84, %75
  br i1 %46, label %86, label %.critedge196

86:                                               ; preds = %85
  %87 = load i32, ptr %30, align 8, !tbaa !11
  %88 = load ptr, ptr %82, align 8, !tbaa !18
  store volatile i32 %87, ptr %88, align 8, !tbaa !19
  %89 = getelementptr inbounds i8, ptr %88, i64 12
  store volatile i32 0, ptr %89, align 4, !tbaa !21
  %90 = getelementptr inbounds i8, ptr %88, i64 24
  store volatile i64 0, ptr %90, align 8, !tbaa !22
  %91 = load i32, ptr %76, align 8, !tbaa !16
  %92 = sdiv i32 %91, 128
  %93 = getelementptr inbounds i8, ptr %88, i64 3120
  br label %100

94:                                               ; preds = %100
  %95 = getelementptr inbounds i8, ptr %88, i64 32
  store volatile i32 0, ptr %95, align 8, !tbaa !23
  %96 = getelementptr inbounds i8, ptr %88, i64 36
  store volatile i32 0, ptr %96, align 4, !tbaa !24
  %97 = getelementptr inbounds i8, ptr %88, i64 40
  store volatile i32 0, ptr %97, align 8, !tbaa !25
  %98 = getelementptr inbounds i8, ptr %88, i64 44
  %99 = getelementptr inbounds i8, ptr %88, i64 1072
  br label %117

100:                                              ; preds = %100, %86
  %indvars.iv = phi i64 [ 0, %86 ], [ %indvars.iv.next.3, %100 ]
  %101 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %93, i64 0, i64 %indvars.iv
  %102 = trunc i64 %indvars.iv to i32
  %103 = mul i32 %92, %102
  store volatile i32 %103, ptr %101, align 8, !tbaa !26
  %104 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %93, i64 0, i64 %indvars.iv, i32 1
  store volatile i32 %92, ptr %104, align 4, !tbaa !28
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %105 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %93, i64 0, i64 %indvars.iv.next
  %106 = trunc i64 %indvars.iv.next to i32
  %107 = mul i32 %92, %106
  store volatile i32 %107, ptr %105, align 8, !tbaa !26
  %108 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %93, i64 0, i64 %indvars.iv.next, i32 1
  store volatile i32 %92, ptr %108, align 4, !tbaa !28
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %109 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %93, i64 0, i64 %indvars.iv.next.1
  %110 = trunc i64 %indvars.iv.next.1 to i32
  %111 = mul i32 %92, %110
  store volatile i32 %111, ptr %109, align 8, !tbaa !26
  %112 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %93, i64 0, i64 %indvars.iv.next.1, i32 1
  store volatile i32 %92, ptr %112, align 4, !tbaa !28
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %113 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %93, i64 0, i64 %indvars.iv.next.2
  %114 = trunc i64 %indvars.iv.next.2 to i32
  %115 = mul i32 %92, %114
  store volatile i32 %115, ptr %113, align 8, !tbaa !26
  %116 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %93, i64 0, i64 %indvars.iv.next.2, i32 1
  store volatile i32 %92, ptr %116, align 4, !tbaa !28
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, 128
  br i1 %exitcond.not.3, label %94, label %100, !llvm.loop !29

117:                                              ; preds = %117, %94
  %indvars.iv206 = phi i64 [ 0, %94 ], [ %indvars.iv.next207.3, %117 ]
  %118 = getelementptr inbounds [256 x i32], ptr %98, i64 0, i64 %indvars.iv206
  store volatile i32 0, ptr %118, align 4, !tbaa !14
  %119 = getelementptr inbounds [256 x i64], ptr %99, i64 0, i64 %indvars.iv206
  store volatile i64 -1, ptr %119, align 8, !tbaa !31
  %indvars.iv.next207 = or disjoint i64 %indvars.iv206, 1
  %120 = getelementptr inbounds [256 x i32], ptr %98, i64 0, i64 %indvars.iv.next207
  store volatile i32 0, ptr %120, align 4, !tbaa !14
  %121 = getelementptr inbounds [256 x i64], ptr %99, i64 0, i64 %indvars.iv.next207
  store volatile i64 -1, ptr %121, align 8, !tbaa !31
  %indvars.iv.next207.1 = or disjoint i64 %indvars.iv206, 2
  %122 = getelementptr inbounds [256 x i32], ptr %98, i64 0, i64 %indvars.iv.next207.1
  store volatile i32 0, ptr %122, align 4, !tbaa !14
  %123 = getelementptr inbounds [256 x i64], ptr %99, i64 0, i64 %indvars.iv.next207.1
  store volatile i64 -1, ptr %123, align 8, !tbaa !31
  %indvars.iv.next207.2 = or disjoint i64 %indvars.iv206, 3
  %124 = getelementptr inbounds [256 x i32], ptr %98, i64 0, i64 %indvars.iv.next207.2
  store volatile i32 0, ptr %124, align 4, !tbaa !14
  %125 = getelementptr inbounds [256 x i64], ptr %99, i64 0, i64 %indvars.iv.next207.2
  store volatile i64 -1, ptr %125, align 8, !tbaa !31
  %indvars.iv.next207.3 = add nuw nsw i64 %indvars.iv206, 4
  %exitcond209.not.3 = icmp eq i64 %indvars.iv.next207.3, 256
  br i1 %exitcond209.not.3, label %126, label %117, !llvm.loop !32

126:                                              ; preds = %117
  %127 = getelementptr inbounds i8, ptr %23, i64 272
  store i64 -1, ptr %127, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  store i32 0, ptr %6, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  store i32 0, ptr %7, align 4, !tbaa !14
  br label %144

.critedge196:                                     ; preds = %85
  %128 = getelementptr inbounds i8, ptr %23, i64 272
  store i64 -1, ptr %128, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #9
  store i32 0, ptr %6, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #9
  store i32 0, ptr %7, align 4, !tbaa !14
  %129 = load i32, ptr %44, align 4, !tbaa !15
  %130 = call i64 @lseek(i32 noundef %129, i64 noundef 4, i32 noundef 0) #9
  %.not187 = icmp eq i64 %130, 4
  br i1 %.not187, label %132, label %131

131:                                              ; preds = %.critedge196
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 440, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.1) #9
  br label %132

132:                                              ; preds = %131, %.critedge196
  %133 = load i32, ptr %44, align 4, !tbaa !15
  %134 = call i64 @read(i32 noundef %133, ptr noundef nonnull %6, i64 noundef 4) #9
  %.not188 = icmp eq i64 %134, 4
  br i1 %.not188, label %136, label %135

135:                                              ; preds = %132
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 440, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.2) #9
  br label %136

136:                                              ; preds = %135, %132
  %137 = load i32, ptr %44, align 4, !tbaa !15
  %138 = call i64 @lseek(i32 noundef %137, i64 noundef 8, i32 noundef 0) #9
  %.not189 = icmp eq i64 %138, 8
  br i1 %.not189, 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 441, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.1) #9
  br label %140

140:                                              ; preds = %139, %136
  %141 = load i32, ptr %44, align 4, !tbaa !15
  %142 = call i64 @read(i32 noundef %141, ptr noundef nonnull %7, i64 noundef 4) #9
  %.not190 = icmp eq i64 %142, 4
  br i1 %.not190, label %144, label %143

143:                                              ; preds = %140
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 441, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.2) #9
  br label %144

144:                                              ; preds = %126, %140, %143
  %145 = load i32, ptr %6, align 4, !tbaa !14
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr %6, align 4, !tbaa !14
  %147 = load i32, ptr %44, align 4, !tbaa !15
  %148 = call i64 @lseek(i32 noundef %147, i64 noundef 4, i32 noundef 0) #9
  %.not191 = icmp eq i64 %148, 4
  br i1 %.not191, label %150, label %149

149:                                              ; preds = %144
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 443, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.1) #9
  br label %150

150:                                              ; preds = %149, %144
  %151 = load i32, ptr %44, align 4, !tbaa !15
  %152 = call i64 @write(i32 noundef %151, ptr noundef nonnull %6, i64 noundef 4) #9
  %.not192 = icmp eq i64 %152, 4
  br i1 %.not192, label %154, label %153

153:                                              ; preds = %150
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 443, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.3) #9
  br label %154

154:                                              ; preds = %153, %150
  %155 = load ptr, ptr %82, align 8, !tbaa !18
  %156 = getelementptr inbounds i8, ptr %155, i64 4
  store volatile i32 %146, ptr %156, align 4, !tbaa !34
  %157 = load i32, ptr %7, align 4, !tbaa !14
  %158 = add nsw i32 %157, 1
  store i32 %158, ptr %7, align 4, !tbaa !14
  %159 = load i32, ptr %44, align 4, !tbaa !15
  %160 = call i64 @lseek(i32 noundef %159, i64 noundef 8, i32 noundef 0) #9
  %.not193 = icmp eq i64 %160, 8
  br i1 %.not193, label %162, label %161

161:                                              ; preds = %154
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 444, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.1) #9
  br label %162

162:                                              ; preds = %161, %154
  %163 = load i32, ptr %44, align 4, !tbaa !15
  %164 = call i64 @write(i32 noundef %163, ptr noundef nonnull %7, i64 noundef 4) #9
  %.not194 = icmp eq i64 %164, 4
  br i1 %.not194, label %166, label %165

165:                                              ; preds = %162
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 444, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.3) #9
  br label %166

166:                                              ; preds = %165, %162
  %167 = load ptr, ptr %82, align 8, !tbaa !18
  %168 = getelementptr inbounds i8, ptr %167, i64 8
  store volatile i32 %158, ptr %168, align 8, !tbaa !35
  %169 = load i32, ptr %44, align 4, !tbaa !15
  %170 = call i32 @flock(i32 noundef %169, i32 noundef 8) #9
  %171 = getelementptr inbounds i8, ptr %21, i64 4
  store volatile i32 1, ptr %171, align 4, !tbaa !36
  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 4, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #9
  br label %172

172:                                              ; preds = %166, %17
  %173 = getelementptr inbounds i8, ptr %23, i64 280
  %174 = load ptr, ptr %173, align 8, !tbaa !18
  %175 = getelementptr inbounds i8, ptr %23, i64 264
  %176 = load i32, ptr %175, align 8, !tbaa !16
  %177 = sdiv i32 %176, 16
  %178 = icmp sgt i32 %19, %177
  br i1 %178, label %179, label %182

179:                                              ; preds = %172
  call void @endProcMessage(ptr noundef nonnull %23)
  store ptr null, ptr %173, align 8, !tbaa !18
  %180 = call i32 @usleep(i32 noundef 10000) #9
  %181 = 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 456, ptr noundef nonnull @__FUNCTION__.m_ProcMessageWrite, ptr noundef nonnull @.str.15) #9
  br label %182

182:                                              ; preds = %179, %172
  %183 = getelementptr inbounds i8, ptr %174, i64 8
  %184 = load volatile i32, ptr %183, align 8, !tbaa !35
  %185 = icmp sgt i32 %184, 1
  br i1 %185, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %182
  %186 = getelementptr inbounds i8, ptr %23, i64 260
  %187 = getelementptr inbounds i8, ptr %174, i64 16
  br label %188

188:                                              ; preds = %.lr.ph, %206
  %189 = load i32, ptr %186, align 4, !tbaa !15
  %190 = call i32 @flock(i32 noundef %189, i32 noundef 2) #9
  %191 = load volatile i32, ptr %187, align 8, !tbaa !37
  %192 = icmp eq i32 %191, 0
  br i1 %192, label %196, label %193

193:                                              ; preds = %188
  %194 = load volatile i32, ptr %174, align 8, !tbaa !19
  %195 = icmp eq i32 %194, 0
  br i1 %195, label %196, label %199

196:                                              ; preds = %193, %188
  store volatile i32 1, ptr %187, align 8, !tbaa !37
  %197 = load i32, ptr %186, align 4, !tbaa !15
  %198 = call i32 @flock(i32 noundef %197, i32 noundef 8) #9
  br label %.loopexit

199:                                              ; preds = %193
  %200 = load volatile i32, ptr %174, align 8, !tbaa !19
  %201 = sdiv i32 %200, 1000
  %202 = call i32 @kill(i32 noundef %201, i32 noundef 0) #9
  %.not183 = icmp eq i32 %202, 0
  br i1 %.not183, label %206, label %203

203:                                              ; preds = %199
  %204 = load volatile i32, ptr %183, align 8, !tbaa !35
  %205 = add nsw i32 %204, -1
  store volatile i32 %205, ptr %183, align 8, !tbaa !35
  br label %206

206:                                              ; preds = %203, %199
  %207 = load i32, ptr %186, align 4, !tbaa !15
  %208 = call i32 @flock(i32 noundef %207, i32 noundef 8) #9
  %209 = call i32 @usleep(i32 noundef 1000) #9
  %210 = load volatile i32, ptr %183, align 8, !tbaa !35
  %211 = icmp sgt i32 %210, 1
  br i1 %211, label %188, label %.loopexit, !llvm.loop !38

.loopexit:                                        ; preds = %206, %182, %196
  %212 = getelementptr inbounds i8, ptr %23, i64 256
  %213 = load i32, ptr %212, align 8, !tbaa !11
  store volatile i32 %213, ptr %174, align 8, !tbaa !19
  %214 = getelementptr inbounds i8, ptr %174, i64 12
  %215 = load volatile i32, ptr %214, align 4, !tbaa !21
  %216 = add nsw i32 %215, %19
  %217 = load i32, ptr %175, align 8, !tbaa !16
  %218 = icmp sgt i32 %216, %217
  br i1 %218, label %219, label %220

219:                                              ; preds = %.loopexit
  store volatile i32 0, ptr %214, align 4, !tbaa !21
  br label %220

220:                                              ; preds = %219, %.loopexit
  %221 = getelementptr inbounds i8, ptr %174, i64 36
  %222 = getelementptr inbounds i8, ptr %174, i64 24
  %223 = getelementptr inbounds i8, ptr %174, i64 40
  %224 = getelementptr inbounds i8, ptr %174, i64 32
  %225 = getelementptr inbounds i8, ptr %174, i64 1072
  %226 = getelementptr inbounds i8, ptr %174, i64 44
  %227 = getelementptr inbounds i8, ptr %174, i64 3120
  br label %228

228:                                              ; preds = %._crit_edge, %220
  %229 = load volatile i32, ptr %214, align 4, !tbaa !21
  %230 = load volatile i32, ptr %221, align 4, !tbaa !24
  %231 = icmp slt i32 %229, %230
  br i1 %231, label %232, label %237

232:                                              ; preds = %228
  %233 = load volatile i32, ptr %214, align 4, !tbaa !21
  %234 = add nsw i32 %233, %19
  %235 = load volatile i32, ptr %221, align 4, !tbaa !24
  %236 = icmp sgt i32 %234, %235
  br i1 %236, label %.critedge, label %237

237:                                              ; preds = %232, %228
  %238 = load volatile i64, ptr %222, align 8, !tbaa !22
  %239 = load volatile i32, ptr %223, align 8, !tbaa !25
  %240 = sext i32 %239 to i64
  %241 = sub nsw i64 %238, %240
  %242 = icmp sgt i64 %241, 127
  br i1 %242, label %.critedge, label %280

.critedge:                                        ; preds = %232, %237
  %243 = load volatile i32, ptr %224, align 8, !tbaa !23
  %244 = icmp eq i32 %243, 0
  br i1 %244, label %280, label %245

245:                                              ; preds = %.critedge
  %246 = load volatile i32, ptr %223, align 8, !tbaa !25
  %247 = add nsw i32 %246, 128
  %248 = load volatile i32, ptr %224, align 8, !tbaa !23
  %249 = icmp sgt i32 %248, 0
  br i1 %249, label %.lr.ph203, label %._crit_edge

._crit_edge:                                      ; preds = %276, %245
  %.0177.lcssa = phi i32 [ %247, %245 ], [ %.1178, %276 ]
  %.0176.lcssa = phi i32 [ 0, %245 ], [ %.1, %276 ]
  %250 = add nsw i32 %.0176.lcssa, 1
  store volatile i32 %250, ptr %224, align 8, !tbaa !23
  store volatile i32 %.0177.lcssa, ptr %223, align 8, !tbaa !25
  %251 = srem i32 %.0177.lcssa, 128
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %227, i64 0, i64 %252
  %254 = load volatile i32, ptr %253, align 8, !tbaa !26
  store volatile i32 %254, ptr %221, align 4, !tbaa !24
  %255 = call i32 @usleep(i32 noundef 1000) #9
  br label %228, !llvm.loop !39

.lr.ph203:                                        ; preds = %245, %276
  %indvars.iv210 = phi i64 [ %indvars.iv.next211, %276 ], [ 0, %245 ]
  %.0176201 = phi i32 [ %.1, %276 ], [ 0, %245 ]
  %.0177200 = phi i32 [ %.1178, %276 ], [ %247, %245 ]
  %256 = getelementptr inbounds [256 x i64], ptr %225, i64 0, i64 %indvars.iv210
  %257 = load volatile i64, ptr %256, align 8, !tbaa !31
  %258 = icmp eq i64 %257, -1
  br i1 %258, label %276, label %259

259:                                              ; preds = %.lr.ph203
  %260 = getelementptr inbounds [256 x i32], ptr %226, i64 0, i64 %indvars.iv210
  %261 = load volatile i32, ptr %260, align 4, !tbaa !14
  %262 = sdiv i32 %261, 1000
  %263 = call i32 @kill(i32 noundef %262, i32 noundef 0) #9
  %.not184 = icmp eq i32 %263, 0
  br i1 %.not184, label %265, label %264

264:                                              ; preds = %259
  store volatile i64 -1, ptr %256, align 8, !tbaa !31
  br label %276

265:                                              ; preds = %259
  %266 = load volatile i64, ptr %256, align 8, !tbaa !31
  %267 = sext i32 %.0177200 to i64
  %268 = icmp ult i64 %266, %267
  br i1 %268, label %269, label %271

269:                                              ; preds = %265
  %270 = load volatile i64, ptr %256, align 8, !tbaa !31
  br label %271

271:                                              ; preds = %265, %269
  %272 = phi i64 [ %270, %269 ], [ %267, %265 ]
  %273 = trunc i64 %272 to i32
  %274 = trunc nuw nsw i64 %indvars.iv210 to i32
  %275 = call i32 @llvm.smax.i32(i32 %274, i32 %.0176201)
  br label %276

276:                                              ; preds = %.lr.ph203, %271, %264
  %.1178 = phi i32 [ %.0177200, %.lr.ph203 ], [ %.0177200, %264 ], [ %273, %271 ]
  %.1 = phi i32 [ %.0176201, %.lr.ph203 ], [ %.0176201, %264 ], [ %275, %271 ]
  %indvars.iv.next211 = add nuw nsw i64 %indvars.iv210, 1
  %277 = load volatile i32, ptr %224, align 8, !tbaa !23
  %278 = sext i32 %277 to i64
  %279 = icmp slt i64 %indvars.iv.next211, %278
  br i1 %279, label %.lr.ph203, label %._crit_edge, !llvm.loop !40

280:                                              ; preds = %.critedge, %237
  %281 = load volatile i64, ptr %222, align 8, !tbaa !22
  %282 = srem i64 %281, 128
  %283 = load volatile i32, ptr %214, align 4, !tbaa !21
  %284 = add nsw i32 %283, %19
  %285 = load i32, ptr %175, align 8, !tbaa !16
  %286 = icmp sgt i32 %284, %285
  %spec.store.select1 = select i1 %286, i32 0, i32 %283
  %287 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %227, i64 0, i64 %282
  %288 = getelementptr inbounds i8, ptr %287, i64 4
  store volatile i32 %.0, ptr %288, align 4, !tbaa !28
  store volatile i32 %spec.store.select1, ptr %287, align 8, !tbaa !26
  %289 = getelementptr inbounds i8, ptr %174, i64 4144
  %290 = sext i32 %spec.store.select1 to i64
  %291 = getelementptr inbounds i8, ptr %289, i64 %290
  %292 = sext i32 %.0 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %291, ptr align 1 %1, i64 %292, i1 false)
  %293 = add nsw i32 %spec.store.select1, %19
  store volatile i32 %293, ptr %214, align 4, !tbaa !21
  %294 = load volatile i64, ptr %222, align 8, !tbaa !22
  %295 = add nsw i64 %294, 1
  store volatile i64 %295, ptr %222, align 8, !tbaa !22
  %296 = getelementptr inbounds i8, ptr %174, i64 16
  store volatile i32 0, ptr %296, align 8, !tbaa !37
  ret ptr %291
}

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

attributes #0 = { mustprogress 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 = { 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 #4 = { 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 #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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, !10, i64 16}
!6 = !{!"MHandle", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 16}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!12, !7, i64 256}
!12 = !{!"HandleProcMessage", !8, i64 0, !7, i64 256, !7, i64 260, !7, i64 264, !7, i64 268, !13, i64 272, !10, i64 280}
!13 = !{!"long", !8, i64 0}
!14 = !{!7, !7, i64 0}
!15 = !{!12, !7, i64 260}
!16 = !{!12, !7, i64 264}
!17 = !{!12, !7, i64 268}
!18 = !{!12, !10, i64 280}
!19 = !{!20, !7, i64 0}
!20 = !{!"ProcMessageInfo", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !13, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !8, i64 44, !8, i64 1072, !8, i64 3120, !8, i64 4144}
!21 = !{!20, !7, i64 12}
!22 = !{!20, !13, i64 24}
!23 = !{!20, !7, i64 32}
!24 = !{!20, !7, i64 36}
!25 = !{!20, !7, i64 40}
!26 = !{!27, !7, i64 0}
!27 = !{!"ProcCommunicateState", !7, i64 0, !7, i64 4}
!28 = !{!27, !7, i64 4}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = !{!13, !13, i64 0}
!32 = distinct !{!32, !30}
!33 = !{!12, !13, i64 272}
!34 = !{!20, !7, i64 4}
!35 = !{!20, !7, i64 8}
!36 = !{!6, !7, i64 4}
!37 = !{!20, !7, i64 16}
!38 = distinct !{!38, !30}
!39 = distinct !{!39, !30}
!40 = distinct !{!40, !30}


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