; LLVM IR from jingweizhanghuai/Morn :: example (thread_pool2)

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

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [78 x i8], align 1
@__FUNCTION__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare i32 @usleep(i32 noundef) #1

declare i32 @m_Rand(i32 noundef, i32 noundef) #1

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [1000 x [64 x i8]], align 16
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 64000, ptr %2) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 2, ptr %3, align 4, !tbaa !5
  %15 = call ptr @mMornObject(ptr noundef @.str, i32 noundef -1)
  %16 = call ptr @m_PropertyWrite(ptr noundef %15, ptr noundef @.str.1, ptr noundef %3, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 1, ptr %4, align 4, !tbaa !5
  %17 = call ptr @mMornObject(ptr noundef @.str, i32 noundef -1)
  %18 = call ptr @m_PropertyWrite(ptr noundef %17, ptr noundef @.str.2, ptr noundef %4, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 8, ptr %5, align 4, !tbaa !5
  %19 = call ptr @mMornObject(ptr noundef @.str, i32 noundef -1)
  %20 = call ptr @m_PropertyWrite(ptr noundef %19, ptr noundef @.str.3, ptr noundef %5, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %186, %0
  %22 = load i32, ptr %6, align 4, !tbaa !5
  %23 = icmp slt i32 %22, 1000
  br i1 %23, label %25, label %24

24:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %189

25:                                               ; preds = %21
  %26 = call i32 @m_Rand(i32 noundef 0, i32 noundef 30)
  %27 = mul nsw i32 %26, 1000
  %28 = call i32 @usleep(i32 noundef %27)
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %30
  %32 = getelementptr inbounds [64 x i8], ptr %31, i64 0, i64 0
  %33 = call i32 @m_RandString(ptr noundef %32, i32 noundef 32, i32 noundef 63)
  br label %34

34:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  %35 = load i8, ptr @.str.4, align 1, !tbaa !9
  %36 = sext i8 %35 to i32
  %37 = icmp ne i32 %36, 0
  %38 = zext i1 %37 to i32
  store i32 %38, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store i64 ptrtoint (ptr @func to i64), ptr %8, align 8, !tbaa !10
  %39 = load i64, ptr %8, align 8, !tbaa !10
  %40 = icmp eq i64 %39, 0
  br i1 %40, label %48, label %41

41:                                               ; preds = %34
  %42 = load i64, ptr %8, align 8, !tbaa !10
  %43 = inttoptr i64 %42 to ptr
  %44 = getelementptr inbounds %struct.HandleList, ptr %43, i64 -1
  %45 = getelementptr inbounds %struct.HandleList, ptr %44, i32 0, i32 4
  %46 = load i32, ptr %45, align 4, !tbaa !12
  %47 = icmp eq i32 %46, 262587807
  br i1 %47, label %48, label %113

48:                                               ; preds = %41, %34
  %49 = load i32, ptr %7, align 4, !tbaa !5
  %50 = icmp eq i32 %49, 1
  br i1 %50, label %51, label %58

51:                                               ; preds = %48
  %52 = load i64, ptr %8, align 8, !tbaa !10
  %53 = inttoptr i64 %52 to ptr
  %54 = load i32, ptr %6, align 4, !tbaa !5
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %55
  %57 = getelementptr inbounds [64 x i8], ptr %56, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef %53, ptr noundef %57, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %112

58:                                               ; preds = %48
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = icmp eq i32 %59, 2
  br i1 %60, label %61, label %68

61:                                               ; preds = %58
  %62 = load i64, ptr %8, align 8, !tbaa !10
  %63 = inttoptr i64 %62 to ptr
  %64 = load i32, ptr %6, align 4, !tbaa !5
  %65 = sext i32 %64 to i64
  %66 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %65
  %67 = getelementptr inbounds [64 x i8], ptr %66, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef %63, ptr noundef %67, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef null, i32 noundef 0)
  br label %111

68:                                               ; preds = %58
  %69 = load i32, ptr %7, align 4, !tbaa !5
  %70 = icmp eq i32 %69, 3
  br i1 %70, label %71, label %90

71:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store i64 0, ptr %9, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 0, ptr %10, align 8, !tbaa !10
  %72 = load i64, ptr %9, align 8, !tbaa !10
  %73 = load i64, ptr %10, align 8, !tbaa !10
  %74 = icmp ne i64 %72, %73
  br i1 %74, label %75, label %82

75:                                               ; preds = %71
  %76 = load i64, ptr %8, align 8, !tbaa !10
  %77 = inttoptr i64 %76 to ptr
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %79
  %81 = getelementptr inbounds [64 x i8], ptr %80, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef %77, ptr noundef %81, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef 0)
  br label %89

82:                                               ; preds = %71
  %83 = load i64, ptr %8, align 8, !tbaa !10
  %84 = inttoptr i64 %83 to ptr
  %85 = load i32, ptr %6, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %86
  %88 = getelementptr inbounds [64 x i8], ptr %87, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef %84, ptr noundef %88, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef null, i32 noundef -1)
  br label %89

89:                                               ; preds = %82, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %110

90:                                               ; preds = %68
  %91 = load i32, ptr %7, align 4, !tbaa !5
  %92 = icmp eq i32 %91, 4
  br i1 %92, label %93, label %100

93:                                               ; preds = %90
  %94 = load i64, ptr %8, align 8, !tbaa !10
  %95 = inttoptr i64 %94 to ptr
  %96 = load i32, ptr %6, align 4, !tbaa !5
  %97 = sext i32 %96 to i64
  %98 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %97
  %99 = getelementptr inbounds [64 x i8], ptr %98, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef %95, ptr noundef %99, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  br label %109

100:                                              ; preds = %90
  br label %101

101:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 1, ptr %11, align 4, !tbaa !5
  %102 = load i32, ptr %11, align 4, !tbaa !5
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %106

104:                                              ; preds = %101
  %105 = load i32, ptr %11, align 4, !tbaa !5
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %105, i32 noundef -1, ptr noundef @.str.5, i32 noundef 30, ptr noundef @__FUNCTION__.main, ptr noundef @.str.6)
  br label %106

106:                                              ; preds = %104, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %107

107:                                              ; preds = %106
  br label %108

108:                                              ; preds = %107
  br label %109

109:                                              ; preds = %108, %93
  br label %110

110:                                              ; preds = %109, %89
  br label %111

111:                                              ; preds = %110, %61
  br label %112

112:                                              ; preds = %111, %51
  br label %174

113:                                              ; preds = %41
  %114 = load i32, ptr %7, align 4, !tbaa !5
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %116, label %119

116:                                              ; preds = %113
  %117 = load i64, ptr %8, align 8, !tbaa !10
  %118 = inttoptr i64 %117 to ptr
  call void @m_ThreadPool(ptr noundef null, ptr noundef %118, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %173

119:                                              ; preds = %113
  %120 = load i32, ptr %7, align 4, !tbaa !5
  %121 = icmp eq i32 %120, 1
  br i1 %121, label %122, label %129

122:                                              ; preds = %119
  %123 = load i64, ptr %8, align 8, !tbaa !10
  %124 = inttoptr i64 %123 to ptr
  %125 = load i32, ptr %6, align 4, !tbaa !5
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %126
  %128 = getelementptr inbounds [64 x i8], ptr %127, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef null, ptr noundef %124, ptr noundef %128, ptr noundef null, i32 noundef 0)
  br label %172

129:                                              ; preds = %119
  %130 = load i32, ptr %7, align 4, !tbaa !5
  %131 = icmp eq i32 %130, 2
  br i1 %131, label %132, label %151

132:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 0, ptr %12, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store i64 0, ptr %13, align 8, !tbaa !10
  %133 = load i64, ptr %12, align 8, !tbaa !10
  %134 = load i64, ptr %13, align 8, !tbaa !10
  %135 = icmp ne i64 %133, %134
  br i1 %135, label %136, label %143

136:                                              ; preds = %132
  %137 = load i64, ptr %8, align 8, !tbaa !10
  %138 = inttoptr i64 %137 to ptr
  %139 = load i32, ptr %6, align 4, !tbaa !5
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %140
  %142 = getelementptr inbounds [64 x i8], ptr %141, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef null, ptr noundef %138, ptr noundef %142, ptr noundef inttoptr (i64 -1 to ptr), i32 noundef 0)
  br label %150

143:                                              ; preds = %132
  %144 = load i64, ptr %8, align 8, !tbaa !10
  %145 = inttoptr i64 %144 to ptr
  %146 = load i32, ptr %6, align 4, !tbaa !5
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %147
  %149 = getelementptr inbounds [64 x i8], ptr %148, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef null, ptr noundef %145, ptr noundef %149, ptr noundef null, i32 noundef -1)
  br label %150

150:                                              ; preds = %143, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %171

151:                                              ; preds = %129
  %152 = load i32, ptr %7, align 4, !tbaa !5
  %153 = icmp eq i32 %152, 3
  br i1 %153, label %154, label %161

154:                                              ; preds = %151
  %155 = load i64, ptr %8, align 8, !tbaa !10
  %156 = inttoptr i64 %155 to ptr
  %157 = load i32, ptr %6, align 4, !tbaa !5
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %158
  %160 = getelementptr inbounds [64 x i8], ptr %159, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef null, ptr noundef %156, ptr noundef %160, ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  br label %170

161:                                              ; preds = %151
  br label %162

162:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 1, ptr %14, align 4, !tbaa !5
  %163 = load i32, ptr %14, align 4, !tbaa !5
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %167

165:                                              ; preds = %162
  %166 = load i32, ptr %14, align 4, !tbaa !5
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %166, i32 noundef -1, ptr noundef @.str.5, i32 noundef 30, ptr noundef @__FUNCTION__.main, ptr noundef @.str.6)
  br label %167

167:                                              ; preds = %165, %162
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  br label %168

168:                                              ; preds = %167
  br label %169

169:                                              ; preds = %168
  br label %170

170:                                              ; preds = %169, %154
  br label %171

171:                                              ; preds = %170, %150
  br label %172

172:                                              ; preds = %171, %122
  br label %173

173:                                              ; preds = %172, %116
  br label %174

174:                                              ; preds = %173, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %175

175:                                              ; preds = %174
  br label %176

176:                                              ; preds = %175
  %177 = load i32, ptr %6, align 4, !tbaa !5
  %178 = srem i32 %177, 100
  %179 = icmp eq i32 %178, 0
  br i1 %179, label %180, label %185

180:                                              ; preds = %176
  %181 = call ptr @mMornObject(ptr noundef @.str, i32 noundef -1)
  %182 = call ptr @m_PropertyRead(ptr noundef %181, ptr noundef @.str.1, ptr noundef %3, ptr noundef null)
  %183 = load i32, ptr %3, align 4, !tbaa !5
  %184 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %183)
  br label %185

185:                                              ; preds = %180, %176
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr %6, align 4, !tbaa !5
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr %6, align 4, !tbaa !5
  br label %21, !llvm.loop !16

189:                                              ; preds = %24
  %190 = call ptr @mMornObject(ptr noundef @.str, i32 noundef -1)
  %191 = call ptr @m_PropertyWrite(ptr noundef %190, ptr noundef @.str.8, ptr noundef null, i32 noundef -1)
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 64000, ptr %2) #3
  ret i32 0
}

