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

; 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 [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [78 x i8], align 1
@__FUNCTION__.main = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 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 ptr, align 8
  %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 8, ptr %3) #3
  %15 = call ptr @ListCreate(i32 noundef 2, ptr noundef null)
  store ptr %15, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 1, ptr %4, align 4, !tbaa !9
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = call ptr @m_PropertyWrite(ptr noundef %16, ptr noundef @.str, 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 !9
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = call ptr @m_PropertyWrite(ptr noundef %18, ptr noundef @.str.1, 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 !9
  br label %20

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

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

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

33:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  store i32 2, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = ptrtoint ptr %34 to i64
  store i64 %35, ptr %8, align 8, !tbaa !11
  %36 = load i64, ptr %8, align 8, !tbaa !11
  %37 = icmp eq i64 %36, 0
  br i1 %37, label %45, label %38

38:                                               ; preds = %33
  %39 = load i64, ptr %8, align 8, !tbaa !11
  %40 = inttoptr i64 %39 to ptr
  %41 = getelementptr inbounds %struct.HandleList, ptr %40, i64 -1
  %42 = getelementptr inbounds %struct.HandleList, ptr %41, i32 0, i32 4
  %43 = load i32, ptr %42, align 4, !tbaa !13
  %44 = icmp eq i32 %43, 262587807
  br i1 %44, label %45, label %106

45:                                               ; preds = %38, %33
  %46 = load i32, ptr %7, align 4, !tbaa !9
  %47 = icmp eq i32 %46, 1
  br i1 %47, label %48, label %51

48:                                               ; preds = %45
  %49 = load i64, ptr %8, align 8, !tbaa !11
  %50 = inttoptr i64 %49 to ptr
  call void @m_ThreadPool(ptr noundef %50, ptr noundef @func, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %105

51:                                               ; preds = %45
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = icmp eq i32 %52, 2
  br i1 %53, label %54, label %61

54:                                               ; preds = %51
  %55 = load i64, ptr %8, align 8, !tbaa !11
  %56 = inttoptr i64 %55 to ptr
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %58
  %60 = getelementptr inbounds [64 x i8], ptr %59, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef %56, ptr noundef @func, ptr noundef %60, ptr noundef null, i32 noundef 0)
  br label %104

61:                                               ; preds = %51
  %62 = load i32, ptr %7, align 4, !tbaa !9
  %63 = icmp eq i32 %62, 3
  br i1 %63, label %64, label %83

64:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store i64 0, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 0, ptr %10, align 8, !tbaa !11
  %65 = load i64, ptr %9, align 8, !tbaa !11
  %66 = load i64, ptr %10, align 8, !tbaa !11
  %67 = icmp ne i64 %65, %66
  br i1 %67, label %68, label %75

68:                                               ; preds = %64
  %69 = load i64, ptr %8, align 8, !tbaa !11
  %70 = inttoptr i64 %69 to ptr
  %71 = load i32, ptr %6, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %72
  %74 = getelementptr inbounds [64 x i8], ptr %73, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef %70, ptr noundef @func, ptr noundef %74, ptr noundef inttoptr (i64 -1 to ptr), i32 noundef 0)
  br label %82

75:                                               ; preds = %64
  %76 = load i64, ptr %8, align 8, !tbaa !11
  %77 = inttoptr i64 %76 to ptr
  %78 = load i32, ptr %6, align 4, !tbaa !9
  %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 @func, ptr noundef %81, ptr noundef null, i32 noundef -1)
  br label %82

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

83:                                               ; preds = %61
  %84 = load i32, ptr %7, align 4, !tbaa !9
  %85 = icmp eq i32 %84, 4
  br i1 %85, label %86, label %93

86:                                               ; preds = %83
  %87 = load i64, ptr %8, align 8, !tbaa !11
  %88 = inttoptr i64 %87 to ptr
  %89 = load i32, ptr %6, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %90
  %92 = getelementptr inbounds [64 x i8], ptr %91, i64 0, i64 0
  call void @m_ThreadPool(ptr noundef %88, ptr noundef @func, ptr noundef %92, ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  br label %102

93:                                               ; preds = %83
  br label %94

94:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 1, ptr %11, align 4, !tbaa !9
  %95 = load i32, ptr %11, align 4, !tbaa !9
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %99

97:                                               ; preds = %94
  %98 = load i32, ptr %11, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %98, i32 noundef -1, ptr noundef @.str.2, i32 noundef 29, ptr noundef @__FUNCTION__.main, ptr noundef @.str.3)
  br label %99

99:                                               ; preds = %97, %94
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %100

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101, %86
  br label %103

103:                                              ; preds = %102, %82
  br label %104

104:                                              ; preds = %103, %54
  br label %105

105:                                              ; preds = %104, %48
  br label %169

106:                                              ; preds = %38
  %107 = load i32, ptr %7, align 4, !tbaa !9
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %112

109:                                              ; preds = %106
  %110 = load i64, ptr %8, align 8, !tbaa !11
  %111 = inttoptr i64 %110 to ptr
  call void @m_ThreadPool(ptr noundef null, ptr noundef %111, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %168

112:                                              ; preds = %106
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = icmp eq i32 %113, 1
  br i1 %114, label %115, label %118

115:                                              ; preds = %112
  %116 = load i64, ptr %8, align 8, !tbaa !11
  %117 = inttoptr i64 %116 to ptr
  call void @m_ThreadPool(ptr noundef null, ptr noundef %117, ptr noundef @func, ptr noundef null, i32 noundef 0)
  br label %167

118:                                              ; preds = %112
  %119 = load i32, ptr %7, align 4, !tbaa !9
  %120 = icmp eq i32 %119, 2
  br i1 %120, label %121, label %144

121:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 0, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  store i64 0, ptr %13, align 8, !tbaa !11
  %122 = load i64, ptr %12, align 8, !tbaa !11
  %123 = load i64, ptr %13, align 8, !tbaa !11
  %124 = icmp ne i64 %122, %123
  br i1 %124, label %125, label %134

125:                                              ; preds = %121
  %126 = load i64, ptr %8, align 8, !tbaa !11
  %127 = inttoptr i64 %126 to ptr
  %128 = load i32, ptr %6, align 4, !tbaa !9
  %129 = sext i32 %128 to i64
  %130 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %129
  %131 = getelementptr inbounds [64 x i8], ptr %130, i64 0, i64 0
  %132 = ptrtoint ptr %131 to i64
  %133 = inttoptr i64 %132 to ptr
  call void @m_ThreadPool(ptr noundef null, ptr noundef %127, ptr noundef @func, ptr noundef %133, i32 noundef 0)
  br label %143

134:                                              ; preds = %121
  %135 = load i64, ptr %8, align 8, !tbaa !11
  %136 = inttoptr i64 %135 to ptr
  %137 = load i32, ptr %6, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %138
  %140 = getelementptr inbounds [64 x i8], ptr %139, i64 0, i64 0
  %141 = ptrtoint ptr %140 to i64
  %142 = trunc i64 %141 to i32
  call void @m_ThreadPool(ptr noundef null, ptr noundef %136, ptr noundef @func, ptr noundef null, i32 noundef %142)
  br label %143

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

144:                                              ; preds = %118
  %145 = load i32, ptr %7, align 4, !tbaa !9
  %146 = icmp eq i32 %145, 3
  br i1 %146, label %147, label %156

147:                                              ; preds = %144
  %148 = load i64, ptr %8, align 8, !tbaa !11
  %149 = inttoptr i64 %148 to ptr
  %150 = load i32, ptr %6, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = getelementptr inbounds [1000 x [64 x i8]], ptr %2, i64 0, i64 %151
  %153 = getelementptr inbounds [64 x i8], ptr %152, i64 0, i64 0
  %154 = ptrtoint ptr %153 to i64
  %155 = inttoptr i64 %154 to ptr
  call void @m_ThreadPool(ptr noundef null, ptr noundef %149, ptr noundef @func, ptr noundef %155, i32 noundef -1)
  br label %165

156:                                              ; preds = %144
  br label %157

157:                                              ; preds = %156
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 1, ptr %14, align 4, !tbaa !9
  %158 = load i32, ptr %14, align 4, !tbaa !9
  %159 = icmp ne i32 %158, 0
  br i1 %159, label %160, label %162

160:                                              ; preds = %157
  %161 = load i32, ptr %14, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %161, i32 noundef -1, ptr noundef @.str.2, i32 noundef 29, ptr noundef @__FUNCTION__.main, ptr noundef @.str.3)
  br label %162

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

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163
  br label %165

165:                                              ; preds = %164, %147
  br label %166

166:                                              ; preds = %165, %143
  br label %167

167:                                              ; preds = %166, %115
  br label %168

168:                                              ; preds = %167, %109
  br label %169

169:                                              ; preds = %168, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  br label %170

170:                                              ; preds = %169
  br label %171

171:                                              ; preds = %170
  %172 = load i32, ptr %6, align 4, !tbaa !9
  %173 = srem i32 %172, 100
  %174 = icmp eq i32 %173, 0
  br i1 %174, label %175, label %180

175:                                              ; preds = %171
  %176 = load ptr, ptr %3, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.MList, ptr %176, i32 0, i32 0
  %178 = load i32, ptr %177, align 8, !tbaa !16
  %179 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %178)
  br label %180

180:                                              ; preds = %175, %171
  br label %181

181:                                              ; preds = %180
  %182 = load i32, ptr %6, align 4, !tbaa !9
  %183 = add nsw i32 %182, 1
  store i32 %183, ptr %6, align 4, !tbaa !9
  br label %20, !llvm.loop !17

184:                                              ; preds = %23
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  call void @mListRelease(ptr noundef %185)
  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 8, ptr %3) #3
  call void @llvm.lifetime.end.p0(i64 64000, ptr %2) #3
  ret i32 0
}

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

declare ptr @m_PropertyWrite(ptr noundef, ptr noundef, 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 i32 @printf(ptr noundef, ...) #1

declare void @mListRelease(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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 28}
!14 = !{!"HandleList", !15, i64 0, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!15 = !{!"MList", !10, i64 0, !6, i64 8}
!16 = !{!15, !10, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"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 [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 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
  call void @llvm.lifetime.start.p0(i64 64000, ptr nonnull %1) #4
  %4 = tail call ptr @ListCreate(i32 noundef 2, ptr noundef null) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  %5 = call ptr @m_PropertyWrite(ptr noundef %4, ptr noundef nonnull @.str, ptr noundef nonnull %2, i32 noundef 4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #4
  store i32 8, ptr %3, align 4, !tbaa !5
  %6 = call ptr @m_PropertyWrite(ptr noundef %4, ptr noundef nonnull @.str.1, ptr noundef nonnull %3, i32 noundef 4) #4
  %7 = icmp eq ptr %4, null
  %8 = getelementptr inbounds i8, ptr %4, i64 -4
  br i1 %7, label %.split.us, label %.split

.split.us:                                        ; preds = %0, %18
  %indvars.iv48 = phi i64 [ %indvars.iv.next49, %18 ], [ 0, %0 ]
  %9 = call i32 @m_Rand(i32 noundef 0, i32 noundef 30) #4
  %10 = mul nsw i32 %9, 1000
  %11 = call i32 @usleep(i32 noundef %10) #4
  %12 = getelementptr inbounds [1000 x [64 x i8]], ptr %1, i64 0, i64 %indvars.iv48
  %13 = call i32 @m_RandString(ptr noundef nonnull %12, i32 noundef 32, i32 noundef 63) #4
  call void @m_ThreadPool(ptr noundef null, ptr noundef nonnull @func, ptr noundef nonnull %12, ptr noundef null, i32 noundef 0) #4
  %.lhs.trunc.us = trunc i64 %indvars.iv48 to i16
  %14 = urem i16 %.lhs.trunc.us, 100
  %15 = icmp eq i16 %14, 0
  br i1 %15, label %16, label %18

16:                                               ; preds = %.split.us
  %17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef undef)
  br label %18

18:                                               ; preds = %16, %.split.us
  %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1
  %exitcond51.not = icmp eq i64 %indvars.iv.next49, 1000
  br i1 %exitcond51.not, label %.split45.us, label %.split.us, !llvm.loop !9

.split45.us:                                      ; preds = %36, %18
  call void @mListRelease(ptr noundef %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

.split:                                           ; preds = %0, %36
  %indvars.iv = phi i64 [ %indvars.iv.next, %36 ], [ 0, %0 ]
  %19 = call i32 @m_Rand(i32 noundef 0, i32 noundef 30) #4
  %20 = mul nsw i32 %19, 1000
  %21 = call i32 @usleep(i32 noundef %20) #4
  %22 = getelementptr inbounds [1000 x [64 x i8]], ptr %1, i64 0, i64 %indvars.iv
  %23 = call i32 @m_RandString(ptr noundef nonnull %22, i32 noundef 32, i32 noundef 63) #4
  %24 = load i32, ptr %8, align 4, !tbaa !11
  %25 = icmp eq i32 %24, 262587807
  br i1 %25, label %26, label %27

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

27:                                               ; preds = %.split
  %28 = ptrtoint ptr %22 to i64
  %29 = trunc i64 %28 to i32
  call void @m_ThreadPool(ptr noundef null, ptr noundef nonnull %4, ptr noundef nonnull @func, ptr noundef null, i32 noundef %29) #4
  br label %30

30:                                               ; preds = %27, %26
  %.lhs.trunc = trunc i64 %indvars.iv to i16
  %31 = urem i16 %.lhs.trunc, 100
  %32 = icmp eq i16 %31, 0
  br i1 %32, label %33, label %36

33:                                               ; preds = %30
  %34 = load i32, ptr %4, align 8, !tbaa !15
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %34)
  br label %36

36:                                               ; preds = %30, %33
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1000
  br i1 %exitcond.not, label %.split45.us, label %.split, !llvm.loop !9
}

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

declare ptr @m_PropertyWrite(ptr noundef, ptr noundef, 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

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

declare void @mListRelease(ptr noundef) local_unnamed_addr #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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !6, i64 28}
!12 = !{!"HandleList", !13, i64 0, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28}
!13 = !{!"MList", !6, i64 0, !14, i64 8}
!14 = !{!"any pointer", !7, i64 0}
!15 = !{!13, !6, i64 0}


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