; LLVM IR from kmilo17pet/QuarkTS-cpp :: src/input.ll (ZN3qOS5input7watcher5watchEv)

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

%"class.qOS::listIterator" = type { ptr, ptr, ptr, ptr }
%"class.qOS::input::watcher" = type { %"class.qOS::node", ptr, %"class.qOS::list", %"class.qOS::list", %"class.qOS::timer", i64, ptr, ptr }
%"class.qOS::node" = type { ptr, ptr, ptr, ptr }
%"class.qOS::list" = type { %"class.qOS::node", ptr, ptr, i64 }
%"class.qOS::timer" = type { ptr, i64, i64 }
%"class.qOS::input::channel" = type { %"class.qOS::node", i32, i8, ptr, ptr, i64, i64, i64 }

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS5input7channel13dispatchEventENS0_5eventE(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN3qOS5input7watcher5watchEv(ptr noundef nonnull align 8 dereferenceable(200) %0) #2 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i8, align 1
  %4 = alloca %"class.qOS::listIterator", align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.qOS::listIterator", align 8
  %7 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %8 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %3) #4
  %9 = getelementptr inbounds %"class.qOS::input::watcher", ptr %8, i32 0, i32 4
  %10 = getelementptr inbounds %"class.qOS::input::watcher", ptr %8, i32 0, i32 5
  %11 = load i64, ptr %10, align 8, !tbaa !9
  %12 = call noundef zeroext i1 @_ZN3qOS5timer7freeRunEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %11) #4
  %13 = zext i1 %12 to i8
  store i8 %13, ptr %3, align 1, !tbaa !15
  %14 = getelementptr inbounds %"class.qOS::input::watcher", ptr %8, i32 0, i32 2
  %15 = call noundef i64 @_ZNK3qOS4list6lengthEv(ptr noundef nonnull align 8 dereferenceable(56) %14) #4
  %16 = icmp ugt i64 %15, 0
  br i1 %16, label %17, label %51

17:                                               ; preds = %1
  %18 = load i8, ptr %3, align 1, !tbaa !15, !range !17, !noundef !18
  %19 = trunc i8 %18 to i1
  br i1 %19, label %20, label %51

20:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #4
  %21 = getelementptr inbounds %"class.qOS::input::watcher", ptr %8, i32 0, i32 2
  call void @_ZN3qOS4list5beginEv(ptr dead_on_unwind writable sret(%"class.qOS::listIterator") align 8 %4, ptr noundef nonnull align 8 dereferenceable(56) %21) #4
  br label %22

22:                                               ; preds = %48, %20
  %23 = call noundef zeroext i1 @_ZNK3qOS12listIterator8untilEndEv(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  br i1 %23, label %25, label %24

24:                                               ; preds = %22
  call void @_ZN3qOS12listIteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #4
  br label %50

25:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %26 = call noundef ptr @_ZN3qOS12listIterator3getIPNS_5input7channelEEET_v(ptr noundef nonnull align 8 dereferenceable(32) %4) #4
  store ptr %26, ptr %5, align 8, !tbaa !5
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %"class.qOS::input::channel", ptr %27, i32 0, i32 4
  %29 = load ptr, ptr %28, align 8, !tbaa !19
  %30 = icmp ne ptr null, %29
  br i1 %30, label %31, label %47

31:                                               ; preds = %25
  %32 = getelementptr inbounds %"class.qOS::input::watcher", ptr %8, i32 0, i32 6
  %33 = load ptr, ptr %32, align 8, !tbaa !22
  %34 = icmp ne ptr null, %33
  br i1 %34, label %35, label %44

35:                                               ; preds = %31
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = load ptr, ptr %36, align 8, !tbaa !23
  %38 = getelementptr inbounds ptr, ptr %37, i64 2
  %39 = load ptr, ptr %38, align 8
  call void %39(ptr noundef nonnull align 8 dereferenceable(80) %36, i1 noundef zeroext true) #4
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = load ptr, ptr %40, align 8, !tbaa !23
  %42 = getelementptr inbounds ptr, ptr %41, i64 3
  %43 = load ptr, ptr %42, align 8
  call void %43(ptr noundef nonnull align 8 dereferenceable(80) %40) #4
  br label %46

44:                                               ; preds = %31
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN3qOS5input7channel13dispatchEventENS0_5eventE(ptr noundef nonnull align 8 dereferenceable(80) %45, i32 noundef 1) #4
  br label %46

46:                                               ; preds = %44, %35
  br label %47

47:                                               ; preds = %46, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %48

48:                                               ; preds = %47
  %49 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS12listIteratorppEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef 0) #4
  br label %22, !llvm.loop !25

50:                                               ; preds = %24
  br label %51

51:                                               ; preds = %50, %17, %1
  %52 = getelementptr inbounds %"class.qOS::input::watcher", ptr %8, i32 0, i32 3
  %53 = call noundef i64 @_ZNK3qOS4list6lengthEv(ptr noundef nonnull align 8 dereferenceable(56) %52) #4
  %54 = icmp ugt i64 %53, 0
  br i1 %54, label %55, label %94

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #4
  %56 = getelementptr inbounds %"class.qOS::input::watcher", ptr %8, i32 0, i32 3
  call void @_ZN3qOS4list5beginEv(ptr dead_on_unwind writable sret(%"class.qOS::listIterator") align 8 %6, ptr noundef nonnull align 8 dereferenceable(56) %56) #4
  br label %57

57:                                               ; preds = %91, %55
  %58 = call noundef zeroext i1 @_ZNK3qOS12listIterator8untilEndEv(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br i1 %58, label %60, label %59

59:                                               ; preds = %57
  call void @_ZN3qOS12listIteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  br label %93

60:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %61 = call noundef ptr @_ZN3qOS12listIterator3getIPNS_5input7channelEEET_v(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  store ptr %61, ptr %7, align 8, !tbaa !5
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = getelementptr inbounds %"class.qOS::input::channel", ptr %62, i32 0, i32 4
  %64 = load ptr, ptr %63, align 8, !tbaa !19
  %65 = icmp ne ptr null, %64
  br i1 %65, label %66, label %90

66:                                               ; preds = %60
  %67 = getelementptr inbounds %"class.qOS::input::watcher", ptr %8, i32 0, i32 7
  %68 = load ptr, ptr %67, align 8, !tbaa !27
  %69 = icmp ne ptr null, %68
  br i1 %69, label %70, label %87

70:                                               ; preds = %66
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = load ptr, ptr %71, align 8, !tbaa !23
  %73 = getelementptr inbounds ptr, ptr %72, i64 4
  %74 = load ptr, ptr %73, align 8
  %75 = call noundef zeroext i1 %74(ptr noundef nonnull align 8 dereferenceable(80) %71) #4
  br i1 %75, label %76, label %87

76:                                               ; preds = %70
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = load i8, ptr %3, align 1, !tbaa !15, !range !17, !noundef !18
  %79 = trunc i8 %78 to i1
  %80 = load ptr, ptr %77, align 8, !tbaa !23
  %81 = getelementptr inbounds ptr, ptr %80, i64 2
  %82 = load ptr, ptr %81, align 8
  call void %82(ptr noundef nonnull align 8 dereferenceable(80) %77, i1 noundef zeroext %79) #4
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = load ptr, ptr %83, align 8, !tbaa !23
  %85 = getelementptr inbounds ptr, ptr %84, i64 3
  %86 = load ptr, ptr %85, align 8
  call void %86(ptr noundef nonnull align 8 dereferenceable(80) %83) #4
  br label %89

87:                                               ; preds = %70, %66
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN3qOS5input7channel13dispatchEventENS0_5eventE(ptr noundef nonnull align 8 dereferenceable(80) %88, i32 noundef 1) #4
  br label %89

89:                                               ; preds = %87, %76
  br label %90

90:                                               ; preds = %89, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %91

91:                                               ; preds = %90
  %92 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS12listIteratorppEi(ptr noundef nonnull align 8 dereferenceable(32) %6, i32 noundef 0) #4
  br label %57, !llvm.loop !28

93:                                               ; preds = %59
  br label %94

94:                                               ; preds = %93, %51
  call void @llvm.lifetime.end.p0(i64 1, ptr %3) #4
  ret i1 true
}

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZN3qOS5timer7freeRunEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3

; Function Attrs: nounwind
declare noundef i64 @_ZNK3qOS4list6lengthEv(ptr noundef nonnull align 8 dereferenceable(56)) #3

; Function Attrs: nounwind
declare void @_ZN3qOS4list5beginEv(ptr dead_on_unwind writable sret(%"class.qOS::listIterator") align 8, ptr noundef nonnull align 8 dereferenceable(56)) #3

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK3qOS12listIterator8untilEndEv(ptr noundef nonnull align 8 dereferenceable(32)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3qOS12listIterator3getIPNS_5input7channelEEET_v(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS12listIteratorppEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS12listIteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress 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 #2 = { mustprogress 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 "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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !13, i64 176}
!10 = !{!"_ZTSN3qOS5input7watcherE", !11, i64 0, !6, i64 32, !12, i64 40, !12, i64 96, !14, i64 152, !13, i64 176, !6, i64 184, !6, i64 192}
!11 = !{!"_ZTSN3qOS4nodeE", !6, i64 8, !6, i64 16, !6, i64 24}
!12 = !{!"_ZTSN3qOS4listE", !11, i64 0, !6, i64 32, !6, i64 40, !13, i64 48}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN3qOS5timerE", !13, i64 8, !13, i64 16}
!15 = !{!16, !16, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!20, !6, i64 48}
!20 = !{!"_ZTSN3qOS5input7channelE", !11, i64 0, !21, i64 32, !7, i64 36, !6, i64 40, !6, i64 48, !13, i64 56, !13, i64 64, !13, i64 72}
!21 = !{!"_ZTSN3qOS5input5eventE", !7, i64 0}
!22 = !{!10, !6, i64 184}
!23 = !{!24, !24, i64 0}
!24 = !{!"vtable pointer", !8, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!10, !6, i64 192}
!28 = distinct !{!28, !26}


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

%"class.qOS::listIterator" = type { ptr, ptr, ptr, 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS5input7channel13dispatchEventENS0_5eventE(ptr noundef nonnull align 8 dereferenceable(80), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef zeroext i1 @_ZN3qOS5input7watcher5watchEv(ptr noundef nonnull align 8 dereferenceable(200) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca %"class.qOS::listIterator", align 8
  %3 = alloca %"class.qOS::listIterator", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 152
  %5 = getelementptr inbounds i8, ptr %0, i64 176
  %6 = load i64, ptr %5, align 8, !tbaa !5
  %7 = tail call noundef zeroext i1 @_ZN3qOS5timer7freeRunEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %6) #4
  %8 = getelementptr inbounds i8, ptr %0, i64 40
  %9 = tail call noundef i64 @_ZNK3qOS4list6lengthEv(ptr noundef nonnull align 8 dereferenceable(56) %8) #4
  %.not = icmp ne i64 %9, 0
  %brmerge.not = and i1 %7, %.not
  br i1 %brmerge.not, label %10, label %30

10:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #4
  call void @_ZN3qOS4list5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.qOS::listIterator") align 8 %2, ptr noundef nonnull align 8 dereferenceable(56) %8) #4
  %11 = call noundef zeroext i1 @_ZNK3qOS12listIterator8untilEndEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  br i1 %11, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %10
  %12 = getelementptr inbounds i8, ptr %0, i64 184
  br label %13

._crit_edge:                                      ; preds = %27, %10
  call void @_ZN3qOS12listIteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #4
  br label %30

13:                                               ; preds = %.lr.ph, %27
  %14 = call noundef ptr @_ZN3qOS12listIterator3getIPNS_5input7channelEEET_v(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  %15 = getelementptr inbounds i8, ptr %14, i64 48
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  %.not14 = icmp eq ptr %16, null
  br i1 %.not14, label %27, label %17

17:                                               ; preds = %13
  %18 = load ptr, ptr %12, align 8, !tbaa !17
  %.not15 = icmp eq ptr %18, null
  br i1 %.not15, label %26, label %19

19:                                               ; preds = %17
  %20 = load ptr, ptr %14, align 8, !tbaa !18
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %22 = load ptr, ptr %21, align 8
  call void %22(ptr noundef nonnull align 8 dereferenceable(80) %14, i1 noundef zeroext true) #4
  %23 = load ptr, ptr %14, align 8, !tbaa !18
  %24 = getelementptr inbounds i8, ptr %23, i64 24
  %25 = load ptr, ptr %24, align 8
  call void %25(ptr noundef nonnull align 8 dereferenceable(80) %14) #4
  br label %27

26:                                               ; preds = %17
  call void @_ZN3qOS5input7channel13dispatchEventENS0_5eventE(ptr noundef nonnull align 8 dereferenceable(80) %14, i32 noundef 1) #4
  br label %27

27:                                               ; preds = %19, %26, %13
  %28 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS12listIteratorppEi(ptr noundef nonnull align 8 dereferenceable(32) %2, i32 noundef 0) #4
  %29 = call noundef zeroext i1 @_ZNK3qOS12listIterator8untilEndEv(ptr noundef nonnull align 8 dereferenceable(32) %2) #4
  br i1 %29, label %13, label %._crit_edge, !llvm.loop !20

30:                                               ; preds = %1, %._crit_edge
  %31 = getelementptr inbounds i8, ptr %0, i64 96
  %32 = call noundef i64 @_ZNK3qOS4list6lengthEv(ptr noundef nonnull align 8 dereferenceable(56) %31) #4
  %.not11 = icmp eq i64 %32, 0
  br i1 %.not11, label %58, label %33

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #4
  call void @_ZN3qOS4list5beginEv(ptr dead_on_unwind nonnull writable sret(%"class.qOS::listIterator") align 8 %3, ptr noundef nonnull align 8 dereferenceable(56) %31) #4
  %34 = call noundef zeroext i1 @_ZNK3qOS12listIterator8untilEndEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br i1 %34, label %.lr.ph18, label %._crit_edge19

.lr.ph18:                                         ; preds = %33
  %35 = getelementptr inbounds i8, ptr %0, i64 192
  br label %36

._crit_edge19:                                    ; preds = %55, %33
  call void @_ZN3qOS12listIteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  br label %58

36:                                               ; preds = %.lr.ph18, %55
  %37 = call noundef ptr @_ZN3qOS12listIterator3getIPNS_5input7channelEEET_v(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  %38 = getelementptr inbounds i8, ptr %37, i64 48
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %.not12 = icmp eq ptr %39, null
  br i1 %.not12, label %55, label %40

40:                                               ; preds = %36
  %41 = load ptr, ptr %35, align 8, !tbaa !22
  %.not13 = icmp eq ptr %41, null
  br i1 %.not13, label %54, label %42

42:                                               ; preds = %40
  %43 = load ptr, ptr %37, align 8, !tbaa !18
  %44 = getelementptr inbounds i8, ptr %43, i64 32
  %45 = load ptr, ptr %44, align 8
  %46 = call noundef zeroext i1 %45(ptr noundef nonnull align 8 dereferenceable(80) %37) #4
  br i1 %46, label %47, label %54

47:                                               ; preds = %42
  %48 = load ptr, ptr %37, align 8, !tbaa !18
  %49 = getelementptr inbounds i8, ptr %48, i64 16
  %50 = load ptr, ptr %49, align 8
  call void %50(ptr noundef nonnull align 8 dereferenceable(80) %37, i1 noundef zeroext %7) #4
  %51 = load ptr, ptr %37, align 8, !tbaa !18
  %52 = getelementptr inbounds i8, ptr %51, i64 24
  %53 = load ptr, ptr %52, align 8
  call void %53(ptr noundef nonnull align 8 dereferenceable(80) %37) #4
  br label %55

54:                                               ; preds = %42, %40
  call void @_ZN3qOS5input7channel13dispatchEventENS0_5eventE(ptr noundef nonnull align 8 dereferenceable(80) %37, i32 noundef 1) #4
  br label %55

55:                                               ; preds = %47, %54, %36
  %56 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS12listIteratorppEi(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef 0) #4
  %57 = call noundef zeroext i1 @_ZNK3qOS12listIterator8untilEndEv(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br i1 %57, label %36, label %._crit_edge19, !llvm.loop !23

58:                                               ; preds = %._crit_edge19, %30
  ret i1 true
}

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZN3qOS5timer7freeRunEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare noundef i64 @_ZNK3qOS4list6lengthEv(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN3qOS4list5beginEv(ptr dead_on_unwind writable sret(%"class.qOS::listIterator") align 8, ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK3qOS12listIterator8untilEndEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3qOS12listIterator3getIPNS_5input7channelEEET_v(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS12listIteratorppEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS12listIteratorD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress 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 #2 = { mustprogress 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 "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, !12, i64 176}
!6 = !{!"_ZTSN3qOS5input7watcherE", !7, i64 0, !8, i64 32, !11, i64 40, !11, i64 96, !13, i64 152, !12, i64 176, !8, i64 184, !8, i64 192}
!7 = !{!"_ZTSN3qOS4nodeE", !8, i64 8, !8, i64 16, !8, i64 24}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN3qOS4listE", !7, i64 0, !8, i64 32, !8, i64 40, !12, i64 48}
!12 = !{!"long", !9, i64 0}
!13 = !{!"_ZTSN3qOS5timerE", !12, i64 8, !12, i64 16}
!14 = !{!15, !8, i64 48}
!15 = !{!"_ZTSN3qOS5input7channelE", !7, i64 0, !16, i64 32, !9, i64 36, !8, i64 40, !8, i64 48, !12, i64 56, !12, i64 64, !12, i64 72}
!16 = !{!"_ZTSN3qOS5input5eventE", !9, i64 0}
!17 = !{!6, !8, i64 184}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !10, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!6, !8, i64 192}
!23 = distinct !{!23, !21}


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