; LLVM IR from dnbaker/sketch :: kthread.ll (Z11kt_pipelineiPFPvS_iS_ES_i)

; 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.ktp_t = type { ptr, ptr, i64, i32, i32, ptr, %union.pthread_mutex_t, %union.pthread_cond_t }
%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.ktp_worker_t = type { ptr, i64, i32, ptr }

; 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_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @pthread_join(i64 noundef, 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 i32 @pthread_mutex_init(ptr noundef, ptr noundef) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11kt_pipelineiPFPvS_iS_ES_i(i32 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) #3 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %struct.ktp_t, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  store i32 %0, ptr %5, align 4, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 128, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %13 = load i32, ptr %5, align 4, !tbaa !5
  %14 = icmp slt i32 %13, 1
  br i1 %14, label %15, label %16

15:                                               ; preds = %4
  store i32 1, ptr %5, align 4, !tbaa !5
  br label %16

16:                                               ; preds = %15, %4
  %17 = load i32, ptr %5, align 4, !tbaa !5
  %18 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 3
  store i32 %17, ptr %18, align 8, !tbaa !11
  %19 = load i32, ptr %8, align 4, !tbaa !5
  %20 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 4
  store i32 %19, ptr %20, align 4, !tbaa !14
  %21 = load ptr, ptr %6, align 8, !tbaa !9
  %22 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 1
  store ptr %21, ptr %22, align 8, !tbaa !15
  %23 = load ptr, ptr %7, align 8, !tbaa !9
  %24 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 0
  store ptr %23, ptr %24, align 8, !tbaa !16
  %25 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 2
  store i64 0, ptr %25, align 8, !tbaa !17
  %26 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 6
  %27 = call i32 @pthread_mutex_init(ptr noundef %26, ptr noundef null) #4
  %28 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 7
  %29 = call i32 @pthread_cond_init(ptr noundef %28, ptr noundef null) #4
  %30 = load i32, ptr %5, align 4, !tbaa !5
  %31 = sext i32 %30 to i64
  %32 = mul i64 %31, 32
  %33 = alloca i8, i64 %32, align 16
  %34 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 5
  store ptr %33, ptr %34, align 8, !tbaa !18
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %56, %16
  %36 = load i32, ptr %11, align 4, !tbaa !5
  %37 = load i32, ptr %5, align 4, !tbaa !5
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %39, label %59

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %40 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 5
  %41 = load ptr, ptr %40, align 8, !tbaa !18
  %42 = load i32, ptr %11, align 4, !tbaa !5
  %43 = sext i32 %42 to i64
  %44 = getelementptr inbounds %struct.ktp_worker_t, ptr %41, i64 %43
  store ptr %44, ptr %12, align 8, !tbaa !9
  %45 = load ptr, ptr %12, align 8, !tbaa !9
  %46 = getelementptr inbounds %struct.ktp_worker_t, ptr %45, i32 0, i32 2
  store i32 0, ptr %46, align 8, !tbaa !19
  %47 = load ptr, ptr %12, align 8, !tbaa !9
  %48 = getelementptr inbounds %struct.ktp_worker_t, ptr %47, i32 0, i32 0
  store ptr %9, ptr %48, align 8, !tbaa !21
  %49 = load ptr, ptr %12, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct.ktp_worker_t, ptr %49, i32 0, i32 3
  store ptr null, ptr %50, align 8, !tbaa !22
  %51 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 2
  %52 = load i64, ptr %51, align 8, !tbaa !17
  %53 = add nsw i64 %52, 1
  store i64 %53, ptr %51, align 8, !tbaa !17
  %54 = load ptr, ptr %12, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.ktp_worker_t, ptr %54, i32 0, i32 1
  store i64 %52, ptr %55, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %56

56:                                               ; preds = %39
  %57 = load i32, ptr %11, align 4, !tbaa !5
  %58 = add nsw i32 %57, 1
  store i32 %58, ptr %11, align 4, !tbaa !5
  br label %35, !llvm.loop !24

59:                                               ; preds = %35
  %60 = load i32, ptr %5, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = mul i64 %61, 8
  %63 = alloca i8, i64 %62, align 16
  store ptr %63, ptr %10, align 8, !tbaa !9
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %79, %59
  %65 = load i32, ptr %11, align 4, !tbaa !5
  %66 = load i32, ptr %5, align 4, !tbaa !5
  %67 = icmp slt i32 %65, %66
  br i1 %67, label %68, label %82

68:                                               ; preds = %64
  %69 = load ptr, ptr %10, align 8, !tbaa !9
  %70 = load i32, ptr %11, align 4, !tbaa !5
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i64, ptr %69, i64 %71
  %73 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 5
  %74 = load ptr, ptr %73, align 8, !tbaa !18
  %75 = load i32, ptr %11, align 4, !tbaa !5
  %76 = sext i32 %75 to i64
  %77 = getelementptr inbounds %struct.ktp_worker_t, ptr %74, i64 %76
  %78 = call i32 @pthread_create(ptr noundef %72, ptr noundef null, ptr noundef @_ZL10ktp_workerPv, ptr noundef %77) #4
  br label %79

79:                                               ; preds = %68
  %80 = load i32, ptr %11, align 4, !tbaa !5
  %81 = add nsw i32 %80, 1
  store i32 %81, ptr %11, align 4, !tbaa !5
  br label %64, !llvm.loop !26

82:                                               ; preds = %64
  store i32 0, ptr %11, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %94, %82
  %84 = load i32, ptr %11, align 4, !tbaa !5
  %85 = load i32, ptr %5, align 4, !tbaa !5
  %86 = icmp slt i32 %84, %85
  br i1 %86, label %87, label %97

87:                                               ; preds = %83
  %88 = load ptr, ptr %10, align 8, !tbaa !9
  %89 = load i32, ptr %11, align 4, !tbaa !5
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds i64, ptr %88, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !27
  %93 = call i32 @pthread_join(i64 noundef %92, ptr noundef null)
  br label %94

94:                                               ; preds = %87
  %95 = load i32, ptr %11, align 4, !tbaa !5
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %11, align 4, !tbaa !5
  br label %83, !llvm.loop !28

97:                                               ; preds = %83
  %98 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 6
  %99 = call i32 @pthread_mutex_destroy(ptr noundef %98) #4
  %100 = getelementptr inbounds %struct.ktp_t, ptr %9, i32 0, i32 7
  %101 = call i32 @pthread_cond_destroy(ptr noundef %100) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 128, ptr %9) #4
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL10ktp_workerPv(ptr noundef) #3

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 = { mustprogress 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 }

!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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"_ZTS5ktp_t", !10, i64 0, !10, i64 8, !13, i64 16, !6, i64 24, !6, i64 28, !10, i64 32, !7, i64 40, !7, i64 80}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 28}
!15 = !{!12, !10, i64 8}
!16 = !{!12, !10, i64 0}
!17 = !{!12, !13, i64 16}
!18 = !{!12, !10, i64 32}
!19 = !{!20, !6, i64 16}
!20 = !{!"_ZTS12ktp_worker_t", !10, i64 0, !13, i64 8, !6, i64 16, !10, i64 24}
!21 = !{!20, !10, i64 0}
!22 = !{!20, !10, i64 24}
!23 = !{!20, !13, i64 8}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}
!27 = !{!13, !13, i64 0}
!28 = distinct !{!28, !25}


; 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"

%struct.ktp_t = type { ptr, ptr, i64, i32, i32, ptr, %union.pthread_mutex_t, %union.pthread_cond_t }
%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.ktp_worker_t = type { ptr, i64, i32, ptr }

; 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_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @pthread_join(i64 noundef, 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: nounwind
declare i32 @pthread_mutex_init(ptr noundef, ptr noundef) local_unnamed_addr #1

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

; 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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z11kt_pipelineiPFPvS_iS_ES_i(i32 noundef %0, ptr noundef %1, ptr noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = alloca %struct.ktp_t, align 8
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %5) #5
  %spec.store.select = tail call i32 @llvm.smax.i32(i32 %0, i32 1)
  %6 = getelementptr inbounds i8, ptr %5, i64 24
  store i32 %spec.store.select, ptr %6, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %5, i64 28
  store i32 %3, ptr %7, align 4, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %1, ptr %8, align 8, !tbaa !13
  store ptr %2, ptr %5, align 8, !tbaa !14
  %9 = getelementptr inbounds i8, ptr %5, i64 16
  store i64 0, ptr %9, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %5, i64 40
  %11 = call i32 @pthread_mutex_init(ptr noundef nonnull %10, ptr noundef null) #5
  %12 = getelementptr inbounds i8, ptr %5, i64 80
  %13 = call i32 @pthread_cond_init(ptr noundef nonnull %12, ptr noundef null) #5
  %14 = zext nneg i32 %spec.store.select to i64
  %15 = shl nuw nsw i64 %14, 5
  %16 = alloca i8, i64 %15, align 16
  %17 = getelementptr inbounds i8, ptr %5, i64 32
  store ptr %16, ptr %17, align 8, !tbaa !16
  %.promoted = load i64, ptr %9, align 8, !tbaa !15
  %xtraiter = and i64 %14, 1
  %18 = icmp slt i32 %0, 2
  br i1 %18, label %.unr-lcssa, label %.new

.new:                                             ; preds = %4
  %unroll_iter = and i64 %14, 2147483646
  br label %19

19:                                               ; preds = %19, %.new
  %indvars.iv = phi i64 [ 0, %.new ], [ %indvars.iv.next.1, %19 ]
  %20 = phi i64 [ %.promoted, %.new ], [ %29, %19 ]
  %niter = phi i64 [ 0, %.new ], [ %niter.next.1, %19 ]
  %21 = getelementptr inbounds %struct.ktp_worker_t, ptr %16, i64 %indvars.iv
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  store i32 0, ptr %22, align 16, !tbaa !17
  store ptr %5, ptr %21, align 16, !tbaa !19
  %23 = getelementptr inbounds i8, ptr %21, i64 24
  store ptr null, ptr %23, align 8, !tbaa !20
  %24 = add nsw i64 %20, 1
  %25 = getelementptr inbounds i8, ptr %21, i64 8
  store i64 %20, ptr %25, align 8, !tbaa !21
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %26 = getelementptr inbounds %struct.ktp_worker_t, ptr %16, i64 %indvars.iv.next
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  store i32 0, ptr %27, align 16, !tbaa !17
  store ptr %5, ptr %26, align 16, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %26, i64 24
  store ptr null, ptr %28, align 8, !tbaa !20
  %29 = add nsw i64 %20, 2
  %30 = getelementptr inbounds i8, ptr %26, i64 8
  store i64 %24, ptr %30, align 8, !tbaa !21
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %.unr-lcssa, label %19, !llvm.loop !22

.unr-lcssa:                                       ; preds = %19, %4
  %.lcssa.ph = phi i64 [ poison, %4 ], [ %29, %19 ]
  %indvars.iv.unr = phi i64 [ 0, %4 ], [ %indvars.iv.next.1, %19 ]
  %.unr = phi i64 [ %.promoted, %4 ], [ %29, %19 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %36, label %.epilog-lcssa

.epilog-lcssa:                                    ; preds = %.unr-lcssa
  %31 = getelementptr inbounds %struct.ktp_worker_t, ptr %16, i64 %indvars.iv.unr
  %32 = getelementptr inbounds i8, ptr %31, i64 16
  store i32 0, ptr %32, align 16, !tbaa !17
  store ptr %5, ptr %31, align 16, !tbaa !19
  %33 = getelementptr inbounds i8, ptr %31, i64 24
  store ptr null, ptr %33, align 8, !tbaa !20
  %34 = add nsw i64 %.unr, 1
  %35 = getelementptr inbounds i8, ptr %31, i64 8
  store i64 %.unr, ptr %35, align 8, !tbaa !21
  br label %36

36:                                               ; preds = %.unr-lcssa, %.epilog-lcssa
  %.lcssa = phi i64 [ %.lcssa.ph, %.unr-lcssa ], [ %34, %.epilog-lcssa ]
  store i64 %.lcssa, ptr %9, align 8, !tbaa !15
  %37 = shl nuw nsw i64 %14, 3
  %38 = alloca i8, i64 %37, align 16
  br label %39

39:                                               ; preds = %36, %39
  %indvars.iv29 = phi i64 [ 0, %36 ], [ %indvars.iv.next30, %39 ]
  %40 = getelementptr inbounds i64, ptr %38, i64 %indvars.iv29
  %41 = load ptr, ptr %17, align 8, !tbaa !16
  %42 = getelementptr inbounds %struct.ktp_worker_t, ptr %41, i64 %indvars.iv29
  %43 = call i32 @pthread_create(ptr noundef nonnull %40, ptr noundef null, ptr noundef nonnull @_ZL10ktp_workerPv, ptr noundef %42) #5
  %indvars.iv.next30 = add nuw nsw i64 %indvars.iv29, 1
  %exitcond33.not = icmp eq i64 %indvars.iv.next30, %14
  br i1 %exitcond33.not, label %.preheader, label %39, !llvm.loop !24

.preheader:                                       ; preds = %39, %.preheader
  %indvars.iv34 = phi i64 [ %indvars.iv.next35, %.preheader ], [ 0, %39 ]
  %44 = getelementptr inbounds i64, ptr %38, i64 %indvars.iv34
  %45 = load i64, ptr %44, align 8, !tbaa !25
  %46 = call i32 @pthread_join(i64 noundef %45, ptr noundef null)
  %indvars.iv.next35 = add nuw nsw i64 %indvars.iv34, 1
  %exitcond38.not = icmp eq i64 %indvars.iv.next35, %14
  br i1 %exitcond38.not, label %47, label %.preheader, !llvm.loop !26

47:                                               ; preds = %.preheader
  %48 = call i32 @pthread_mutex_destroy(ptr noundef nonnull %10) #5
  %49 = call i32 @pthread_cond_destroy(ptr noundef nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %5) #5
  ret void
}

; Function Attrs: mustprogress uwtable
declare hidden noundef ptr @_ZL10ktp_workerPv(ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #4

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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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, !11, i64 24}
!6 = !{!"_ZTS5ktp_t", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !11, i64 28, !7, i64 32, !8, i64 40, !8, i64 80}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!6, !11, i64 28}
!13 = !{!6, !7, i64 8}
!14 = !{!6, !7, i64 0}
!15 = !{!6, !10, i64 16}
!16 = !{!6, !7, i64 32}
!17 = !{!18, !11, i64 16}
!18 = !{!"_ZTS12ktp_worker_t", !7, i64 0, !10, i64 8, !11, i64 16, !7, i64 24}
!19 = !{!18, !7, i64 0}
!20 = !{!18, !7, i64 24}
!21 = !{!18, !10, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = !{!10, !10, i64 0}
!26 = distinct !{!26, !23}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass