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

26:                                               ; preds = %6
  %27 = load ptr, ptr %12, align 8, !tbaa !9
  store i32 4, ptr %27, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %17, align 4
  br label %123

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

40:                                               ; preds = %28
  %41 = load ptr, ptr %12, align 8, !tbaa !9
  store i32 4, ptr %41, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %17, align 4
  br label %123

42:                                               ; preds = %28
  %43 = load ptr, ptr %14, align 8, !tbaa !9
  %44 = getelementptr inbounds %struct._PARTITION_INFORMATION_TYPE, ptr %43, i32 0, i32 24
  %45 = load ptr, ptr %44, align 8, !tbaa !24
  %46 = load i32, ptr %8, align 4, !tbaa !5
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %45, i64 %47
  store ptr %48, ptr %15, align 8, !tbaa !9
  %49 = load ptr, ptr %15, align 8, !tbaa !9
  %50 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %49, i32 0, i32 3
  %51 = load i32, ptr %50, align 4, !tbaa !25
  %52 = icmp ne i32 %51, 1
  br i1 %52, label %53, label %55

53:                                               ; preds = %42
  %54 = load ptr, ptr %12, align 8, !tbaa !9
  store i32 6, ptr %54, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %17, align 4
  br label %123

55:                                               ; preds = %42
  %56 = load ptr, ptr %15, align 8, !tbaa !9
  %57 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %56, i32 0, i32 8
  %58 = load i32, ptr %57, align 4, !tbaa !27
  %59 = icmp eq i32 %58, 1
  br i1 %59, label %60, label %62

60:                                               ; preds = %55
  %61 = load ptr, ptr %12, align 8, !tbaa !9
  store i32 3, ptr %61, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %17, align 4
  br label %123

62:                                               ; preds = %55
  %63 = load ptr, ptr %15, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %63, i32 0, i32 6
  %65 = load i64, ptr %64, align 8, !tbaa !28
  %66 = icmp ne i64 %65, -1
  br i1 %66, label %67, label %82

67:                                               ; preds = %62
  %68 = load ptr, ptr %15, align 8, !tbaa !9
  %69 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %68, i32 0, i32 5
  %70 = load i64, ptr %69, align 8, !tbaa !29
  %71 = icmp ne i64 %70, -1
  br i1 %71, label %72, label %82

72:                                               ; preds = %67
  %73 = load ptr, ptr %15, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %73, i32 0, i32 6
  %75 = load i64, ptr %74, align 8, !tbaa !28
  %76 = load ptr, ptr %15, align 8, !tbaa !9
  %77 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %76, i32 0, i32 5
  %78 = load i64, ptr %77, align 8, !tbaa !29
  %79 = icmp sle i64 %75, %78
  br i1 %79, label %80, label %82

80:                                               ; preds = %72
  %81 = load ptr, ptr %12, align 8, !tbaa !9
  store i32 2, ptr %81, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 1, ptr %17, align 4
  br label %123

82:                                               ; preds = %72, %67, %62
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %101, %82
  %84 = load i32, ptr %16, align 4, !tbaa !5
  %85 = load ptr, ptr %15, align 8, !tbaa !9
  %86 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %85, i32 0, i32 10
  %87 = load i32, ptr %86, align 8, !tbaa !30
  %88 = icmp ult i32 %84, %87
  br i1 %88, label %89, label %104

89:                                               ; preds = %83
  %90 = load ptr, ptr %15, align 8, !tbaa !9
  %91 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %90, i32 0, i32 9
  %92 = load ptr, ptr %91, align 8, !tbaa !31
  %93 = load i32, ptr %16, align 4, !tbaa !5
  %94 = zext i32 %93 to i64
  %95 = getelementptr inbounds i8, ptr %92, i64 %94
  %96 = load i8, ptr %95, align 1, !tbaa !11
  %97 = load ptr, ptr %9, align 8, !tbaa !9
  %98 = load i32, ptr %16, align 4, !tbaa !5
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds i8, ptr %97, i64 %99
  store i8 %96, ptr %100, align 1, !tbaa !11
  br label %101

101:                                              ; preds = %89
  %102 = load i32, ptr %16, align 4, !tbaa !5
  %103 = add i32 %102, 1
  store i32 %103, ptr %16, align 4, !tbaa !5
  br label %83, !llvm.loop !32

104:                                              ; preds = %83
  %105 = load ptr, ptr %15, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %105, i32 0, i32 10
  %107 = load i32, ptr %106, align 8, !tbaa !30
  %108 = load ptr, ptr %10, align 8, !tbaa !9
  store i32 %107, ptr %108, align 4, !tbaa !5
  %109 = load i8, ptr %11, align 1, !tbaa !11
  %110 = icmp ne i8 %109, 0
  br i1 %110, label %121, label %111

111:                                              ; preds = %104
  %112 = load ptr, ptr %13, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %112, i32 0, i32 10
  %114 = load i64, ptr %113, align 8, !tbaa !34
  %115 = load ptr, ptr %13, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct._MODULE_INFORMATION_TYPE, ptr %115, i32 0, i32 11
  %117 = load i64, ptr %116, align 8, !tbaa !35
  %118 = add nsw i64 %114, %117
  %119 = load ptr, ptr %15, align 8, !tbaa !9
  %120 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %119, i32 0, i32 5
  store i64 %118, ptr %120, align 8, !tbaa !29
  br label %121

121:                                              ; preds = %111, %104
  %122 = load ptr, ptr %12, align 8, !tbaa !9
  store i32 1, ptr %122, align 4, !tbaa !5
  call void @EXIT_CORE()
  store i32 0, ptr %17, align 4
  br label %123

123:                                              ; preds = %121, %80, %60, %53, %40, %26
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  %124 = load i32, ptr %17, align 4
  switch i32 %124, label %126 [
    i32 0, label %125
    i32 1, label %125
  ]

125:                                              ; preds = %123, %123
  ret void

126:                                              ; preds = %123
  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 = !{!21, !6, i64 496}
