; 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
@__FUNCTION__.test_no_adjust = external hidden unnamed_addr constant [15 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

; 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

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

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

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

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 ptr, ptr %1, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.MList, ptr %28, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !11
  %31 = load i32, ptr %3, align 4, !tbaa !9
  %32 = sext i32 %31 to i64
  %33 = getelementptr inbounds ptr, ptr %30, i64 %32
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  %35 = call i32 @m_RandString(ptr noundef %34, i32 noundef 32, i32 noundef 64)
  br label %36

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

43:                                               ; preds = %36
  %44 = load i64, ptr %5, align 8, !tbaa !14
  %45 = inttoptr i64 %44 to ptr
  %46 = getelementptr inbounds %struct.HandleList, ptr %45, i64 -1
  %47 = getelementptr inbounds %struct.HandleList, ptr %46, i32 0, i32 4
  %48 = load i32, ptr %47, align 4, !tbaa !16
  %49 = icmp eq i32 %48, 262587807
  br i1 %49, label %50, label %130

50:                                               ; preds = %43, %36
  %51 = load i32, ptr %4, align 4, !tbaa !9
  %52 = icmp eq i32 %51, 1
  br i1 %52, label %53, label %63

53:                                               ; preds = %50
  %54 = load i64, ptr %5, align 8, !tbaa !14
  %55 = inttoptr i64 %54 to ptr
  %56 = load ptr, ptr %1, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.MList, ptr %56, i32 0, i32 1
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = load i32, ptr %3, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds ptr, ptr %58, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef %55, ptr noundef %62, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %129

63:                                               ; preds = %50
  %64 = load i32, ptr %4, align 4, !tbaa !9
  %65 = icmp eq i32 %64, 2
  br i1 %65, label %66, label %76

66:                                               ; preds = %63
  %67 = load i64, ptr %5, align 8, !tbaa !14
  %68 = inttoptr i64 %67 to ptr
  %69 = load ptr, ptr %1, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.MList, ptr %69, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !11
  %72 = load i32, ptr %3, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds ptr, ptr %71, i64 %73
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef %68, ptr noundef %75, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef null, i32 noundef 0)
  br label %128

76:                                               ; preds = %63
  %77 = load i32, ptr %4, align 4, !tbaa !9
  %78 = icmp eq i32 %77, 3
  br i1 %78, label %79, label %104

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store i64 0, ptr %6, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store i64 0, ptr %7, align 8, !tbaa !14
  %80 = load i64, ptr %6, align 8, !tbaa !14
  %81 = load i64, ptr %7, align 8, !tbaa !14
  %82 = icmp ne i64 %80, %81
  br i1 %82, label %83, label %93

83:                                               ; preds = %79
  %84 = load i64, ptr %5, align 8, !tbaa !14
  %85 = inttoptr i64 %84 to ptr
  %86 = load ptr, ptr %1, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.MList, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !11
  %89 = load i32, ptr %3, align 4, !tbaa !9
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds ptr, ptr %88, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef %85, ptr noundef %92, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef 0)
  br label %103

93:                                               ; preds = %79
  %94 = load i64, ptr %5, align 8, !tbaa !14
  %95 = inttoptr i64 %94 to ptr
  %96 = load ptr, ptr %1, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.MList, ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !11
  %99 = load i32, ptr %3, align 4, !tbaa !9
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds ptr, ptr %98, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef %95, ptr noundef %102, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef null, i32 noundef -1)
  br label %103

103:                                              ; preds = %93, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  br label %127

104:                                              ; preds = %76
  %105 = load i32, ptr %4, align 4, !tbaa !9
  %106 = icmp eq i32 %105, 4
  br i1 %106, label %107, label %117

107:                                              ; preds = %104
  %108 = load i64, ptr %5, align 8, !tbaa !14
  %109 = inttoptr i64 %108 to ptr
  %110 = load ptr, ptr %1, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.MList, ptr %110, i32 0, i32 1
  %112 = load ptr, ptr %111, align 8, !tbaa !11
  %113 = load i32, ptr %3, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds ptr, ptr %112, i64 %114
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef %109, ptr noundef %116, ptr noundef inttoptr (i64 -1 to ptr), ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  br label %126

117:                                              ; preds = %104
  br label %118

118:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  store i32 1, ptr %8, align 4, !tbaa !9
  %119 = load i32, ptr %8, align 4, !tbaa !9
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %123

121:                                              ; preds = %118
  %122 = load i32, ptr %8, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %122, i32 noundef -1, ptr noundef @.str.6, i32 noundef 36, ptr noundef @__FUNCTION__.test_no_adjust, ptr noundef @.str.7)
  br label %123

123:                                              ; preds = %121, %118
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125, %107
  br label %127

127:                                              ; preds = %126, %103
  br label %128

128:                                              ; preds = %127, %66
  br label %129

129:                                              ; preds = %128, %53
  br label %203

130:                                              ; preds = %43
  %131 = load i32, ptr %4, align 4, !tbaa !9
  %132 = icmp eq i32 %131, 0
  br i1 %132, label %133, label %136

133:                                              ; preds = %130
  %134 = load i64, ptr %5, align 8, !tbaa !14
  %135 = inttoptr i64 %134 to ptr
  call void @m_ThreadPool(ptr noundef null, ptr noundef %135, ptr noundef null, ptr noundef null, i32 noundef 0)
  br label %202

136:                                              ; preds = %130
  %137 = load i32, ptr %4, align 4, !tbaa !9
  %138 = icmp eq i32 %137, 1
  br i1 %138, label %139, label %149

139:                                              ; preds = %136
  %140 = load i64, ptr %5, align 8, !tbaa !14
  %141 = inttoptr i64 %140 to ptr
  %142 = load ptr, ptr %1, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.MList, ptr %142, i32 0, i32 1
  %144 = load ptr, ptr %143, align 8, !tbaa !11
  %145 = load i32, ptr %3, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds ptr, ptr %144, i64 %146
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef null, ptr noundef %141, ptr noundef %148, ptr noundef null, i32 noundef 0)
  br label %201

149:                                              ; preds = %136
  %150 = load i32, ptr %4, align 4, !tbaa !9
  %151 = icmp eq i32 %150, 2
  br i1 %151, label %152, label %177

152:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store i64 0, ptr %9, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store i64 0, ptr %10, align 8, !tbaa !14
  %153 = load i64, ptr %9, align 8, !tbaa !14
  %154 = load i64, ptr %10, align 8, !tbaa !14
  %155 = icmp ne i64 %153, %154
  br i1 %155, label %156, label %166

156:                                              ; preds = %152
  %157 = load i64, ptr %5, align 8, !tbaa !14
  %158 = inttoptr i64 %157 to ptr
  %159 = load ptr, ptr %1, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.MList, ptr %159, i32 0, i32 1
  %161 = load ptr, ptr %160, align 8, !tbaa !11
  %162 = load i32, ptr %3, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds ptr, ptr %161, i64 %163
  %165 = load ptr, ptr %164, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef null, ptr noundef %158, ptr noundef %165, ptr noundef inttoptr (i64 -1 to ptr), i32 noundef 0)
  br label %176

166:                                              ; preds = %152
  %167 = load i64, ptr %5, align 8, !tbaa !14
  %168 = inttoptr i64 %167 to ptr
  %169 = load ptr, ptr %1, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.MList, ptr %169, i32 0, i32 1
  %171 = load ptr, ptr %170, align 8, !tbaa !11
  %172 = load i32, ptr %3, align 4, !tbaa !9
  %173 = sext i32 %172 to i64
  %174 = getelementptr inbounds ptr, ptr %171, i64 %173
  %175 = load ptr, ptr %174, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef null, ptr noundef %168, ptr noundef %175, ptr noundef null, i32 noundef -1)
  br label %176

176:                                              ; preds = %166, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %200

177:                                              ; preds = %149
  %178 = load i32, ptr %4, align 4, !tbaa !9
  %179 = icmp eq i32 %178, 3
  br i1 %179, label %180, label %190

180:                                              ; preds = %177
  %181 = load i64, ptr %5, align 8, !tbaa !14
  %182 = inttoptr i64 %181 to ptr
  %183 = load ptr, ptr %1, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.MList, ptr %183, i32 0, i32 1
  %185 = load ptr, ptr %184, align 8, !tbaa !11
  %186 = load i32, ptr %3, align 4, !tbaa !9
  %187 = sext i32 %186 to i64
  %188 = getelementptr inbounds ptr, ptr %185, i64 %187
  %189 = load ptr, ptr %188, align 8, !tbaa !5
  call void @m_ThreadPool(ptr noundef null, ptr noundef %182, ptr noundef %189, ptr noundef inttoptr (i64 -1 to ptr), i32 noundef -1)
  br label %199

190:                                              ; preds = %177
  br label %191

191:                                              ; preds = %190
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  store i32 1, ptr %11, align 4, !tbaa !9
  %192 = load i32, ptr %11, align 4, !tbaa !9
  %193 = icmp ne i32 %192, 0
  br i1 %193, label %194, label %196

194:                                              ; preds = %191
  %195 = load i32, ptr %11, align 4, !tbaa !9
  call void (i32, i32, ptr, i32, ptr, ptr, ...) @m_Exception(i32 noundef %195, i32 noundef -1, ptr noundef @.str.6, i32 noundef 36, ptr noundef @__FUNCTION__.test_no_adjust, ptr noundef @.str.7)
  br label %196

196:                                              ; preds = %194, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %197

197:                                              ; preds = %196
  br label %198

198:                                              ; preds = %197
  br label %199

199:                                              ; preds = %198, %180
  br label %200

200:                                              ; preds = %199, %176
  br label %201

201:                                              ; preds = %200, %139
  br label %202

202:                                              ; preds = %201, %133
  br label %203

203:                                              ; preds = %202, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #3
  br label %204

204:                                              ; preds = %203
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %3, align 4, !tbaa !9
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %3, align 4, !tbaa !9
  br label %20, !llvm.loop !18

209:                                              ; preds = %23
  %210 = call ptr @mMornObject(ptr noundef @.str.2, i32 noundef -1)
  %211 = call ptr @m_PropertyRead(ptr noundef %210, ptr noundef @.str.3, ptr noundef %2, ptr noundef null)
  %212 = call ptr @mMornObject(ptr noundef @.str.2, i32 noundef -1)
  %213 = call ptr @m_PropertyWrite(ptr noundef %212, ptr noundef @.str.8, ptr noundef null, i32 noundef -1)
  %214 = load i32, ptr %2, align 4, !tbaa !9
  %215 = call i32 (ptr, ...) @printf(ptr noundef @.str.4, i32 noundef %214)
  %216 = load ptr, ptr %1, align 8, !tbaa !5
  call void @mListRelease(ptr noundef %216)
  %217 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #3
  ret void
}

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

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
@__FUNCTION__.test_no_adjust = external hidden unnamed_addr constant [15 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

; 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

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

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

20:                                               ; 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 %22

21:                                               ; 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 36, ptr noundef nonnull @__FUNCTION__.test_no_adjust, ptr noundef nonnull @.str.7) #4
  br label %22

22:                                               ; preds = %21, %20
  %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 = %44, %22
  %23 = call ptr @mMornObject(ptr noundef nonnull @.str.2, i32 noundef -1) #4
  %24 = call ptr @m_PropertyRead(ptr noundef %23, ptr noundef nonnull @.str.3, ptr noundef nonnull %1, ptr noundef null) #4
  %25 = call ptr @mMornObject(ptr noundef nonnull @.str.2, i32 noundef -1) #4
  %26 = call ptr @m_PropertyWrite(ptr noundef %25, ptr noundef nonnull @.str.8, ptr noundef null, i32 noundef -1) #4
  %27 = load i32, ptr %1, align 4, !tbaa !5
  %28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %27)
  call void @mListRelease(ptr noundef nonnull %2) #4
  %29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #4
  ret void

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

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

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

44:                                               ; preds = %43, %42
  %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
}

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

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