; LLVM IR from jingweizhanghuai/Morn :: test (test_thread_pool)

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

@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@__FUNCTION__.test_adjust = external hidden unnamed_addr constant [12 x i8], align 1

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @test_adjust() #0 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #3
  %14 = call ptr @ListCreate(i32 noundef -1, ptr noundef null)
  store ptr %14, ptr %1, align 8, !tbaa !5
  %15 = load ptr, ptr %1, align 8, !tbaa !5
  call void @mListPlace(ptr noundef %15, ptr noundef null, i32 noundef 1024, i32 noundef 64)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #3
  store i32 2, ptr %2, align 4, !tbaa !9
  %16 = call ptr @mMornObject(ptr noundef @.str.2, i32 noundef -1)
  %17 = call ptr @m_PropertyWrite(ptr noundef %16, ptr noundef @.str.3, ptr noundef %2, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #3
  store i32 1, ptr %3, align 4, !tbaa !9
  %18 = call ptr @mMornObject(ptr noundef @.str.2, i32 noundef -1)
  %19 = call ptr @m_PropertyWrite(ptr noundef %18, ptr noundef @.str.10, ptr noundef %3, i32 noundef 4)
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #3
  store i32 8, ptr %4, align 4, !tbaa !9
  %20 = call ptr @mMornObject(ptr noundef @.str.2, i32 noundef -1)
  %21 = call ptr @m_PropertyWrite(ptr noundef %20, ptr noundef @.str.11, ptr noundef %4, i32 noundef 4)
  %22 = call ptr @mMornObject(ptr noundef @.str.2, i32 noundef -1)
  %23 = call ptr @m_PropertyRead(ptr noundef %22, ptr noundef @.str.3, ptr noundef %2, ptr noundef null)
  %24 = load i32, ptr %2, align 4, !tbaa !9
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %24)
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  store i32 0, ptr %5, align 4, !tbaa !9
  br label %26

26:                                               ; preds = %212, %0
  %27 = load i32, ptr %5, align 4, !tbaa !9
  %28 = icmp slt i32 %27, 1024
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  br label %215

30:                                               ; preds = %26
  %31 = call i32 @m_Rand(i32 noundef 0, i32 noundef 30)
  %32 = mul nsw i32 %31, 1000
  %33 = call i32 @usleep(i32 noundef %32)
  %34 = load ptr, ptr %1, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.MList, ptr %34, i32 0, i32 1
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  %37 = load i32, ptr %5, align 4, !tbaa !9
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds ptr, ptr %36, i64 %38
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  %41 = call i32 @m_RandString(ptr noundef %40, i32 noundef 32, i32 noundef 64)
  br label %42

42:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  %43 = load i8, ptr @.str.5, align 1, !tbaa !13
  %44 = sext i8 %43 to i32
  %45 = icmp ne i32 %44, 0
  %46 = zext i1 %45 to i32
  store i32 %46, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store i64 ptrtoint (ptr @func to i64), ptr %7, align 8, !tbaa !14
  %47 = load i64, ptr %7, align 8, !tbaa !14
  %48 = icmp eq i64 %47, 0
  br i1 %48, label %56, label %49

49:                                               ; preds = %42
  %50 = load i64, ptr %7, align 8, !tbaa !14
  %51 = inttoptr i64 %50 to ptr
  %52 = getelementptr inbounds %struct.HandleList, ptr %51, i64 -1
  %53 = getelementptr inbounds %struct.HandleList, ptr %52, i32 0, i32 4
  %54 = load i32, ptr %53, align 4, !tbaa !16
  %55 = icmp eq i32 %54, 262587807
  br i1 %55, label %56, label %136

56:                                               ; preds = %49, %42
  %57 = load i32, ptr %6, align 4, !tbaa !9
  %58 = icmp eq i32 %57, 1
  br i1 %58, label %59, label %69

