; LLVM IR from Softmotions/iowow :: src/utils (iwtp)

; 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.iwtp = type { ptr, ptr, %union.pthread_mutex_t, %union.pthread_cond_t, %struct.iwulist, ptr, i32, i32, i32, i32, i32, i8, i8 }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%union.pthread_cond_t = type { %struct.__pthread_cond_s }
%struct.__pthread_cond_s = type { %union.__atomic_wide_counter, %union.__atomic_wide_counter, [2 x i32], [2 x i32], i32, i32, [2 x i32] }
%union.__atomic_wide_counter = type { i64 }
%struct.iwulist = type { ptr, i64, i64, i64, i64 }
%struct._task = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [63 x i8], align 1

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

; Function Attrs: nounwind
declare i32 @pthread_mutex_lock(ptr noundef) #1

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(ptr noundef) #1

declare void @iwlog2(i32 noundef, i64 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #2

declare i64 @iwulist_length(ptr noundef) #2

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @iwtp_shutdown(ptr noundef %0, i1 noundef zeroext %1) #3 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %15 = zext i1 %1 to i8
  store i8 %15, ptr %5, align 1, !tbaa !9
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %18, label %22

18:                                               ; preds = %2
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %19, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %23, label %22

22:                                               ; preds = %18, %2
  store i64 0, ptr %3, align 8
  br label %115

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = load ptr, ptr %24, align 8, !tbaa !5
  store ptr %25, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store ptr null, ptr %7, align 8, !tbaa !5
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.iwtp, ptr %26, i32 0, i32 2
  %28 = call i32 @pthread_mutex_lock(ptr noundef %27) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %29 = call i64 @pthread_self() #6
  store i64 %29, ptr %8, align 8, !tbaa !11
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.iwtp, ptr %30, i32 0, i32 4
  %32 = call i64 @iwulist_find_first(ptr noundef %31, ptr noundef %8)
  %33 = icmp ne i64 %32, -1
  br i1 %33, label %34, label %39

34:                                               ; preds = %23
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.iwtp, ptr %35, i32 0, i32 2
  %37 = call i32 @pthread_mutex_unlock(ptr noundef %36) #5
  %38 = load i64, ptr %8, align 8, !tbaa !11
  call void (i32, i64, ptr, i32, ptr, ...) @iwlog2(i32 noundef 0, i64 noundef 0, ptr noundef @.str, i32 noundef 257, ptr noundef @.str.4, i64 noundef %38)
  store i64 70009, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %114

39:                                               ; preds = %23
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.iwtp, ptr %40, i32 0, i32 12
  %42 = load i8, ptr %41, align 1, !tbaa !13, !range !17, !noundef !18
  %43 = trunc i8 %42 to i1
  br i1 %43, label %44, label %48

44:                                               ; preds = %39
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.iwtp, ptr %45, i32 0, i32 2
  %47 = call i32 @pthread_mutex_unlock(ptr noundef %46) #5
  store i64 0, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %114

48:                                               ; preds = %39
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr null, ptr %49, align 8, !tbaa !5
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.iwtp, ptr %50, i32 0, i32 12
  store i8 1, ptr %51, align 1, !tbaa !13
  %52 = load i8, ptr %5, align 1, !tbaa !9, !range !17, !noundef !18
  %53 = trunc i8 %52 to i1
  br i1 %53, label %74, label %54

54:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.iwtp, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !19
  store ptr %57, ptr %10, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %61, %54
  %59 = load ptr, ptr %10, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %67

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %62, ptr %11, align 8, !tbaa !5
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct._task, ptr %63, i32 0, i32 2
  %65 = load ptr, ptr %64, align 8, !tbaa !20
  store ptr %65, ptr %10, align 8, !tbaa !5
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %66) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %58, !llvm.loop !22

67:                                               ; preds = %58
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.iwtp, ptr %68, i32 0, i32 0
  store ptr null, ptr %69, align 8, !tbaa !19
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.iwtp, ptr %70, i32 0, i32 1
  store ptr null, ptr %71, align 8, !tbaa !24
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.iwtp, ptr %72, i32 0, i32 10
  store i32 0, ptr %73, align 8, !tbaa !25
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %74

74:                                               ; preds = %67, %48
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.iwtp, ptr %75, i32 0, i32 4
  %77 = call ptr @iwulist_clone(ptr noundef %76)
  store ptr %77, ptr %7, align 8, !tbaa !5
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.iwtp, ptr %78, i32 0, i32 3
  %80 = call i32 @pthread_cond_broadcast(ptr noundef %79) #5
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.iwtp, ptr %81, i32 0, i32 2
  %83 = call i32 @pthread_mutex_unlock(ptr noundef %82) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store i64 0, ptr %12, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = call i64 @iwulist_length(ptr noundef %84)
  store i64 %85, ptr %13, align 8, !tbaa !11
  br label %86

86:                                               ; preds = %98, %74
  %87 = load i64, ptr %12, align 8, !tbaa !11
  %88 = load i64, ptr %13, align 8, !tbaa !11
  %89 = icmp ult i64 %87, %88
  br i1 %89, label %91, label %90

90:                                               ; preds = %86
  store i32 4, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %101

91:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i64, ptr %12, align 8, !tbaa !11
  %94 = call ptr @iwulist_at2(ptr noundef %92, i64 noundef %93)
  %95 = load i64, ptr %94, align 8, !tbaa !11
  store i64 %95, ptr %14, align 8, !tbaa !11
  %96 = load i64, ptr %14, align 8, !tbaa !11
  %97 = call i32 @pthread_join(i64 noundef %96, ptr noundef null)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %98

98:                                               ; preds = %91
  %99 = load i64, ptr %12, align 8, !tbaa !11
  %100 = add i64 %99, 1
  store i64 %100, ptr %12, align 8, !tbaa !11
  br label %86, !llvm.loop !26

101:                                              ; preds = %90
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.iwtp, ptr %102, i32 0, i32 3
  %104 = call i32 @pthread_cond_destroy(ptr noundef %103) #5
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.iwtp, ptr %105, i32 0, i32 2
  %107 = call i32 @pthread_mutex_destroy(ptr noundef %106) #5
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.iwtp, ptr %108, i32 0, i32 4
  call void @iwulist_destroy_keep(ptr noundef %109)
  call void @iwulist_destroy(ptr noundef %7)
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.iwtp, ptr %110, i32 0, i32 5
  %112 = load ptr, ptr %111, align 8, !tbaa !27
  call void @free(ptr noundef %112) #5
  %113 = load ptr, ptr %6, align 8, !tbaa !5
  call void @free(ptr noundef %113) #5
  store i64 0, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %114

114:                                              ; preds = %101, %44, %34
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %115

115:                                              ; preds = %114, %22
  %116 = load i64, ptr %3, align 8
  ret i64 %116
}

; Function Attrs: nounwind willreturn memory(none)
declare i64 @pthread_self() #4

declare i64 @iwulist_find_first(ptr noundef, ptr noundef) #2

declare ptr @iwulist_clone(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @pthread_cond_broadcast(ptr noundef) #1

declare ptr @iwulist_at2(ptr noundef, i64 noundef) #2

declare i32 @pthread_join(i64 noundef, ptr noundef) #2

; Function Attrs: nounwind
declare i32 @pthread_cond_destroy(ptr noundef) #1

; Function Attrs: nounwind
declare i32 @pthread_mutex_destroy(ptr noundef) #1

declare void @iwulist_destroy_keep(ptr noundef) #2

declare void @iwulist_destroy(ptr noundef) #2

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

!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 = !{!"_Bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 173}
!14 = !{!"iwtp", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 56, !15, i64 104, !6, i64 144, !16, i64 152, !16, i64 156, !16, i64 160, !16, i64 164, !16, i64 168, !10, i64 172, !10, i64 173}
!15 = !{!"iwulist", !6, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32}
!16 = !{!"int", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!14, !6, i64 0}
!20 = !{!21, !6, i64 16}
!21 = !{!"_task", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!14, !6, i64 8}
!25 = !{!14, !16, i64 168}
!26 = distinct !{!26, !23}
!27 = !{!14, !6, i64 144}


; 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 [68 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [63 x i8], align 1

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

; Function Attrs: nounwind
declare i32 @pthread_mutex_lock(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(ptr noundef) local_unnamed_addr #1

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

declare i64 @iwulist_length(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local range(i64 0, 70010) i64 @iwtp_shutdown(ptr noundef %0, i1 noundef zeroext %1) local_unnamed_addr #4 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %43, label %5

5:                                                ; preds = %2
  %6 = load ptr, ptr %0, align 8, !tbaa !5
  %.not36 = icmp eq ptr %6, null
  br i1 %.not36, label %43, label %7

7:                                                ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %8 = getelementptr inbounds i8, ptr %6, i64 16
  %9 = tail call i32 @pthread_mutex_lock(ptr noundef nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %10 = tail call i64 @pthread_self() #8
  store i64 %10, ptr %4, align 8, !tbaa !9
  %11 = getelementptr inbounds i8, ptr %6, i64 104
  %12 = call i64 @iwulist_find_first(ptr noundef nonnull %11, ptr noundef nonnull %4) #7
  %.not37 = icmp eq i64 %12, -1
  br i1 %.not37, label %16, label %13

13:                                               ; preds = %7
  %14 = call i32 @pthread_mutex_unlock(ptr noundef nonnull %8) #7
  %15 = load i64, ptr %4, align 8, !tbaa !9
  call void (i32, i64, ptr, i32, ptr, ...) @iwlog2(i32 noundef 0, i64 noundef 0, ptr noundef nonnull @.str, i32 noundef 257, ptr noundef nonnull @.str.4, i64 noundef %15) #7
  br label %42

16:                                               ; preds = %7
  %17 = getelementptr inbounds i8, ptr %6, i64 173
  %18 = load i8, ptr %17, align 1, !tbaa !11, !range !16, !noundef !17
  %19 = trunc nuw i8 %18 to i1
  br i1 %19, label %20, label %22

20:                                               ; preds = %16
  %21 = call i32 @pthread_mutex_unlock(ptr noundef nonnull %8) #7
  br label %42

22:                                               ; preds = %16
  store ptr null, ptr %0, align 8, !tbaa !5
  store i8 1, ptr %17, align 1, !tbaa !11
  br i1 %1, label %28, label %23

23:                                               ; preds = %22
  %24 = load ptr, ptr %6, align 8, !tbaa !18
  %.not3839 = icmp eq ptr %24, null
  br i1 %.not3839, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %23, %.lr.ph
  %.03340 = phi ptr [ %26, %.lr.ph ], [ %24, %23 ]
  %25 = getelementptr inbounds i8, ptr %.03340, i64 16
  %26 = load ptr, ptr %25, align 8, !tbaa !19
  call void @free(ptr noundef nonnull %.03340) #7
  %.not38 = icmp eq ptr %26, null
  br i1 %.not38, label %._crit_edge, label %.lr.ph, !llvm.loop !21

._crit_edge:                                      ; preds = %.lr.ph, %23
  %27 = getelementptr inbounds i8, ptr %6, i64 168
  store i32 0, ptr %27, align 8, !tbaa !23
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, i8 0, i64 16, i1 false)
  br label %28

28:                                               ; preds = %._crit_edge, %22
  %29 = call ptr @iwulist_clone(ptr noundef nonnull %11) #7
  store ptr %29, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %6, i64 56
  %31 = call i32 @pthread_cond_broadcast(ptr noundef nonnull %30) #7
  %32 = call i32 @pthread_mutex_unlock(ptr noundef nonnull %8) #7
  %33 = call i64 @iwulist_length(ptr noundef %29) #7
  %.not45 = icmp eq i64 %33, 0
  br i1 %.not45, label %._crit_edge44, label %.lr.ph43

._crit_edge44:                                    ; preds = %.lr.ph43, %28
  %34 = call i32 @pthread_cond_destroy(ptr noundef nonnull %30) #7
  %35 = call i32 @pthread_mutex_destroy(ptr noundef nonnull %8) #7
  call void @iwulist_destroy_keep(ptr noundef nonnull %11) #7
  call void @iwulist_destroy(ptr noundef nonnull %3) #7
  %36 = getelementptr inbounds i8, ptr %6, i64 144
  %37 = load ptr, ptr %36, align 8, !tbaa !24
  call void @free(ptr noundef %37) #7
  call void @free(ptr noundef %6) #7
  br label %42

.lr.ph43:                                         ; preds = %28, %.lr.ph43
  %.03241 = phi i64 [ %41, %.lr.ph43 ], [ 0, %28 ]
  %38 = call ptr @iwulist_at2(ptr noundef %29, i64 noundef %.03241) #7
  %39 = load i64, ptr %38, align 8, !tbaa !9
  %40 = call i32 @pthread_join(i64 noundef %39, ptr noundef null) #7
  %41 = add nuw i64 %.03241, 1
  %exitcond.not = icmp eq i64 %41, %33
  br i1 %exitcond.not, label %._crit_edge44, label %.lr.ph43, !llvm.loop !25

42:                                               ; preds = %._crit_edge44, %20, %13
  %.0 = phi i64 [ 70009, %13 ], [ 0, %20 ], [ 0, %._crit_edge44 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %43

43:                                               ; preds = %2, %5, %42
  %.1 = phi i64 [ %.0, %42 ], [ 0, %5 ], [ 0, %2 ]
  ret i64 %.1
}

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare i64 @pthread_self() local_unnamed_addr #5

declare i64 @iwulist_find_first(ptr noundef, ptr noundef) local_unnamed_addr #2

declare ptr @iwulist_clone(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @pthread_cond_broadcast(ptr noundef) local_unnamed_addr #1

declare ptr @iwulist_at2(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @pthread_join(i64 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @pthread_cond_destroy(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare i32 @pthread_mutex_destroy(ptr noundef) local_unnamed_addr #1

declare void @iwulist_destroy_keep(ptr noundef) local_unnamed_addr #2

declare void @iwulist_destroy(ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !15, i64 173}
!12 = !{!"iwtp", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 56, !13, i64 104, !6, i64 144, !14, i64 152, !14, i64 156, !14, i64 160, !14, i64 164, !14, i64 168, !15, i64 172, !15, i64 173}
!13 = !{!"iwulist", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!12, !6, i64 0}
!19 = !{!20, !6, i64 16}
!20 = !{!"_task", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!12, !14, i64 168}
!24 = !{!12, !6, i64 144}
!25 = distinct !{!25, !22}


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