!21 = !{!"_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, !22, 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}
!22 = !{!"_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}
!23 = !{!"_priorityqueueENTRY", !17, i64 0, !17, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!24 = !{!21, !10, i64 504}
!25 = !{!26, !6, i64 20}
!26 = !{!"_SAMPLINGPORT_INFORMATION_TYPE", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 20, !17, i64 24, !17, i64 32, !17, i64 40, !6, i64 48, !6, i64 52, !10, i64 56, !6, i64 64}
!27 = !{!26, !6, i64 52}
!28 = !{!26, !17, i64 40}
!29 = !{!26, !17, i64 32}
!30 = !{!26, !6, i64 64}
!31 = !{!26, !10, i64 56}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!13, !17, i64 256}
!35 = !{!13, !17, i64 264}


; 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 @READ_PARTITION_SAMPLING_MESSAGE(i32 noundef %0, i32 noundef %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef writeonly %3, i8 noundef zeroext %4, ptr nocapture noundef writeonly %5) local_unnamed_addr #1 {
  tail call void @ENTER_CORE() #2
  %7 = tail call i32 @PORT_GETCORE() #2
  %8 = zext i32 %7 to i64
  %9 = getelementptr inbounds [2 x %struct._MODULE_INFORMATION_TYPE], ptr @CORE_MODULE_INFORMATION, i64 0, i64 %8
  %10 = getelementptr inbounds i8, ptr %9, i64 120
  %11 = load i32, ptr %10, align 8, !tbaa !5
  %.not = icmp ugt i32 %11, %0
  br i1 %.not, label %12, label %55

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

19:                                               ; preds = %12
  %20 = getelementptr inbounds i8, ptr %16, i64 504
  %21 = load ptr, ptr %20, align 8, !tbaa !21
  %22 = zext i32 %1 to i64
  %23 = getelementptr inbounds %struct._SAMPLINGPORT_INFORMATION_TYPE, ptr %21, i64 %22
  %24 = getelementptr inbounds i8, ptr %23, i64 20
  %25 = load i32, ptr %24, align 4, !tbaa !22
  %.not38 = icmp eq i32 %25, 1
  br i1 %.not38, label %26, label %55

26:                                               ; preds = %19
  %27 = getelementptr inbounds i8, ptr %23, i64 52
  %28 = load i32, ptr %27, align 4, !tbaa !24
  %29 = icmp eq i32 %28, 1
  br i1 %29, label %55, label %30

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %23, i64 40
  %32 = load i64, ptr %31, align 8, !tbaa !25
  %.not39 = icmp eq i64 %32, -1
  br i1 %.not39, label %36, label %33

33:                                               ; preds = %30
  %34 = getelementptr inbounds i8, ptr %23, i64 32
  %35 = load i64, ptr %34, align 8, !tbaa !26
  %.not40 = icmp eq i64 %35, -1
  %.not41 = icmp sgt i64 %32, %35
  %or.cond = or i1 %.not40, %.not41
  br i1 %or.cond, label %36, label %55

36:                                               ; preds = %33, %30
  %37 = getelementptr inbounds i8, ptr %23, i64 64
  %38 = load i32, ptr %37, align 8, !tbaa !27
  %.not44 = icmp eq i32 %38, 0
  br i1 %.not44, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %36
  %39 = getelementptr inbounds i8, ptr %23, i64 56
  br label %40

40:                                               ; preds = %.lr.ph, %40
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %40 ]
  %41 = load ptr, ptr %39, align 8, !tbaa !28
  %42 = getelementptr inbounds i8, ptr %41, i64 %indvars.iv
  %43 = load i8, ptr %42, align 1, !tbaa !29
  %44 = getelementptr inbounds i8, ptr %2, i64 %indvars.iv
  store i8 %43, ptr %44, align 1, !tbaa !29
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %45 = load i32, ptr %37, align 8, !tbaa !27
  %46 = zext i32 %45 to i64
  %47 = icmp ult i64 %indvars.iv.next, %46
  br i1 %47, label %40, label %._crit_edge, !llvm.loop !30

._crit_edge:                                      ; preds = %40, %36
  %.lcssa = phi i32 [ 0, %36 ], [ %45, %40 ]
  store i32 %.lcssa, ptr %3, align 4, !tbaa !32
  %.not42 = icmp eq i8 %4, 0
  br i1 %.not42, label %48, label %55

48:                                               ; preds = %._crit_edge
  %49 = getelementptr inbounds i8, ptr %9, i64 256
  %50 = load i64, ptr %49, align 8, !tbaa !33
  %51 = getelementptr inbounds i8, ptr %9, i64 264
  %52 = load i64, ptr %51, align 8, !tbaa !34
  %53 = add nsw i64 %52, %50
  %54 = getelementptr inbounds i8, ptr %23, i64 32
  store i64 %53, ptr %54, align 8, !tbaa !26
  br label %55

55:                                               ; preds = %._crit_edge, %48, %33, %26, %19, %12, %6
  %.sink = phi i32 [ 4, %6 ], [ 4, %12 ], [ 6, %19 ], [ 3, %26 ], [ 2, %33 ], [ 1, %48 ], [ 1, %._crit_edge ]
  store i32 %.sink, ptr %5, align 4, !tbaa !32
  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 20}
!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 52}
!25 = !{!23, !14, i64 40}
!26 = !{!23, !14, i64 32}
!27 = !{!23, !11, i64 64}
!28 = !{!23, !7, i64 56}
!29 = !{!8, !8, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!11, !11, i64 0}
!33 = !{!6, !14, i64 256}
!34 = !{!6, !14, i64 264}


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