59:                                               ; preds = %56
  %60 = load i64, ptr %7, align 8, !tbaa !14
  %61 = inttoptr i64 %60 to ptr
  %62 = load ptr, ptr %1, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.MList, ptr %62, i32 0, i32 1
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  %65 = load i32, ptr %5, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds ptr, ptr %64, i64 %66
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef %61, ptr noundef %68, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %135

69:                                               ; preds = %56
  %70 = load i32, ptr %6, align 4, !tbaa !9
  %71 = icmp eq i32 %70, 2
  br i1 %71, label %72, label %82

72:                                               ; preds = %69
  %73 = load i64, ptr %7, align 8, !tbaa !14
  %74 = inttoptr i64 %73 to ptr
  %75 = load ptr, ptr %1, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.MList, ptr %75, i32 0, i32 1
  %77 = load ptr, ptr %76, align 8, !tbaa !11
  %78 = load i32, ptr %5, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %77, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef %74, ptr noundef %81, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef null, i32 noundef 0)
  br label %134

82:                                               ; preds = %69
  %83 = load i32, ptr %6, align 4, !tbaa !9
  %84 = icmp eq i32 %83, 3
  br i1 %84, label %85, label %110

85:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store i64 0, ptr %8, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store i64 0, ptr %9, align 8, !tbaa !14
  %86 = load i64, ptr %8, align 8, !tbaa !14
  %87 = load i64, ptr %9, align 8, !tbaa !14
  %88 = icmp ne i64 %86, %87
  br i1 %88, label %89, label %99

89:                                               ; preds = %85
  %90 = load i64, ptr %7, align 8, !tbaa !14
  %91 = inttoptr i64 %90 to ptr
  %92 = load ptr, ptr %1, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.MList, ptr %92, i32 0, i32 1
  %94 = load ptr, ptr %93, align 8, !tbaa !11
  %95 = load i32, ptr %5, align 4, !tbaa !9
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds ptr, ptr %94, i64 %96
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef %91, ptr noundef %98, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef 0)
  br label %109

99:                                               ; preds = %85
  %100 = load i64, ptr %7, align 8, !tbaa !14
  %101 = inttoptr i64 %100 to ptr
  %102 = load ptr, ptr %1, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.MList, ptr %102, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !11
  %105 = load i32, ptr %5, align 4, !tbaa !9
  %106 = sext i32 %105 to i64
  %107 = getelementptr inbounds ptr, ptr %104, i64 %106
  %108 = load ptr, ptr %107, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef %101, ptr noundef %108, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef null, i32 noundef -1)
  br label %109

109:                                              ; preds = %99, %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  br label %133

110:                                              ; preds = %82
  %111 = load i32, ptr %6, align 4, !tbaa !9
  %112 = icmp eq i32 %111, 4
  br i1 %112, label %113, label %123

113:                                              ; preds = %110
  %114 = load i64, ptr %7, align 8, !tbaa !14
  %115 = inttoptr i64 %114 to ptr
  %116 = load ptr, ptr %1, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.MList, ptr %116, i32 0, i32 1
  %118 = load ptr, ptr %117, align 8, !tbaa !11
  %119 = load i32, ptr %5, align 4, !tbaa !9
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds ptr, ptr %118, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef %115, ptr noundef %122, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  br label %132

123:                                              ; preds = %110
  br label %124

124:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 1, ptr %10, align 4, !tbaa !9
  %125 = load i32, ptr %10, align 4, !tbaa !9
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %129

127:                                              ; preds = %124
  %128 = load i32, ptr %10, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %128, i32 noundef -1, ptr noundef @.str.6, i32 noundef 66, ptr noundef @__FUNCTION__.test_adjust, ptr noundef @.str.7)
  br label %129

129:                                              ; preds = %127, %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131, %113
  br label %133

133:                                              ; preds = %132, %109
  br label %134

134:                                              ; preds = %133, %72
  br label %135

135:                                              ; preds = %134, %59
  br label %209

