; LLVM IR from lfarcaro/ARINC653_ARMV7A_Z7000 :: ARINC653_ARMV7A_Z7000.sw/ARINC653_ARMV7A_Z7000/src/ARINC653 (RESOURCE)

; 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._MODULE_INFORMATION_TYPE = type { ptr, %struct._heapRECORD, i32, i32, i32, %struct._CONTEXT_TYPE, i32, ptr, ptr, %struct._HEALTHMONITORINGCALLBACK_INFORMATION_TYPE, i64, i64, i64, %struct._priorityqueueRECORD }
%struct._heapRECORD = type { ptr, i32, i32, i32 }
%struct._CONTEXT_TYPE = type { i32, ptr, ptr, ptr, i32, i8, ptr, ptr, i32, i32, i32, i32 }
%struct._HEALTHMONITORINGCALLBACK_INFORMATION_TYPE = type { i8, ptr, i32, %struct._CONTEXT_TYPE, i8, i8, i8, i8, i32, i32 }
%struct._priorityqueueRECORD = type { ptr, i32, i8, i8 }
%struct._PARTITION_INFORMATION_TYPE = type { i8, ptr, ptr, i32, i32, i32, i32, i8, %struct._heapRECORD, %struct._CONTEXT_TYPE, i32, ptr, ptr, %struct._ERRORHANDLER_INFORMATION_TYPE, %struct._HEALTHMONITORINGCALLBACK_INFORMATION_TYPE, i32, %struct._priorityqueueENTRY, %struct._priorityqueueRECORD, %struct._priorityqueueRECORD, %struct._priorityqueueRECORD, i32, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr }
%struct._ERRORHANDLER_INFORMATION_TYPE = type { i8, ptr, i32, %struct._CONTEXT_TYPE, i8, i8, i8, i8, i32 }
%struct._priorityqueueENTRY = type { i64, i64, ptr, ptr, ptr }
%struct._PROCESS_INFORMATION_TYPE = type { ptr, ptr, i32, i32, i32, i64, i64, i64, i64, i64, %struct._CONTEXT_TYPE, %struct._priorityqueueENTRY, %struct._priorityqueueENTRY, %struct._priorityqueueENTRY, %struct._priorityqueueENTRY, i8, i8, ptr, i32, ptr, ptr }

@CORE_MODULE_INFORMATION = external global [2 x %struct._MODULE_INFORMATION_TYPE], align 16

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

declare void @ENTER_CORE() #1

declare i32 @PORT_GETCORE() #1

declare void @EXIT_CORE() #1

declare void @PRIORITYQUEUE_REMOVE(ptr noundef) #1

declare void @PRIORITYQUEUE_ENQUEUE(ptr noundef, ptr noundef) #1

declare void @PORT_YIELD() #1

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

; Function Attrs: nounwind uwtable
define dso_local void @SIGNAL_RESOURCE(i32 noundef %0, ptr noundef %1, i8 noundef zeroext %2, ptr noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !9
  store i8 %2, ptr %7, align 1, !tbaa !11
  store ptr %3, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @ENTER_CORE()
  %15 = call i32 @PORT_GETCORE()
  %16 = zext i32 %15 to i64
  %17 = getelementptr inbounds [2 x %struct._MODULE_INFORMATION_TYPE], ptr @CORE_MODULE_INFORMATION, i64 0, i64 %16
  store ptr %17, ptr %9, align 8, !tbaa !9
  %18 = load i32, ptr %5, align 4, !tbaa !5
  %19 = load ptr, ptr %9, align 8, !tbaa !9
  %20 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %19, i32 0, i32 6
  %21 = load i32, ptr %20, align 8, !tbaa !12
  %22 = icmp uge i32 %18, %21
  br i1 %22, label %23, label %25

23:                                               ; preds = %4
  %24 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 4, ptr %24, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %14, align 4
  br label %101

25:                                               ; preds = %4
  %26 = load ptr, ptr %9, align 8, !tbaa !9
  %27 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %26, i32 0, i32 7
  %28 = load ptr, ptr %27, align 8, !tbaa !19
  %29 = load i32, ptr %5, align 4, !tbaa !5
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %28, i64 %30
  store ptr %31, ptr %10, align 8, !tbaa !9
  %32 = load ptr, ptr %6, align 8, !tbaa !9
  %33 = getelementptr inbounds %struct._priorityqueueRECORD, ptr %32, i32 0, i32 1
  %34 = load i32, ptr %33, align 8, !tbaa !20
  %35 = icmp eq i32 %34, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %25
  %37 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 2, ptr %37, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %14, align 4
  br label %101

38:                                               ; preds = %25
  %39 = load ptr, ptr %6, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct._priorityqueueRECORD, ptr %39, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8, !tbaa !21
  store ptr %41, ptr %12, align 8, !tbaa !9
  %42 = load ptr, ptr %12, align 8, !tbaa !9
  %43 = getelementptr inbounds %struct._priorityqueueENTRY, ptr %42, i32 0, i32 1
  %44 = load i64, ptr %43, align 8, !tbaa !22
  %45 = trunc i64 %44 to i32
  store i32 %45, ptr %13, align 4, !tbaa !5
  %46 = load i32, ptr %13, align 4, !tbaa !5
  %47 = load ptr, ptr %10, align 8, !tbaa !9
  %48 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %47, i32 0, i32 10
  %49 = load i32, ptr %48, align 8, !tbaa !24
  %50 = icmp uge i32 %46, %49
  br i1 %50, label %51, label %53

51:                                               ; preds = %38
  %52 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 4, ptr %52, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %14, align 4
  br label %101

53:                                               ; preds = %38
  %54 = load ptr, ptr %10, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %54, i32 0, i32 11
  %56 = load ptr, ptr %55, align 8, !tbaa !27
  %57 = load i32, ptr %13, align 4, !tbaa !5
  %58 = zext i32 %57 to i64
  %59 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %56, i64 %58
  store ptr %59, ptr %11, align 8, !tbaa !9
  %60 = load ptr, ptr %11, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %60, i32 0, i32 13
  call void @PRIORITYQUEUE_REMOVE(ptr noundef %61)
  %62 = load ptr, ptr %11, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %62, i32 0, i32 14
  call void @PRIORITYQUEUE_REMOVE(ptr noundef %63)
  %64 = load ptr, ptr %11, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %64, i32 0, i32 15
  %66 = load i8, ptr %65, align 8, !tbaa !28
  %67 = icmp ne i8 %66, 0
  br i1 %67, label %99, label %68

68:                                               ; preds = %53
  %69 = load ptr, ptr %11, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %69, i32 0, i32 4
  store i32 2, ptr %70, align 8, !tbaa !30
  %71 = load ptr, ptr %11, align 8, !tbaa !9
  %72 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %71, i32 0, i32 3
  %73 = load i32, ptr %72, align 4, !tbaa !31
  %74 = zext i32 %73 to i64
  %75 = load ptr, ptr %11, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %75, i32 0, i32 11
  %77 = getelementptr inbounds %struct._priorityqueueENTRY, ptr %76, i32 0, i32 0
  store i64 %74, ptr %77, align 8, !tbaa !32
  %78 = load ptr, ptr %11, align 8, !tbaa !9
  %79 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %79, align 8, !tbaa !33
  %81 = zext i32 %80 to i64
  %82 = load ptr, ptr %11, align 8, !tbaa !9
  %83 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %82, i32 0, i32 11
  %84 = getelementptr inbounds %struct._priorityqueueENTRY, ptr %83, i32 0, i32 1
  store i64 %81, ptr %84, align 8, !tbaa !34
  %85 = load ptr, ptr %10, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %85, i32 0, i32 17
  %87 = load ptr, ptr %11, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %87, i32 0, i32 11
  call void @PRIORITYQUEUE_ENQUEUE(ptr noundef %86, ptr noundef %88)
  %89 = load i8, ptr %7, align 1, !tbaa !11
  %90 = zext i8 %89 to i32
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %98

92:                                               ; preds = %68
  %93 = load ptr, ptr %10, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %93, i32 0, i32 6
  %95 = load i32, ptr %94, align 4, !tbaa !35
  %96 = icmp eq i32 %95, 0
  br i1 %96, label %97, label %98

97:                                               ; preds = %92
  call void @PORT_YIELD()
  br label %98

98:                                               ; preds = %97, %92, %68
  br label %99

99:                                               ; preds = %98, %53
  %100 = load ptr, ptr %8, align 8, !tbaa !9
  store i32 1, ptr %100, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 0, ptr %14, align 4
  br label %101

101:                                              ; preds = %99, %51, %36, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  %102 = load i32, ptr %14, align 4
  switch i32 %102, label %104 [
    i32 0, label %103
    i32 1, label %103
  ]

103:                                              ; preds = %101, %101
  ret void

104:                                              ; preds = %101
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!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, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !6, i64 120}
!13 = !{!"_MODULE_INFORMATION_TYPE", !10, i64 0, !14, i64 8, !6, i64 32, !6, i64 36, !6, i64 40, !15, i64 48, !6, i64 120, !10, i64 128, !10, i64 136, !16, i64 144, !17, i64 256, !17, i64 264, !17, i64 272, !18, i64 280}
!14 = !{!"_heapRECORD", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16}
!15 = !{!"_CONTEXT_TYPE", !6, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !7, i64 36, !10, i64 40, !10, i64 48, !6, i64 56, !6, i64 60, !6, i64 64, !6, i64 68}
!16 = !{!"_HEALTHMONITORINGCALLBACK_INFORMATION_TYPE", !7, i64 0, !10, i64 8, !6, i64 16, !15, i64 24, !7, i64 96, !7, i64 97, !7, i64 98, !7, i64 99, !6, i64 100, !6, i64 104}
!17 = !{!"long long", !7, i64 0}
!18 = !{!"_priorityqueueRECORD", !10, i64 0, !6, i64 8, !7, i64 12, !7, i64 13}
!19 = !{!13, !10, i64 128}
!20 = !{!18, !6, i64 8}
!21 = !{!18, !10, i64 0}
!22 = !{!23, !17, i64 8}
!23 = !{!"_priorityqueueENTRY", !17, i64 0, !17, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!24 = !{!25, !6, i64 144}
!25 = !{!"_PARTITION_INFORMATION_TYPE", !7, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !7, i64 40, !14, i64 48, !15, i64 72, !6, i64 144, !10, i64 152, !10, i64 160, !26, i64 168, !16, i64 272, !6, i64 384, !23, i64 392, !18, i64 432, !18, i64 448, !18, i64 464, !6, i64 480, !6, i64 484, !10, i64 488, !6, i64 496, !10, i64 504, !6, i64 512, !10, i64 520, !6, i64 528, !10, i64 536, !6, i64 544, !10, i64 552, !6, i64 560, !10, i64 568, !6, i64 576, !10, i64 584}
!26 = !{!"_ERRORHANDLER_INFORMATION_TYPE", !7, i64 0, !10, i64 8, !6, i64 16, !15, i64 24, !7, i64 96, !7, i64 97, !7, i64 98, !7, i64 99, !6, i64 100}
!27 = !{!25, !10, i64 152}
!28 = !{!29, !7, i64 304}
!29 = !{!"_PROCESS_INFORMATION_TYPE", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !6, i64 24, !17, i64 32, !17, i64 40, !17, i64 48, !17, i64 56, !17, i64 64, !15, i64 72, !23, i64 144, !23, i64 184, !23, i64 224, !23, i64 264, !7, i64 304, !7, i64 305, !10, i64 312, !6, i64 320, !10, i64 328, !10, i64 336}
!30 = !{!29, !6, i64 24}
!31 = !{!29, !6, i64 20}
!32 = !{!29, !17, i64 144}
!33 = !{!29, !6, i64 16}
!34 = !{!29, !17, i64 152}
!35 = !{!25, !6, i64 36}


; 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._MODULE_INFORMATION_TYPE = type { ptr, %struct._heapRECORD, i32, i32, i32, %struct._CONTEXT_TYPE, i32, ptr, ptr, %struct._HEALTHMONITORINGCALLBACK_INFORMATION_TYPE, i64, i64, i64, %struct._priorityqueueRECORD }
%struct._heapRECORD = type { ptr, i32, i32, i32 }
%struct._CONTEXT_TYPE = type { i32, ptr, ptr, ptr, i32, i8, ptr, ptr, i32, i32, i32, i32 }
%struct._HEALTHMONITORINGCALLBACK_INFORMATION_TYPE = type { i8, ptr, i32, %struct._CONTEXT_TYPE, i8, i8, i8, i8, i32, i32 }
%struct._priorityqueueRECORD = type { ptr, i32, i8, i8 }
%struct._PARTITION_INFORMATION_TYPE = type { i8, ptr, ptr, i32, i32, i32, i32, i8, %struct._heapRECORD, %struct._CONTEXT_TYPE, i32, ptr, ptr, %struct._ERRORHANDLER_INFORMATION_TYPE, %struct._HEALTHMONITORINGCALLBACK_INFORMATION_TYPE, i32, %struct._priorityqueueENTRY, %struct._priorityqueueRECORD, %struct._priorityqueueRECORD, %struct._priorityqueueRECORD, i32, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr }
%struct._ERRORHANDLER_INFORMATION_TYPE = type { i8, ptr, i32, %struct._CONTEXT_TYPE, i8, i8, i8, i8, i32 }
%struct._priorityqueueENTRY = type { i64, i64, ptr, ptr, ptr }
%struct._PROCESS_INFORMATION_TYPE = type { ptr, ptr, i32, i32, i32, i64, i64, i64, i64, i64, %struct._CONTEXT_TYPE, %struct._priorityqueueENTRY, %struct._priorityqueueENTRY, %struct._priorityqueueENTRY, %struct._priorityqueueENTRY, i8, i8, ptr, i32, ptr, ptr }

@CORE_MODULE_INFORMATION = external local_unnamed_addr global [2 x %struct._MODULE_INFORMATION_TYPE], align 16

declare void @ENTER_CORE() local_unnamed_addr #0

declare i32 @PORT_GETCORE() local_unnamed_addr #0

declare void @EXIT_CORE() local_unnamed_addr #0

declare void @PRIORITYQUEUE_REMOVE(ptr noundef) local_unnamed_addr #0

declare void @PRIORITYQUEUE_ENQUEUE(ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @PORT_YIELD() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @SIGNAL_RESOURCE(i32 noundef %0, ptr nocapture noundef readonly %1, i8 noundef zeroext %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #1 {
  tail call void @ENTER_CORE() #2
  %5 = tail call i32 @PORT_GETCORE() #2
  %6 = zext i32 %5 to i64
  %7 = getelementptr inbounds [2 x %struct._MODULE_INFORMATION_TYPE], ptr @CORE_MODULE_INFORMATION, i64 0, i64 %6
  %8 = getelementptr inbounds i8, ptr %7, i64 120
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %.not = icmp ugt i32 %9, %0
  br i1 %.not, label %10, label %50

10:                                               ; preds = %4
  %11 = getelementptr inbounds i8, ptr %7, i64 128
  %12 = load ptr, ptr %11, align 8, !tbaa !16
  %13 = zext i32 %0 to i64
  %14 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %12, i64 %13
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = load i32, ptr %15, align 8, !tbaa !17
  %17 = icmp eq i32 %16, 0
  br i1 %17, label %50, label %18

18:                                               ; preds = %10
  %19 = load ptr, ptr %1, align 8, !tbaa !18
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  %21 = load i64, ptr %20, align 8, !tbaa !19
  %22 = trunc i64 %21 to i32
  %23 = getelementptr inbounds i8, ptr %14, i64 144
  %24 = load i32, ptr %23, align 8, !tbaa !21
  %.not27 = icmp ugt i32 %24, %22
  br i1 %.not27, label %25, label %50

25:                                               ; preds = %18
  %26 = getelementptr inbounds i8, ptr %14, i64 152
  %27 = load ptr, ptr %26, align 8, !tbaa !24
  %28 = and i64 %21, 4294967295
  %29 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %27, i64 %28
  %30 = getelementptr inbounds i8, ptr %29, i64 224
  tail call void @PRIORITYQUEUE_REMOVE(ptr noundef nonnull %30) #2
  %31 = getelementptr inbounds i8, ptr %29, i64 264
  tail call void @PRIORITYQUEUE_REMOVE(ptr noundef nonnull %31) #2
  %32 = getelementptr inbounds i8, ptr %29, i64 304
  %33 = load i8, ptr %32, align 8, !tbaa !25
  %.not28 = icmp eq i8 %33, 0
  br i1 %.not28, label %34, label %50

34:                                               ; preds = %25
  %35 = getelementptr inbounds i8, ptr %29, i64 24
  store i32 2, ptr %35, align 8, !tbaa !27
  %36 = getelementptr inbounds i8, ptr %29, i64 20
  %37 = load i32, ptr %36, align 4, !tbaa !28
  %38 = zext i32 %37 to i64
  %39 = getelementptr inbounds i8, ptr %29, i64 144
  store i64 %38, ptr %39, align 8, !tbaa !29
  %40 = getelementptr inbounds i8, ptr %29, i64 16
  %41 = load i32, ptr %40, align 8, !tbaa !30
  %42 = zext i32 %41 to i64
  %43 = getelementptr inbounds i8, ptr %29, i64 152
  store i64 %42, ptr %43, align 8, !tbaa !31
  %44 = getelementptr inbounds i8, ptr %14, i64 432
  tail call void @PRIORITYQUEUE_ENQUEUE(ptr noundef nonnull %44, ptr noundef nonnull %39) #2
  %.not29 = icmp eq i8 %2, 0
  br i1 %.not29, label %50, label %45

45:                                               ; preds = %34
  %46 = getelementptr inbounds i8, ptr %14, i64 36
  %47 = load i32, ptr %46, align 4, !tbaa !32
  %48 = icmp eq i32 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %45
  tail call void @PORT_YIELD() #2
  br label %50

50:                                               ; preds = %25, %49, %45, %34, %18, %10, %4
  %.sink = phi i32 [ 4, %4 ], [ 2, %10 ], [ 4, %18 ], [ 1, %34 ], [ 1, %45 ], [ 1, %49 ], [ 1, %25 ]
  store i32 %.sink, ptr %3, align 4, !tbaa !33
  tail call void @EXIT_CORE() #2
  ret void
}

attributes #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 = { 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 = { 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, !11, i64 120}
!6 = !{!"_MODULE_INFORMATION_TYPE", !7, i64 0, !10, i64 8, !11, i64 32, !11, i64 36, !11, i64 40, !12, i64 48, !11, i64 120, !7, i64 128, !7, i64 136, !13, i64 144, !14, i64 256, !14, i64 264, !14, i64 272, !15, i64 280}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_heapRECORD", !7, i64 0, !11, i64 8, !11, i64 12, !11, i64 16}
!11 = !{!"int", !8, i64 0}
!12 = !{!"_CONTEXT_TYPE", !11, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !8, i64 36, !7, i64 40, !7, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68}
!13 = !{!"_HEALTHMONITORINGCALLBACK_INFORMATION_TYPE", !8, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 96, !8, i64 97, !8, i64 98, !8, i64 99, !11, i64 100, !11, i64 104}
!14 = !{!"long long", !8, i64 0}
!15 = !{!"_priorityqueueRECORD", !7, i64 0, !11, i64 8, !8, i64 12, !8, i64 13}
!16 = !{!6, !7, i64 128}
!17 = !{!15, !11, i64 8}
!18 = !{!15, !7, i64 0}
!19 = !{!20, !14, i64 8}
!20 = !{!"_priorityqueueENTRY", !14, i64 0, !14, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!21 = !{!22, !11, i64 144}
!22 = !{!"_PARTITION_INFORMATION_TYPE", !8, i64 0, !7, i64 8, !7, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !8, i64 40, !10, i64 48, !12, i64 72, !11, i64 144, !7, i64 152, !7, i64 160, !23, i64 168, !13, i64 272, !11, i64 384, !20, i64 392, !15, i64 432, !15, i64 448, !15, i64 464, !11, i64 480, !11, i64 484, !7, i64 488, !11, i64 496, !7, i64 504, !11, i64 512, !7, i64 520, !11, i64 528, !7, i64 536, !11, i64 544, !7, i64 552, !11, i64 560, !7, i64 568, !11, i64 576, !7, i64 584}
!23 = !{!"_ERRORHANDLER_INFORMATION_TYPE", !8, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 96, !8, i64 97, !8, i64 98, !8, i64 99, !11, i64 100}
!24 = !{!22, !7, i64 152}
!25 = !{!26, !8, i64 304}
!26 = !{!"_PROCESS_INFORMATION_TYPE", !7, i64 0, !7, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !12, i64 72, !20, i64 144, !20, i64 184, !20, i64 224, !20, i64 264, !8, i64 304, !8, i64 305, !7, i64 312, !11, i64 320, !7, i64 328, !7, i64 336}
!27 = !{!26, !11, i64 24}
!28 = !{!26, !11, i64 20}
!29 = !{!26, !14, i64 144}
!30 = !{!26, !11, i64 16}
!31 = !{!26, !14, i64 152}
!32 = !{!22, !11, i64 36}
!33 = !{!11, !11, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass