; LLVM IR from SourajitaDewasi/ComputerNetworks :: MAC (ALOHA)

; 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.Process = type { i32, i32, i32 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@i = external dso_local global i32, align 4
@j = external dso_local global i32, align 4
@check = external dso_local global i32, align 4
@P = external dso_local global [4 x %struct.Process], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z6AlohaCii(i32 noundef, i32 noundef) #0

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #2 {
  %1 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %2 = call i64 @time(ptr noundef null) #5
  %3 = trunc i64 %2 to i32
  call void @srand(i32 noundef %3) #5
  store i32 0, ptr @P, align 16, !tbaa !5
  store i32 1, ptr getelementptr inbounds ([4 x %struct.Process], ptr @P, i64 0, i64 1), align 4, !tbaa !5
  store i32 1, ptr getelementptr inbounds ([4 x %struct.Process], ptr @P, i64 0, i64 2), align 8, !tbaa !5
  store i32 2, ptr getelementptr inbounds ([4 x %struct.Process], ptr @P, i64 0, i64 3), align 4, !tbaa !5
  store i32 0, ptr @i, align 4, !tbaa !10
  br label %4

4:                                                ; preds = %16, %0
  %5 = load i32, ptr @i, align 4, !tbaa !10
  %6 = icmp slt i32 %5, 5
  br i1 %6, label %7, label %19

7:                                                ; preds = %4
  %8 = load i32, ptr @i, align 4, !tbaa !10
  %9 = sext i32 %8 to i64
  %10 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %9
  %11 = getelementptr inbounds %struct.Process, ptr %10, i32 0, i32 1
  store i32 0, ptr %11, align 4, !tbaa !11
  %12 = load i32, ptr @i, align 4, !tbaa !10
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %13
  %15 = getelementptr inbounds %struct.Process, ptr %14, i32 0, i32 2
  store i32 0, ptr %15, align 4, !tbaa !12
  br label %16

16:                                               ; preds = %7
  %17 = load i32, ptr @i, align 4, !tbaa !10
  %18 = add nsw i32 %17, 1
  store i32 %18, ptr @i, align 4, !tbaa !10
  br label %4, !llvm.loop !13

19:                                               ; preds = %4
  store i32 0, ptr @i, align 4, !tbaa !10
  br label %20

20:                                               ; preds = %98, %19
  %21 = load i32, ptr @i, align 4, !tbaa !10
  %22 = icmp slt i32 %21, 5
  br i1 %22, label %23, label %101

23:                                               ; preds = %20
  %24 = load i32, ptr @i, align 4, !tbaa !10
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr @j, align 4, !tbaa !10
  br label %26

26:                                               ; preds = %94, %23
  %27 = load i32, ptr @j, align 4, !tbaa !10
  %28 = icmp slt i32 %27, 5
  br i1 %28, label %29, label %97

29:                                               ; preds = %26
  %30 = load i32, ptr @i, align 4, !tbaa !10
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %31
  %33 = getelementptr inbounds %struct.Process, ptr %32, i32 0, i32 0
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = load i32, ptr @j, align 4, !tbaa !10
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %36
  %38 = getelementptr inbounds %struct.Process, ptr %37, i32 0, i32 0
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = icmp eq i32 %34, %39
  br i1 %40, label %41, label %84

41:                                               ; preds = %29
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.3)
  %43 = load i32, ptr @i, align 4, !tbaa !10
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %44
  %46 = getelementptr inbounds %struct.Process, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 4, !tbaa !11
  %48 = load i32, ptr @j, align 4, !tbaa !10
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %49
  %51 = getelementptr inbounds %struct.Process, ptr %50, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !11
  %53 = call noundef i32 @_Z6AlohaCii(i32 noundef %47, i32 noundef %52)
  %54 = load i32, ptr @check, align 4, !tbaa !10
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %68

56:                                               ; preds = %41
  %57 = load i32, ptr @j, align 4, !tbaa !10
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %58
  %60 = getelementptr inbounds %struct.Process, ptr %59, i32 0, i32 0
  %61 = load i32, ptr %60, align 4, !tbaa !5
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %60, align 4, !tbaa !5
  %63 = load i32, ptr @j, align 4, !tbaa !10
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %64
  %66 = getelementptr inbounds %struct.Process, ptr %65, i32 0, i32 2
  store i32 1, ptr %66, align 4, !tbaa !12
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.4)
  br label %68

68:                                               ; preds = %56, %41
  %69 = load i32, ptr @check, align 4, !tbaa !10
  %70 = icmp eq i32 %69, 1
  br i1 %70, label %71, label %83

71:                                               ; preds = %68
  %72 = load i32, ptr @i, align 4, !tbaa !10
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %73
  %75 = getelementptr inbounds %struct.Process, ptr %74, i32 0, i32 0
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %75, align 4, !tbaa !5
  %78 = load i32, ptr @i, align 4, !tbaa !10
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %79
  %81 = getelementptr inbounds %struct.Process, ptr %80, i32 0, i32 2
  store i32 1, ptr %81, align 4, !tbaa !12
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.5)
  br label %83

83:                                               ; preds = %71, %68
  br label %93

84:                                               ; preds = %29
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.6)
  %86 = load i32, ptr @i, align 4, !tbaa !10
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %85, i32 noundef %86)
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef @.str.7)
  %89 = load i32, ptr @i, align 4, !tbaa !10
  %90 = sext i32 %89 to i64
  %91 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %90
  %92 = getelementptr inbounds %struct.Process, ptr %91, i32 0, i32 2
  store i32 1, ptr %92, align 4, !tbaa !12
  br label %93

93:                                               ; preds = %84, %83
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr @j, align 4, !tbaa !10
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr @j, align 4, !tbaa !10
  br label %26, !llvm.loop !15

97:                                               ; preds = %26
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr @i, align 4, !tbaa !10
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr @i, align 4, !tbaa !10
  br label %20, !llvm.loop !16

101:                                              ; preds = %20
  store i32 0, ptr @i, align 4, !tbaa !10
  br label %102

102:                                              ; preds = %119, %101
  %103 = load i32, ptr @i, align 4, !tbaa !10
  %104 = icmp slt i32 %103, 5
  br i1 %104, label %105, label %122

105:                                              ; preds = %102
  %106 = load i32, ptr @i, align 4, !tbaa !10
  %107 = sext i32 %106 to i64
  %108 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %107
  %109 = getelementptr inbounds %struct.Process, ptr %108, i32 0, i32 2
  %110 = load i32, ptr %109, align 4, !tbaa !12
  %111 = icmp eq i32 %110, 1
  br i1 %111, label %112, label %118

112:                                              ; preds = %105
  %113 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.8)
  %114 = load i32, ptr @i, align 4, !tbaa !10
  %115 = add nsw i32 %114, 1
  %116 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %113, i32 noundef %115)
  %117 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %116, ptr noundef @.str.9)
  br label %118

118:                                              ; preds = %112, %105
  br label %119

119:                                              ; preds = %118
  %120 = load i32, ptr @i, align 4, !tbaa !10
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr @i, align 4, !tbaa !10
  br label %102, !llvm.loop !17

122:                                              ; preds = %102
  ret i32 0
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) #3

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #4

attributes #0 = { mustprogress 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 #1 = { inlinehint mustprogress 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 = { mustprogress norecurse 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 "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 #4 = { "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 #5 = { 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 = !{!"_ZTS7Process", !7, i64 0, !7, i64 4, !7, i64 8}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!7, !7, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!6, !7, i64 8}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}


; 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.Process = type { i32, i32, i32 }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }

@i = external dso_local local_unnamed_addr global i32, align 4
@j = external dso_local local_unnamed_addr global i32, align 4
@check = external dso_local local_unnamed_addr global i32, align 4
@P = external dso_local local_unnamed_addr global [4 x %struct.Process], align 16
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.3 = external hidden unnamed_addr constant [72 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [49 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [17 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_Z6AlohaCii(i32 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
.preheader8:
  %0 = tail call i64 @time(ptr noundef null) #5
  %1 = trunc i64 %0 to i32
  tail call void @srand(i32 noundef %1) #5
  store <4 x i32> <i32 0, i32 0, i32 0, i32 1>, ptr @P, align 16, !tbaa !5
  store <4 x i32> <i32 0, i32 0, i32 1, i32 0>, ptr getelementptr inbounds (i8, ptr @P, i64 16), align 16, !tbaa !5
  store <4 x i32> <i32 0, i32 2, i32 0, i32 0>, ptr getelementptr inbounds (i8, ptr @P, i64 32), align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @P, i64 52), align 4, !tbaa !9
  store i32 0, ptr getelementptr inbounds (i8, ptr @P, i64 56), align 8, !tbaa !11
  store i32 0, ptr @i, align 4, !tbaa !5
  br label %.preheader7

.preheader7:                                      ; preds = %.preheader8, %._crit_edge
  %storemerge412 = phi i32 [ 0, %.preheader8 ], [ %.pre16, %._crit_edge ]
  %storemerge610 = add nsw i32 %storemerge412, 1
  store i32 %storemerge610, ptr @j, align 4, !tbaa !5
  %2 = icmp slt i32 %storemerge412, 4
  br i1 %2, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %._crit_edge, %.preheader7
  store i32 0, ptr @i, align 4, !tbaa !5
  br label %55

.lr.ph:                                           ; preds = %.preheader7, %51
  %storemerge611 = phi i32 [ %storemerge6, %51 ], [ %storemerge610, %.preheader7 ]
  %3 = load i32, ptr @i, align 4, !tbaa !5
  %4 = sext i32 %3 to i64
  %5 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %4
  %6 = load i32, ptr %5, align 4, !tbaa !12
  %7 = sext i32 %storemerge611 to i64
  %8 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %7
  %9 = load i32, ptr %8, align 4, !tbaa !12
  %10 = icmp eq i32 %6, %9
  br i1 %10, label %11, label %43

11:                                               ; preds = %.lr.ph
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.3)
  %13 = load i32, ptr @i, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %15 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %14, i32 1
  %16 = load i32, ptr %15, align 4, !tbaa !9
  %17 = load i32, ptr @j, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %18, i32 1
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = tail call noundef i32 @_Z6AlohaCii(i32 noundef %16, i32 noundef %20)
  %22 = load i32, ptr @check, align 4, !tbaa !5
  %23 = icmp eq i32 %22, 0
  br i1 %23, label %24, label %32

24:                                               ; preds = %11
  %25 = load i32, ptr @j, align 4, !tbaa !5
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !12
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %27, align 4, !tbaa !12
  %30 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %26, i32 2
  store i32 1, ptr %30, align 4, !tbaa !11
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.4)
  %.pr = load i32, ptr @check, align 4, !tbaa !5
  br label %32

32:                                               ; preds = %24, %11
  %33 = phi i32 [ %.pr, %24 ], [ %22, %11 ]
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %35, label %51

35:                                               ; preds = %32
  %36 = load i32, ptr @i, align 4, !tbaa !5
  %37 = sext i32 %36 to i64
  %38 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %37
  %39 = load i32, ptr %38, align 4, !tbaa !12
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %38, align 4, !tbaa !12
  %41 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %37, i32 2
  store i32 1, ptr %41, align 4, !tbaa !11
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.5)
  br label %51

43:                                               ; preds = %.lr.ph
  %44 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.6)
  %45 = load i32, ptr @i, align 4, !tbaa !5
  %46 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %44, i32 noundef %45)
  %47 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %46, ptr noundef nonnull @.str.7)
  %48 = load i32, ptr @i, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %49, i32 2
  store i32 1, ptr %50, align 4, !tbaa !11
  br label %51

51:                                               ; preds = %43, %35, %32
  %52 = load i32, ptr @j, align 4, !tbaa !5
  %storemerge6 = add nsw i32 %52, 1
  store i32 %storemerge6, ptr @j, align 4, !tbaa !5
  %53 = icmp slt i32 %52, 4
  br i1 %53, label %.lr.ph, label %._crit_edge, !llvm.loop !13

._crit_edge:                                      ; preds = %51
  %.pre = load i32, ptr @i, align 4, !tbaa !5
  %.pre16 = add nsw i32 %.pre, 1
  store i32 %.pre16, ptr @i, align 4, !tbaa !5
  %54 = icmp slt i32 %.pre, 4
  br i1 %54, label %.preheader7, label %.preheader, !llvm.loop !15

55:                                               ; preds = %.preheader, %66
  %storemerge513 = phi i32 [ 0, %.preheader ], [ %68, %66 ]
  %56 = sext i32 %storemerge513 to i64
  %57 = getelementptr inbounds [4 x %struct.Process], ptr @P, i64 0, i64 %56, i32 2
  %58 = load i32, ptr %57, align 4, !tbaa !11
  %59 = icmp eq i32 %58, 1
  br i1 %59, label %60, label %66

60:                                               ; preds = %55
  %61 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.8)
  %62 = load i32, ptr @i, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %61, i32 noundef %63)
  %65 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %64, ptr noundef nonnull @.str.9)
  %.pre15 = load i32, ptr @i, align 4, !tbaa !5
  br label %66

66:                                               ; preds = %55, %60
  %67 = phi i32 [ %storemerge513, %55 ], [ %.pre15, %60 ]
  %68 = add nsw i32 %67, 1
  store i32 %68, ptr @i, align 4, !tbaa !5
  %69 = icmp slt i32 %67, 4
  br i1 %69, label %55, label %70, !llvm.loop !16

70:                                               ; preds = %66
  ret i32 0
}

; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #3

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #4

attributes #0 = { mustprogress 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 #1 = { inlinehint mustprogress 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 = { mustprogress norecurse 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 "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 #4 = { "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 #5 = { 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++ TBAA"}
!9 = !{!10, !6, i64 4}
!10 = !{!"_ZTS7Process", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = !{!10, !6, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass