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

; 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 dso_local global [2 x %struct._MODULE_INFORMATION_TYPE], align 16

declare i32 @PORT_GETCORE() #0

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

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

; Function Attrs: nounwind uwtable
define dso_local void @INITIALIZE_PROCESS_INFORMATION(i32 noundef %0, i32 noundef %1) #2 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  store i32 %0, ptr %3, align 4, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  %8 = call i32 @PORT_GETCORE()
  %9 = zext i32 %8 to i64
  %10 = getelementptr inbounds [2 x %struct._MODULE_INFORMATION_TYPE], ptr @CORE_MODULE_INFORMATION, i64 0, i64 %9
  store ptr %10, ptr %5, align 8, !tbaa !9
  %11 = load ptr, ptr %5, align 8, !tbaa !9
  %12 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %11, i32 0, i32 7
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = load i32, ptr %3, align 4, !tbaa !5
  %15 = zext i32 %14 to i64
  %16 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %13, i64 %15
  store ptr %16, ptr %6, align 8, !tbaa !9
  %17 = load ptr, ptr %6, align 8, !tbaa !9
  %18 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %17, i32 0, i32 11
  %19 = load ptr, ptr %18, align 8, !tbaa !18
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = zext i32 %20 to i64
  %22 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %19, i64 %21
  store ptr %22, ptr %7, align 8, !tbaa !9
  %23 = load ptr, ptr %7, align 8, !tbaa !9
  %24 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %23, i32 0, i32 0
  store ptr null, ptr %24, align 8, !tbaa !22
  %25 = load ptr, ptr %7, align 8, !tbaa !9
  %26 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %25, i32 0, i32 1
  store ptr null, ptr %26, align 8, !tbaa !24
  %27 = load ptr, ptr %7, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %27, i32 0, i32 2
  store i32 -1, ptr %28, align 8, !tbaa !25
  %29 = load ptr, ptr %7, align 8, !tbaa !9
  %30 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %29, i32 0, i32 3
  store i32 0, ptr %30, align 4, !tbaa !26
  %31 = load ptr, ptr %7, align 8, !tbaa !9
  %32 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %31, i32 0, i32 4
  store i32 1, ptr %32, align 8, !tbaa !27
  %33 = load ptr, ptr %7, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %33, i32 0, i32 5
  store i64 -1, ptr %34, align 8, !tbaa !28
  %35 = load ptr, ptr %7, align 8, !tbaa !9
  %36 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %35, i32 0, i32 6
  store i64 -1, ptr %36, align 8, !tbaa !29
  %37 = load ptr, ptr %7, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %37, i32 0, i32 7
  store i64 -1, ptr %38, align 8, !tbaa !30
  %39 = load ptr, ptr %7, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %39, i32 0, i32 8
  store i64 -1, ptr %40, align 8, !tbaa !31
  %41 = load ptr, ptr %7, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %41, i32 0, i32 9
  store i64 -1, ptr %42, align 8, !tbaa !32
  %43 = load ptr, ptr %6, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %43, i32 0, i32 0
  %45 = load i8, ptr %44, align 8, !tbaa !33
  %46 = icmp ne i8 %45, 0
  br i1 %46, label %78, label %47

47:                                               ; preds = %2
  %48 = load ptr, ptr %7, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %48, i32 0, i32 10
  %50 = getelementptr inbounds %struct._CONTEXT_TYPE, ptr %49, i32 0, i32 0
  store i32 0, ptr %50, align 8, !tbaa !34
  %51 = load ptr, ptr %7, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %51, i32 0, i32 10
  %53 = getelementptr inbounds %struct._CONTEXT_TYPE, ptr %52, i32 0, i32 1
  store ptr null, ptr %53, align 8, !tbaa !35
  %54 = load ptr, ptr %7, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %54, i32 0, i32 10
  %56 = getelementptr inbounds %struct._CONTEXT_TYPE, ptr %55, i32 0, i32 2
  store ptr null, ptr %56, align 8, !tbaa !36
  %57 = load ptr, ptr %7, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %57, i32 0, i32 10
  %59 = getelementptr inbounds %struct._CONTEXT_TYPE, ptr %58, i32 0, i32 3
  store ptr null, ptr %59, align 8, !tbaa !37
  %60 = load ptr, ptr %7, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %60, i32 0, i32 10
  %62 = getelementptr inbounds %struct._CONTEXT_TYPE, ptr %61, i32 0, i32 4
  store i32 0, ptr %62, align 8, !tbaa !38
  %63 = load ptr, ptr %7, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %63, i32 0, i32 10
  %65 = getelementptr inbounds %struct._CONTEXT_TYPE, ptr %64, i32 0, i32 5
  store i8 0, ptr %65, align 4, !tbaa !39
  %66 = load ptr, ptr %7, align 8, !tbaa !9
  %67 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %66, i32 0, i32 10
  %68 = getelementptr inbounds %struct._CONTEXT_TYPE, ptr %67, i32 0, i32 6
  store ptr null, ptr %68, align 8, !tbaa !40
  %69 = load ptr, ptr %7, align 8, !tbaa !9
  %70 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %69, i32 0, i32 10
  %71 = getelementptr inbounds %struct._CONTEXT_TYPE, ptr %70, i32 0, i32 7
  store ptr null, ptr %71, align 8, !tbaa !41
  %72 = load ptr, ptr %7, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %72, i32 0, i32 10
  %74 = getelementptr inbounds %struct._CONTEXT_TYPE, ptr %73, i32 0, i32 8
  store i32 0, ptr %74, align 8, !tbaa !42
  %75 = load ptr, ptr %7, align 8, !tbaa !9
  %76 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %75, i32 0, i32 10
  %77 = getelementptr inbounds %struct._CONTEXT_TYPE, ptr %76, i32 0, i32 9
  store i32 0, ptr %77, align 4, !tbaa !43
  br label %78

78:                                               ; preds = %47, %2
  %79 = load ptr, ptr %6, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %79, i32 0, i32 0
  %81 = load i8, ptr %80, align 8, !tbaa !33
  %82 = icmp ne i8 %81, 0
  br i1 %82, label %83, label %92

83:                                               ; preds = %78
  %84 = load ptr, ptr %7, align 8, !tbaa !9
  %85 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %84, i32 0, i32 11
  call void @PRIORITYQUEUE_REMOVE(ptr noundef %85)
  %86 = load ptr, ptr %7, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %86, i32 0, i32 12
  call void @PRIORITYQUEUE_REMOVE(ptr noundef %87)
  %88 = load ptr, ptr %7, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %88, i32 0, i32 13
  call void @PRIORITYQUEUE_REMOVE(ptr noundef %89)
  %90 = load ptr, ptr %7, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %90, i32 0, i32 14
  call void @PRIORITYQUEUE_REMOVE(ptr noundef %91)
  br label %92

92:                                               ; preds = %83, %78
  %93 = load ptr, ptr %7, align 8, !tbaa !9
  %94 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %93, i32 0, i32 11
  call void @PRIORITYQUEUE_INITIALIZEENTRY(ptr noundef %94)
  %95 = load ptr, ptr %7, align 8, !tbaa !9
  %96 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %95, i32 0, i32 12
  call void @PRIORITYQUEUE_INITIALIZEENTRY(ptr noundef %96)
  %97 = load ptr, ptr %7, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %97, i32 0, i32 13
  call void @PRIORITYQUEUE_INITIALIZEENTRY(ptr noundef %98)
  %99 = load ptr, ptr %7, align 8, !tbaa !9
  %100 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %99, i32 0, i32 14
  call void @PRIORITYQUEUE_INITIALIZEENTRY(ptr noundef %100)
  %101 = load ptr, ptr %7, align 8, !tbaa !9
  %102 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %101, i32 0, i32 15
  store i8 0, ptr %102, align 8, !tbaa !44
  %103 = load ptr, ptr %7, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %103, i32 0, i32 16
  store i8 0, ptr %104, align 1, !tbaa !45
  %105 = load ptr, ptr %7, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %105, i32 0, i32 17
  store ptr null, ptr %106, align 8, !tbaa !46
  %107 = load ptr, ptr %7, align 8, !tbaa !9
  %108 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %107, i32 0, i32 18
  store i32 0, ptr %108, align 8, !tbaa !47
  %109 = load ptr, ptr %7, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %109, i32 0, i32 19
  store ptr null, ptr %110, align 8, !tbaa !48
  %111 = load ptr, ptr %7, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %111, i32 0, i32 20
  store ptr null, ptr %112, align 8, !tbaa !49
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret void
}

declare void @PRIORITYQUEUE_REMOVE(ptr noundef) #0

declare void @PRIORITYQUEUE_INITIALIZEENTRY(ptr noundef) #0

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = !{!12, !10, i64 128}
!12 = !{!"_MODULE_INFORMATION_TYPE", !10, i64 0, !13, i64 8, !6, i64 32, !6, i64 36, !6, i64 40, !14, i64 48, !6, i64 120, !10, i64 128, !10, i64 136, !15, i64 144, !16, i64 256, !16, i64 264, !16, i64 272, !17, i64 280}
!13 = !{!"_heapRECORD", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16}
!14 = !{!"_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}
!15 = !{!"_HEALTHMONITORINGCALLBACK_INFORMATION_TYPE", !7, i64 0, !10, i64 8, !6, i64 16, !14, i64 24, !7, i64 96, !7, i64 97, !7, i64 98, !7, i64 99, !6, i64 100, !6, i64 104}
!16 = !{!"long long", !7, i64 0}
!17 = !{!"_priorityqueueRECORD", !10, i64 0, !6, i64 8, !7, i64 12, !7, i64 13}
!18 = !{!19, !10, i64 152}
!19 = !{!"_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, !13, i64 48, !14, i64 72, !6, i64 144, !10, i64 152, !10, i64 160, !20, i64 168, !15, i64 272, !6, i64 384, !21, i64 392, !17, i64 432, !17, i64 448, !17, 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}
!20 = !{!"_ERRORHANDLER_INFORMATION_TYPE", !7, i64 0, !10, i64 8, !6, i64 16, !14, i64 24, !7, i64 96, !7, i64 97, !7, i64 98, !7, i64 99, !6, i64 100}
!21 = !{!"_priorityqueueENTRY", !16, i64 0, !16, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!22 = !{!23, !10, i64 0}
!23 = !{!"_PROCESS_INFORMATION_TYPE", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !6, i64 24, !16, i64 32, !16, i64 40, !16, i64 48, !16, i64 56, !16, i64 64, !14, i64 72, !21, i64 144, !21, i64 184, !21, i64 224, !21, i64 264, !7, i64 304, !7, i64 305, !10, i64 312, !6, i64 320, !10, i64 328, !10, i64 336}
!24 = !{!23, !10, i64 8}
!25 = !{!23, !6, i64 16}
!26 = !{!23, !6, i64 20}
!27 = !{!23, !6, i64 24}
!28 = !{!23, !16, i64 32}
!29 = !{!23, !16, i64 40}
!30 = !{!23, !16, i64 48}
!31 = !{!23, !16, i64 56}
!32 = !{!23, !16, i64 64}
!33 = !{!19, !7, i64 0}
!34 = !{!23, !6, i64 72}
!35 = !{!23, !10, i64 80}
!36 = !{!23, !10, i64 88}
!37 = !{!23, !10, i64 96}
!38 = !{!23, !6, i64 104}
!39 = !{!23, !7, i64 108}
!40 = !{!23, !10, i64 112}
!41 = !{!23, !10, i64 120}
!42 = !{!23, !6, i64 128}
!43 = !{!23, !6, i64 132}
!44 = !{!23, !7, i64 304}
!45 = !{!23, !7, i64 305}
!46 = !{!23, !10, i64 312}
!47 = !{!23, !6, i64 320}
!48 = !{!23, !10, i64 328}
!49 = !{!23, !10, i64 336}


; 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 dso_local local_unnamed_addr global [2 x %struct._MODULE_INFORMATION_TYPE], align 16

declare i32 @PORT_GETCORE() local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @INITIALIZE_PROCESS_INFORMATION(i32 noundef %0, i32 noundef %1) local_unnamed_addr #1 {
  %3 = tail call i32 @PORT_GETCORE() #3
  %4 = zext i32 %3 to i64
  %5 = getelementptr inbounds [2 x %struct._MODULE_INFORMATION_TYPE], ptr @CORE_MODULE_INFORMATION, i64 0, i64 %4, i32 7
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = zext i32 %0 to i64
  %8 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %6, i64 %7
  %9 = getelementptr inbounds i8, ptr %8, i64 152
  %10 = load ptr, ptr %9, align 8, !tbaa !16
  %11 = zext i32 %1 to i64
  %12 = getelementptr inbounds %struct._PROCESS_INFORMATION_TYPE, ptr %10, i64 %11
  %13 = getelementptr inbounds i8, ptr %12, i64 16
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %12, i8 0, i64 16, i1 false)
  store i32 -1, ptr %13, align 8, !tbaa !20
  %14 = getelementptr inbounds i8, ptr %12, i64 20
  store i32 0, ptr %14, align 4, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %12, i64 24
  store i32 1, ptr %15, align 8, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %12, i64 32
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %16, i8 -1, i64 40, i1 false)
  %17 = load i8, ptr %8, align 8, !tbaa !24
  %.not = icmp eq i8 %17, 0
  br i1 %.not, label %.thread, label %21

.thread:                                          ; preds = %2
  %18 = getelementptr inbounds i8, ptr %12, i64 72
  store i32 0, ptr %18, align 8, !tbaa !25
  %19 = getelementptr inbounds i8, ptr %12, i64 80
  %20 = getelementptr inbounds i8, ptr %12, i64 112
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(29) %19, i8 0, i64 29, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %20, i8 0, i64 24, i1 false)
  br label %26

21:                                               ; preds = %2
  %22 = getelementptr inbounds i8, ptr %12, i64 144
  tail call void @PRIORITYQUEUE_REMOVE(ptr noundef nonnull %22) #3
  %23 = getelementptr inbounds i8, ptr %12, i64 184
  tail call void @PRIORITYQUEUE_REMOVE(ptr noundef nonnull %23) #3
  %24 = getelementptr inbounds i8, ptr %12, i64 224
  tail call void @PRIORITYQUEUE_REMOVE(ptr noundef nonnull %24) #3
  %25 = getelementptr inbounds i8, ptr %12, i64 264
  tail call void @PRIORITYQUEUE_REMOVE(ptr noundef nonnull %25) #3
  br label %26

26:                                               ; preds = %.thread, %21
  %27 = getelementptr inbounds i8, ptr %12, i64 144
  tail call void @PRIORITYQUEUE_INITIALIZEENTRY(ptr noundef nonnull %27) #3
  %28 = getelementptr inbounds i8, ptr %12, i64 184
  tail call void @PRIORITYQUEUE_INITIALIZEENTRY(ptr noundef nonnull %28) #3
  %29 = getelementptr inbounds i8, ptr %12, i64 224
  tail call void @PRIORITYQUEUE_INITIALIZEENTRY(ptr noundef nonnull %29) #3
  %30 = getelementptr inbounds i8, ptr %12, i64 264
  tail call void @PRIORITYQUEUE_INITIALIZEENTRY(ptr noundef nonnull %30) #3
  %31 = getelementptr inbounds i8, ptr %12, i64 304
  store i8 0, ptr %31, align 8, !tbaa !26
  %32 = getelementptr inbounds i8, ptr %12, i64 305
  store i8 0, ptr %32, align 1, !tbaa !27
  %33 = getelementptr inbounds i8, ptr %12, i64 312
  store ptr null, ptr %33, align 8, !tbaa !28
  %34 = getelementptr inbounds i8, ptr %12, i64 320
  store i32 0, ptr %34, align 8, !tbaa !29
  %35 = getelementptr inbounds i8, ptr %12, i64 328
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %35, i8 0, i64 16, i1 false)
  ret void
}

declare void @PRIORITYQUEUE_REMOVE(ptr noundef) local_unnamed_addr #0

declare void @PRIORITYQUEUE_INITIALIZEENTRY(ptr noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 128}
!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 152}
!17 = !{!"_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, !18, i64 168, !13, i64 272, !11, i64 384, !19, 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}
!18 = !{!"_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}
!19 = !{!"_priorityqueueENTRY", !14, i64 0, !14, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!20 = !{!21, !11, i64 16}
!21 = !{!"_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, !19, i64 144, !19, i64 184, !19, i64 224, !19, i64 264, !8, i64 304, !8, i64 305, !7, i64 312, !11, i64 320, !7, i64 328, !7, i64 336}
!22 = !{!21, !11, i64 20}
!23 = !{!21, !11, i64 24}
!24 = !{!17, !8, i64 0}
!25 = !{!21, !11, i64 72}
!26 = !{!21, !8, i64 304}
!27 = !{!21, !8, i64 305}
!28 = !{!21, !7, i64 312}
!29 = !{!21, !11, i64 320}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MemCpyOptPass,SROAPass,TailCallElimPass