; LLVM IR from CactiLab/Sherloc-Cortex-M-CFVD :: Sherloc_runtime/freertos/portable/MemMang (heap_4)

; 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.A_BLOCK_LINK = type { ptr, i64 }

@pxEnd = external hidden global ptr, section "privileged_data", align 8
@xBlockAllocatedBit = external hidden global i64, section "privileged_data", align 8
@xFreeBytesRemaining = external hidden global i64, section "privileged_data", align 8
@xStart = external hidden global %struct.A_BLOCK_LINK, section "privileged_data", align 8
@xMinimumEverFreeBytesRemaining = external hidden global i64, section "privileged_data", align 8
@xNumberOfSuccessfulAllocations = external hidden global i64, section "privileged_data", align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @pvPortMalloc(i64 noundef %0) #0 section "privileged_functions" {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  store i64 %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  store ptr null, ptr %6, align 8, !tbaa !9
  call void @vTaskSuspendAll()
  %7 = load ptr, ptr @pxEnd, align 8, !tbaa !9
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %10

9:                                                ; preds = %1
  call void @prvHeapInit()
  br label %11

10:                                               ; preds = %1
  br label %11

11:                                               ; preds = %10, %9
  %12 = load i64, ptr %2, align 8, !tbaa !5
  %13 = load i64, ptr @xBlockAllocatedBit, align 8, !tbaa !5
  %14 = and i64 %12, %13
  %15 = icmp eq i64 %14, 0
  br i1 %15, label %16, label %155

16:                                               ; preds = %11
  %17 = load i64, ptr %2, align 8, !tbaa !5
  %18 = icmp ugt i64 %17, 0
  br i1 %18, label %19, label %56

19:                                               ; preds = %16
  %20 = load i64, ptr %2, align 8, !tbaa !5
  %21 = add i64 %20, 16
  %22 = load i64, ptr %2, align 8, !tbaa !5
  %23 = icmp ugt i64 %21, %22
  br i1 %23, label %24, label %56

24:                                               ; preds = %19
  %25 = load i64, ptr %2, align 8, !tbaa !5
  %26 = add i64 %25, 16
  store i64 %26, ptr %2, align 8, !tbaa !5
  %27 = load i64, ptr %2, align 8, !tbaa !5
  %28 = and i64 %27, 7
  %29 = icmp ne i64 %28, 0
  br i1 %29, label %30, label %54

30:                                               ; preds = %24
  %31 = load i64, ptr %2, align 8, !tbaa !5
  %32 = load i64, ptr %2, align 8, !tbaa !5
  %33 = and i64 %32, 7
  %34 = sub i64 8, %33
  %35 = add i64 %31, %34
  %36 = load i64, ptr %2, align 8, !tbaa !5
  %37 = icmp ugt i64 %35, %36
  br i1 %37, label %38, label %52

38:                                               ; preds = %30
  %39 = load i64, ptr %2, align 8, !tbaa !5
  %40 = and i64 %39, 7
  %41 = sub i64 8, %40
  %42 = load i64, ptr %2, align 8, !tbaa !5
  %43 = add i64 %42, %41
  store i64 %43, ptr %2, align 8, !tbaa !5
  %44 = load i64, ptr %2, align 8, !tbaa !5
  %45 = and i64 %44, 7
  %46 = icmp eq i64 %45, 0
  %47 = zext i1 %46 to i32
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %38
  call void asm sideeffect " cpsid i ", "~{memory},~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !11
  br label %50

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

51:                                               ; preds = %38
  br label %53

52:                                               ; preds = %30
  store i64 0, ptr %2, align 8, !tbaa !5
  br label %53

53:                                               ; preds = %52, %51
  br label %55

54:                                               ; preds = %24
  br label %55

55:                                               ; preds = %54, %53
  br label %57

56:                                               ; preds = %19, %16
  store i64 0, ptr %2, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %56, %55
  %58 = load i64, ptr %2, align 8, !tbaa !5
  %59 = icmp ugt i64 %58, 0
  br i1 %59, label %60, label %153

60:                                               ; preds = %57
  %61 = load i64, ptr %2, align 8, !tbaa !5
  %62 = load i64, ptr @xFreeBytesRemaining, align 8, !tbaa !5
  %63 = icmp ule i64 %61, %62
  br i1 %63, label %64, label %153

64:                                               ; preds = %60
  store ptr @xStart, ptr %4, align 8, !tbaa !9
  %65 = load ptr, ptr @xStart, align 8, !tbaa !12
  store ptr %65, ptr %3, align 8, !tbaa !9
  br label %66

66:                                               ; preds = %79, %64
  %67 = load ptr, ptr %3, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %67, i32 0, i32 1
  %69 = load i64, ptr %68, align 8, !tbaa !14
  %70 = load i64, ptr %2, align 8, !tbaa !5
  %71 = icmp ult i64 %69, %70
  br i1 %71, label %72, label %77

72:                                               ; preds = %66
  %73 = load ptr, ptr %3, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %73, i32 0, i32 0
  %75 = load ptr, ptr %74, align 8, !tbaa !12
  %76 = icmp ne ptr %75, null
  br label %77

77:                                               ; preds = %72, %66
  %78 = phi i1 [ false, %66 ], [ %76, %72 ]
  br i1 %78, label %79, label %84

79:                                               ; preds = %77
  %80 = load ptr, ptr %3, align 8, !tbaa !9
  store ptr %80, ptr %4, align 8, !tbaa !9
  %81 = load ptr, ptr %3, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !12
  store ptr %83, ptr %3, align 8, !tbaa !9
  br label %66, !llvm.loop !15

84:                                               ; preds = %77
  %85 = load ptr, ptr %3, align 8, !tbaa !9
  %86 = load ptr, ptr @pxEnd, align 8, !tbaa !9
  %87 = icmp ne ptr %85, %86
  br i1 %87, label %88, label %151

88:                                               ; preds = %84
  %89 = load ptr, ptr %4, align 8, !tbaa !9
  %90 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !12
  %92 = getelementptr inbounds i8, ptr %91, i64 16
  store ptr %92, ptr %6, align 8, !tbaa !9
  %93 = load ptr, ptr %3, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !12
  %96 = load ptr, ptr %4, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %96, i32 0, i32 0
  store ptr %95, ptr %97, align 8, !tbaa !12
  %98 = load ptr, ptr %3, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %98, i32 0, i32 1
  %100 = load i64, ptr %99, align 8, !tbaa !14
  %101 = load i64, ptr %2, align 8, !tbaa !5
  %102 = sub i64 %100, %101
  %103 = icmp ugt i64 %102, 32
  br i1 %103, label %104, label %128

104:                                              ; preds = %88
  %105 = load ptr, ptr %3, align 8, !tbaa !9
  %106 = load i64, ptr %2, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %105, i64 %106
  store ptr %107, ptr %5, align 8, !tbaa !9
  %108 = load ptr, ptr %5, align 8, !tbaa !9
  %109 = ptrtoint ptr %108 to i64
  %110 = and i64 %109, 7
  %111 = icmp eq i64 %110, 0
  %112 = zext i1 %111 to i32
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %116

114:                                              ; preds = %104
  call void asm sideeffect " cpsid i ", "~{memory},~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !17
  br label %115

115:                                              ; preds = %115, %114
  br label %115

116:                                              ; preds = %104
  %117 = load ptr, ptr %3, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %117, i32 0, i32 1
  %119 = load i64, ptr %118, align 8, !tbaa !14
  %120 = load i64, ptr %2, align 8, !tbaa !5
  %121 = sub i64 %119, %120
  %122 = load ptr, ptr %5, align 8, !tbaa !9
  %123 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %122, i32 0, i32 1
  store i64 %121, ptr %123, align 8, !tbaa !14
  %124 = load i64, ptr %2, align 8, !tbaa !5
  %125 = load ptr, ptr %3, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %125, i32 0, i32 1
  store i64 %124, ptr %126, align 8, !tbaa !14
  %127 = load ptr, ptr %5, align 8, !tbaa !9
  call void @prvInsertBlockIntoFreeList(ptr noundef %127)
  br label %129

128:                                              ; preds = %88
  br label %129

129:                                              ; preds = %128, %116
  %130 = load ptr, ptr %3, align 8, !tbaa !9
  %131 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %130, i32 0, i32 1
  %132 = load i64, ptr %131, align 8, !tbaa !14
  %133 = load i64, ptr @xFreeBytesRemaining, align 8, !tbaa !5
  %134 = sub i64 %133, %132
  store i64 %134, ptr @xFreeBytesRemaining, align 8, !tbaa !5
  %135 = load i64, ptr @xFreeBytesRemaining, align 8, !tbaa !5
  %136 = load i64, ptr @xMinimumEverFreeBytesRemaining, align 8, !tbaa !5
  %137 = icmp ult i64 %135, %136
  br i1 %137, label %138, label %140

138:                                              ; preds = %129
  %139 = load i64, ptr @xFreeBytesRemaining, align 8, !tbaa !5
  store i64 %139, ptr @xMinimumEverFreeBytesRemaining, align 8, !tbaa !5
  br label %141

140:                                              ; preds = %129
  br label %141

141:                                              ; preds = %140, %138
  %142 = load i64, ptr @xBlockAllocatedBit, align 8, !tbaa !5
  %143 = load ptr, ptr %3, align 8, !tbaa !9
  %144 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %143, i32 0, i32 1
  %145 = load i64, ptr %144, align 8, !tbaa !14
  %146 = or i64 %145, %142
  store i64 %146, ptr %144, align 8, !tbaa !14
  %147 = load ptr, ptr %3, align 8, !tbaa !9
  %148 = getelementptr inbounds %struct.A_BLOCK_LINK, ptr %147, i32 0, i32 0
  store ptr null, ptr %148, align 8, !tbaa !12
  %149 = load i64, ptr @xNumberOfSuccessfulAllocations, align 8, !tbaa !5
  %150 = add i64 %149, 1
  store i64 %150, ptr @xNumberOfSuccessfulAllocations, align 8, !tbaa !5
  br label %152

151:                                              ; preds = %84
  br label %152

152:                                              ; preds = %151, %141
  br label %154

153:                                              ; preds = %60, %57
  br label %154

154:                                              ; preds = %153, %152
  br label %156

155:                                              ; preds = %11
  br label %156

156:                                              ; preds = %155, %154
  %157 = call i64 @xTaskResumeAll()
  %158 = load ptr, ptr %6, align 8, !tbaa !9
  %159 = icmp eq ptr %158, null
  br i1 %159, label %160, label %161

160:                                              ; preds = %156
  call void @vApplicationMallocFailedHook()
  br label %162

161:                                              ; preds = %156
  br label %162

162:                                              ; preds = %161, %160
  %163 = load ptr, ptr %6, align 8, !tbaa !9
  %164 = ptrtoint ptr %163 to i64
  %165 = and i64 %164, 7
  %166 = icmp eq i64 %165, 0
  %167 = zext i1 %166 to i32
  %168 = icmp eq i32 %167, 0
  br i1 %168, label %169, label %171

169:                                              ; preds = %162
  call void asm sideeffect " cpsid i ", "~{memory},~{dirflag},~{fpsr},~{flags}"() #3, !srcloc !18
  br label %170

170:                                              ; preds = %170, %169
  br label %170

171:                                              ; preds = %162
  %172 = load ptr, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret ptr %172
}

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

declare void @vTaskSuspendAll() #2 section "privileged_functions"

; Function Attrs: nounwind uwtable
declare hidden void @prvHeapInit() #0 section "privileged_functions"

; Function Attrs: nounwind uwtable
declare hidden void @prvInsertBlockIntoFreeList(ptr noundef) #0 section "privileged_functions"

declare i64 @xTaskResumeAll() #2 section "privileged_functions"

declare void @vApplicationMallocFailedHook() #2

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

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

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

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


; 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.A_BLOCK_LINK = type { ptr, i64 }

@pxEnd = external hidden local_unnamed_addr global ptr, section "privileged_data", align 8
@xBlockAllocatedBit = external hidden local_unnamed_addr global i64, section "privileged_data", align 8
@xFreeBytesRemaining = external hidden local_unnamed_addr global i64, section "privileged_data", align 8
@xStart = external hidden local_unnamed_addr global %struct.A_BLOCK_LINK, section "privileged_data", align 8
@xMinimumEverFreeBytesRemaining = external hidden local_unnamed_addr global i64, section "privileged_data", align 8
@xNumberOfSuccessfulAllocations = external hidden local_unnamed_addr global i64, section "privileged_data", align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @pvPortMalloc(i64 noundef %0) local_unnamed_addr #0 section "privileged_functions" {
  tail call void @vTaskSuspendAll() #2
  %2 = load ptr, ptr @pxEnd, align 8, !tbaa !5
  %3 = icmp eq ptr %2, null
  br i1 %3, label %4, label %5