136:                                              ; preds = %49
  %137 = load i32, ptr %6, align 4, !tbaa !9
  %138 = icmp eq i32 %137, 0
  br i1 %138, label %139, label %142

139:                                              ; preds = %136
  %140 = load i64, ptr %7, align 8, !tbaa !14
  %141 = inttoptr i64 %140 to ptr
  call void @m_ThreadPool(ptr noundef null, ptr noundef %141, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %208

142:                                              ; preds = %136
  %143 = load i32, ptr %6, align 4, !tbaa !9
  %144 = icmp eq i32 %143, 1
  br i1 %144, label %145, label %155

145:                                              ; preds = %142
  %146 = load i64, ptr %7, align 8, !tbaa !14
  %147 = inttoptr i64 %146 to ptr
  %148 = load ptr, ptr %1, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.MList, ptr %148, i32 0, i32 1
  %150 = load ptr, ptr %149, align 8, !tbaa !11
  %151 = load i32, ptr %5, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = getelementptr inbounds ptr, ptr %150, i64 %152
  %154 = load ptr, ptr %153, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef null, ptr noundef %147, ptr noundef %154, ptr noundef null, i32 noundef 0)
  br label %207

155:                                              ; preds = %142
  %156 = load i32, ptr %6, align 4, !tbaa !9
  %157 = icmp eq i32 %156, 2
  br i1 %157, label %158, label %183

158:                                              ; preds = %155
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  store i64 0, ptr %11, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  store i64 0, ptr %12, align 8, !tbaa !14
  %159 = load i64, ptr %11, align 8, !tbaa !14
  %160 = load i64, ptr %12, align 8, !tbaa !14
  %161 = icmp ne i64 %159, %160
  br i1 %161, label %162, label %172

162:                                              ; preds = %158
  %163 = load i64, ptr %7, align 8, !tbaa !14
  %164 = inttoptr i64 %163 to ptr
  %165 = load ptr, ptr %1, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.MList, ptr %165, i32 0, i32 1
  %167 = load ptr, ptr %166, align 8, !tbaa !11
  %168 = load i32, ptr %5, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds ptr, ptr %167, i64 %169
  %171 = load ptr, ptr %170, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef null, ptr noundef %164, ptr noundef %171, ptr noundef inttoptr (i64 -1 to ptr), i32 noundef 0)
  br label %182

172:                                              ; preds = %158
  %173 = load i64, ptr %7, align 8, !tbaa !14
  %174 = inttoptr i64 %173 to ptr
  %175 = load ptr, ptr %1, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.MList, ptr %175, i32 0, i32 1
  %177 = load ptr, ptr %176, align 8, !tbaa !11
  %178 = load i32, ptr %5, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds ptr, ptr %177, i64 %179
  %181 = load ptr, ptr %180, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef null, ptr noundef %174, ptr noundef %181, ptr noundef null, i32 noundef -1)
  br label %182

182:                                              ; preds = %172, %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %206

183:                                              ; preds = %155
  %184 = load i32, ptr %6, align 4, !tbaa !9
  %185 = icmp eq i32 %184, 3
  br i1 %185, label %186, label %196

186:                                              ; preds = %183
  %187 = load i64, ptr %7, align 8, !tbaa !14
  %188 = inttoptr i64 %187 to ptr
  %189 = load ptr, ptr %1, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.MList, ptr %189, i32 0, i32 1
  %191 = load ptr, ptr %190, align 8, !tbaa !11
  %192 = load i32, ptr %5, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds ptr, ptr %191, i64 %193
  %195 = load ptr, ptr %194, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef null, ptr noundef %188, ptr noundef %195, ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  br label %205

196:                                              ; preds = %183
  br label %197

197:                                              ; preds = %196
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 1, ptr %13, align 4, !tbaa !9
  %198 = load i32, ptr %13, align 4, !tbaa !9
  %199 = icmp ne i32 %198, 0
  br i1 %199, label %200, label %202

200:                                              ; preds = %197
  %201 = load i32, ptr %13, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %201, i32 noundef -1, ptr noundef @.str.6, i32 noundef 66, ptr noundef @__FUNCTION__.test_adjust, ptr noundef @.str.7)
  br label %202

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

203:                                              ; preds = %202
  br label %204

204:                                              ; preds = %203
  br label %205

205:                                              ; preds = %204, %186
  br label %206

206:                                              ; preds = %205, %182
  br label %207

207:                                              ; preds = %206, %145
  br label %208

208:                                              ; preds = %207, %139
  br label %209

209:                                              ; preds = %208, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %210

210:                                              ; preds = %209
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  %213 = load i32, ptr %5, align 4, !tbaa !9
  %214 = add nsw i32 %213, 1
  store i32 %214, ptr %5, align 4, !tbaa !9
  br label %26, !llvm.loop !18

215:                                              ; preds = %29
  %216 = call ptr @mMornObject(ptr noundef @.str.2, i32 noundef -1)
  %217 = call ptr @m_PropertyRead(ptr noundef %216, ptr noundef @.str.3, ptr noundef %2, ptr noundef null)
  %218 = call ptr @mMornObject(ptr noundef @.str.2, i32 noundef -1)
  %219 = call ptr @m_PropertyWrite(ptr noundef %218, ptr noundef @.str.8, ptr noundef null, i32 noundef -1)
  %220 = load i32, ptr %2, align 4, !tbaa !9
  %221 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %220)
  %222 = load ptr, ptr %1, align 8, !tbaa !5
  call void @mListRelease(ptr noundef %222)
  %223 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  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 4, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #3
  ret void
}

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, !6, i64 8}
!12 = !{!"MList", !10, i64 0, !6, i64 8}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !10, i64 28}
!17 = !{!"HandleList", !12, i64 0, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28}
!18 = distinct !{!18, !19}
!19 = !{!"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.2 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [11 x i8], align 1
@__FUNCTION__.test_adjust = external hidden unnamed_addr constant [12 x i8], align 1

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

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

declare i32 @usleep(i32 noundef) local_unnamed_addr #2

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

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

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

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

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

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

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

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

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

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

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

declare void @mListRelease(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @test_adjust() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call ptr @ListCreate(i32 noundef -1, ptr noundef null) #4
  tail call void @mListPlace(ptr noundef %4, ptr noundef null, i32 noundef 1024, i32 noundef 64) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #4
  store i32 2, ptr %1, align 4, !tbaa !5
  %5 = tail call ptr @mMornObject(ptr noundef nonnull @.str.2, i32 noundef -1) #4
  %6 = call ptr @m_PropertyWrite(ptr noundef %5, ptr noundef nonnull @.str.3, ptr noundef nonnull %1, i32 noundef 4) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #4
  store i32 1, ptr %2, align 4, !tbaa !5
  %7 = call ptr @mMornObject(ptr noundef nonnull @.str.2, i32 noundef -1) #4
  %8 = call ptr @m_PropertyWrite(ptr noundef %7, ptr noundef nonnull @.str.10, 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
  %9 = call ptr @mMornObject(ptr noundef nonnull @.str.2, i32 noundef -1) #4
  %10 = call ptr @m_PropertyWrite(ptr noundef %9, ptr noundef nonnull @.str.11, ptr noundef nonnull %3, i32 noundef 4) #4
  %11 = call ptr @mMornObject(ptr noundef nonnull @.str.2, i32 noundef -1) #4
  %12 = call ptr @m_PropertyRead(ptr noundef %11, ptr noundef nonnull @.str.3, ptr noundef nonnull %1, ptr noundef null) #4
  %13 = load i32, ptr %1, align 4, !tbaa !5
  %14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %13)
  %15 = getelementptr inbounds i8, ptr %4, i64 8
  %16 = load i8, ptr @.str.5, align 1
  %.fr = freeze i8 %16
  %.not = icmp eq i8 %.fr, 0
  br i1 %.not, label %.split.us, label %.split

.split.us:                                        ; preds = %0, %28
  %indvars.iv56 = phi i64 [ %indvars.iv.next57, %28 ], [ 0, %0 ]
  %17 = call i32 @m_Rand(i32 noundef 0, i32 noundef 30) #4
  %18 = mul nsw i32 %17, 1000
  %19 = call i32 @usleep(i32 noundef %18) #4
  %20 = load ptr, ptr %15, align 8, !tbaa !9
  %21 = getelementptr inbounds ptr, ptr %20, i64 %indvars.iv56
  %22 = load ptr, ptr %21, align 8, !tbaa !12
  %23 = call i32 @m_RandString(ptr noundef %22, i32 noundef 32, i32 noundef 64) #4
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @func, i64 -4), align 4, !tbaa !13
  %25 = icmp eq i32 %24, 262587807
  br i1 %25, label %27, label %26

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

27:                                               ; preds = %.split.us
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef 1, i32 noundef -1, ptr noundef nonnull @.str.6, i32 noundef 66, ptr noundef nonnull @__FUNCTION__.test_adjust, ptr noundef nonnull @.str.7) #4
  br label %28

