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

; 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._SAMPLINGPORT_INFORMATION_TYPE = type { i32, ptr, i32, i32, i64, i64, i64, i32, i32, ptr, 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 i32 @PORT_GETCORE() #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 @WRITE_PARTITION_SAMPLING_MESSAGE(i32 noundef %0, i32 noundef %1, ptr noundef %2, i32 noundef %3, ptr noundef %4) #2 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !9
  store i32 %3, ptr %9, align 4, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !9
  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 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @ENTER_CORE()
  %16 = call i32 @PORT_GETCORE()
  %17 = zext i32 %16 to i64
  %18 = getelementptr inbounds [2 x %struct._MODULE_INFORMATION_TYPE], ptr @CORE_MODULE_INFORMATION, i64 0, i64 %17
  store ptr %18, ptr %11, align 8, !tbaa !9
  %19 = load i32, ptr %6, align 4, !tbaa !5
  %20 = load ptr, ptr %11, align 8, !tbaa !9
  %21 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %20, i32 0, i32 6
  %22 = load i32, ptr %21, align 8, !tbaa !11
  %23 = icmp uge i32 %19, %22
  br i1 %23, label %24, label %26

24:                                               ; preds = %5
  %25 = load ptr, ptr %10, align 8, !tbaa !9
  store i32 4, ptr %25, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %15, align 4
  br label %97

26:                                               ; preds = %5
  %27 = load ptr, ptr %11, align 8, !tbaa !9
  %28 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %27, i32 0, i32 7
  %29 = load ptr, ptr %28, align 8, !tbaa !18
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = zext i32 %30 to i64
  %32 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %29, i64 %31
  store ptr %32, ptr %12, align 8, !tbaa !9
  %33 = load i32, ptr %7, align 4, !tbaa !5
  %34 = load ptr, ptr %12, align 8, !tbaa !9
  %35 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %34, i32 0, i32 23
  %36 = load i32, ptr %35, align 8, !tbaa !19
  %37 = icmp uge i32 %33, %36
  br i1 %37, label %38, label %40

38:                                               ; preds = %26
  %39 = load ptr, ptr %10, align 8, !tbaa !9
  store i32 4, ptr %39, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %15, align 4
  br label %97

40:                                               ; preds = %26
  %41 = load ptr, ptr %12, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %41, i32 0, i32 24
  %43 = load ptr, ptr %42, align 8, !tbaa !23
  %44 = load i32, ptr %7, align 4, !tbaa !5
  %45 = zext i32 %44 to i64
  %46 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %43, i64 %45
  store ptr %46, ptr %13, align 8, !tbaa !9
  %47 = load i32, ptr %9, align 4, !tbaa !5
  %48 = load ptr, ptr %13, align 8, !tbaa !9
  %49 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %48, i32 0, i32 2
  %50 = load i32, ptr %49, align 8, !tbaa !24
  %51 = icmp ugt i32 %47, %50
  br i1 %51, label %52, label %54

52:                                               ; preds = %40
  %53 = load ptr, ptr %10, align 8, !tbaa !9
  store i32 5, ptr %53, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %15, align 4
  br label %97

54:                                               ; preds = %40
  %55 = load ptr, ptr %13, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %55, i32 0, i32 3
  %57 = load i32, ptr %56, align 4, !tbaa !26
  %58 = icmp ne i32 %57, 2
  br i1 %58, label %59, label %61

59:                                               ; preds = %54
  %60 = load ptr, ptr %10, align 8, !tbaa !9
  store i32 6, ptr %60, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %15, align 4
  br label %97

61:                                               ; preds = %54
  %62 = load ptr, ptr %13, align 8, !tbaa !9
  %63 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %62, i32 0, i32 8
  store i32 2, ptr %63, align 4, !tbaa !27
  store i32 0, ptr %14, align 4, !tbaa !5
  br label %64

64:                                               ; preds = %80, %61
  %65 = load i32, ptr %14, align 4, !tbaa !5
  %66 = load i32, ptr %9, align 4, !tbaa !5
  %67 = icmp ult i32 %65, %66
  br i1 %67, label %68, label %83

68:                                               ; preds = %64
  %69 = load ptr, ptr %8, align 8, !tbaa !9
  %70 = load i32, ptr %14, align 4, !tbaa !5
  %71 = zext i32 %70 to i64
  %72 = getelementptr inbounds i8, ptr %69, i64 %71
  %73 = load i8, ptr %72, align 1, !tbaa !28
  %74 = load ptr, ptr %13, align 8, !tbaa !9
  %75 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %74, i32 0, i32 9
  %76 = load ptr, ptr %75, align 8, !tbaa !29
  %77 = load i32, ptr %14, align 4, !tbaa !5
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %76, i64 %78
  store i8 %73, ptr %79, align 1, !tbaa !28
  br label %80

80:                                               ; preds = %68
  %81 = load i32, ptr %14, align 4, !tbaa !5
  %82 = add i32 %81, 1
  store i32 %82, ptr %14, align 4, !tbaa !5
  br label %64, !llvm.loop !30

83:                                               ; preds = %64
  %84 = load i32, ptr %9, align 4, !tbaa !5
  %85 = load ptr, ptr %13, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %85, i32 0, i32 10
  store i32 %84, ptr %86, align 8, !tbaa !32
  %87 = load ptr, ptr %11, align 8, !tbaa !9
  %88 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %87, i32 0, i32 10
  %89 = load i64, ptr %88, align 8, !tbaa !33
  %90 = load ptr, ptr %11, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %90, i32 0, i32 11
  %92 = load i64, ptr %91, align 8, !tbaa !34
  %93 = add nsw i64 %89, %92
  %94 = load ptr, ptr %13, align 8, !tbaa !9
  %95 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %94, i32 0, i32 6
  store i64 %93, ptr %95, align 8, !tbaa !35
  %96 = load ptr, ptr %10, align 8, !tbaa !9
  store i32 1, ptr %96, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 0, ptr %15, align 4
  br label %97

97:                                               ; preds = %83, %59, %52, %38, %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, 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
  %98 = load i32, ptr %15, align 4
  switch i32 %98, label %100 [
    i32 0, label %99
    i32 1, label %99
  ]

99:                                               ; preds = %97, %97
  ret void

100:                                              ; preds = %97
  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 = !{!12, !6, i64 120}
!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 = !{!12, !10, i64 128}
!19 = !{!20, !6, i64 496}
!20 = !{!"_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, !21, i64 168, !15, i64 272, !6, i64 384, !22, 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}
!21 = !{!"_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}
!22 = !{!"_priorityqueueENTRY", !16, i64 0, !16, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!23 = !{!20, !10, i64 504}
!24 = !{!25, !6, i64 16}
!25 = !{!"_SAMPLINGPORT_INFORMATION_TYPE", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !16, i64 24, !16, i64 32, !16, i64 40, !6, i64 48, !6, i64 52, !10, i64 56, !6, i64 64}
!26 = !{!25, !6, i64 20}
!27 = !{!25, !6, i64 52}
!28 = !{!7, !7, i64 0}
!29 = !{!25, !10, i64 56}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!25, !6, i64 64}
!33 = !{!12, !16, i64 256}
!34 = !{!12, !16, i64 264}
!35 = !{!25, !16, 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._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._SAMPLINGPORT_INFORMATION_TYPE = type { i32, ptr, i32, i32, i64, i64, i64, i32, i32, ptr, i32 }

@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

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

11:                                               ; preds = %5
  %12 = getelementptr inbounds i8, ptr %8, i64 128
  %13 = load ptr, ptr %12, align 8, !tbaa !16
  %14 = zext i32 %0 to i64
  %15 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %13, i64 %14
  %16 = getelementptr inbounds i8, ptr %15, i64 496
  %17 = load i32, ptr %16, align 8, !tbaa !17
  %.not31 = icmp ugt i32 %17, %1
  br i1 %.not31, label %18, label %61

18:                                               ; preds = %11
  %19 = getelementptr inbounds i8, ptr %15, i64 504
  %20 = load ptr, ptr %19, align 8, !tbaa !21
  %21 = zext i32 %1 to i64
  %22 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %20, i64 %21
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %24 = load i32, ptr %23, align 8, !tbaa !22
  %25 = icmp ult i32 %24, %3
  br i1 %25, label %61, label %26

26:                                               ; preds = %18
  %27 = getelementptr inbounds i8, ptr %22, i64 20
  %28 = load i32, ptr %27, align 4, !tbaa !24
  %.not32 = icmp eq i32 %28, 2
  br i1 %.not32, label %29, label %61

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %22, i64 52
  store i32 2, ptr %30, align 4, !tbaa !25
  %.not34 = icmp eq i32 %3, 0
  br i1 %.not34, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %29
  %31 = getelementptr inbounds i8, ptr %22, i64 56
  %wide.trip.count = zext i32 %3 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %32 = icmp ult i32 %3, 4
  br i1 %32, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %wide.trip.count, 4294967292
  br label %33

33:                                               ; preds = %33, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %33 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %33 ]
  %34 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv
  %35 = load i8, ptr %34, align 1, !tbaa !26
  %36 = load ptr, ptr %31, align 8, !tbaa !27
  %37 = getelementptr inbounds i8, ptr %36, i64 %indvars.iv
  store i8 %35, ptr %37, align 1, !tbaa !26
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %38 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next
  %39 = load i8, ptr %38, align 1, !tbaa !26
  %40 = load ptr, ptr %31, align 8, !tbaa !27
  %41 = getelementptr inbounds i8, ptr %40, i64 %indvars.iv.next
  store i8 %39, ptr %41, align 1, !tbaa !26
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %42 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next.1
  %43 = load i8, ptr %42, align 1, !tbaa !26
  %44 = load ptr, ptr %31, align 8, !tbaa !27
  %45 = getelementptr inbounds i8, ptr %44, i64 %indvars.iv.next.1
  store i8 %43, ptr %45, align 1, !tbaa !26
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %46 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.next.2
  %47 = load i8, ptr %46, align 1, !tbaa !26
  %48 = load ptr, ptr %31, align 8, !tbaa !27
  %49 = getelementptr inbounds i8, ptr %48, i64 %indvars.iv.next.2
  store i8 %47, ptr %49, align 1, !tbaa !26
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %33, !llvm.loop !28

._crit_edge.loopexit.unr-lcssa:                   ; preds = %33, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %33 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %50 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv.epil
  %51 = load i8, ptr %50, align 1, !tbaa !26
  %52 = load ptr, ptr %31, align 8, !tbaa !27
  %53 = getelementptr inbounds i8, ptr %52, i64 %indvars.iv.epil
  store i8 %51, ptr %53, align 1, !tbaa !26
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !30

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %29
  %54 = getelementptr inbounds i8, ptr %22, i64 64
  store i32 %3, ptr %54, align 8, !tbaa !32
  %55 = getelementptr inbounds i8, ptr %8, i64 256
  %56 = load i64, ptr %55, align 8, !tbaa !33
  %57 = getelementptr inbounds i8, ptr %8, i64 264
  %58 = load i64, ptr %57, align 8, !tbaa !34
  %59 = add nsw i64 %58, %56
  %60 = getelementptr inbounds i8, ptr %22, i64 40
  store i64 %59, ptr %60, align 8, !tbaa !35
  br label %61

61:                                               ; preds = %26, %18, %11, %5, %._crit_edge
  %.sink = phi i32 [ 1, %._crit_edge ], [ 4, %5 ], [ 4, %11 ], [ 5, %18 ], [ 6, %26 ]
  store i32 %.sink, ptr %4, align 4, !tbaa !36
  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 = !{!18, !11, i64 496}
!18 = !{!"_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, !19, 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}
!19 = !{!"_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}
!20 = !{!"_priorityqueueENTRY", !14, i64 0, !14, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!21 = !{!18, !7, i64 504}
!22 = !{!23, !11, i64 16}
!23 = !{!"_SAMPLINGPORT_INFORMATION_TYPE", !11, i64 0, !7, i64 8, !11, i64 16, !11, i64 20, !14, i64 24, !14, i64 32, !14, i64 40, !11, i64 48, !11, i64 52, !7, i64 56, !11, i64 64}
!24 = !{!23, !11, i64 20}
!25 = !{!23, !11, i64 52}
!26 = !{!8, !8, i64 0}
!27 = !{!23, !7, i64 56}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.unroll.disable"}
!32 = !{!23, !11, i64 64}
!33 = !{!6, !14, i64 256}
!34 = !{!6, !14, i64 264}
!35 = !{!23, !14, i64 40}
!36 = !{!11, !11, i64 0}


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