4:                                                ; preds = %1
  tail call void @prvHeapInit()
  br label %5

5:                                                ; preds = %1, %4
  %6 = load i64, ptr @xBlockAllocatedBit, align 8, !tbaa !9
  %7 = and i64 %6, %0
  %8 = icmp eq i64 %7, 0
  %9 = add i64 %0, -1
  %10 = icmp ult i64 %9, -17
  %or.cond = and i1 %10, %8
  br i1 %or.cond, label %11, label %.thread

11:                                               ; preds = %5
  %12 = add nuw i64 %0, 16
  %13 = and i64 %0, 7
  %.not49 = icmp eq i64 %13, 0
  %14 = and i64 %0, -8
  %15 = add i64 %14, 24
  %16 = icmp ugt i64 %15, %12
  %. = select i1 %16, i64 %15, i64 0
  %.039 = select i1 %.not49, i64 %12, i64 %.
  %17 = load i64, ptr @xFreeBytesRemaining, align 8
  %18 = freeze i64 %17
  %19 = add i64 %.039, -1
  %or.cond.not = icmp ult i64 %19, %18
  br i1 %or.cond.not, label %20, label %.thread

20:                                               ; preds = %11
  %21 = load ptr, ptr @xStart, align 8, !tbaa !11
  %22 = getelementptr inbounds i8, ptr %21, i64 8
  %23 = load i64, ptr %22, align 8, !tbaa !13
  %24 = icmp ult i64 %23, %.039
  br i1 %24, label %.lr.ph.preheader, label %.critedge

.lr.ph.preheader:                                 ; preds = %20
  %25 = load ptr, ptr %21, align 8, !tbaa !11
  %.not5280 = icmp eq ptr %25, null
  br i1 %.not5280, label %.critedge, label %.lr.ph82, !llvm.loop !14

.lr.ph82:                                         ; preds = %.lr.ph.preheader, %.lr.ph
  %26 = phi ptr [ %30, %.lr.ph ], [ %25, %.lr.ph.preheader ]
  %.0416881 = phi ptr [ %26, %.lr.ph ], [ %21, %.lr.ph.preheader ]
  %27 = getelementptr inbounds i8, ptr %26, i64 8
  %28 = load i64, ptr %27, align 8, !tbaa !13
  %29 = icmp ult i64 %28, %.039
  br i1 %29, label %.lr.ph, label %.critedge, !llvm.loop !14

.lr.ph:                                           ; preds = %.lr.ph82
  %30 = load ptr, ptr %26, align 8, !tbaa !11
  %.not52 = icmp eq ptr %30, null
  br i1 %.not52, label %.critedge, label %.lr.ph82, !llvm.loop !14

.critedge:                                        ; preds = %.lr.ph82, %.lr.ph, %.lr.ph.preheader, %20
  %.041.lcssa67 = phi ptr [ %21, %20 ], [ %21, %.lr.ph.preheader ], [ %26, %.lr.ph ], [ %26, %.lr.ph82 ]
  %.040.lcssa = phi ptr [ @xStart, %20 ], [ @xStart, %.lr.ph.preheader ], [ %.0416881, %.lr.ph ], [ %.0416881, %.lr.ph82 ]
  %.lcssa = phi i64 [ %23, %20 ], [ %23, %.lr.ph.preheader ], [ %28, %.lr.ph ], [ %28, %.lr.ph82 ]
  %31 = getelementptr inbounds i8, ptr %.041.lcssa67, i64 8
  %32 = load ptr, ptr @pxEnd, align 8, !tbaa !5
  %.not53 = icmp eq ptr %.041.lcssa67, %32
  br i1 %.not53, label %.thread, label %33

33:                                               ; preds = %.critedge
  %34 = load ptr, ptr %.040.lcssa, align 8, !tbaa !11
  %35 = getelementptr inbounds i8, ptr %34, i64 16
  %36 = load ptr, ptr %.041.lcssa67, align 8, !tbaa !11
  store ptr %36, ptr %.040.lcssa, align 8, !tbaa !11
  %37 = sub i64 %.lcssa, %.039
  %38 = icmp ugt i64 %37, 32
  br i1 %38, label %39, label %47

39:                                               ; preds = %33
  %40 = getelementptr inbounds i8, ptr %.041.lcssa67, i64 %.039
  %41 = ptrtoint ptr %40 to i64
  %42 = and i64 %41, 7
  %.not54 = icmp eq i64 %42, 0
  br i1 %.not54, label %45, label %43

43:                                               ; preds = %39
  tail call void asm sideeffect " cpsid i ", "~{memory},~{dirflag},~{fpsr},~{flags}"() #2, !srcloc !16
  br label %44

44:                                               ; preds = %44, %43
  br label %44

45:                                               ; preds = %39
  %46 = getelementptr inbounds i8, ptr %40, i64 8
  store i64 %37, ptr %46, align 8, !tbaa !13
  store i64 %.039, ptr %31, align 8, !tbaa !13
  tail call void @prvInsertBlockIntoFreeList(ptr noundef nonnull %40)
  br label %47

47:                                               ; preds = %33, %45
  %48 = load i64, ptr %31, align 8, !tbaa !13
  %49 = load i64, ptr @xFreeBytesRemaining, align 8, !tbaa !9
  %50 = sub i64 %49, %48
  store i64 %50, ptr @xFreeBytesRemaining, align 8, !tbaa !9
  %51 = load i64, ptr @xMinimumEverFreeBytesRemaining, align 8, !tbaa !9
  %52 = icmp ult i64 %50, %51
  br i1 %52, label %53, label %54

53:                                               ; preds = %47
  store i64 %50, ptr @xMinimumEverFreeBytesRemaining, align 8, !tbaa !9
  br label %54

54:                                               ; preds = %53, %47
  %55 = load i64, ptr @xBlockAllocatedBit, align 8, !tbaa !9
  %56 = or i64 %48, %55
  store i64 %56, ptr %31, align 8, !tbaa !13
  store ptr null, ptr %.041.lcssa67, align 8, !tbaa !11
  %57 = load i64, ptr @xNumberOfSuccessfulAllocations, align 8, !tbaa !9
  %58 = add i64 %57, 1
  store i64 %58, ptr @xNumberOfSuccessfulAllocations, align 8, !tbaa !9
  %59 = tail call i64 @xTaskResumeAll() #2
  br label %61

.thread:                                          ; preds = %.critedge, %11, %5
  %60 = tail call i64 @xTaskResumeAll() #2
  tail call void @vApplicationMallocFailedHook() #2
  br label %61

61:                                               ; preds = %54, %.thread
  %.063 = phi ptr [ %35, %54 ], [ null, %.thread ]
  %62 = ptrtoint ptr %.063 to i64
  %63 = and i64 %62, 7
  %.not55 = icmp eq i64 %63, 0
  br i1 %.not55, label %66, label %64

64:                                               ; preds = %61
  tail call void asm sideeffect " cpsid i ", "~{memory},~{dirflag},~{fpsr},~{flags}"() #2, !srcloc !17
  br label %65

65:                                               ; preds = %65, %64
  br label %65

66:                                               ; preds = %61
  ret ptr %.063
}

declare void @vTaskSuspendAll() local_unnamed_addr #1 section "privileged_functions"

; Function Attrs: nounwind uwtable
declare hidden void @prvHeapInit() local_unnamed_addr #0 section "privileged_functions"

; Function Attrs: nounwind uwtable
declare hidden void @prvInsertBlockIntoFreeList(ptr noundef) local_unnamed_addr #0 section "privileged_functions"

declare i64 @xTaskResumeAll() local_unnamed_addr #1 section "privileged_functions"

declare void @vApplicationMallocFailedHook() local_unnamed_addr #1

attributes #0 = { 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 #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!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, !6, i64 0}
!12 = !{!"A_BLOCK_LINK", !6, i64 0, !10, i64 8}
!13 = !{!12, !10, i64 8}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{i64 2148145769}
!17 = !{i64 2148145988}


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