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

; 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._task = type { ptr, ptr, ptr }
%struct.iwstw = type { ptr, ptr, ptr, ptr, %union.pthread_mutex_t, %union.pthread_cond_t, %union.pthread_cond_t, i64, i32, i32, i8, 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 }

; 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

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @iwstw_schedule(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %struct._task, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = icmp ne ptr %12, null
  br i1 %13, label %14, label %17

14:                                               ; preds = %3
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %18, label %17

17:                                               ; preds = %14, %3
  store i64 70017, ptr %4, align 8
  br label %134

18:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store i64 0, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %19 = call noalias ptr @malloc(i64 noundef 24) #8
  store ptr %19, ptr %9, align 8, !tbaa !5
  %20 = load ptr, ptr %9, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %26, label %22

22:                                               ; preds = %18
  %23 = call ptr @__errno_location() #9
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = call i64 @iwrc_set_errno(i64 noundef 70013, i32 noundef %24)
  store i64 %25, ptr %8, align 8, !tbaa !9
  br label %127

26:                                               ; preds = %18
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._task, ptr %10, i32 0, i32 0
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %29, ptr %28, align 8, !tbaa !13
  %30 = getelementptr inbounds %struct._task, ptr %10, i32 0, i32 1
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %31, ptr %30, align 8, !tbaa !15
  %32 = getelementptr inbounds %struct._task, ptr %10, i32 0, i32 2
  store ptr null, ptr %32, align 8, !tbaa !16
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %27, ptr align 8 %10, i64 24, i1 false), !tbaa.struct !17
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.iwstw, ptr %33, i32 0, i32 4
  %35 = call i32 @pthread_mutex_lock(ptr noundef %34) #7
  store i32 %35, ptr %11, align 4, !tbaa !11
  %36 = load i32, ptr %11, align 4, !tbaa !11
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %42

38:                                               ; preds = %26
  %39 = call ptr @__errno_location() #9
  %40 = load i32, ptr %39, align 4, !tbaa !11
  %41 = call i64 @iwrc_set_errno(i64 noundef 70008, i32 noundef %40)
  store i64 %41, ptr %8, align 8, !tbaa !9
  br label %127

42:                                               ; preds = %26
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.iwstw, ptr %43, i32 0, i32 12
  %45 = load volatile i8, ptr %44, align 2, !tbaa !18, !range !21, !noundef !22
  %46 = trunc i8 %45 to i1
  br i1 %46, label %47, label %51

47:                                               ; preds = %42
  store i64 70014, ptr %8, align 8, !tbaa !9
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.iwstw, ptr %48, i32 0, i32 4
  %50 = call i32 @pthread_mutex_unlock(ptr noundef %49) #7
  br label %127

51:                                               ; preds = %42
  br label %52

52:                                               ; preds = %94, %51
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.iwstw, ptr %53, i32 0, i32 9
  %55 = load i32, ptr %54, align 4, !tbaa !23
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %66

57:                                               ; preds = %52
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.iwstw, ptr %58, i32 0, i32 8
  %60 = load i32, ptr %59, align 8, !tbaa !24
  %61 = add nsw i32 %60, 1
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.iwstw, ptr %62, i32 0, i32 9
  %64 = load i32, ptr %63, align 4, !tbaa !23
  %65 = icmp sgt i32 %61, %64
  br label %66

66:                                               ; preds = %57, %52
  %67 = phi i1 [ false, %52 ], [ %65, %57 ]
  br i1 %67, label %68, label %95

68:                                               ; preds = %66
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.iwstw, ptr %69, i32 0, i32 10
  %71 = load i8, ptr %70, align 8, !tbaa !25, !range !21, !noundef !22
  %72 = trunc i8 %71 to i1
  br i1 %72, label %73, label %90

73:                                               ; preds = %68
  %74 = load ptr, ptr %5, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.iwstw, ptr %74, i32 0, i32 12
  %76 = load volatile i8, ptr %75, align 2, !tbaa !18, !range !21, !noundef !22
  %77 = trunc i8 %76 to i1
  br i1 %77, label %78, label %82

78:                                               ; preds = %73
  store i64 70014, ptr %8, align 8, !tbaa !9
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.iwstw, ptr %79, i32 0, i32 4
  %81 = call i32 @pthread_mutex_unlock(ptr noundef %80) #7
  br label %127

82:                                               ; preds = %73
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.iwstw, ptr %83, i32 0, i32 11
  store i8 1, ptr %84, align 1, !tbaa !26
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.iwstw, ptr %85, i32 0, i32 6
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.iwstw, ptr %87, i32 0, i32 4
  %89 = call i32 @pthread_cond_wait(ptr noundef %86, ptr noundef %88)
  br label %94

90:                                               ; preds = %68
  store i64 70019, ptr %8, align 8, !tbaa !9
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.iwstw, ptr %91, i32 0, i32 4
  %93 = call i32 @pthread_mutex_unlock(ptr noundef %92) #7
  br label %127

94:                                               ; preds = %82
  br label %52, !llvm.loop !27

95:                                               ; preds = %66
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.iwstw, ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !29
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %109

100:                                              ; preds = %95
  %101 = load ptr, ptr %9, align 8, !tbaa !5
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.iwstw, ptr %102, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !29
  %105 = getelementptr inbounds %struct._task, ptr %104, i32 0, i32 2
  store ptr %101, ptr %105, align 8, !tbaa !16
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.iwstw, ptr %107, i32 0, i32 1
  store ptr %106, ptr %108, align 8, !tbaa !29
  br label %116

109:                                              ; preds = %95
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.iwstw, ptr %111, i32 0, i32 0
  store ptr %110, ptr %112, align 8, !tbaa !30
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.iwstw, ptr %114, i32 0, i32 1
  store ptr %113, ptr %115, align 8, !tbaa !29
  br label %116

116:                                              ; preds = %109, %100
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.iwstw, ptr %117, i32 0, i32 8
  %119 = load i32, ptr %118, align 8, !tbaa !24
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr %118, align 8, !tbaa !24
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.iwstw, ptr %121, i32 0, i32 5
  %123 = call i32 @pthread_cond_broadcast(ptr noundef %122) #7
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.iwstw, ptr %124, i32 0, i32 4
  %126 = call i32 @pthread_mutex_unlock(ptr noundef %125) #7
  br label %127

127:                                              ; preds = %116, %90, %78, %47, %38, %22
  %128 = load i64, ptr %8, align 8, !tbaa !9
  %129 = icmp ne i64 %128, 0
  br i1 %129, label %130, label %132

130:                                              ; preds = %127
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  call void @free(ptr noundef %131) #7
  br label %132

132:                                              ; preds = %130, %127
  %133 = load i64, ptr %8, align 8, !tbaa !9
  store i64 %133, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %134

134:                                              ; preds = %132, %17
  %135 = load i64, ptr %4, align 8
  ret i64 %135
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #3

declare i64 @iwrc_set_errno(i64 noundef, i32 noundef) #4

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #5

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

declare i32 @pthread_cond_wait(ptr noundef, ptr noundef) #4

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 = { 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 #3 = { nounwind allocsize(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 = { "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 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: readwrite) }
attributes #7 = { nounwind }
attributes #8 = { nounwind allocsize(0) }
attributes #9 = { 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, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_task", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!14, !6, i64 8}
!16 = !{!14, !6, i64 16}
!17 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5}
!18 = !{!19, !20, i64 186}
!19 = !{!"iwstw", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !7, i64 72, !7, i64 120, !10, i64 168, !12, i64 176, !12, i64 180, !20, i64 184, !20, i64 185, !20, i64 186}
!20 = !{!"_Bool", !7, i64 0}
!21 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!19, !12, i64 180}
!24 = !{!19, !12, i64 176}
!25 = !{!19, !20, i64 184}
!26 = !{!19, !20, i64 185}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!19, !6, i64 8}
!30 = !{!19, !6, i64 0}


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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @iwstw_schedule(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %4 = icmp ne ptr %0, null
  %5 = icmp ne ptr %1, null
  %or.cond = and i1 %4, %5
  br i1 %or.cond, label %6, label %47

6:                                                ; preds = %3
  %7 = tail call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #6
  %.not = icmp eq ptr %7, null
  br i1 %.not, label %42, label %8

8:                                                ; preds = %6
  store ptr %1, ptr %7, align 8, !tbaa !5
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store ptr %2, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !5
  %.sroa.3.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 16
  store ptr null, ptr %.sroa.3.0..sroa_idx, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 32
  %10 = tail call i32 @pthread_mutex_lock(ptr noundef nonnull %9) #7
  %.not42 = icmp eq i32 %10, 0
  br i1 %.not42, label %11, label %42

11:                                               ; preds = %8
  %12 = getelementptr inbounds i8, ptr %0, i64 186
  %13 = load volatile i8, ptr %12, align 2, !tbaa !9, !range !14, !noundef !15
  %14 = trunc nuw i8 %13 to i1
  br i1 %14, label %.thread.sink.split, label %.preheader

.preheader:                                       ; preds = %11
  %15 = getelementptr inbounds i8, ptr %0, i64 180
  %16 = load i32, ptr %15, align 4, !tbaa !16
  %.not4353 = icmp eq i32 %16, 0
  br i1 %.not4353, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader
  %17 = getelementptr inbounds i8, ptr %0, i64 176
  %18 = getelementptr inbounds i8, ptr %0, i64 184
  %19 = getelementptr inbounds i8, ptr %0, i64 185
  %20 = getelementptr inbounds i8, ptr %0, i64 120
  br label %21

21:                                               ; preds = %.lr.ph, %30
  %22 = phi i32 [ %16, %.lr.ph ], [ %32, %30 ]
  %23 = load i32, ptr %17, align 8, !tbaa !17
  %.not44 = icmp slt i32 %23, %22
  br i1 %.not44, label %.critedge, label %24

24:                                               ; preds = %21
  %25 = load i8, ptr %18, align 8, !tbaa !18, !range !14, !noundef !15
  %26 = trunc nuw i8 %25 to i1
  br i1 %26, label %27, label %.thread.sink.split

27:                                               ; preds = %24
  %28 = load volatile i8, ptr %12, align 2, !tbaa !9, !range !14, !noundef !15
  %29 = trunc nuw i8 %28 to i1
  br i1 %29, label %.thread.sink.split, label %30

30:                                               ; preds = %27
  store i8 1, ptr %19, align 1, !tbaa !19
  %31 = tail call i32 @pthread_cond_wait(ptr noundef nonnull %20, ptr noundef nonnull %9) #7
  %32 = load i32, ptr %15, align 4, !tbaa !16
  %.not43 = icmp eq i32 %32, 0
  br i1 %.not43, label %.critedge, label %21, !llvm.loop !20

.critedge:                                        ; preds = %21, %30, %.preheader
  %33 = getelementptr inbounds i8, ptr %0, i64 8
  %34 = load ptr, ptr %33, align 8, !tbaa !22
  %.not45 = icmp eq ptr %34, null
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %.sink = select i1 %.not45, ptr %0, ptr %35
  store ptr %7, ptr %.sink, align 8, !tbaa !5
  store ptr %7, ptr %33, align 8, !tbaa !22
  %36 = getelementptr inbounds i8, ptr %0, i64 176
  %37 = load i32, ptr %36, align 8, !tbaa !17
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %36, align 8, !tbaa !17
  %39 = getelementptr inbounds i8, ptr %0, i64 72
  %40 = tail call i32 @pthread_cond_broadcast(ptr noundef nonnull %39) #7
  %41 = tail call i32 @pthread_mutex_unlock(ptr noundef nonnull %9) #7
  br label %47

42:                                               ; preds = %8, %6
  %.sink55 = phi i64 [ 70013, %6 ], [ 70008, %8 ]
  %43 = tail call ptr @__errno_location() #8
  %44 = load i32, ptr %43, align 4, !tbaa !23
  %45 = tail call i64 @iwrc_set_errno(i64 noundef %.sink55, i32 noundef %44) #7
  %.not46 = icmp eq i64 %45, 0
  br i1 %.not46, label %47, label %.thread

.thread.sink.split:                               ; preds = %24, %27, %11
  %.03649.ph = phi i64 [ 70014, %11 ], [ 70014, %27 ], [ 70019, %24 ]
  %46 = tail call i32 @pthread_mutex_unlock(ptr noundef nonnull %9) #7
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %42
  %.03649 = phi i64 [ %45, %42 ], [ %.03649.ph, %.thread.sink.split ]
  tail call void @free(ptr noundef %7) #7
  br label %47

47:                                               ; preds = %.critedge, %42, %.thread, %3
  %.0 = phi i64 [ 70017, %3 ], [ %.03649, %.thread ], [ 0, %42 ], [ 0, %.critedge ]
  ret i64 %.0
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3

declare i64 @iwrc_set_errno(i64 noundef, i32 noundef) local_unnamed_addr #4

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

declare i32 @pthread_cond_wait(ptr noundef, ptr noundef) local_unnamed_addr #4

attributes #0 = { 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 #1 = { 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 #2 = { 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 #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 = { "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 = { nounwind allocsize(0) }
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, !13, i64 186}
!10 = !{!"iwstw", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !7, i64 72, !7, i64 120, !11, i64 168, !12, i64 176, !12, i64 180, !13, i64 184, !13, i64 185, !13, i64 186}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!10, !12, i64 180}
!17 = !{!10, !12, i64 176}
!18 = !{!10, !13, i64 184}
!19 = !{!10, !13, i64 185}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !6, i64 8}
!23 = !{!12, !12, i64 0}


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