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

; 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._MODULE_CONFIGURATION_TYPE = type { i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, i64, ptr, ptr, i32, ptr, ptr }
%struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE = type { ptr, i32, i32, ptr }
%struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE = type { i32, i32, ptr }
%struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE = type { i32, i32, i32, i32 }

@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 void @SET_MODULE_MODE(i32 noundef, ptr noundef) #1

declare void @EXIT_CORE() #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 @RUN_MODULE_ERROR_ACTION(i8 noundef zeroext %0, i8 noundef zeroext %1, i32 noundef %2, i32 noundef %3) #2 {
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i8 %0, ptr %5, align 1, !tbaa !5
  store i8 %1, ptr %6, align 1, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !8
  store i32 %3, ptr %8, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %15 = load i8, ptr %5, align 1, !tbaa !5
  %16 = icmp ne i8 %15, 0
  br i1 %16, label %17, label %18

17:                                               ; preds = %4
  call void @ENTER_CORE()
  br label %18

18:                                               ; preds = %17, %4
  %19 = call i32 @PORT_GETCORE()
  %20 = zext i32 %19 to i64
  %21 = getelementptr inbounds [2 x %struct._MODULE_INFORMATION_TYPE], ptr @CORE_MODULE_INFORMATION, i64 0, i64 %20
  store ptr %21, ptr %9, align 8, !tbaa !10
  store i32 1, ptr %10, align 4, !tbaa !8
  %22 = load ptr, ptr %9, align 8, !tbaa !10
  %23 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !12
  %25 = getelementptr inbounds %struct._MODULE_CONFIGURATION_TYPE, ptr %24, i32 0, i32 13
  %26 = load ptr, ptr %25, align 8, !tbaa !19
  store ptr %26, ptr %11, align 8, !tbaa !10
  %27 = load ptr, ptr %11, align 8, !tbaa !10
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %99

29:                                               ; preds = %18
  store i32 0, ptr %12, align 4, !tbaa !8
  br label %30

30:                                               ; preds = %95, %29
  %31 = load i32, ptr %12, align 4, !tbaa !8
  %32 = load ptr, ptr %11, align 8, !tbaa !10
  %33 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %32, i32 0, i32 2
  %34 = load i32, ptr %33, align 4, !tbaa !21
  %35 = icmp ult i32 %31, %34
  br i1 %35, label %36, label %98

36:                                               ; preds = %30
  %37 = load ptr, ptr %11, align 8, !tbaa !10
  %38 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %37, i32 0, i32 3
  %39 = load ptr, ptr %38, align 8, !tbaa !23
  %40 = load i32, ptr %12, align 4, !tbaa !8
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %39, i64 %41
  %43 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %42, i32 0, i32 0
  %44 = load i32, ptr %43, align 8, !tbaa !24
  %45 = load i32, ptr %7, align 4, !tbaa !8
  %46 = icmp eq i32 %44, %45
  br i1 %46, label %47, label %94

47:                                               ; preds = %36
  store i32 0, ptr %13, align 4, !tbaa !8
  br label %48

48:                                               ; preds = %90, %47
  %49 = load i32, ptr %13, align 4, !tbaa !8
  %50 = load ptr, ptr %11, align 8, !tbaa !10
  %51 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %50, i32 0, i32 3
  %52 = load ptr, ptr %51, align 8, !tbaa !23
  %53 = load i32, ptr %12, align 4, !tbaa !8
  %54 = zext i32 %53 to i64
  %55 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %52, i64 %54
  %56 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %55, i32 0, i32 1
  %57 = load i32, ptr %56, align 4, !tbaa !26
  %58 = icmp ult i32 %49, %57
  br i1 %58, label %59, label %93

59:                                               ; preds = %48
  %60 = load ptr, ptr %11, align 8, !tbaa !10
  %61 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %60, i32 0, i32 3
  %62 = load ptr, ptr %61, align 8, !tbaa !23
  %63 = load i32, ptr %12, align 4, !tbaa !8
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %62, i64 %64
  %66 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %66, align 8, !tbaa !27
  %68 = load i32, ptr %13, align 4, !tbaa !8
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %67, i64 %69
  %71 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %70, i32 0, i32 0
  %72 = load i32, ptr %71, align 4, !tbaa !28
  %73 = load i32, ptr %8, align 4, !tbaa !8
  %74 = icmp eq i32 %72, %73
  br i1 %74, label %75, label %89

75:                                               ; preds = %59
  %76 = load ptr, ptr %11, align 8, !tbaa !10
  %77 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_TYPE, ptr %76, i32 0, i32 3
  %78 = load ptr, ptr %77, align 8, !tbaa !23
  %79 = load i32, ptr %12, align 4, !tbaa !8
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %78, i64 %80
  %82 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %81, i32 0, i32 2
  %83 = load ptr, ptr %82, align 8, !tbaa !27
  %84 = load i32, ptr %13, align 4, !tbaa !8
  %85 = zext i32 %84 to i64
  %86 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %83, i64 %85
  %87 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %86, i32 0, i32 3
  %88 = load i32, ptr %87, align 4, !tbaa !30
  store i32 %88, ptr %10, align 4, !tbaa !8
  br label %93

89:                                               ; preds = %59
  br label %90

90:                                               ; preds = %89
  %91 = load i32, ptr %13, align 4, !tbaa !8
  %92 = add i32 %91, 1
  store i32 %92, ptr %13, align 4, !tbaa !8
  br label %48, !llvm.loop !31

93:                                               ; preds = %75, %48
  br label %98

94:                                               ; preds = %36
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %12, align 4, !tbaa !8
  %97 = add i32 %96, 1
  store i32 %97, ptr %12, align 4, !tbaa !8
  br label %30, !llvm.loop !33

98:                                               ; preds = %93, %30
  br label %99

99:                                               ; preds = %98, %18
  %100 = load i32, ptr %10, align 4, !tbaa !8
  %101 = icmp eq i32 %100, 1
  br i1 %101, label %102, label %103

102:                                              ; preds = %99
  br label %120

103:                                              ; preds = %99
  %104 = load i32, ptr %10, align 4, !tbaa !8
  %105 = icmp eq i32 %104, 2
  br i1 %105, label %106, label %107

106:                                              ; preds = %103
  call void @SET_MODULE_MODE(i32 noundef 1, ptr noundef %14)
  br label %119

107:                                              ; preds = %103
  %108 = load i32, ptr %10, align 4, !tbaa !8
  %109 = icmp eq i32 %108, 3
  br i1 %109, label %110, label %118

110:                                              ; preds = %107
  %111 = load ptr, ptr %9, align 8, !tbaa !10
  %112 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %111, i32 0, i32 4
  %113 = load i32, ptr %112, align 8, !tbaa !34
  %114 = icmp eq i32 %113, 2
  br i1 %114, label %115, label %116

115:                                              ; preds = %110
  call void @SET_MODULE_MODE(i32 noundef 2, ptr noundef %14)
  br label %117

116:                                              ; preds = %110
  call void @SET_MODULE_MODE(i32 noundef 3, ptr noundef %14)
  br label %117

117:                                              ; preds = %116, %115
  br label %118

118:                                              ; preds = %117, %107
  br label %119

119:                                              ; preds = %118, %106
  br label %120

120:                                              ; preds = %119, %102
  %121 = load i8, ptr %5, align 1, !tbaa !5
  %122 = icmp ne i8 %121, 0
  br i1 %122, label %123, label %124

123:                                              ; preds = %120
  call void @EXIT_CORE()
  br label %124

124:                                              ; preds = %123, %120
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret void
}

declare i32 @PORT_GETCORE() #1

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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"_MODULE_INFORMATION_TYPE", !11, i64 0, !14, i64 8, !9, i64 32, !9, i64 36, !9, i64 40, !15, i64 48, !9, i64 120, !11, i64 128, !11, i64 136, !16, i64 144, !17, i64 256, !17, i64 264, !17, i64 272, !18, i64 280}
!14 = !{!"_heapRECORD", !11, i64 0, !9, i64 8, !9, i64 12, !9, i64 16}
!15 = !{!"_CONTEXT_TYPE", !9, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !9, i64 32, !6, i64 36, !11, i64 40, !11, i64 48, !9, i64 56, !9, i64 60, !9, i64 64, !9, i64 68}
!16 = !{!"_HEALTHMONITORINGCALLBACK_INFORMATION_TYPE", !6, i64 0, !11, i64 8, !9, i64 16, !15, i64 24, !6, i64 96, !6, i64 97, !6, i64 98, !6, i64 99, !9, i64 100, !9, i64 104}
!17 = !{!"long long", !6, i64 0}
!18 = !{!"_priorityqueueRECORD", !11, i64 0, !9, i64 8, !6, i64 12, !6, i64 13}
!19 = !{!20, !11, i64 104}
!20 = !{!"_MODULE_CONFIGURATION_TYPE", !9, i64 0, !11, i64 8, !9, i64 16, !11, i64 24, !9, i64 32, !11, i64 40, !9, i64 48, !11, i64 56, !9, i64 64, !11, i64 72, !9, i64 80, !17, i64 88, !11, i64 96, !11, i64 104, !9, i64 112, !11, i64 120, !11, i64 128}
!21 = !{!22, !9, i64 12}
!22 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_TYPE", !11, i64 0, !9, i64 8, !9, i64 12, !11, i64 16}
!23 = !{!22, !11, i64 16}
!24 = !{!25, !9, i64 0}
!25 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE", !9, i64 0, !9, i64 4, !11, i64 8}
!26 = !{!25, !9, i64 4}
!27 = !{!25, !11, i64 8}
!28 = !{!29, !9, i64 0}
!29 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12}
!30 = !{!29, !9, i64 12}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !32}
!34 = !{!13, !9, i64 40}


; 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._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE = type { i32, i32, ptr }
%struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE = type { i32, i32, i32, i32 }

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

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

declare void @ENTER_CORE() local_unnamed_addr #1

declare void @SET_MODULE_MODE(i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @EXIT_CORE() 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

; Function Attrs: nounwind uwtable
define dso_local void @RUN_MODULE_ERROR_ACTION(i8 noundef zeroext %0, i8 noundef zeroext %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #2 {
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %.not = icmp eq i8 %0, 0
  br i1 %.not, label %7, label %6

6:                                                ; preds = %4
  tail call void @ENTER_CORE() #3
  br label %7

7:                                                ; preds = %6, %4
  %8 = tail call i32 @PORT_GETCORE() #3
  %9 = zext i32 %8 to i64
  %10 = getelementptr inbounds [2 x %struct._MODULE_INFORMATION_TYPE], ptr @CORE_MODULE_INFORMATION, i64 0, i64 %9
  %11 = load ptr, ptr %10, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 104
  %13 = load ptr, ptr %12, align 8, !tbaa !16
  %.not27 = icmp eq ptr %13, null
  br i1 %.not27, label %.thread, label %.preheader29

.preheader29:                                     ; preds = %7
  %14 = getelementptr inbounds i8, ptr %13, i64 12
  %15 = load i32, ptr %14, align 4, !tbaa !18
  %.not35 = icmp eq i32 %15, 0
  br i1 %.not35, label %.thread, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader29
  %16 = getelementptr inbounds i8, ptr %13, i64 16
  %17 = load ptr, ptr %16, align 8, !tbaa !20
  %wide.trip.count = zext i32 %15 to i64
  br label %19

18:                                               ; preds = %19
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.thread, label %19, !llvm.loop !21

19:                                               ; preds = %.lr.ph, %18
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %18 ]
  %20 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE, ptr %17, i64 %indvars.iv
  %21 = load i32, ptr %20, align 8, !tbaa !23
  %22 = icmp eq i32 %21, %2
  br i1 %22, label %.preheader, label %18

.preheader:                                       ; preds = %19
  %23 = getelementptr inbounds i8, ptr %20, i64 4
  %24 = load i32, ptr %23, align 4, !tbaa !25
  %.not36 = icmp eq i32 %24, 0
  br i1 %.not36, label %.thread, label %.lr.ph34

.lr.ph34:                                         ; preds = %.preheader
  %25 = getelementptr inbounds i8, ptr %20, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !26
  %wide.trip.count45 = zext i32 %24 to i64
  br label %28

27:                                               ; preds = %28
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  %exitcond46.not = icmp eq i64 %indvars.iv.next43, %wide.trip.count45
  br i1 %exitcond46.not, label %.thread, label %28, !llvm.loop !27

28:                                               ; preds = %.lr.ph34, %27
  %indvars.iv42 = phi i64 [ 0, %.lr.ph34 ], [ %indvars.iv.next43, %27 ]
  %29 = getelementptr inbounds %struct._MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE, ptr %26, i64 %indvars.iv42
  %30 = load i32, ptr %29, align 4, !tbaa !28
  %31 = icmp eq i32 %30, %3
  br i1 %31, label %32, label %27

32:                                               ; preds = %28
  %33 = getelementptr inbounds i8, ptr %29, i64 12
  %34 = load i32, ptr %33, align 4, !tbaa !30
  switch i32 %34, label %.thread [
    i32 3, label %35
    i32 2, label %.thread.sink.split
  ]

35:                                               ; preds = %32
  %36 = getelementptr inbounds i8, ptr %10, i64 40
  %37 = load i32, ptr %36, align 8, !tbaa !31
  %38 = icmp eq i32 %37, 2
  %. = select i1 %38, i32 2, i32 3
  br label %.thread.sink.split

.thread.sink.split:                               ; preds = %35, %32
  %.sink = phi i32 [ 1, %32 ], [ %., %35 ]
  call void @SET_MODULE_MODE(i32 noundef %.sink, ptr noundef nonnull %5) #3
  br label %.thread

.thread:                                          ; preds = %18, %27, %.thread.sink.split, %.preheader29, %.preheader, %7, %32
  br i1 %.not, label %40, label %39

39:                                               ; preds = %.thread
  call void @EXIT_CORE() #3
  br label %40

40:                                               ; preds = %39, %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  ret void
}

declare i32 @PORT_GETCORE() local_unnamed_addr #1

attributes #0 = { mustprogress 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, !7, i64 0}
!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 = !{!17, !7, i64 104}
!17 = !{!"_MODULE_CONFIGURATION_TYPE", !11, i64 0, !7, i64 8, !11, i64 16, !7, i64 24, !11, i64 32, !7, i64 40, !11, i64 48, !7, i64 56, !11, i64 64, !7, i64 72, !11, i64 80, !14, i64 88, !7, i64 96, !7, i64 104, !11, i64 112, !7, i64 120, !7, i64 128}
!18 = !{!19, !11, i64 12}
!19 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_TYPE", !7, i64 0, !11, i64 8, !11, i64 12, !7, i64 16}
!20 = !{!19, !7, i64 16}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !11, i64 0}
!24 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_SYSTEMSTATE_TYPE", !11, i64 0, !11, i64 4, !7, i64 8}
!25 = !{!24, !11, i64 4}
!26 = !{!24, !7, i64 8}
!27 = distinct !{!27, !22}
!28 = !{!29, !11, i64 0}
!29 = !{!"_MODULE_CONFIGURATION_HEALTHMONITORING_ERROR_TYPE", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!30 = !{!29, !11, i64 12}
!31 = !{!6, !11, i64 40}


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