; LLVM IR from pupnp/pupnp :: upnp/src/threadutil (TimerThread)

; 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.TIMERTHREAD = type { %union.pthread_mutex_t, %union.pthread_cond_t, i32, %struct.LINKEDLIST, i32, %struct.FREELIST, ptr }
%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.LINKEDLIST = type { %struct.LISTNODE, %struct.LISTNODE, i64, %struct.FREELIST, ptr, ptr }
%struct.LISTNODE = type { ptr, ptr, ptr }
%struct.FREELIST = type { ptr, i64, i32, i32 }
%struct.TIMEREVENT = type { %struct.THREADPOOLJOB, i64, i32, i32 }
%struct.THREADPOOLJOB = type { ptr, ptr, ptr, %struct.timeval, i32, i32 }
%struct.timeval = type { i64, i64 }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__.TimerThreadSchedule = external hidden unnamed_addr constant [94 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: nounwind
declare i32 @pthread_mutex_unlock(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 uwtable
define dso_local i32 @TimerThreadSchedule(ptr noundef %0, i64 noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef %5) #3 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !11
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !11
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 536870912, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 0, ptr %16, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store ptr null, ptr %19, align 8, !tbaa !5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %6
  br label %25

24:                                               ; preds = %6
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 268, ptr noundef @__PRETTY_FUNCTION__.TimerThreadSchedule) #6
  unreachable

25:                                               ; preds = %23
  %26 = load ptr, ptr %11, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %29

28:                                               ; preds = %25
  br label %30

29:                                               ; preds = %25
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 269, ptr noundef @__PRETTY_FUNCTION__.TimerThreadSchedule) #6
  unreachable

30:                                               ; preds = %28
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = icmp eq ptr %31, null
  br i1 %32, label %36, label %33

33:                                               ; preds = %30
  %34 = load ptr, ptr %11, align 8, !tbaa !5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %37

36:                                               ; preds = %33, %30
  store i32 22, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %124

37:                                               ; preds = %33
  %38 = load i32, ptr %10, align 4, !tbaa !11
  %39 = call i32 @CalculateEventTime(ptr noundef %9, i32 noundef %38)
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.TIMERTHREAD, ptr %40, i32 0, i32 0
  %42 = call i32 @pthread_mutex_lock(ptr noundef %41) #5
  %43 = load ptr, ptr %13, align 8, !tbaa !5
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %46

45:                                               ; preds = %37
  store ptr %16, ptr %13, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %45, %37
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  store i32 536870912, ptr %47, align 4, !tbaa !11
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = load i32, ptr %12, align 4, !tbaa !11
  %51 = load i64, ptr %9, align 8, !tbaa !9
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.TIMERTHREAD, ptr %52, i32 0, i32 2
  %54 = load i32, ptr %53, align 8, !tbaa !13
  %55 = call ptr @CreateTimerEvent(ptr noundef %48, ptr noundef %49, i32 noundef %50, i64 noundef %51, i32 noundef %54)
  store ptr %55, ptr %19, align 8, !tbaa !5
  %56 = load ptr, ptr %19, align 8, !tbaa !5
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %63

58:                                               ; preds = %46
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.TIMERTHREAD, ptr %59, i32 0, i32 0
  %61 = call i32 @pthread_mutex_unlock(ptr noundef %60) #5
  %62 = load i32, ptr %14, align 4, !tbaa !11
  store i32 %62, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %124

63:                                               ; preds = %46
  %64 = load ptr, ptr %8, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.TIMERTHREAD, ptr %64, i32 0, i32 3
  %66 = call ptr @ListHead(ptr noundef %65)
  store ptr %66, ptr %17, align 8, !tbaa !5
  br label %67

67:                                               ; preds = %88, %63
  %68 = load ptr, ptr %17, align 8, !tbaa !5
  %69 = icmp ne ptr %68, null
  br i1 %69, label %70, label %93

70:                                               ; preds = %67
  %71 = load ptr, ptr %17, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.LISTNODE, ptr %71, i32 0, i32 2
  %73 = load ptr, ptr %72, align 8, !tbaa !18
  store ptr %73, ptr %18, align 8, !tbaa !5
  %74 = load ptr, ptr %18, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.TIMEREVENT, ptr %74, i32 0, i32 1
  %76 = load i64, ptr %75, align 8, !tbaa !19
  %77 = load i64, ptr %9, align 8, !tbaa !9
  %78 = icmp sge i64 %76, %77
  br i1 %78, label %79, label %88

79:                                               ; preds = %70
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.TIMERTHREAD, ptr %80, i32 0, i32 3
  %82 = load ptr, ptr %19, align 8, !tbaa !5
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = call ptr @ListAddBefore(ptr noundef %81, ptr noundef %82, ptr noundef %83)
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %87

86:                                               ; preds = %79
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %87

87:                                               ; preds = %86, %79
  store i32 1, ptr %15, align 4, !tbaa !11
  br label %93

88:                                               ; preds = %70
  %89 = load ptr, ptr %8, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.TIMERTHREAD, ptr %89, i32 0, i32 3
  %91 = load ptr, ptr %17, align 8, !tbaa !5
  %92 = call ptr @ListNext(ptr noundef %90, ptr noundef %91)
  store ptr %92, ptr %17, align 8, !tbaa !5
  br label %67, !llvm.loop !23

93:                                               ; preds = %87, %67
  %94 = load i32, ptr %15, align 4, !tbaa !11
  %95 = icmp ne i32 %94, 0
  br i1 %95, label %104, label %96

96:                                               ; preds = %93
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.TIMERTHREAD, ptr %97, i32 0, i32 3
  %99 = load ptr, ptr %19, align 8, !tbaa !5
  %100 = call ptr @ListAddTail(ptr noundef %98, ptr noundef %99)
  %101 = icmp ne ptr %100, null
  br i1 %101, label %102, label %103

102:                                              ; preds = %96
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %103

103:                                              ; preds = %102, %96
  br label %104

104:                                              ; preds = %103, %93
  %105 = load i32, ptr %14, align 4, !tbaa !11
  %106 = icmp eq i32 %105, 0
  br i1 %106, label %107, label %111

107:                                              ; preds = %104
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.TIMERTHREAD, ptr %108, i32 0, i32 1
  %110 = call i32 @pthread_cond_signal(ptr noundef %109) #5
  br label %114

111:                                              ; preds = %104
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = load ptr, ptr %19, align 8, !tbaa !5
  call void @FreeTimerEvent(ptr noundef %112, ptr noundef %113)
  br label %114

114:                                              ; preds = %111, %107
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.TIMERTHREAD, ptr %115, i32 0, i32 2
  %117 = load i32, ptr %116, align 8, !tbaa !13
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %116, align 8, !tbaa !13
  %119 = load ptr, ptr %13, align 8, !tbaa !5
  store i32 %117, ptr %119, align 4, !tbaa !11
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.TIMERTHREAD, ptr %120, i32 0, i32 0
  %122 = call i32 @pthread_mutex_unlock(ptr noundef %121) #5
  %123 = load i32, ptr %14, align 4, !tbaa !11
  store i32 %123, ptr %7, align 4
  store i32 1, ptr %20, align 4
  br label %124

124:                                              ; preds = %114, %58, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  %125 = load i32, ptr %7, align 4
  ret i32 %125
}

; Function Attrs: nounwind uwtable
declare hidden i32 @CalculateEventTime(ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden ptr @CreateTimerEvent(ptr noundef, ptr noundef, i32 noundef, i64 noundef, i32 noundef) #3

declare ptr @ListHead(ptr noundef) #4

declare ptr @ListAddBefore(ptr noundef, ptr noundef, ptr noundef) #4

declare ptr @ListNext(ptr noundef, ptr noundef) #4

declare ptr @ListAddTail(ptr noundef, ptr noundef) #4

; Function Attrs: nounwind
declare i32 @pthread_cond_signal(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @FreeTimerEvent(ptr noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noreturn 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 "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 = { "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 = { noreturn 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !12, i64 88}
!14 = !{!"TIMERTHREAD", !7, i64 0, !7, i64 40, !12, i64 88, !15, i64 96, !12, i64 192, !17, i64 200, !6, i64 224}
!15 = !{!"LINKEDLIST", !16, i64 0, !16, i64 24, !10, i64 48, !17, i64 56, !6, i64 80, !6, i64 88}
!16 = !{!"LISTNODE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"FREELIST", !6, i64 0, !10, i64 8, !12, i64 16, !12, i64 20}
!18 = !{!16, !6, i64 16}
!19 = !{!20, !10, i64 48}
!20 = !{!"TIMEREVENT", !21, i64 0, !10, i64 48, !12, i64 56, !12, i64 60}
!21 = !{!"THREADPOOLJOB", !6, i64 0, !6, i64 8, !6, i64 16, !22, i64 24, !12, i64 40, !12, i64 44}
!22 = !{!"timeval", !10, i64 0, !10, i64 8}
!23 = distinct !{!23, !24}
!24 = !{!"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 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [79 x i8], align 1
@__PRETTY_FUNCTION__.TimerThreadSchedule = external hidden unnamed_addr constant [94 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 536870913) i32 @TimerThreadSchedule(ptr noundef %0, i64 noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4, ptr noundef writeonly %5) local_unnamed_addr #2 {
  %7 = alloca i64, align 8
  store i64 %1, ptr %7, align 8, !tbaa !5
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %8, label %9

8:                                                ; preds = %6
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 268, ptr noundef nonnull @__PRETTY_FUNCTION__.TimerThreadSchedule) #4
  unreachable

9:                                                ; preds = %6
  %.not42 = icmp eq ptr %3, null
  br i1 %.not42, label %10, label %11

10:                                               ; preds = %9
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 269, ptr noundef nonnull @__PRETTY_FUNCTION__.TimerThreadSchedule) #4
  unreachable

11:                                               ; preds = %9
  %12 = call i32 @CalculateEventTime(ptr noundef nonnull %7, i32 noundef %2)
  %13 = call i32 @pthread_mutex_lock(ptr noundef nonnull %0) #5
  %14 = icmp eq ptr %5, null
  br i1 %14, label %.cont49, label %.else51

.else51:                                          ; preds = %11
  store i32 536870912, ptr %5, align 4, !tbaa !9
  br label %.cont49

.cont49:                                          ; preds = %11, %.else51
  %15 = load i64, ptr %7, align 8, !tbaa !5
  %16 = getelementptr inbounds i8, ptr %0, i64 88
  %17 = load i32, ptr %16, align 8, !tbaa !11
  %18 = call ptr @CreateTimerEvent(ptr noundef nonnull %0, ptr noundef nonnull %3, i32 noundef %4, i64 noundef %15, i32 noundef %17)
  %19 = icmp eq ptr %18, null
  br i1 %19, label %.cont, label %20

20:                                               ; preds = %.cont49
  %21 = getelementptr inbounds i8, ptr %0, i64 96
  %22 = call ptr @ListHead(ptr noundef nonnull %21) #5
  %.not4360 = icmp eq ptr %22, null
  br i1 %.not4360, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %20, %28
  %.061 = phi ptr [ %29, %28 ], [ %22, %20 ]
  %23 = getelementptr inbounds i8, ptr %.061, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !17
  %25 = getelementptr inbounds i8, ptr %24, i64 48
  %26 = load i64, ptr %25, align 8, !tbaa !18
  %27 = load i64, ptr %7, align 8, !tbaa !5
  %.not44 = icmp slt i64 %26, %27
  br i1 %.not44, label %28, label %30

28:                                               ; preds = %.lr.ph
  %29 = call ptr @ListNext(ptr noundef nonnull %21, ptr noundef nonnull %.061) #5
  %.not43 = icmp eq ptr %29, null
  br i1 %.not43, label %._crit_edge, label %.lr.ph, !llvm.loop !22

30:                                               ; preds = %.lr.ph
  %31 = call ptr @ListAddBefore(ptr noundef nonnull %21, ptr noundef nonnull %18, ptr noundef nonnull %.061) #5
  %.not45 = icmp eq ptr %31, null
  br i1 %.not45, label %select.unfold, label %33

._crit_edge:                                      ; preds = %28, %20
  %32 = call ptr @ListAddTail(ptr noundef nonnull %21, ptr noundef nonnull %18) #5
  %.not47 = icmp eq ptr %32, null
  br i1 %.not47, label %select.unfold, label %33

33:                                               ; preds = %30, %._crit_edge
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  %35 = call i32 @pthread_cond_signal(ptr noundef nonnull %34) #5
  br label %36

select.unfold:                                    ; preds = %._crit_edge, %30
  call void @FreeTimerEvent(ptr noundef nonnull %0, ptr noundef nonnull %18)
  br label %36

36:                                               ; preds = %select.unfold, %33
  %.257 = phi i32 [ 536870912, %select.unfold ], [ 0, %33 ]
  %37 = load i32, ptr %16, align 8, !tbaa !11
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %16, align 8, !tbaa !11
  br i1 %14, label %.cont, label %.else

.else:                                            ; preds = %36
  store i32 %37, ptr %5, align 4, !tbaa !9
  br label %.cont

.cont:                                            ; preds = %.else, %36, %.cont49
  %.038 = phi i32 [ 536870912, %.cont49 ], [ %.257, %36 ], [ %.257, %.else ]
  %39 = call i32 @pthread_mutex_unlock(ptr noundef nonnull %0) #5
  ret i32 %.038
}

; Function Attrs: nounwind uwtable
declare hidden i32 @CalculateEventTime(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden ptr @CreateTimerEvent(ptr noundef, ptr noundef, i32 noundef, i64 noundef, i32 noundef) local_unnamed_addr #2

declare ptr @ListHead(ptr noundef) local_unnamed_addr #3

declare ptr @ListAddBefore(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @ListNext(ptr noundef, ptr noundef) local_unnamed_addr #3

declare ptr @ListAddTail(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare hidden void @FreeTimerEvent(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { noreturn 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 = { 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 = { "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 = { noreturn nounwind }
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, !6, i64 0}
!6 = !{!"long", !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, !10, i64 88}
!12 = !{!"TIMERTHREAD", !7, i64 0, !7, i64 40, !10, i64 88, !13, i64 96, !10, i64 192, !16, i64 200, !15, i64 224}
!13 = !{!"LINKEDLIST", !14, i64 0, !14, i64 24, !6, i64 48, !16, i64 56, !15, i64 80, !15, i64 88}
!14 = !{!"LISTNODE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !7, i64 0}
!16 = !{!"FREELIST", !15, i64 0, !6, i64 8, !10, i64 16, !10, i64 20}
!17 = !{!14, !15, i64 16}
!18 = !{!19, !6, i64 48}
!19 = !{!"TIMEREVENT", !20, i64 0, !6, i64 48, !10, i64 56, !10, i64 60}
!20 = !{!"THREADPOOLJOB", !15, i64 0, !15, i64 8, !15, i64 16, !21, i64 24, !10, i64 40, !10, i64 44}
!21 = !{!"timeval", !6, i64 0, !6, i64 8}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass