; 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.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
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@__FUNCTION__.m_ProcMessageRead = external hidden unnamed_addr constant [18 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 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

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

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

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

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

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

38:                                               ; preds = %37, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = call ptr @mMornObject(ptr noundef %39, i32 noundef -1)
  %41 = call ptr @GetHandle(ptr noundef %40, i32 noundef 288, i32 noundef -1138036864, ptr noundef @endProcMessage)
  store ptr %41, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.MHandle, ptr %42, i32 0, i32 3
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  store ptr %44, ptr %8, align 8, !tbaa !5
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = call i32 @mHandleValid(ptr noundef %45)
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %409, label %48

48:                                               ; preds = %38
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = call ptr @mMornObject(ptr noundef %50, i32 noundef -1)
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  call void @m_PropertyFunction(ptr noundef %51, ptr noundef @.str.6, ptr noundef @mornObjectRemove, ptr noundef %52)
  br label %53

53:                                               ; preds = %49
  br label %54

54:                                               ; preds = %53
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %57, label %59

57:                                               ; preds = %54
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 0, ptr %58, align 4, !tbaa !12
  br label %59

59:                                               ; preds = %57, %54
  %60 = call i32 @getpid() #5
  %61 = mul nsw i32 %60, 1000
  %62 = call i32 (...) @mThreadOrder()
  %63 = add nsw i32 %61, %62
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.HandleProcMessage, ptr %64, i32 0, i32 1
  store i32 %63, ptr %65, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  store i32 0, ptr %9, align 4, !tbaa !12
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.HandleProcMessage, ptr %66, i32 0, i32 3
  %68 = load i32, ptr %67, align 8, !tbaa !16
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %114

70:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 128, ptr %10) #5
  %71 = getelementptr inbounds [128 x i8], ptr %10, i64 0, i64 0
  %72 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %71, ptr noundef @.str.14) #5
  %73 = getelementptr inbounds [128 x i8], ptr %10, i64 0, i64 0
  %74 = call i32 @access(ptr noundef %73, i32 noundef 0) #5
  %75 = icmp slt i32 %74, 0
  br i1 %75, label %76, label %79

76:                                               ; preds = %70
  %77 = getelementptr inbounds [128 x i8], ptr %10, i64 0, i64 0
  %78 = call i32 @mkdir(ptr noundef %77, i32 noundef 511) #5
  br label %79

79:                                               ; preds = %76, %70
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.HandleProcMessage, ptr %80, i32 0, i32 0
  %82 = getelementptr inbounds [256 x i8], ptr %81, i64 0, i64 0
  %83 = getelementptr inbounds [128 x i8], ptr %10, i64 0, i64 0
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %82, ptr noundef @.str.9, ptr noundef %83, ptr noundef %84) #5
  br label %86

86:                                               ; preds = %92, %79
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.HandleProcMessage, ptr %87, i32 0, i32 0
  %89 = getelementptr inbounds [256 x i8], ptr %88, i64 0, i64 0
  %90 = call i32 @access(ptr noundef %89, i32 noundef 0) #5
  %91 = icmp slt i32 %90, 0
  br i1 %91, label %92, label %93

92:                                               ; preds = %86
  store i32 1, ptr %9, align 4, !tbaa !12
  br label %86, !llvm.loop !17

93:                                               ; preds = %86
  %94 = load ptr, ptr %8, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.HandleProcMessage, ptr %94, i32 0, i32 0
  %96 = getelementptr inbounds [256 x i8], ptr %95, i64 0, i64 0
  %97 = call i32 (ptr, i32, ...) @open(ptr noundef %96, i32 noundef 66, i32 noundef 438)
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.HandleProcMessage, ptr %98, i32 0, i32 2
  store i32 %97, ptr %99, align 4, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !12
  br label %100

100:                                              ; preds = %104, %93
  %101 = load i32, ptr %11, align 4, !tbaa !12
  %102 = sext i32 %101 to i64
  %103 = icmp ult i64 %102, 4144
  br i1 %103, label %104, label %110

104:                                              ; preds = %100
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.HandleProcMessage, ptr %105, i32 0, i32 2
  %107 = load i32, ptr %106, align 4, !tbaa !19
  %108 = call i64 @lseek(i32 noundef %107, i64 noundef 1, i32 noundef 2) #5
  %109 = trunc i64 %108 to i32
  store i32 %109, ptr %11, align 4, !tbaa !12
  br label %100, !llvm.loop !20

110:                                              ; preds = %100
  %111 = load i32, ptr %11, align 4, !tbaa !12
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.HandleProcMessage, ptr %112, i32 0, i32 3
  store i32 %111, ptr %113, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr %10) #5
  br label %114

114:                                              ; preds = %110, %59
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  br label %115

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.HandleProcMessage, ptr %117, i32 0, i32 2
  %119 = load i32, ptr %118, align 4, !tbaa !19
  %120 = call i64 @lseek(i32 noundef %119, i64 noundef 0, i32 noundef 0) #5
  %121 = icmp ne i64 %120, 0
  %122 = zext i1 %121 to i32
  store i32 %122, ptr %13, align 4, !tbaa !12
  %123 = load i32, ptr %13, align 4, !tbaa !12
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %127

125:                                              ; preds = %116
  %126 = load i32, ptr %13, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %126, i32 noundef -1, ptr noundef @.str, i32 noundef 539, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.1)
  br label %127

127:                                              ; preds = %125, %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.HandleProcMessage, ptr %131, i32 0, i32 2
  %133 = load i32, ptr %132, align 4, !tbaa !19
  %134 = call i64 @read(i32 noundef %133, ptr noundef %12, i64 noundef 4)
  %135 = icmp ne i64 %134, 4
  %136 = zext i1 %135 to i32
  store i32 %136, ptr %14, align 4, !tbaa !12
  %137 = load i32, ptr %14, align 4, !tbaa !12
  %138 = icmp ne i32 %137, 0
  br i1 %138, label %139, label %141

139:                                              ; preds = %130
  %140 = load i32, ptr %14, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %140, i32 noundef -1, ptr noundef @.str, i32 noundef 539, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.2)
  br label %141

141:                                              ; preds = %139, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %142

142:                                              ; preds = %141
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %184, %145
  %147 = load i32, ptr %12, align 4, !tbaa !12
  %148 = sdiv i32 %147, 1000
  %149 = call i32 @kill(i32 noundef %148, i32 noundef 0) #5
  %150 = icmp eq i32 %149, 0
  %151 = zext i1 %150 to i32
  %152 = icmp eq i32 %151, 0
  br i1 %152, label %153, label %185

153:                                              ; preds = %146
  store i32 1, ptr %9, align 4, !tbaa !12
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %156 = load ptr, ptr %8, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.HandleProcMessage, ptr %156, i32 0, i32 2
  %158 = load i32, ptr %157, align 4, !tbaa !19
  %159 = call i64 @lseek(i32 noundef %158, i64 noundef 0, i32 noundef 0) #5
  %160 = icmp ne i64 %159, 0
  %161 = zext i1 %160 to i32
  store i32 %161, ptr %15, align 4, !tbaa !12
  %162 = load i32, ptr %15, align 4, !tbaa !12
  %163 = icmp ne i32 %162, 0
  br i1 %163, label %164, label %166

164:                                              ; preds = %155
  %165 = load i32, ptr %15, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %165, i32 noundef -1, ptr noundef @.str, i32 noundef 540, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.1)
  br label %166

166:                                              ; preds = %164, %155
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %167

167:                                              ; preds = %166
  br label %168

168:                                              ; preds = %167
  br label %169

169:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %170 = load ptr, ptr %8, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.HandleProcMessage, ptr %170, i32 0, i32 2
  %172 = load i32, ptr %171, align 4, !tbaa !19
  %173 = call i64 @read(i32 noundef %172, ptr noundef %12, i64 noundef 4)
  %174 = icmp ne i64 %173, 4
  %175 = zext i1 %174 to i32
  store i32 %175, ptr %16, align 4, !tbaa !12
  %176 = load i32, ptr %16, align 4, !tbaa !12
  %177 = icmp ne i32 %176, 0
  br i1 %177, label %178, label %180

178:                                              ; preds = %169
  %179 = load i32, ptr %16, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %179, i32 noundef -1, ptr noundef @.str, i32 noundef 540, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.2)
  br label %180

180:                                              ; preds = %178, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %181

181:                                              ; preds = %180
  br label %182

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182
  br label %184

184:                                              ; preds = %183
  br label %146, !llvm.loop !21

185:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store i64 0, ptr %17, align 8, !tbaa !22
  br label %186

186:                                              ; preds = %220, %185
  %187 = load i64, ptr %17, align 8, !tbaa !22
  %188 = icmp eq i64 %187, 0
  br i1 %188, label %189, label %221

189:                                              ; preds = %186
  br label %190

190:                                              ; preds = %189
  br label %191

191:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %192 = load ptr, ptr %8, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.HandleProcMessage, ptr %192, i32 0, i32 2
  %194 = load i32, ptr %193, align 4, !tbaa !19
  %195 = call i64 @lseek(i32 noundef %194, i64 noundef 24, i32 noundef 0) #5
  %196 = icmp ne i64 %195, 24
  %197 = zext i1 %196 to i32
  store i32 %197, ptr %18, align 4, !tbaa !12
  %198 = load i32, ptr %18, align 4, !tbaa !12
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %202

200:                                              ; preds = %191
  %201 = load i32, ptr %18, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %201, i32 noundef -1, ptr noundef @.str, i32 noundef 543, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.1)
  br label %202

202:                                              ; preds = %200, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %203

203:                                              ; preds = %202
  br label %204

204:                                              ; preds = %203
  br label %205

205:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %206 = load ptr, ptr %8, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.HandleProcMessage, ptr %206, i32 0, i32 2
  %208 = load i32, ptr %207, align 4, !tbaa !19
  %209 = call i64 @read(i32 noundef %208, ptr noundef %17, i64 noundef 8)
  %210 = icmp ne i64 %209, 8
  %211 = zext i1 %210 to i32
  store i32 %211, ptr %19, align 4, !tbaa !12
  %212 = load i32, ptr %19, align 4, !tbaa !12
  %213 = icmp ne i32 %212, 0
  br i1 %213, label %214, label %216

214:                                              ; preds = %205
  %215 = load i32, ptr %19, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %215, i32 noundef -1, ptr noundef @.str, i32 noundef 543, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.2)
  br label %216

216:                                              ; preds = %214, %205
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %217

217:                                              ; preds = %216
  br label %218

218:                                              ; preds = %217
  br label %219

219:                                              ; preds = %218
  br label %220

220:                                              ; preds = %219
  br label %186, !llvm.loop !23

221:                                              ; preds = %186
  br label %222

222:                                              ; preds = %221
  %223 = load ptr, ptr %8, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.HandleProcMessage, ptr %223, i32 0, i32 3
  %225 = load i32, ptr %224, align 8, !tbaa !16
  %226 = sext i32 %225 to i64
  %227 = add i64 %226, 4144
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.HandleProcMessage, ptr %228, i32 0, i32 2
  %230 = load i32, ptr %229, align 4, !tbaa !19
  %231 = call ptr @mmap(ptr noundef null, i64 noundef %227, i32 noundef 3, i32 noundef 1, i32 noundef %230, i64 noundef 0) #5
  %232 = load ptr, ptr %8, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.HandleProcMessage, ptr %232, i32 0, i32 6
  store ptr %231, ptr %233, align 8, !tbaa !24
  br label %234

234:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %235 = load ptr, ptr %8, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.HandleProcMessage, ptr %235, i32 0, i32 6
  %237 = load ptr, ptr %236, align 8, !tbaa !24
  %238 = icmp eq ptr %237, null
  %239 = zext i1 %238 to i32
  store i32 %239, ptr %20, align 4, !tbaa !12
  %240 = load i32, ptr %20, align 4, !tbaa !12
  %241 = icmp ne i32 %240, 0
  br i1 %241, label %242, label %244

242:                                              ; preds = %234
  %243 = load i32, ptr %20, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %243, i32 noundef -1, ptr noundef @.str, i32 noundef 545, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.10)
  br label %244

244:                                              ; preds = %242, %234
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %245

245:                                              ; preds = %244
  br label %246

246:                                              ; preds = %245
  br label %247

247:                                              ; preds = %246
  br label %248

248:                                              ; preds = %247
  %249 = load ptr, ptr %8, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.HandleProcMessage, ptr %249, i32 0, i32 2
  %251 = load i32, ptr %250, align 4, !tbaa !19
  %252 = call i32 @flock(i32 noundef %251, i32 noundef 2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !12
  br label %253

253:                                              ; preds = %329, %248
  %254 = load i32, ptr %21, align 4, !tbaa !12
  %255 = load ptr, ptr %8, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.HandleProcMessage, ptr %255, i32 0, i32 6
  %257 = load ptr, ptr %256, align 8, !tbaa !24
  %258 = getelementptr inbounds %struct.ProcMessageInfo, ptr %257, i32 0, i32 7
  %259 = load volatile i32, ptr %258, align 8, !tbaa !25
  %260 = icmp sle i32 %254, %259
  br i1 %260, label %262, label %261

261:                                              ; preds = %253
  store i32 34, ptr %22, align 4
  br label %332

262:                                              ; preds = %253
  %263 = load ptr, ptr %8, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.HandleProcMessage, ptr %263, i32 0, i32 6
  %265 = load ptr, ptr %264, align 8, !tbaa !24
  %266 = getelementptr inbounds %struct.ProcMessageInfo, ptr %265, i32 0, i32 11
  %267 = load i32, ptr %21, align 4, !tbaa !12
  %268 = sext i32 %267 to i64
  %269 = getelementptr inbounds [256 x i64], ptr %266, i64 0, i64 %268
  %270 = load volatile i64, ptr %269, align 8, !tbaa !22
  %271 = icmp eq i64 %270, -1
  br i1 %271, label %272, label %328

272:                                              ; preds = %262
  %273 = load i32, ptr %21, align 4, !tbaa !12
  %274 = load ptr, ptr %8, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.HandleProcMessage, ptr %274, i32 0, i32 6
  %276 = load ptr, ptr %275, align 8, !tbaa !24
  %277 = getelementptr inbounds %struct.ProcMessageInfo, ptr %276, i32 0, i32 7
  %278 = load volatile i32, ptr %277, align 8, !tbaa !25
  %279 = icmp eq i32 %273, %278
  br i1 %279, label %280, label %298

280:                                              ; preds = %272
  br label %281

281:                                              ; preds = %280
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %282 = load i32, ptr %21, align 4, !tbaa !12
  %283 = icmp eq i32 %282, 255
  %284 = zext i1 %283 to i32
  store i32 %284, ptr %23, align 4, !tbaa !12
  %285 = load i32, ptr %23, align 4, !tbaa !12
  %286 = icmp ne i32 %285, 0
  br i1 %286, label %287, label %289

287:                                              ; preds = %281
  %288 = load i32, ptr %23, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %288, i32 noundef -1, ptr noundef @.str, i32 noundef 555, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.16)
  br label %289

289:                                              ; preds = %287, %281
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  br label %290

290:                                              ; preds = %289
  br label %291

291:                                              ; preds = %290
  %292 = load i32, ptr %21, align 4, !tbaa !12
  %293 = add nsw i32 %292, 1
  %294 = load ptr, ptr %8, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.HandleProcMessage, ptr %294, i32 0, i32 6
  %296 = load ptr, ptr %295, align 8, !tbaa !24
  %297 = getelementptr inbounds %struct.ProcMessageInfo, ptr %296, i32 0, i32 7
  store volatile i32 %293, ptr %297, align 8, !tbaa !25
  br label %298

298:                                              ; preds = %291, %272
  %299 = load ptr, ptr %8, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.HandleProcMessage, ptr %299, i32 0, i32 6
  %301 = load ptr, ptr %300, align 8, !tbaa !24
  %302 = getelementptr inbounds %struct.ProcMessageInfo, ptr %301, i32 0, i32 6
  %303 = load volatile i64, ptr %302, align 8, !tbaa !27
  %304 = load i32, ptr %9, align 4, !tbaa !12
  %305 = sext i32 %304 to i64
  %306 = sub nsw i64 %303, %305
  %307 = load ptr, ptr %8, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.HandleProcMessage, ptr %307, i32 0, i32 6
  %309 = load ptr, ptr %308, align 8, !tbaa !24
  %310 = getelementptr inbounds %struct.ProcMessageInfo, ptr %309, i32 0, i32 11
  %311 = load i32, ptr %21, align 4, !tbaa !12
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds [256 x i64], ptr %310, i64 0, i64 %312
  store volatile i64 %306, ptr %313, align 8, !tbaa !22
  %314 = load ptr, ptr %8, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.HandleProcMessage, ptr %314, i32 0, i32 1
  %316 = load i32, ptr %315, align 8, !tbaa !13
  %317 = load ptr, ptr %8, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.HandleProcMessage, ptr %317, i32 0, i32 6
  %319 = load ptr, ptr %318, align 8, !tbaa !24
  %320 = getelementptr inbounds %struct.ProcMessageInfo, ptr %319, i32 0, i32 10
  %321 = load i32, ptr %21, align 4, !tbaa !12
  %322 = sext i32 %321 to i64
  %323 = getelementptr inbounds [256 x i32], ptr %320, i64 0, i64 %322
  store volatile i32 %316, ptr %323, align 4, !tbaa !12
  %324 = load i32, ptr %21, align 4, !tbaa !12
  %325 = sext i32 %324 to i64
  %326 = load ptr, ptr %8, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.HandleProcMessage, ptr %326, i32 0, i32 5
  store i64 %325, ptr %327, align 8, !tbaa !28
  store i32 34, ptr %22, align 4
  br label %332

328:                                              ; preds = %262
  br label %329

329:                                              ; preds = %328
  %330 = load i32, ptr %21, align 4, !tbaa !12
  %331 = add nsw i32 %330, 1
  store i32 %331, ptr %21, align 4, !tbaa !12
  br label %253, !llvm.loop !29

332:                                              ; preds = %298, %261
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %333

333:                                              ; preds = %332
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  br label %334

334:                                              ; preds = %333
  br label %335

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

344:                                              ; preds = %335
  %345 = load i32, ptr %25, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %345, i32 noundef -1, ptr noundef @.str, i32 noundef 565, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.1)
  br label %346

346:                                              ; preds = %344, %335
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  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 %26) #5
  %350 = load ptr, ptr %8, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct.HandleProcMessage, ptr %350, i32 0, i32 2
  %352 = load i32, ptr %351, align 4, !tbaa !19
  %353 = call i64 @read(i32 noundef %352, ptr noundef %24, i64 noundef 4)
  %354 = icmp ne i64 %353, 4
  %355 = zext i1 %354 to i32
  store i32 %355, ptr %26, align 4, !tbaa !12
  %356 = load i32, ptr %26, align 4, !tbaa !12
  %357 = icmp ne i32 %356, 0
  br i1 %357, label %358, label %360

358:                                              ; preds = %349
  %359 = load i32, ptr %26, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %359, i32 noundef -1, ptr noundef @.str, i32 noundef 565, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.2)
  br label %360

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

361:                                              ; preds = %360
  br label %362

362:                                              ; preds = %361
  br label %363

363:                                              ; preds = %362
  br label %364

364:                                              ; preds = %363
  %365 = load i32, ptr %24, align 4, !tbaa !12
  %366 = add nsw i32 %365, 1
  store i32 %366, ptr %24, align 4, !tbaa !12
  br label %367

367:                                              ; preds = %364
  br label %368

368:                                              ; preds = %367
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %369 = load ptr, ptr %8, align 8, !tbaa !5
  %370 = getelementptr inbounds %struct.HandleProcMessage, ptr %369, i32 0, i32 2
  %371 = load i32, ptr %370, align 4, !tbaa !19
  %372 = call i64 @lseek(i32 noundef %371, i64 noundef 4, i32 noundef 0) #5
  %373 = icmp ne i64 %372, 4
  %374 = zext i1 %373 to i32
  store i32 %374, ptr %27, align 4, !tbaa !12
  %375 = load i32, ptr %27, align 4, !tbaa !12
  %376 = icmp ne i32 %375, 0
  br i1 %376, label %377, label %379

377:                                              ; preds = %368
  %378 = load i32, ptr %27, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %378, i32 noundef -1, ptr noundef @.str, i32 noundef 566, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.1)
  br label %379

379:                                              ; preds = %377, %368
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  br label %380

380:                                              ; preds = %379
  br label %381

381:                                              ; preds = %380
  br label %382

382:                                              ; preds = %381
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #5
  %383 = load ptr, ptr %8, align 8, !tbaa !5
  %384 = getelementptr inbounds %struct.HandleProcMessage, ptr %383, i32 0, i32 2
  %385 = load i32, ptr %384, align 4, !tbaa !19
  %386 = call i64 @write(i32 noundef %385, ptr noundef %24, i64 noundef 4)
  %387 = icmp ne i64 %386, 4
  %388 = zext i1 %387 to i32
  store i32 %388, ptr %28, align 4, !tbaa !12
  %389 = load i32, ptr %28, align 4, !tbaa !12
  %390 = icmp ne i32 %389, 0
  br i1 %390, label %391, label %393

391:                                              ; preds = %382
  %392 = load i32, ptr %28, align 4, !tbaa !12
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %392, i32 noundef -1, ptr noundef @.str, i32 noundef 566, ptr noundef @__FUNCTION__.m_ProcMessageRead, ptr noundef @.str.3)
  br label %393

393:                                              ; preds = %391, %382
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #5
  br label %394

394:                                              ; preds = %393
  br label %395

395:                                              ; preds = %394
  br label %396

396:                                              ; preds = %395
  br label %397

397:                                              ; preds = %396
  %398 = load i32, ptr %24, align 4, !tbaa !12
  %399 = load ptr, ptr %8, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.HandleProcMessage, ptr %399, i32 0, i32 6
  %401 = load ptr, ptr %400, align 8, !tbaa !24
  %402 = getelementptr inbounds %struct.ProcMessageInfo, ptr %401, i32 0, i32 1
  store volatile i32 %398, ptr %402, align 4, !tbaa !30
  %403 = load ptr, ptr %8, align 8, !tbaa !5
  %404 = getelementptr inbounds %struct.HandleProcMessage, ptr %403, i32 0, i32 2
  %405 = load i32, ptr %404, align 4, !tbaa !19
  %406 = call i32 @flock(i32 noundef %405, i32 noundef 8) #5
  %407 = load ptr, ptr %7, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct.MHandle, ptr %407, i32 0, i32 1
  store volatile i32 1, ptr %408, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  br label %409

409:                                              ; preds = %397, %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %410 = load ptr, ptr %8, align 8, !tbaa !5
  %411 = getelementptr inbounds %struct.HandleProcMessage, ptr %410, i32 0, i32 6
  %412 = load ptr, ptr %411, align 8, !tbaa !24
  store ptr %412, ptr %29, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  %413 = load ptr, ptr %8, align 8, !tbaa !5
  %414 = getelementptr inbounds %struct.HandleProcMessage, ptr %413, i32 0, i32 5
  %415 = load i64, ptr %414, align 8, !tbaa !28
  %416 = trunc i64 %415 to i32
  store i32 %416, ptr %30, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #5
  %417 = load ptr, ptr %29, align 8, !tbaa !5
  %418 = getelementptr inbounds %struct.ProcMessageInfo, ptr %417, i32 0, i32 11
  %419 = load i32, ptr %30, align 4, !tbaa !12
  %420 = sext i32 %419 to i64
  %421 = getelementptr inbounds [256 x i64], ptr %418, i64 0, i64 %420
  %422 = load volatile i64, ptr %421, align 8, !tbaa !22
  %423 = trunc i64 %422 to i32
  store i32 %423, ptr %31, align 4, !tbaa !12
  br label %424

424:                                              ; preds = %431, %409
  %425 = load i32, ptr %31, align 4, !tbaa !12
  %426 = sext i32 %425 to i64
  %427 = load ptr, ptr %29, align 8, !tbaa !5
  %428 = getelementptr inbounds %struct.ProcMessageInfo, ptr %427, i32 0, i32 6
  %429 = load volatile i64, ptr %428, align 8, !tbaa !27
  %430 = icmp sge i64 %426, %429
  br i1 %430, label %431, label %433

431:                                              ; preds = %424
  %432 = call i32 @usleep(i32 noundef 1000)
  br label %424, !llvm.loop !32

433:                                              ; preds = %424
  %434 = load i32, ptr %31, align 4, !tbaa !12
  %435 = add nsw i32 %434, 1
  %436 = sext i32 %435 to i64
  %437 = load ptr, ptr %29, align 8, !tbaa !5
  %438 = getelementptr inbounds %struct.ProcMessageInfo, ptr %437, i32 0, i32 11
  %439 = load i32, ptr %30, align 4, !tbaa !12
  %440 = sext i32 %439 to i64
  %441 = getelementptr inbounds [256 x i64], ptr %438, i64 0, i64 %440
  store volatile i64 %436, ptr %441, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #5
  %442 = load i32, ptr %31, align 4, !tbaa !12
  %443 = srem i32 %442, 128
  store i32 %443, ptr %32, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #5
  %444 = load ptr, ptr %29, align 8, !tbaa !5
  %445 = getelementptr inbounds %struct.ProcMessageInfo, ptr %444, i32 0, i32 12
  %446 = load i32, ptr %32, align 4, !tbaa !12
  %447 = sext i32 %446 to i64
  %448 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %445, i64 0, i64 %447
  %449 = getelementptr inbounds %struct.ProcCommunicateState, ptr %448, i32 0, i32 0
  %450 = load volatile i32, ptr %449, align 8, !tbaa !33
  store i32 %450, ptr %33, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %34) #5
  %451 = load ptr, ptr %29, align 8, !tbaa !5
  %452 = getelementptr inbounds %struct.ProcMessageInfo, ptr %451, i32 0, i32 12
  %453 = load i32, ptr %32, align 4, !tbaa !12
  %454 = sext i32 %453 to i64
  %455 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %452, i64 0, i64 %454
  %456 = getelementptr inbounds %struct.ProcCommunicateState, ptr %455, i32 0, i32 1
  %457 = load volatile i32, ptr %456, align 4, !tbaa !35
  store i32 %457, ptr %34, align 4, !tbaa !12
  %458 = load ptr, ptr %6, align 8, !tbaa !5
  %459 = icmp ne ptr %458, null
  br i1 %459, label %460, label %479

460:                                              ; preds = %433
  %461 = load ptr, ptr %6, align 8, !tbaa !5
  %462 = load i32, ptr %461, align 4, !tbaa !12
  %463 = icmp sgt i32 %462, 0
  br i1 %463, label %464, label %476

464:                                              ; preds = %460
  %465 = load ptr, ptr %6, align 8, !tbaa !5
  %466 = load i32, ptr %465, align 4, !tbaa !12
  %467 = load i32, ptr %34, align 4, !tbaa !12
  %468 = icmp slt i32 %466, %467
  br i1 %468, label %469, label %472

469:                                              ; preds = %464
  %470 = load ptr, ptr %6, align 8, !tbaa !5
  %471 = load i32, ptr %470, align 4, !tbaa !12
  br label %474

472:                                              ; preds = %464
  %473 = load i32, ptr %34, align 4, !tbaa !12
  br label %474

474:                                              ; preds = %472, %469
  %475 = phi i32 [ %471, %469 ], [ %473, %472 ]
  store i32 %475, ptr %34, align 4, !tbaa !12
  br label %476

476:                                              ; preds = %474, %460
  %477 = load i32, ptr %34, align 4, !tbaa !12
  %478 = load ptr, ptr %6, align 8, !tbaa !5
  store i32 %477, ptr %478, align 4, !tbaa !12
  br label %479

479:                                              ; preds = %476, %433
  %480 = load ptr, ptr %5, align 8, !tbaa !5
  %481 = icmp ne ptr %480, null
  br i1 %481, label %482, label %492

482:                                              ; preds = %479
  %483 = load ptr, ptr %5, align 8, !tbaa !5
  %484 = load ptr, ptr %29, align 8, !tbaa !5
  %485 = getelementptr inbounds %struct.ProcMessageInfo, ptr %484, i32 0, i32 13
  %486 = getelementptr inbounds [0 x i8], ptr %485, i64 0, i64 0
  %487 = load i32, ptr %33, align 4, !tbaa !12
  %488 = sext i32 %487 to i64
  %489 = getelementptr inbounds i8, ptr %486, i64 %488
  %490 = load i32, ptr %34, align 4, !tbaa !12
  %491 = sext i32 %490 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %483, ptr align 1 %489, i64 %491, i1 false)
  br label %492

492:                                              ; preds = %482, %479
  %493 = load ptr, ptr %29, align 8, !tbaa !5
  %494 = getelementptr inbounds %struct.ProcMessageInfo, ptr %493, i32 0, i32 13
  %495 = getelementptr inbounds [0 x i8], ptr %494, i64 0, i64 0
  %496 = load i32, ptr %33, align 4, !tbaa !12
  %497 = sext i32 %496 to i64
  %498 = getelementptr inbounds i8, ptr %495, i64 %497
  store i32 1, ptr %22, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret ptr %498
}

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 16}
!10 = !{!"MHandle", !11, i64 0, !11, i64 4, !6, i64 8, !6, i64 16}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !11, i64 256}
!14 = !{!"HandleProcMessage", !7, i64 0, !11, i64 256, !11, i64 260, !11, i64 264, !11, i64 268, !15, i64 272, !6, i64 280}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !11, i64 264}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!14, !11, i64 260}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !18}
!22 = !{!15, !15, i64 0}
!23 = distinct !{!23, !18}
!24 = !{!14, !6, i64 280}
!25 = !{!26, !11, i64 32}
!26 = !{!"ProcMessageInfo", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !15, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !7, i64 44, !7, i64 1072, !7, i64 3120, !7, i64 4144}
!27 = !{!26, !15, i64 24}
!28 = !{!14, !15, i64 272}
!29 = distinct !{!29, !18}
!30 = !{!26, !11, i64 4}
!31 = !{!10, !11, i64 4}
!32 = distinct !{!32, !18}
!33 = !{!34, !11, i64 0}
!34 = !{!"ProcCommunicateState", !11, i64 0, !11, i64 4}
!35 = !{!34, !11, i64 4}


; 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.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
@.str.14 = external hidden unnamed_addr constant [18 x i8], align 1
@__FUNCTION__.m_ProcMessageRead = external hidden unnamed_addr constant [18 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [17 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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local nonnull ptr @m_ProcMessageRead(ptr noundef %0, ptr noundef writeonly %1, ptr noundef %2) local_unnamed_addr #6 {
  %4 = alloca [128 x i8], align 16
  %5 = alloca i32, align 4
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = icmp eq ptr %0, null
  %spec.store.select = select i1 %8, ptr @.str.12, ptr %0
  %9 = tail call ptr @mMornObject(ptr noundef nonnull %spec.store.select, i32 noundef -1) #8
  %10 = tail call ptr @GetHandle(ptr noundef %9, i32 noundef 288, i32 noundef -1138036864, ptr noundef nonnull @endProcMessage) #8
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = tail call i32 @mHandleValid(ptr noundef %10) #8
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %14, label %147

14:                                               ; preds = %3
  %15 = tail call ptr @mMornObject(ptr noundef nonnull %spec.store.select, i32 noundef -1) #8
  tail call void @m_PropertyFunction(ptr noundef %15, ptr noundef nonnull @.str.6, ptr noundef nonnull @mornObjectRemove, ptr noundef nonnull %spec.store.select) #8
  %.not117 = icmp eq ptr %2, null
  br i1 %.not117, label %17, label %16

16:                                               ; preds = %14
  store i32 0, ptr %2, align 4, !tbaa !11
  br label %17

17:                                               ; preds = %16, %14
  %18 = tail call i32 @getpid() #8
  %19 = mul nsw i32 %18, 1000
  %20 = tail call i32 (...) @mThreadOrder() #8
  %21 = add nsw i32 %19, %20
  %22 = getelementptr inbounds i8, ptr %12, i64 256
  store i32 %21, ptr %22, align 8, !tbaa !12
  %23 = getelementptr inbounds i8, ptr %12, i64 264
  %24 = load i32, ptr %23, align 8, !tbaa !15
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %45

26:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #8
  %27 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %4, ptr noundef nonnull dereferenceable(1) @.str.14) #8
  %28 = call i32 @access(ptr noundef nonnull %4, i32 noundef 0) #8
  %29 = icmp slt i32 %28, 0
  br i1 %29, label %30, label %.peel.begin

30:                                               ; preds = %26
  %31 = call i32 @mkdir(ptr noundef nonnull %4, i32 noundef 511) #8
  br label %.peel.begin

.peel.begin:                                      ; preds = %30, %26
  %32 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %12, ptr noundef nonnull dereferenceable(1) @.str.9, ptr noundef nonnull %4, ptr noundef nonnull %spec.store.select) #8
  %33 = call i32 @access(ptr noundef nonnull %12, i32 noundef 0) #8
  %34 = icmp slt i32 %33, 0
  br i1 %34, label %.peel.next, label %.loopexit152

.peel.next:                                       ; preds = %.peel.begin, %.peel.next
  %35 = call i32 @access(ptr noundef %12, i32 noundef 0) #8
  %36 = icmp slt i32 %35, 0
  br i1 %36, label %.peel.next, label %.loopexit152, !llvm.loop !16

.loopexit152:                                     ; preds = %.peel.next, %.peel.begin
  %.0108.lcssa = phi i64 [ 0, %.peel.begin ], [ 1, %.peel.next ]
  %37 = call i32 (ptr, i32, ...) @open(ptr noundef %12, i32 noundef 66, i32 noundef 438) #8
  %38 = getelementptr inbounds i8, ptr %12, i64 260
  store i32 %37, ptr %38, align 4, !tbaa !19
  br label %39

39:                                               ; preds = %.loopexit152, %39
  %40 = load i32, ptr %38, align 4, !tbaa !19
  %41 = call i64 @lseek(i32 noundef %40, i64 noundef 1, i32 noundef 2) #8
  %42 = trunc i64 %41 to i32
  %43 = icmp ult i32 %42, 4144
  br i1 %43, label %39, label %44, !llvm.loop !20

44:                                               ; preds = %39
  store i32 %42, ptr %23, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #8
  br label %45

45:                                               ; preds = %44, %17
  %.1109 = phi i64 [ %.0108.lcssa, %44 ], [ 0, %17 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %46 = getelementptr inbounds i8, ptr %12, i64 260
  %47 = load i32, ptr %46, align 4, !tbaa !19
  %48 = call i64 @lseek(i32 noundef %47, i64 noundef 0, i32 noundef 0) #8
  %.not125 = icmp eq i64 %48, 0
  br i1 %.not125, label %50, label %49

49:                                               ; preds = %45
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 539, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.1) #8
  br label %50

50:                                               ; preds = %49, %45
  %51 = load i32, ptr %46, align 4, !tbaa !19
  %52 = call i64 @read(i32 noundef %51, ptr noundef nonnull %5, i64 noundef 4) #8
  %.not126 = icmp eq i64 %52, 4
  br i1 %.not126, label %54, label %53

53:                                               ; preds = %50
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 539, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.2) #8
  br label %54

54:                                               ; preds = %53, %50
  %55 = load i32, ptr %5, align 4, !tbaa !11
  %56 = sdiv i32 %55, 1000
  %57 = call i32 @kill(i32 noundef %56, i32 noundef 0) #8
  %.not118138 = icmp eq i32 %57, 0
  br i1 %.not118138, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %54, %65
  %58 = load i32, ptr %46, align 4, !tbaa !19
  %59 = call i64 @lseek(i32 noundef %58, i64 noundef 0, i32 noundef 0) #8
  %.not127 = icmp eq i64 %59, 0
  br i1 %.not127, label %61, label %60

60:                                               ; preds = %.lr.ph
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 540, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.1) #8
  br label %61

61:                                               ; preds = %60, %.lr.ph
  %62 = load i32, ptr %46, align 4, !tbaa !19
  %63 = call i64 @read(i32 noundef %62, ptr noundef nonnull %5, i64 noundef 4) #8
  %.not128 = icmp eq i64 %63, 4
  br i1 %.not128, label %65, label %64

64:                                               ; preds = %61
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 540, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.2) #8
  br label %65

65:                                               ; preds = %64, %61
  %66 = load i32, ptr %5, align 4, !tbaa !11
  %67 = sdiv i32 %66, 1000
  %68 = call i32 @kill(i32 noundef %67, i32 noundef 0) #8
  %.not118 = icmp eq i32 %68, 0
  br i1 %.not118, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %65, %54
  %.2.lcssa = phi i64 [ %.1109, %54 ], [ 1, %65 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #8
  store i64 0, ptr %6, align 8, !tbaa !22
  br label %69

69:                                               ; preds = %._crit_edge, %77
  %70 = load i32, ptr %46, align 4, !tbaa !19
  %71 = call i64 @lseek(i32 noundef %70, i64 noundef 24, i32 noundef 0) #8
  %.not133 = icmp eq i64 %71, 24
  br i1 %.not133, label %73, label %72

72:                                               ; preds = %69
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 543, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.1) #8
  br label %73

73:                                               ; preds = %72, %69
  %74 = load i32, ptr %46, align 4, !tbaa !19
  %75 = call i64 @read(i32 noundef %74, ptr noundef nonnull %6, i64 noundef 8) #8
  %.not134 = icmp eq i64 %75, 8
  br i1 %.not134, label %77, label %76

76:                                               ; preds = %73
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 543, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.2) #8
  br label %77

77:                                               ; preds = %76, %73
  %.pr = load i64, ptr %6, align 8, !tbaa !22
  %78 = icmp eq i64 %.pr, 0
  br i1 %78, label %69, label %79, !llvm.loop !23

79:                                               ; preds = %77
  %80 = load i32, ptr %23, align 8, !tbaa !15
  %81 = sext i32 %80 to i64
  %82 = add nsw i64 %81, 4144
  %83 = load i32, ptr %46, align 4, !tbaa !19
  %84 = call ptr @mmap(ptr noundef null, i64 noundef %82, i32 noundef 3, i32 noundef 1, i32 noundef %83, i64 noundef 0) #8
  %85 = getelementptr inbounds i8, ptr %12, i64 280
  store ptr %84, ptr %85, align 8, !tbaa !24
  %86 = icmp eq ptr %84, null
  br i1 %86, label %87, label %88

87:                                               ; preds = %79
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 545, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.10) #8
  br label %88

88:                                               ; preds = %87, %79
  %89 = load i32, ptr %46, align 4, !tbaa !19
  %90 = call i32 @flock(i32 noundef %89, i32 noundef 2) #8
  %91 = load ptr, ptr %85, align 8, !tbaa !24
  %92 = getelementptr inbounds i8, ptr %91, i64 32
  %93 = load volatile i32, ptr %92, align 8, !tbaa !25
  %.not119139 = icmp slt i32 %93, 0
  br i1 %.not119139, label %.loopexit, label %.lr.ph142

.lr.ph142:                                        ; preds = %88
  %94 = getelementptr inbounds i8, ptr %91, i64 1072
  br label %95

95:                                               ; preds = %.lr.ph142, %122
  %indvars.iv = phi i64 [ 0, %.lr.ph142 ], [ %indvars.iv.next, %122 ]
  %96 = getelementptr inbounds [256 x i64], ptr %94, i64 0, i64 %indvars.iv
  %97 = load volatile i64, ptr %96, align 8, !tbaa !22
  %98 = icmp eq i64 %97, -1
  %99 = load volatile i32, ptr %92, align 8, !tbaa !25
  br i1 %98, label %100, label %122

100:                                              ; preds = %95
  %101 = trunc nuw nsw i64 %indvars.iv to i32
  %102 = icmp eq i32 %99, %101
  br i1 %102, label %103, label %110

103:                                              ; preds = %100
  %104 = icmp eq i64 %indvars.iv, 255
  br i1 %104, label %105, label %106

105:                                              ; preds = %103
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 555, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.16) #8
  %.pre = load ptr, ptr %85, align 8, !tbaa !24
  br label %106

106:                                              ; preds = %105, %103
  %107 = phi ptr [ %.pre, %105 ], [ %91, %103 ]
  %108 = add nuw nsw i32 %101, 1
  %109 = getelementptr inbounds i8, ptr %107, i64 32
  store volatile i32 %108, ptr %109, align 8, !tbaa !25
  br label %110

110:                                              ; preds = %106, %100
  %111 = phi ptr [ %107, %106 ], [ %91, %100 ]
  %112 = getelementptr inbounds i8, ptr %111, i64 24
  %113 = load volatile i64, ptr %112, align 8, !tbaa !27
  %114 = and i64 %.2.lcssa, 4294967295
  %115 = sub nsw i64 %113, %114
  %116 = getelementptr inbounds i8, ptr %111, i64 1072
  %117 = getelementptr inbounds [256 x i64], ptr %116, i64 0, i64 %indvars.iv
  store volatile i64 %115, ptr %117, align 8, !tbaa !22
  %118 = load i32, ptr %22, align 8, !tbaa !12
  %119 = getelementptr inbounds i8, ptr %111, i64 44
  %120 = getelementptr inbounds [256 x i32], ptr %119, i64 0, i64 %indvars.iv
  store volatile i32 %118, ptr %120, align 4, !tbaa !11
  %121 = getelementptr inbounds i8, ptr %12, i64 272
  store i64 %indvars.iv, ptr %121, align 8, !tbaa !28
  br label %.loopexit

122:                                              ; preds = %95
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %123 = sext i32 %99 to i64
  %.not119.not = icmp slt i64 %indvars.iv, %123
  br i1 %.not119.not, label %95, label %.loopexit, !llvm.loop !29

.loopexit:                                        ; preds = %122, %88, %110
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %124 = load i32, ptr %46, align 4, !tbaa !19
  %125 = call i64 @lseek(i32 noundef %124, i64 noundef 4, i32 noundef 0) #8
  %.not129 = icmp eq i64 %125, 4
  br i1 %.not129, label %127, label %126

126:                                              ; preds = %.loopexit
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 565, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.1) #8
  br label %127

127:                                              ; preds = %126, %.loopexit
  %128 = load i32, ptr %46, align 4, !tbaa !19
  %129 = call i64 @read(i32 noundef %128, ptr noundef nonnull %7, i64 noundef 4) #8
  %.not130 = icmp eq i64 %129, 4
  br i1 %.not130, label %131, label %130

130:                                              ; preds = %127
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 565, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.2) #8
  br label %131

131:                                              ; preds = %130, %127
  %132 = load i32, ptr %7, align 4, !tbaa !11
  %133 = add nsw i32 %132, 1
  store i32 %133, ptr %7, align 4, !tbaa !11
  %134 = load i32, ptr %46, align 4, !tbaa !19
  %135 = call i64 @lseek(i32 noundef %134, i64 noundef 4, i32 noundef 0) #8
  %.not131 = icmp eq i64 %135, 4
  br i1 %.not131, label %137, label %136

136:                                              ; preds = %131
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 566, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.1) #8
  br label %137

137:                                              ; preds = %136, %131
  %138 = load i32, ptr %46, align 4, !tbaa !19
  %139 = call i64 @write(i32 noundef %138, ptr noundef nonnull %7, i64 noundef 4) #8
  %.not132 = icmp eq i64 %139, 4
  br i1 %.not132, label %141, label %140

140:                                              ; preds = %137
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str, i32 noundef 566, ptr noundef nonnull @__FUNCTION__.m_ProcMessageRead, ptr noundef nonnull @.str.3) #8
  br label %141

141:                                              ; preds = %140, %137
  %142 = load ptr, ptr %85, align 8, !tbaa !24
  %143 = getelementptr inbounds i8, ptr %142, i64 4
  store volatile i32 %133, ptr %143, align 4, !tbaa !30
  %144 = load i32, ptr %46, align 4, !tbaa !19
  %145 = call i32 @flock(i32 noundef %144, i32 noundef 8) #8
  %146 = getelementptr inbounds i8, ptr %10, i64 4
  store volatile i32 1, ptr %146, align 4, !tbaa !31
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  br label %147

147:                                              ; preds = %141, %3
  %148 = getelementptr inbounds i8, ptr %12, i64 280
  %149 = load ptr, ptr %148, align 8, !tbaa !24
  %150 = getelementptr inbounds i8, ptr %12, i64 272
  %151 = load i64, ptr %150, align 8, !tbaa !28
  %152 = getelementptr inbounds i8, ptr %149, i64 1072
  %sext = shl i64 %151, 32
  %153 = ashr exact i64 %sext, 32
  %154 = getelementptr inbounds [256 x i64], ptr %152, i64 0, i64 %153
  %155 = load volatile i64, ptr %154, align 8, !tbaa !22
  %156 = trunc i64 %155 to i32
  %sext120 = shl i64 %155, 32
  %157 = ashr exact i64 %sext120, 32
  %158 = getelementptr inbounds i8, ptr %149, i64 24
  %159 = load volatile i64, ptr %158, align 8, !tbaa !27
  %.not121143 = icmp slt i64 %157, %159
  br i1 %.not121143, label %._crit_edge146, label %.lr.ph145

.lr.ph145:                                        ; preds = %147, %.lr.ph145
  %160 = call i32 @usleep(i32 noundef 1000) #8
  %161 = load volatile i64, ptr %158, align 8, !tbaa !27
  %.not121 = icmp slt i64 %157, %161
  br i1 %.not121, label %._crit_edge146, label %.lr.ph145, !llvm.loop !32

._crit_edge146:                                   ; preds = %.lr.ph145, %147
  %sext122 = add i64 %sext120, 4294967296
  %162 = ashr exact i64 %sext122, 32
  store volatile i64 %162, ptr %154, align 8, !tbaa !22
  %163 = srem i32 %156, 128
  %164 = getelementptr inbounds i8, ptr %149, i64 3120
  %165 = sext i32 %163 to i64
  %166 = getelementptr inbounds [128 x %struct.ProcCommunicateState], ptr %164, i64 0, i64 %165
  %167 = load volatile i32, ptr %166, align 8, !tbaa !33
  %168 = getelementptr inbounds i8, ptr %166, i64 4
  %169 = load volatile i32, ptr %168, align 4, !tbaa !35
  %.not123 = icmp eq ptr %2, null
  br i1 %.not123, label %173, label %170

170:                                              ; preds = %._crit_edge146
  %171 = load i32, ptr %2, align 4, !tbaa !11
  %172 = icmp sgt i32 %171, 0
  %. = call i32 @llvm.smin.i32(i32 %171, i32 %169)
  %.0 = select i1 %172, i32 %., i32 %169
  store i32 %.0, ptr %2, align 4, !tbaa !11
  br label %173

173:                                              ; preds = %170, %._crit_edge146
  %.1 = phi i32 [ %.0, %170 ], [ %169, %._crit_edge146 ]
  %.not124 = icmp eq ptr %1, null
  br i1 %.not124, label %._crit_edge154, label %174

._crit_edge154:                                   ; preds = %173
  %.pre155 = sext i32 %167 to i64
  br label %179

174:                                              ; preds = %173
  %175 = getelementptr inbounds i8, ptr %149, i64 4144
  %176 = sext i32 %167 to i64
  %177 = getelementptr inbounds i8, ptr %175, i64 %176
  %178 = sext i32 %.1 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %1, ptr nonnull align 1 %177, i64 %178, i1 false)
  br label %179

179:                                              ; preds = %._crit_edge154, %174
  %.pre-phi = phi i64 [ %.pre155, %._crit_edge154 ], [ %176, %174 ]
  %180 = getelementptr inbounds i8, ptr %149, i64 4144
  %181 = getelementptr inbounds i8, ptr %180, i64 %.pre-phi
  ret ptr %181
}

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

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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #8 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 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 = !{!7, !7, i64 0}
!12 = !{!13, !7, i64 256}
!13 = !{!"HandleProcMessage", !8, i64 0, !7, i64 256, !7, i64 260, !7, i64 264, !7, i64 268, !14, i64 272, !10, i64 280}
!14 = !{!"long", !8, i64 0}
!15 = !{!13, !7, i64 264}
!16 = distinct !{!16, !17, !18}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!"llvm.loop.peeled.count", i32 1}
!19 = !{!13, !7, i64 260}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}
!22 = !{!14, !14, i64 0}
!23 = distinct !{!23, !17}
!24 = !{!13, !10, i64 280}
!25 = !{!26, !7, i64 32}
!26 = !{!"ProcMessageInfo", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !14, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !8, i64 44, !8, i64 1072, !8, i64 3120, !8, i64 4144}
!27 = !{!26, !14, i64 24}
!28 = !{!13, !14, i64 272}
!29 = distinct !{!29, !17}
!30 = !{!26, !7, i64 4}
!31 = !{!6, !7, i64 4}
!32 = distinct !{!32, !17}
!33 = !{!34, !7, i64 0}
!34 = !{!"ProcCommunicateState", !7, i64 0, !7, i64 4}
!35 = !{!34, !7, i64 4}


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