28:                                               ; preds = %27, %26
  %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1
  %exitcond59.not = icmp eq i64 %indvars.iv.next57, 1024
  br i1 %exitcond59.not, label %.split53.us, label %.split.us, !llvm.loop !15

.split53.us:                                      ; preds = %50, %28
  %29 = call ptr @mMornObject(ptr noundef nonnull @.str.2, i32 noundef -1) #4
  %30 = call ptr @m_PropertyRead(ptr noundef %29, ptr noundef nonnull @.str.3, ptr noundef nonnull %1, ptr noundef null) #4
  %31 = call ptr @mMornObject(ptr noundef nonnull @.str.2, i32 noundef -1) #4
  %32 = call ptr @m_PropertyWrite(ptr noundef %31, ptr noundef nonnull @.str.8, ptr noundef null, i32 noundef -1) #4
  %33 = load i32, ptr %1, align 4, !tbaa !5
  %34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %33)
  call void @mListRelease(ptr noundef nonnull %4) #4
  %35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  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 4, ptr nonnull %1) #4
  ret void

.split:                                           ; preds = %0, %50
  %indvars.iv = phi i64 [ %indvars.iv.next, %50 ], [ 0, %0 ]
  %36 = call i32 @m_Rand(i32 noundef 0, i32 noundef 30) #4
  %37 = mul nsw i32 %36, 1000
  %38 = call i32 @usleep(i32 noundef %37) #4
  %39 = load ptr, ptr %15, align 8, !tbaa !9
  %40 = getelementptr inbounds ptr, ptr %39, i64 %indvars.iv
  %41 = load ptr, ptr %40, align 8, !tbaa !12
  %42 = call i32 @m_RandString(ptr noundef %41, i32 noundef 32, i32 noundef 64) #4
  %43 = load i32, ptr getelementptr inbounds (i8, ptr @func, i64 -4), align 4, !tbaa !13
  %44 = icmp eq i32 %43, 262587807
  %45 = load ptr, ptr %15, align 8, !tbaa !9
  %46 = getelementptr inbounds ptr, ptr %45, i64 %indvars.iv
  %47 = load ptr, ptr %46, align 8, !tbaa !12
  br i1 %44, label %48, label %49

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

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

50:                                               ; preds = %49, %48
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, 1024
  br i1 %exitcond.not, label %.split53.us, label %.split, !llvm.loop !15
}

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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !11, i64 8}
!10 = !{!"MList", !6, i64 0, !11, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !6, i64 28}
!14 = !{!"HandleList", !10, i64 0, !6, i64 16, !6, i64 20, !6, i64 24, !6, i64 28}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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