; LLVM IR from kmilo17pet/QuarkTS-cpp :: check/simple_dry_test.ll (Z17idleTask_callbackRN3qOS9taskEventE)

; 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::co::position" = type { i32 }
%"class.qOS::co::coContext" = type { i32, %"class.qOS::timer" }
%"class.qOS::timer" = type { ptr, i64, i64 }
%"struct.qOS::logger::source_location" = type { ptr, ptr, i64, i64 }

@__dso_handle = external hidden global i8
@pos1 = external dso_local global %"class.qOS::co::position", align 4
@.str = external hidden unnamed_addr constant [82 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZN3qOS6logger3endE = external constant ptr, align 8
@_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx = external hidden global %"class.qOS::co::coContext", align 8
@_ZGVZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx = external hidden global i64, align 8
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17idleTask_callbackRN3qOS9taskEventE(ptr noundef nonnull align 8 dereferenceable(48) %0) #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"struct.qOS::logger::source_location", align 8
  %5 = alloca %"struct.qOS::logger::source_location", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"struct.qOS::logger::source_location", align 8
  %9 = alloca %"struct.qOS::logger::source_location", align 8
  %10 = alloca %"struct.qOS::logger::source_location", align 8
  %11 = alloca %"struct.qOS::logger::source_location", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #0
  %12 = load ptr, ptr %2, align 8, !tbaa !5
  %13 = call noundef zeroext i1 @_ZNK3qOS9taskEvent9firstCallEv(ptr noundef nonnull align 8 dereferenceable(48) %12) #0
  br i1 %13, label %14, label %26

14:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #0
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind writable sret(%"struct.qOS::logger::source_location") align 8 %4, ptr noundef @.str, ptr noundef @.str.20, i64 noundef 75, i64 noundef 9) #0
  %15 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %4) #0
  %16 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %15, ptr noundef @.str.21)
  %17 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsERKj(ptr noundef nonnull align 8 dereferenceable(128) %16, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %18 = load ptr, ptr @_ZN3qOS6logger3endE, align 8, !tbaa !5
  %19 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %17, ptr noundef %18)
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #0
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #0
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind writable sret(%"struct.qOS::logger::source_location") align 8 %5, ptr noundef @.str, ptr noundef @.str.20, i64 noundef 76, i64 noundef 9) #0
  %20 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %5) #0
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = call noundef nonnull align 8 dereferenceable(150) ptr @_ZN3qOS9taskEvent8thisTaskEv(ptr noundef nonnull align 8 dereferenceable(48) %21) #0
  %23 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsERKNS_4taskE(ptr noundef nonnull align 8 dereferenceable(128) %20, ptr noundef nonnull align 8 dereferenceable(150) %22)
  %24 = load ptr, ptr @_ZN3qOS6logger3endE, align 8, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %23, ptr noundef %24)
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #0
  br label %26

26:                                               ; preds = %14, %1
  call void @_ZN3qOS2co7reenterEv() #0
  %27 = load atomic i8, ptr @_ZGVZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx acquire, align 8
  %28 = icmp eq i8 %27, 0
  br i1 %28, label %29, label %35, !prof !9

29:                                               ; preds = %26
  %30 = call i32 @__cxa_guard_acquire(ptr @_ZGVZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx) #0
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %35

32:                                               ; preds = %29
  invoke void @_ZN3qOS2co9coContextC2Ev(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
          to label %33 unwind label %40

33:                                               ; preds = %32
  %34 = call i32 @__cxa_atexit(ptr @_ZN3qOS2co9coContextD2Ev, ptr @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, ptr @__dso_handle) #0
  call void @__cxa_guard_release(ptr @_ZGVZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx) #0
  br label %35

35:                                               ; preds = %33, %29, %26
  call void @_ZN3qOS2co9coContext10saveHandleEv() #0
  br label %36

36:                                               ; preds = %137, %35
  %37 = call noundef zeroext i1 @_ZNK3qOS2co9coContextneEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef -1)
  br i1 %37, label %38, label %139

38:                                               ; preds = %36
  br i1 false, label %39, label %45

39:                                               ; preds = %38
  br label %44

40:                                               ; preds = %32
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %6, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %7, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx) #0
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #0
  br label %140

44:                                               ; preds = %39
  br label %137

45:                                               ; preds = %38
  br i1 false, label %46, label %48

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %132, %129, %122, %121, %115, %109, %103, %101, %88, %86, %73, %71, %46
  br label %139

48:                                               ; preds = %45
  %49 = call noundef i32 @_ZNK3qOS2co9coContextclEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
  switch i32 %49, label %134 [
    i32 0, label %50
    i32 80, label %53
    i32 83, label %69
    i32 85, label %84
    i32 87, label %99
    i32 88, label %108
    i32 89, label %114
    i32 90, label %120
    i32 96, label %128
  ]

50:                                               ; preds = %48
  br label %51

51:                                               ; preds = %133, %50
  call void @_ZN3qOS2co11getPositionERNS0_8positionE(ptr noundef nonnull align 4 dereferenceable(4) @pos1) #0
  %52 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3qOS2co8positionaSEi(ptr noundef nonnull align 4 dereferenceable(4) @pos1, i32 noundef 80)
  br label %53

53:                                               ; preds = %51, %48
  call void @_ZN3qOS2co5crNOPEv() #0
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #0
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind writable sret(%"struct.qOS::logger::source_location") align 8 %8, ptr noundef @.str, ptr noundef @.str.20, i64 noundef 81, i64 noundef 13) #0
  %54 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %8) #0
  %55 = load ptr, ptr %2, align 8, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(150) ptr @_ZN3qOS9taskEvent8thisTaskEv(ptr noundef nonnull align 8 dereferenceable(48) %55) #0
  %57 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsERKNS_4taskE(ptr noundef nonnull align 8 dereferenceable(128) %54, ptr noundef nonnull align 8 dereferenceable(150) %56)
  %58 = load ptr, ptr @_ZN3qOS6logger3endE, align 8, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %57, ptr noundef %58)
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #0
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #0
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind writable sret(%"struct.qOS::logger::source_location") align 8 %9, ptr noundef @.str, ptr noundef @.str.20, i64 noundef 82, i64 noundef 13) #0
  %60 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %9) #0
  %61 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %60, ptr noundef @.str.22)
  %62 = load ptr, ptr @_ZN3qOS6logger3endE, align 8, !tbaa !5
  %63 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %61, ptr noundef %62)
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #0
  %64 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co5delayEm(i64 noundef %64) #0
  %65 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co9coContextclEm(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i64 noundef %65)
  %66 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef 83)
  br label %67

67:                                               ; preds = %53
  br i1 false, label %68, label %73

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68, %48
  %70 = call noundef zeroext i1 @_ZNK3qOS2co9coContext7timeoutEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
  br i1 %70, label %72, label %71

71:                                               ; preds = %69
  br label %47

72:                                               ; preds = %69
  br label %74

73:                                               ; preds = %67
  br label %47

74:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #0
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind writable sret(%"struct.qOS::logger::source_location") align 8 %10, ptr noundef @.str, ptr noundef @.str.20, i64 noundef 84, i64 noundef 13) #0
  %75 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %10) #0
  %76 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %75, ptr noundef @.str.23)
  %77 = load ptr, ptr @_ZN3qOS6logger3endE, align 8, !tbaa !5
  %78 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %76, ptr noundef %77)
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #0
  %79 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co5delayEm(i64 noundef %79) #0
  %80 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co9coContextclEm(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i64 noundef %80)
  %81 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef 85)
  br label %82

82:                                               ; preds = %74
  br i1 false, label %83, label %88

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83, %48
  %85 = call noundef zeroext i1 @_ZNK3qOS2co9coContext7timeoutEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
  br i1 %85, label %87, label %86

86:                                               ; preds = %84
  br label %47

87:                                               ; preds = %84
  br label %89

88:                                               ; preds = %82
  br label %47

89:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #0
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind writable sret(%"struct.qOS::logger::source_location") align 8 %11, ptr noundef @.str, ptr noundef @.str.20, i64 noundef 86, i64 noundef 13) #0
  %90 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %11) #0
  %91 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %90, ptr noundef @.str.24)
  %92 = load ptr, ptr @_ZN3qOS6logger3endE, align 8, !tbaa !5
  %93 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %91, ptr noundef %92)
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #0
  %94 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co5delayEm(i64 noundef %94) #0
  %95 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co9coContextclEm(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i64 noundef %95)
  %96 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef 87)
  br label %97

97:                                               ; preds = %89
  br i1 false, label %98, label %103

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98, %48
  %100 = call noundef zeroext i1 @_ZNK3qOS2co9coContext7timeoutEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
  br i1 %100, label %102, label %101

101:                                              ; preds = %99
  br label %47

102:                                              ; preds = %99
  br label %104

103:                                              ; preds = %97
  br label %47

104:                                              ; preds = %102
  call void @_ZN3qOS2co9waitUntilEb(i1 noundef zeroext true) #0
  call void @_ZN3qOS2co5crNOPEv() #0
  %105 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef 88)
  br label %106

106:                                              ; preds = %104
  br i1 false, label %107, label %109

107:                                              ; preds = %106
  br label %108

108:                                              ; preds = %107, %48
  br label %110

109:                                              ; preds = %106
  br label %47

110:                                              ; preds = %108
  call void @_ZN3qOS2co9waitUntilEbm(i1 noundef zeroext true, i64 noundef 500) #0
  call void @_ZN3qOS2co5crNOPEv() #0
  %111 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef 89)
  br label %112

112:                                              ; preds = %110
  br i1 false, label %113, label %115

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113, %48
  br label %116

115:                                              ; preds = %112
  br label %47

116:                                              ; preds = %114
  call void @_ZN3qOS2co5yieldEv() #0
  call void @_ZN3qOS2co5crNOPEv() #0
  %117 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef 90)
  br label %118

118:                                              ; preds = %116
  br i1 false, label %119, label %121

119:                                              ; preds = %118
  br label %120

120:                                              ; preds = %119, %48
  br label %122

121:                                              ; preds = %118
  br label %47

122:                                              ; preds = %120
  call void @_ZN3qOS2co7restartEv() #0
  %123 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef 0)
  br label %47

124:                                              ; No predecessors!
  %125 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef 96)
  br label %126

126:                                              ; preds = %124
  br i1 false, label %127, label %129

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127, %48
  br label %130

129:                                              ; preds = %126
  br label %47

130:                                              ; preds = %128
  call void @_ZN3qOS2co5untilEb(i1 noundef zeroext false) #0
  %131 = call noundef zeroext i1 @_ZNK3qOS2co9coContext7timeoutEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
  br i1 %131, label %133, label %132

132:                                              ; preds = %130
  br label %47

133:                                              ; preds = %130
  br label %51, !llvm.loop !10

134:                                              ; preds = %48
  br label %135

135:                                              ; preds = %134
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136, %44
  %138 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef -1)
  br label %36, !llvm.loop !12

139:                                              ; preds = %47, %36
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #0
  ret void

140:                                              ; preds = %40
  %141 = load ptr, ptr %6, align 8
  %142 = load i32, ptr %7, align 4
  %143 = insertvalue { ptr, i32 } poison, ptr %141, 0
  %144 = insertvalue { ptr, i32 } %143, i32 %142, 1
  resume { ptr, i32 } %144
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3qOS9taskEvent9firstCallEv(ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

; Function Attrs: nounwind
declare noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef, ptr noundef nonnull align 8 dereferenceable(32)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind noalias writable sret(%"struct.qOS::logger::source_location") align 8, ptr noundef, ptr noundef, i64 noundef, i64 noundef) #1 align 2

declare noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) #6

declare noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsERKj(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(4)) #6

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

declare noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsERKNS_4taskE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(150)) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(150) ptr @_ZN3qOS9taskEvent8thisTaskEv(ptr noundef nonnull align 8 dereferenceable(48)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co7reenterEv() #4

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #0

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #0

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co9coContext10saveHandleEv() #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3qOS2co9coContextneEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co11getPositionERNS0_8positionE(ptr noundef nonnull align 4 dereferenceable(4)) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3qOS2co8positionaSEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co5crNOPEv() #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co5delayEm(i64 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co9coContextclEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3qOS2co9coContext7timeoutEv(ptr noundef nonnull align 8 dereferenceable(32)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co9waitUntilEb(i1 noundef zeroext) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co9waitUntilEbm(i1 noundef zeroext, i64 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co5yieldEv() #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co7restartEv() #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co5untilEb(i1 noundef zeroext) #4

attributes #0 = { nounwind }
attributes #1 = { 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 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { "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" }

!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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


; 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::co::position" = type { i32 }
%"class.qOS::co::coContext" = type { i32, %"class.qOS::timer" }
%"class.qOS::timer" = type { ptr, i64, i64 }
%"struct.qOS::logger::source_location" = type { ptr, ptr, i64, i64 }

@__dso_handle = external hidden global i8
@pos1 = external dso_local global %"class.qOS::co::position", align 4
@.str = external hidden unnamed_addr constant [82 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [10 x i8], align 1
@_ZN3qOS6logger3endE = external local_unnamed_addr constant ptr, align 8
@_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx = external hidden global %"class.qOS::co::coContext", align 8
@_ZGVZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx = external hidden global i64, align 8
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nofree nounwind
declare i32 @__cxa_atexit(ptr, ptr, ptr) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_Z17idleTask_callbackRN3qOS9taskEventE(ptr noundef nonnull align 8 dereferenceable(48) %0) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"struct.qOS::logger::source_location", align 8
  %4 = alloca %"struct.qOS::logger::source_location", align 8
  %5 = alloca %"struct.qOS::logger::source_location", align 8
  %6 = alloca %"struct.qOS::logger::source_location", align 8
  %7 = alloca %"struct.qOS::logger::source_location", align 8
  %8 = alloca %"struct.qOS::logger::source_location", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  %9 = tail call noundef zeroext i1 @_ZNK3qOS9taskEvent9firstCallEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #7
  br i1 %9, label %10, label %20

10:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #7
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind nonnull writable sret(%"struct.qOS::logger::source_location") align 8 %3, ptr noundef nonnull @.str, ptr noundef nonnull @.str.20, i64 noundef 75, i64 noundef 9) #7
  %11 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %3) #7
  %12 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %11, ptr noundef nonnull @.str.21)
  %13 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsERKj(ptr noundef nonnull align 8 dereferenceable(128) %12, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %14 = load ptr, ptr @_ZN3qOS6logger3endE, align 8, !tbaa !5
  %15 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %13, ptr noundef %14)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #7
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind nonnull writable sret(%"struct.qOS::logger::source_location") align 8 %4, ptr noundef nonnull @.str, ptr noundef nonnull @.str.20, i64 noundef 76, i64 noundef 9) #7
  %16 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  %17 = call noundef nonnull align 8 dereferenceable(150) ptr @_ZN3qOS9taskEvent8thisTaskEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #7
  %18 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsERKNS_4taskE(ptr noundef nonnull align 8 dereferenceable(128) %16, ptr noundef nonnull align 8 dereferenceable(150) %17)
  %19 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %18, ptr noundef %14)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #7
  br label %20

20:                                               ; preds = %10, %1
  call void @_ZN3qOS2co7reenterEv() #7
  %21 = load atomic i8, ptr @_ZGVZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx acquire, align 8
  %22 = icmp eq i8 %21, 0
  br i1 %22, label %23, label %28, !prof !9

23:                                               ; preds = %20
  %24 = call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx) #7
  %.not = icmp eq i32 %24, 0
  br i1 %.not, label %28, label %25

25:                                               ; preds = %23
  invoke void @_ZN3qOS2co9coContextC2Ev(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
          to label %26 unwind label %30

26:                                               ; preds = %25
  %27 = call i32 @__cxa_atexit(ptr nonnull @_ZN3qOS2co9coContextD2Ev, ptr nonnull @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, ptr nonnull @__dso_handle) #7
  call void @__cxa_guard_release(ptr nonnull @_ZGVZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx) #7
  br label %28

28:                                               ; preds = %26, %23, %20
  call void @_ZN3qOS2co9coContext10saveHandleEv() #7
  %29 = call noundef zeroext i1 @_ZNK3qOS2co9coContextneEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef -1)
  br i1 %29, label %.lr.ph, label %.loopexit

30:                                               ; preds = %25
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_guard_abort(ptr nonnull @_ZGVZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  resume { ptr, i32 } %31

.lr.ph:                                           ; preds = %28, %70
  %32 = call noundef i32 @_ZNK3qOS2co9coContextclEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
  switch i32 %32, label %70 [
    i32 0, label %.loopexit4
    i32 80, label %.loopexit5
    i32 83, label %44
    i32 85, label %53
    i32 87, label %62
    i32 88, label %65
    i32 89, label %66
    i32 90, label %67
    i32 96, label %68
  ]

.loopexit4:                                       ; preds = %.lr.ph, %68
  call void @_ZN3qOS2co11getPositionERNS0_8positionE(ptr noundef nonnull align 4 dereferenceable(4) @pos1) #7
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN3qOS2co8positionaSEi(ptr noundef nonnull align 4 dereferenceable(4) @pos1, i32 noundef 80)
  br label %.loopexit5

.loopexit5:                                       ; preds = %.lr.ph, %.loopexit4
  call void @_ZN3qOS2co5crNOPEv() #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind nonnull writable sret(%"struct.qOS::logger::source_location") align 8 %5, ptr noundef nonnull @.str, ptr noundef nonnull @.str.20, i64 noundef 81, i64 noundef 13) #7
  %34 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  %35 = call noundef nonnull align 8 dereferenceable(150) ptr @_ZN3qOS9taskEvent8thisTaskEv(ptr noundef nonnull align 8 dereferenceable(48) %0) #7
  %36 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsERKNS_4taskE(ptr noundef nonnull align 8 dereferenceable(128) %34, ptr noundef nonnull align 8 dereferenceable(150) %35)
  %37 = load ptr, ptr @_ZN3qOS6logger3endE, align 8, !tbaa !5
  %38 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %36, ptr noundef %37)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind nonnull writable sret(%"struct.qOS::logger::source_location") align 8 %6, ptr noundef nonnull @.str, ptr noundef nonnull @.str.20, i64 noundef 82, i64 noundef 13) #7
  %39 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %6) #7
  %40 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %39, ptr noundef nonnull @.str.22)
  %41 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %40, ptr noundef %37)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  %42 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co5delayEm(i64 noundef %42) #7
  %43 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co9coContextclEm(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i64 noundef %43)
  br label %.loopexit.sink.split

44:                                               ; preds = %.lr.ph
  %45 = call noundef zeroext i1 @_ZNK3qOS2co9coContext7timeoutEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
  br i1 %45, label %46, label %.loopexit

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind nonnull writable sret(%"struct.qOS::logger::source_location") align 8 %7, ptr noundef nonnull @.str, ptr noundef nonnull @.str.20, i64 noundef 84, i64 noundef 13) #7
  %47 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  %48 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %47, ptr noundef nonnull @.str.23)
  %49 = load ptr, ptr @_ZN3qOS6logger3endE, align 8, !tbaa !5
  %50 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %48, ptr noundef %49)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  %51 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co5delayEm(i64 noundef %51) #7
  %52 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co9coContextclEm(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i64 noundef %52)
  br label %.loopexit.sink.split

53:                                               ; preds = %.lr.ph
  %54 = call noundef zeroext i1 @_ZNK3qOS2co9coContext7timeoutEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
  br i1 %54, label %55, label %.loopexit

55:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #7
  call void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind nonnull writable sret(%"struct.qOS::logger::source_location") align 8 %8, ptr noundef nonnull @.str, ptr noundef nonnull @.str.20, i64 noundef 86, i64 noundef 13) #7
  %56 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger3outENS0_11logSeverityERKNS0_15source_locationE(i32 noundef 0, ptr noundef nonnull align 8 dereferenceable(32) %8) #7
  %57 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %56, ptr noundef nonnull @.str.24)
  %58 = load ptr, ptr @_ZN3qOS6logger3endE, align 8, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128) %57, ptr noundef %58)
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #7
  %60 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co5delayEm(i64 noundef %60) #7
  %61 = call noundef i64 @_ZN3qOSli4_secEe(x86_fp80 noundef 0xK3FFE8000000000000000)
  call void @_ZN3qOS2co9coContextclEm(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i64 noundef %61)
  br label %.loopexit.sink.split

62:                                               ; preds = %.lr.ph
  %63 = call noundef zeroext i1 @_ZNK3qOS2co9coContext7timeoutEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
  br i1 %63, label %64, label %.loopexit

64:                                               ; preds = %62
  call void @_ZN3qOS2co9waitUntilEb(i1 noundef zeroext true) #7
  call void @_ZN3qOS2co5crNOPEv() #7
  br label %.loopexit.sink.split

65:                                               ; preds = %.lr.ph
  call void @_ZN3qOS2co9waitUntilEbm(i1 noundef zeroext true, i64 noundef 500) #7
  call void @_ZN3qOS2co5crNOPEv() #7
  br label %.loopexit.sink.split

66:                                               ; preds = %.lr.ph
  call void @_ZN3qOS2co5yieldEv() #7
  call void @_ZN3qOS2co5crNOPEv() #7
  br label %.loopexit.sink.split

67:                                               ; preds = %.lr.ph
  call void @_ZN3qOS2co7restartEv() #7
  br label %.loopexit.sink.split

68:                                               ; preds = %.lr.ph
  call void @_ZN3qOS2co5untilEb(i1 noundef zeroext false) #7
  %69 = call noundef zeroext i1 @_ZNK3qOS2co9coContext7timeoutEv(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx)
  br i1 %69, label %.loopexit4, label %.loopexit, !llvm.loop !10

70:                                               ; preds = %.lr.ph
  %71 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef -1)
  %72 = call noundef zeroext i1 @_ZNK3qOS2co9coContextneEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef -1)
  br i1 %72, label %.lr.ph, label %.loopexit, !llvm.loop !12

.loopexit.sink.split:                             ; preds = %67, %66, %65, %64, %55, %46, %.loopexit5
  %.sink = phi i32 [ 83, %.loopexit5 ], [ 85, %46 ], [ 87, %55 ], [ 88, %64 ], [ 89, %65 ], [ 90, %66 ], [ 0, %67 ]
  %73 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32) @_ZZ17idleTask_callbackRN3qOS9taskEventEE6co_ctx, i32 noundef %.sink)
  br label %.loopexit

.loopexit:                                        ; preds = %70, %.loopexit.sink.split, %28, %68, %62, %53, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  ret void
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3qOS9taskEvent9firstCallEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS6logger15source_location7currentEPKcS3_mm(ptr dead_on_unwind noalias writable sret(%"struct.qOS::logger::source_location") align 8, ptr noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsEPKc(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef) local_unnamed_addr #6

declare noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsERKj(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

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

declare noundef nonnull align 8 dereferenceable(128) ptr @_ZN3qOS6logger7_loggerlsERKNS_4taskE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(150)) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(150) ptr @_ZN3qOS9taskEvent8thisTaskEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co7reenterEv() local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #0

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co9coContext10saveHandleEv() local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3qOS2co9coContextneEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co11getPositionERNS0_8positionE(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3qOS2co8positionaSEi(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co5crNOPEv() local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co5delayEm(i64 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co9coContextclEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZN3qOS2co9coContextaSEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3qOS2co9coContext7timeoutEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co9waitUntilEb(i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co9waitUntilEbm(i1 noundef zeroext, i64 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co5yieldEv() local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co7restartEv() local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3qOS2co5untilEb(i1 noundef zeroext) local_unnamed_addr #4

attributes #0 = { nofree nounwind }
attributes #1 = { 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 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { "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 #7 = { 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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


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