; LLVM IR from whoiswelliton/Computer_Engineering_UTFPR-PB :: Embedded_Systems/TIVA Connected TM4C1294XL Projects/00 - freeRTOS10_on_TIVA (xStreamBufferSend)

; 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.xTIME_OUT = type { i64, i32 }
%struct.StreamBufferDef_t = type { i64, i64, i64, i64, ptr, ptr, ptr, i8 }

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @vPortRaiseBASEPRI() #1

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

declare void @vPortEnterCritical() #2

declare void @vPortExitCritical() #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @xStreamBufferSpacesAvailable(ptr noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local i64 @xStreamBufferSend(ptr noundef %0, ptr noundef %1, i64 noundef %2, i32 noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %struct.xTIME_OUT, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %15, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  store i64 0, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %16 = load i64, ptr %7, align 8, !tbaa !9
  store i64 %16, ptr %12, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %21

19:                                               ; preds = %4
  call void @vPortRaiseBASEPRI()
  br label %20

20:                                               ; preds = %20, %19
  br label %20

21:                                               ; preds = %4
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %26

24:                                               ; preds = %21
  call void @vPortRaiseBASEPRI()
  br label %25

25:                                               ; preds = %25, %24
  br label %25

26:                                               ; preds = %21
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.StreamBufferDef_t, ptr %27, i32 0, i32 7
  %29 = load i8, ptr %28, align 8, !tbaa !13
  %30 = zext i8 %29 to i32
  %31 = and i32 %30, 1
  %32 = icmp ne i32 %31, 0
  br i1 %32, label %33, label %52

33:                                               ; preds = %26
  %34 = load i64, ptr %12, align 8, !tbaa !9
  %35 = add i64 %34, 8
  store i64 %35, ptr %12, align 8, !tbaa !9
  %36 = load i64, ptr %12, align 8, !tbaa !9
  %37 = load i64, ptr %7, align 8, !tbaa !9
  %38 = icmp ugt i64 %36, %37
  %39 = zext i1 %38 to i32
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %43

41:                                               ; preds = %33
  call void @vPortRaiseBASEPRI()
  br label %42

42:                                               ; preds = %42, %41
  br label %42

43:                                               ; preds = %33
  %44 = load i64, ptr %12, align 8, !tbaa !9
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.StreamBufferDef_t, ptr %45, i32 0, i32 2
  %47 = load i64, ptr %46, align 8, !tbaa !15
  %48 = icmp ugt i64 %44, %47
  br i1 %48, label %49, label %50

49:                                               ; preds = %43
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %51

50:                                               ; preds = %43
  store i64 1, ptr %14, align 8, !tbaa !9
  br label %51

51:                                               ; preds = %50, %49
  br label %64

52:                                               ; preds = %26
  %53 = load i64, ptr %12, align 8, !tbaa !9
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.StreamBufferDef_t, ptr %54, i32 0, i32 2
  %56 = load i64, ptr %55, align 8, !tbaa !15
  %57 = icmp ugt i64 %53, %56
  br i1 %57, label %58, label %62

58:                                               ; preds = %52
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.StreamBufferDef_t, ptr %59, i32 0, i32 2
  %61 = load i64, ptr %60, align 8, !tbaa !15
  store i64 %61, ptr %12, align 8, !tbaa !9
  store i64 1, ptr %14, align 8, !tbaa !9
  br label %63

62:                                               ; preds = %52
  store i64 1, ptr %14, align 8, !tbaa !9
  br label %63

63:                                               ; preds = %62, %58
  br label %64

64:                                               ; preds = %63, %51
  %65 = load i32, ptr %8, align 4, !tbaa !11
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %101

67:                                               ; preds = %64
  %68 = load i64, ptr %14, align 8, !tbaa !9
  %69 = icmp eq i64 %68, 1
  br i1 %69, label %70, label %101

70:                                               ; preds = %67
  call void @vTaskSetTimeOutState(ptr noundef %13)
  br label %71

71:                                               ; preds = %97, %70
  call void @vPortEnterCritical()
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = call i64 @xStreamBufferSpacesAvailable(ptr noundef %72)
  store i64 %73, ptr %11, align 8, !tbaa !9
  %74 = load i64, ptr %11, align 8, !tbaa !9
  %75 = load i64, ptr %12, align 8, !tbaa !9
  %76 = icmp ult i64 %74, %75
  br i1 %76, label %77, label %91

77:                                               ; preds = %71
  %78 = call i64 @xTaskGenericNotifyStateClear(ptr noundef null, i64 noundef 0)
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.StreamBufferDef_t, ptr %79, i32 0, i32 5
  %81 = load volatile ptr, ptr %80, align 8, !tbaa !16
  %82 = icmp eq ptr %81, null
  %83 = zext i1 %82 to i32
  %84 = icmp eq i32 %83, 0
  br i1 %84, label %85, label %87

85:                                               ; preds = %77
  call void @vPortRaiseBASEPRI()
  br label %86

86:                                               ; preds = %86, %85
  br label %86

87:                                               ; preds = %77
  %88 = call ptr @xTaskGetCurrentTaskHandle()
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.StreamBufferDef_t, ptr %89, i32 0, i32 5
  store volatile ptr %88, ptr %90, align 8, !tbaa !16
  br label %92

91:                                               ; preds = %71
  call void @vPortExitCritical()
  br label %100

92:                                               ; preds = %87
  call void @vPortExitCritical()
  %93 = load i32, ptr %8, align 4, !tbaa !11
  %94 = call i64 @xTaskGenericNotifyWait(i64 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef null, i32 noundef %93)
  %95 = load ptr, ptr %9, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.StreamBufferDef_t, ptr %95, i32 0, i32 5
  store volatile ptr null, ptr %96, align 8, !tbaa !16
  br label %97

97:                                               ; preds = %92
  %98 = call i64 @xTaskCheckForTimeOut(ptr noundef %13, ptr noundef %8)
  %99 = icmp eq i64 %98, 0
  br i1 %99, label %71, label %100, !llvm.loop !17

100:                                              ; preds = %97, %91
  br label %102

101:                                              ; preds = %67, %64
  br label %102

102:                                              ; preds = %101, %100
  %103 = load i64, ptr %11, align 8, !tbaa !9
  %104 = icmp eq i64 %103, 0
  br i1 %104, label %105, label %108

105:                                              ; preds = %102
  %106 = load ptr, ptr %9, align 8, !tbaa !5
  %107 = call i64 @xStreamBufferSpacesAvailable(ptr noundef %106)
  store i64 %107, ptr %11, align 8, !tbaa !9
  br label %109

108:                                              ; preds = %102
  br label %109

109:                                              ; preds = %108, %105
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = load i64, ptr %7, align 8, !tbaa !9
  %113 = load i64, ptr %11, align 8, !tbaa !9
  %114 = load i64, ptr %12, align 8, !tbaa !9
  %115 = call i64 @prvWriteMessageToBuffer(ptr noundef %110, ptr noundef %111, i64 noundef %112, i64 noundef %113, i64 noundef %114)
  store i64 %115, ptr %10, align 8, !tbaa !9
  %116 = load i64, ptr %10, align 8, !tbaa !9
  %117 = icmp ugt i64 %116, 0
  br i1 %117, label %118, label %141

118:                                              ; preds = %109
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = call i64 @prvBytesInBuffer(ptr noundef %119)
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.StreamBufferDef_t, ptr %121, i32 0, i32 3
  %123 = load i64, ptr %122, align 8, !tbaa !19
  %124 = icmp uge i64 %120, %123
  br i1 %124, label %125, label %139

125:                                              ; preds = %118
  call void @vTaskSuspendAll()
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.StreamBufferDef_t, ptr %126, i32 0, i32 4
  %128 = load volatile ptr, ptr %127, align 8, !tbaa !20
  %129 = icmp ne ptr %128, null
  br i1 %129, label %130, label %137

130:                                              ; preds = %125
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.StreamBufferDef_t, ptr %131, i32 0, i32 4
  %133 = load volatile ptr, ptr %132, align 8, !tbaa !20
  %134 = call i64 @xTaskGenericNotify(ptr noundef %133, i64 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef null)
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.StreamBufferDef_t, ptr %135, i32 0, i32 4
  store volatile ptr null, ptr %136, align 8, !tbaa !20
  br label %137

137:                                              ; preds = %130, %125
  %138 = call i64 @xTaskResumeAll()
  br label %140

139:                                              ; preds = %118
  br label %140

140:                                              ; preds = %139, %137
  br label %142

141:                                              ; preds = %109
  br label %142

142:                                              ; preds = %141, %140
  %143 = load i64, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  ret i64 %143
}

declare void @vTaskSetTimeOutState(ptr noundef) #2

declare i64 @xTaskGenericNotifyStateClear(ptr noundef, i64 noundef) #2

declare ptr @xTaskGetCurrentTaskHandle() #2

declare i64 @xTaskGenericNotifyWait(i64 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #2

declare i64 @xTaskCheckForTimeOut(ptr noundef, ptr noundef) #2

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

declare void @vTaskSuspendAll() #2

declare i64 @xTaskGenericNotify(ptr noundef, i64 noundef, i32 noundef, i32 noundef, ptr noundef) #2

declare i64 @xTaskResumeAll() #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { alwaysinline 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 = { "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 = { 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, !7, i64 56}
!14 = !{!"StreamBufferDef_t", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !7, i64 56}
!15 = !{!14, !10, i64 16}
!16 = !{!14, !6, i64 40}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!14, !10, i64 24}
!20 = !{!14, !6, i64 32}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.xTIME_OUT = type { i64, i32 }

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden void @vPortRaiseBASEPRI() local_unnamed_addr #1

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

declare void @vPortEnterCritical() local_unnamed_addr #2

declare void @vPortExitCritical() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @xStreamBufferSpacesAvailable(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare hidden i64 @prvBytesInBuffer(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local i64 @xStreamBufferSend(ptr noundef %0, ptr noundef %1, i64 noundef %2, i32 noundef %3) local_unnamed_addr #3 {
  %5 = alloca i32, align 4
  %6 = alloca %struct.xTIME_OUT, align 8
  store i32 %3, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %7 = icmp eq ptr %1, null
  br i1 %7, label %8, label %10

8:                                                ; preds = %4
  tail call void @vPortRaiseBASEPRI()
  br label %9

9:                                                ; preds = %9, %8
  br label %9

10:                                               ; preds = %4
  %11 = icmp eq ptr %0, null
  br i1 %11, label %12, label %14

12:                                               ; preds = %10
  tail call void @vPortRaiseBASEPRI()
  br label %13

13:                                               ; preds = %13, %12
  br label %13

14:                                               ; preds = %10
  %15 = getelementptr inbounds i8, ptr %0, i64 56
  %16 = load i8, ptr %15, align 8, !tbaa !9
  %17 = and i8 %16, 1
  %.not = icmp eq i8 %17, 0
  br i1 %.not, label %27, label %18

18:                                               ; preds = %14
  %19 = icmp ugt i64 %2, -9
  br i1 %19, label %20, label %22

20:                                               ; preds = %18
  tail call void @vPortRaiseBASEPRI()
  br label %21

21:                                               ; preds = %21, %20
  br label %21

22:                                               ; preds = %18
  %23 = add nuw i64 %2, 8
  %24 = getelementptr inbounds i8, ptr %0, i64 16
  %25 = load i64, ptr %24, align 8, !tbaa !13
  %26 = icmp ule i64 %23, %25
  br label %30

27:                                               ; preds = %14
  %28 = getelementptr inbounds i8, ptr %0, i64 16
  %29 = load i64, ptr %28, align 8, !tbaa !13
  %.48 = tail call i64 @llvm.umin.i64(i64 %29, i64 %2)
  br label %30

30:                                               ; preds = %27, %22
  %.034 = phi i64 [ %23, %22 ], [ %.48, %27 ]
  %31 = phi i1 [ %26, %22 ], [ true, %27 ]
  %32 = icmp ne i32 %3, 0
  %or.cond = and i1 %32, %31
  br i1 %or.cond, label %33, label %.thread

33:                                               ; preds = %30
  call void @vTaskSetTimeOutState(ptr noundef nonnull %6) #5
  %34 = getelementptr inbounds i8, ptr %0, i64 40
  br label %35

35:                                               ; preds = %43, %33
  call void @vPortEnterCritical() #5
  %36 = call i64 @xStreamBufferSpacesAvailable(ptr noundef nonnull %0)
  %37 = icmp ult i64 %36, %.034
  br i1 %37, label %38, label %49

38:                                               ; preds = %35
  %39 = call i64 @xTaskGenericNotifyStateClear(ptr noundef null, i64 noundef 0) #5
  %40 = load volatile ptr, ptr %34, align 8, !tbaa !14
  %.not44 = icmp eq ptr %40, null
  br i1 %.not44, label %43, label %41

41:                                               ; preds = %38
  call void @vPortRaiseBASEPRI()
  br label %42

42:                                               ; preds = %42, %41
  br label %42

43:                                               ; preds = %38
  %44 = call ptr @xTaskGetCurrentTaskHandle() #5
  store volatile ptr %44, ptr %34, align 8, !tbaa !14
  call void @vPortExitCritical() #5
  %45 = load i32, ptr %5, align 4, !tbaa !5
  %46 = call i64 @xTaskGenericNotifyWait(i64 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef null, i32 noundef %45) #5
  store volatile ptr null, ptr %34, align 8, !tbaa !14
  %47 = call i64 @xTaskCheckForTimeOut(ptr noundef nonnull %6, ptr noundef nonnull %5) #5
  %48 = icmp eq i64 %47, 0
  br i1 %48, label %35, label %.loopexit, !llvm.loop !15

49:                                               ; preds = %35
  call void @vPortExitCritical() #5
  br label %.loopexit

.loopexit:                                        ; preds = %43, %49
  %50 = icmp eq i64 %36, 0
  br i1 %50, label %.thread, label %52

.thread:                                          ; preds = %30, %.loopexit
  %51 = call i64 @xStreamBufferSpacesAvailable(ptr noundef nonnull %0)
  br label %52

52:                                               ; preds = %.loopexit, %.thread
  %.1 = phi i64 [ %51, %.thread ], [ %36, %.loopexit ]
  %53 = call i64 @prvWriteMessageToBuffer(ptr noundef nonnull %0, ptr noundef nonnull %1, i64 noundef %2, i64 noundef %.1, i64 noundef %.034)
  %.not45 = icmp eq i64 %53, 0
  br i1 %.not45, label %66, label %54

54:                                               ; preds = %52
  %55 = call i64 @prvBytesInBuffer(ptr noundef nonnull %0)
  %56 = getelementptr inbounds i8, ptr %0, i64 24
  %57 = load i64, ptr %56, align 8, !tbaa !17
  %.not46 = icmp ult i64 %55, %57
  br i1 %.not46, label %66, label %58

58:                                               ; preds = %54
  call void @vTaskSuspendAll() #5
  %59 = getelementptr inbounds i8, ptr %0, i64 32
  %60 = load volatile ptr, ptr %59, align 8, !tbaa !18
  %.not47 = icmp eq ptr %60, null
  br i1 %.not47, label %64, label %61

61:                                               ; preds = %58
  %62 = load volatile ptr, ptr %59, align 8, !tbaa !18
  %63 = call i64 @xTaskGenericNotify(ptr noundef %62, i64 noundef 0, i32 noundef 0, i32 noundef 0, ptr noundef null) #5
  store volatile ptr null, ptr %59, align 8, !tbaa !18
  br label %64

64:                                               ; preds = %61, %58
  %65 = call i64 @xTaskResumeAll() #5
  br label %66

66:                                               ; preds = %52, %64, %54
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  ret i64 %53
}

declare void @vTaskSetTimeOutState(ptr noundef) local_unnamed_addr #2

declare i64 @xTaskGenericNotifyStateClear(ptr noundef, i64 noundef) local_unnamed_addr #2

declare ptr @xTaskGetCurrentTaskHandle() local_unnamed_addr #2

declare i64 @xTaskGenericNotifyWait(i64 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i64 @xTaskCheckForTimeOut(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare void @vTaskSuspendAll() local_unnamed_addr #2

declare i64 @xTaskGenericNotify(ptr noundef, i64 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

declare i64 @xTaskResumeAll() local_unnamed_addr #2

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

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !7, i64 56}
!10 = !{!"StreamBufferDef_t", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !7, i64 56}
!11 = !{!"long", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!10, !11, i64 16}
!14 = !{!10, !12, i64 40}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!10, !11, i64 24}
!18 = !{!10, !12, i64 32}


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