declare ptr @m_PropertyWrite(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

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

declare i32 @m_RandString(ptr noundef, i32 noundef, i32 noundef) #1

declare void @m_ThreadPool(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

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

declare ptr @m_PropertyRead(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @printf(ptr noundef, ...) #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !6, i64 28}
!13 = !{!"HandleList", !14, i64 0, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28}
!14 = !{!"MList", !6, i64 0, !15, i64 8}
!15 = !{!"any pointer", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [78 x i8], align 1
@__FUNCTION__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1

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

declare i32 @usleep(i32 noundef) local_unnamed_addr #1

declare i32 @m_Rand(i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca [1000 x [64 x i8]], align 16
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 64000, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  store i32 2, ptr %2, align 4, !tbaa !5
  %5 = tail call ptr @mMornObject(ptr noundef nonnull @.str, i32 noundef -1) #4
  %6 = call ptr @m_PropertyWrite(ptr noundef %5, ptr noundef nonnull @.str.1, ptr noundef nonnull %2, i32 noundef 4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  store i32 1, ptr %3, align 4, !tbaa !5
  %7 = call ptr @mMornObject(ptr noundef nonnull @.str, i32 noundef -1) #4
  %8 = call ptr @m_PropertyWrite(ptr noundef %7, ptr noundef nonnull @.str.2, ptr noundef nonnull %3, i32 noundef 4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  store i32 8, ptr %4, align 4, !tbaa !5
  %9 = call ptr @mMornObject(ptr noundef nonnull @.str, i32 noundef -1) #4
  %10 = call ptr @m_PropertyWrite(ptr noundef %9, ptr noundef nonnull @.str.3, ptr noundef nonnull %4, i32 noundef 4) #4
  %11 = load i8, ptr @.str.4, align 1
  %.not = icmp eq i8 %11, 0
  br label %15

12:                                               ; preds = %37
  %13 = call ptr @mMornObject(ptr noundef nonnull @.str, i32 noundef -1) #4
  %14 = call ptr @m_PropertyWrite(ptr noundef %13, ptr noundef nonnull @.str.8, ptr noundef null, i32 noundef -1) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 64000, ptr nonnull %1) #4
  ret i32 0

15:                                               ; preds = %0, %37
  %indvars.iv = phi i64 [ 0, %0 ], [ %indvars.iv.next, %37 ]
  %16 = call i32 @m_Rand(i32 noundef 0, i32 noundef 30) #4
  %17 = mul nsw i32 %16, 1000
  %18 = call i32 @usleep(i32 noundef %17) #4
  %19 = getelementptr inbounds [1000 x [64 x i8]], ptr %1, i64 0, i64 %indvars.iv
  %20 = call i32 @m_RandString(ptr noundef nonnull %19, i32 noundef 32, i32 noundef 63) #4
  %21 = load i32, ptr getelementptr inbounds (i8, ptr @func, i64 -4), align 4, !tbaa !9
  %22 = icmp eq i32 %21, 262587807
  br i1 %22, label %23, label %26

23:                                               ; preds = %15
  br i1 %.not, label %25, label %24

24:                                               ; preds = %23
  call void @m_ThreadPool(ptr noundef nonnull @func, ptr noundef nonnull %19, ptr noundef null, ptr noundef null, i32 noundef 0) #4
  br label %29

25:                                               ; preds = %23
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.5, i32 noundef 30, ptr noundef nonnull @__FUNCTION__.main, ptr noundef nonnull @.str.6) #4
  br label %29

26:                                               ; preds = %15
  br i1 %.not, label %27, label %28

27:                                               ; preds = %26
  call void @m_ThreadPool(ptr noundef null, ptr noundef nonnull @func, ptr noundef null, ptr noundef null, i32 noundef 0) #4
  br label %29

28:                                               ; preds = %26
  call void @m_ThreadPool(ptr noundef null, ptr noundef nonnull @func, ptr noundef nonnull %19, ptr noundef null, i32 noundef 0) #4
  br label %29

29:                                               ; preds = %27, %28, %24, %25
  %.lhs.trunc = trunc i64 %indvars.iv to i16
  %30 = urem i16 %.lhs.trunc, 100
  %31 = icmp eq i16 %30, 0
  br i1 %31, label %32, label %37

32:                                               ; preds = %29
  %33 = call ptr @mMornObject(ptr noundef nonnull @.str, i32 noundef -1) #4
  %34 = call ptr @m_PropertyRead(ptr noundef %33, ptr noundef nonnull @.str.1, ptr noundef nonnull %2, ptr noundef null) #4
  %35 = load i32, ptr %2, align 4, !tbaa !5
  %36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %35)
  br label %37

37:                                               ; preds = %29, %32
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1000
  br i1 %exitcond.not, label %12, label %15, !llvm.loop !13
}

declare ptr @m_PropertyWrite(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

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

declare i32 @m_RandString(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare void @m_ThreadPool(ptr noundef, ptr noundef, ptr noundef, ptr 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 #1

declare ptr @m_PropertyRead(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 28}
!10 = !{!"HandleList", !11, i64 0, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28}
!11 = !{!"MList", !6, i64 0, !12, i64 8}
!12 = !{!"any pointer", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass