; LLVM IR from SourajitaDewasi/ComputerNetworks :: Flow Control Methods (StopWait)

; 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.Sender = type { i32, i32, i32 }
%struct.Receiver = 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 }

@S = external dso_local global [6 x %struct.Sender], align 16
@R = external dso_local global [6 x %struct.Receiver], align 16
@i = external dso_local global i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  store i32 0, ptr @i, align 4, !tbaa !5
  br label %4

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

7:                                                ; preds = %4
  %8 = load i32, ptr @i, align 4, !tbaa !5
  %9 = sext i32 %8 to i64
  %10 = getelementptr inbounds [6 x %struct.Sender], ptr @S, i64 0, i64 %9
  %11 = getelementptr inbounds %struct.Sender, ptr %10, i32 0, i32 1
  store i32 0, ptr %11, align 4, !tbaa !9
  %12 = load i32, ptr @i, align 4, !tbaa !5
  %13 = sext i32 %12 to i64
  %14 = getelementptr inbounds [6 x %struct.Sender], ptr @S, i64 0, i64 %13
  %15 = getelementptr inbounds %struct.Sender, ptr %14, i32 0, i32 2
  store i32 0, ptr %15, align 4, !tbaa !11
  %16 = load i32, ptr @i, align 4, !tbaa !5
  %17 = load i32, ptr @i, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [6 x %struct.Sender], ptr @S, i64 0, i64 %18
  %20 = getelementptr inbounds %struct.Sender, ptr %19, i32 0, i32 0
  store i32 %16, ptr %20, align 4, !tbaa !12
  br label %21

21:                                               ; preds = %7
  %22 = load i32, ptr @i, align 4, !tbaa !5
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr @i, align 4, !tbaa !5
  br label %4, !llvm.loop !13

24:                                               ; preds = %4
  store i32 1, ptr @i, align 4, !tbaa !5
  br label %25

25:                                               ; preds = %42, %24
  %26 = load i32, ptr @i, align 4, !tbaa !5
  %27 = icmp sle i32 %26, 6
  br i1 %27, label %28, label %45

28:                                               ; preds = %25
  %29 = load i32, ptr @i, align 4, !tbaa !5
  %30 = sext i32 %29 to i64
  %31 = getelementptr inbounds [6 x %struct.Receiver], ptr @R, i64 0, i64 %30
  %32 = getelementptr inbounds %struct.Receiver, ptr %31, i32 0, i32 2
  store i32 0, ptr %32, align 4, !tbaa !15
  %33 = load i32, ptr @i, align 4, !tbaa !5
  %34 = sext i32 %33 to i64
  %35 = getelementptr inbounds [6 x %struct.Receiver], ptr @R, i64 0, i64 %34
  %36 = getelementptr inbounds %struct.Receiver, ptr %35, i32 0, i32 1
  store i32 0, ptr %36, align 4, !tbaa !17
  %37 = load i32, ptr @i, align 4, !tbaa !5
  %38 = load i32, ptr @i, align 4, !tbaa !5
  %39 = sext i32 %38 to i64
  %40 = getelementptr inbounds [6 x %struct.Receiver], ptr @R, i64 0, i64 %39
  %41 = getelementptr inbounds %struct.Receiver, ptr %40, i32 0, i32 0
  store i32 %37, ptr %41, align 4, !tbaa !18
  br label %42

42:                                               ; preds = %28
  %43 = load i32, ptr @i, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr @i, align 4, !tbaa !5
  br label %25, !llvm.loop !19

45:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  store i32 0, ptr %2, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #4
  store i32 0, ptr %3, align 4, !tbaa !5
  store i32 0, ptr @i, align 4, !tbaa !5
  br label %46

46:                                               ; preds = %118, %45
  %47 = load i32, ptr @i, align 4, !tbaa !5
  %48 = icmp slt i32 %47, 6
  br i1 %48, label %49, label %121

49:                                               ; preds = %46
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %52 = load i32, ptr @i, align 4, !tbaa !5
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %51, i32 noundef %52)
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %53, ptr noundef @.str.2)
  %55 = load i32, ptr @i, align 4, !tbaa !5
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [6 x %struct.Sender], ptr @S, i64 0, i64 %56
  %58 = getelementptr inbounds %struct.Sender, ptr %57, i32 0, i32 1
  store i32 1, ptr %58, align 4, !tbaa !9
  %59 = 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)
  %60 = load i32, ptr @i, align 4, !tbaa !5
  %61 = icmp eq i32 %60, 4
  br i1 %61, label %62, label %76

62:                                               ; preds = %49
  %63 = load i32, ptr %2, align 4, !tbaa !5
  %64 = icmp eq i32 %63, 0
  br i1 %64, label %65, label %76

65:                                               ; preds = %62
  %66 = load i32, ptr @i, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [6 x %struct.Receiver], ptr @R, i64 0, i64 %67
  %69 = getelementptr inbounds %struct.Receiver, ptr %68, i32 0, i32 1
  store i32 0, ptr %69, align 4, !tbaa !17
  store i32 1, ptr %2, align 4, !tbaa !5
  %70 = load i32, ptr @i, align 4, !tbaa !5
  %71 = add nsw i32 %70, -1
  store i32 %71, ptr @i, align 4, !tbaa !5
  %72 = 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)
  %73 = load i32, ptr @i, align 4, !tbaa !5
  %74 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %72, i32 noundef %73)
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef @.str.5)
  br label %117

76:                                               ; preds = %62, %49
  %77 = load i32, ptr @i, align 4, !tbaa !5
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds [6 x %struct.Receiver], ptr @R, i64 0, i64 %78
  %80 = getelementptr inbounds %struct.Receiver, ptr %79, i32 0, i32 1
  store i32 1, ptr %80, align 4, !tbaa !17
  %81 = load i32, ptr @i, align 4, !tbaa !5
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds [6 x %struct.Receiver], ptr @R, i64 0, i64 %82
  %84 = getelementptr inbounds %struct.Receiver, ptr %83, i32 0, i32 2
  store i32 1, ptr %84, align 4, !tbaa !15
  %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 !5
  %87 = add nsw i32 %86, 1
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %85, i32 noundef %87)
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef @.str.7)
  %90 = 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)
  %91 = load i32, ptr @i, align 4, !tbaa !5
  %92 = icmp eq i32 %91, 5
  br i1 %92, label %93, label %107

93:                                               ; preds = %76
  %94 = load i32, ptr %3, align 4, !tbaa !5
  %95 = icmp eq i32 %94, 0
  br i1 %95, label %96, label %107

96:                                               ; preds = %93
  %97 = load i32, ptr @i, align 4, !tbaa !5
  %98 = sext i32 %97 to i64
  %99 = getelementptr inbounds [6 x %struct.Sender], ptr @S, i64 0, i64 %98
  %100 = getelementptr inbounds %struct.Sender, ptr %99, i32 0, i32 2
  store i32 0, ptr %100, align 4, !tbaa !11
  store i32 1, ptr %3, align 4, !tbaa !5
  %101 = load i32, ptr @i, align 4, !tbaa !5
  %102 = add nsw i32 %101, -1
  store i32 %102, ptr @i, align 4, !tbaa !5
  %103 = 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)
  %104 = load i32, ptr @i, align 4, !tbaa !5
  %105 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %103, i32 noundef %104)
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef @.str.9)
  br label %116

107:                                              ; preds = %93, %76
  %108 = load i32, ptr @i, align 4, !tbaa !5
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds [6 x %struct.Sender], ptr @S, i64 0, i64 %109
  %111 = getelementptr inbounds %struct.Sender, ptr %110, i32 0, i32 2
  store i32 1, ptr %111, align 4, !tbaa !11
  %112 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
  %113 = load i32, ptr @i, align 4, !tbaa !5
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %112, i32 noundef %113)
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %114, ptr noundef @.str.11)
  br label %116

116:                                              ; preds = %107, %96
  br label %117

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

118:                                              ; preds = %117
  %119 = load i32, ptr @i, align 4, !tbaa !5
  %120 = add nsw i32 %119, 1
  store i32 %120, ptr @i, align 4, !tbaa !5
  br label %46, !llvm.loop !20

121:                                              ; preds = %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  ret i32 0
}

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

; 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) #2

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { "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 = { 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 = !{!"_ZTS6Sender", !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 = !{!16, !6, i64 8}
!16 = !{!"_ZTS8Receiver", !6, i64 0, !6, i64 4, !6, i64 8}
!17 = !{!16, !6, i64 4}
!18 = !{!16, !6, i64 0}
!19 = distinct !{!19, !14}
!20 = distinct !{!20, !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.Sender = type { i32, i32, i32 }
%struct.Receiver = 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 }

@S = external dso_local local_unnamed_addr global [6 x %struct.Sender], align 16
@R = external dso_local local_unnamed_addr global [6 x %struct.Receiver], align 16
@i = external dso_local local_unnamed_addr global i32, align 4
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [21 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
.preheader13:
  store <4 x i32> <i32 0, i32 0, i32 0, i32 1>, ptr @S, align 16, !tbaa !5
  store <4 x i32> <i32 0, i32 0, i32 2, i32 0>, ptr getelementptr inbounds (i8, ptr @S, i64 16), align 16, !tbaa !5
  store <4 x i32> <i32 0, i32 3, i32 0, i32 0>, ptr getelementptr inbounds (i8, ptr @S, i64 32), align 16, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @S, i64 64), align 16, !tbaa !9
  store i32 0, ptr getelementptr inbounds (i8, ptr @S, i64 68), align 4, !tbaa !11
  store <4 x i32> <i32 4, i32 0, i32 0, i32 5>, ptr getelementptr inbounds (i8, ptr @S, i64 48), align 16, !tbaa !5
  store <4 x i32> <i32 1, i32 0, i32 0, i32 2>, ptr getelementptr inbounds (i8, ptr @R, i64 12), align 4, !tbaa !5
  store <4 x i32> <i32 0, i32 0, i32 3, i32 0>, ptr getelementptr inbounds (i8, ptr @R, i64 28), align 4, !tbaa !5
  store <4 x i32> <i32 0, i32 4, i32 0, i32 0>, ptr getelementptr inbounds (i8, ptr @R, i64 44), align 4, !tbaa !5
  store i32 0, ptr getelementptr inbounds (i8, ptr @R, i64 80), align 16, !tbaa !12
  store i32 0, ptr getelementptr inbounds (i8, ptr @R, i64 76), align 4, !tbaa !14
  store <4 x i32> <i32 5, i32 0, i32 0, i32 6>, ptr getelementptr inbounds (i8, ptr @R, i64 60), align 4, !tbaa !5
  store i32 0, ptr @i, align 4, !tbaa !5
  br label %0

0:                                                ; preds = %.preheader13, %31
  %.017 = phi i32 [ 0, %.preheader13 ], [ %.1, %31 ]
  %.0516 = phi i32 [ 0, %.preheader13 ], [ %.16, %31 ]
  %1 = 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)
  %2 = 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.1)
  %3 = load i32, ptr @i, align 4, !tbaa !5
  %4 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %2, i32 noundef %3)
  %5 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull @.str.2)
  %6 = load i32, ptr @i, align 4, !tbaa !5
  %7 = sext i32 %6 to i64
  %8 = getelementptr inbounds [6 x %struct.Sender], ptr @S, i64 0, i64 %7, i32 1
  store i32 1, ptr %8, align 4, !tbaa !9
  %9 = 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)
  %10 = load i32, ptr @i, align 4, !tbaa !5
  %11 = icmp eq i32 %10, 4
  %12 = icmp eq i32 %.0516, 0
  %or.cond = select i1 %11, i1 %12, i1 false
  br i1 %or.cond, label %13, label %14

13:                                               ; preds = %0
  store i32 0, ptr getelementptr inbounds (i8, ptr @R, i64 52), align 4, !tbaa !14
  store i32 3, ptr @i, align 4, !tbaa !5
  br label %31

14:                                               ; preds = %0
  %15 = sext i32 %10 to i64
  %16 = getelementptr inbounds [6 x %struct.Receiver], ptr @R, i64 0, i64 %15, i32 1
  store i32 1, ptr %16, align 4, !tbaa !14
  %17 = getelementptr inbounds [6 x %struct.Receiver], ptr @R, i64 0, i64 %15, i32 2
  store i32 1, ptr %17, align 4, !tbaa !12
  %18 = 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)
  %19 = load i32, ptr @i, align 4, !tbaa !5
  %20 = add nsw i32 %19, 1
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %18, i32 noundef %20)
  %22 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull @.str.7)
  %23 = 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)
  %24 = load i32, ptr @i, align 4, !tbaa !5
  %25 = icmp eq i32 %24, 5
  %26 = icmp eq i32 %.017, 0
  %or.cond3 = select i1 %25, i1 %26, i1 false
  br i1 %or.cond3, label %27, label %28

27:                                               ; preds = %14
  store i32 0, ptr getelementptr inbounds (i8, ptr @S, i64 68), align 4, !tbaa !11
  store i32 4, ptr @i, align 4, !tbaa !5
  br label %31

28:                                               ; preds = %14
  %29 = sext i32 %24 to i64
  %30 = getelementptr inbounds [6 x %struct.Sender], ptr @S, i64 0, i64 %29, i32 2
  store i32 1, ptr %30, align 4, !tbaa !11
  br label %31

31:                                               ; preds = %13, %28, %27
  %.str.4.sink = phi ptr [ @.str.4, %13 ], [ @.str.10, %28 ], [ @.str.8, %27 ]
  %.str.5.sink = phi ptr [ @.str.5, %13 ], [ @.str.11, %28 ], [ @.str.9, %27 ]
  %.16 = phi i32 [ 1, %13 ], [ %.0516, %28 ], [ %.0516, %27 ]
  %.1 = phi i32 [ %.017, %13 ], [ %.017, %28 ], [ 1, %27 ]
  %32 = 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.sink)
  %33 = load i32, ptr @i, align 4, !tbaa !5
  %34 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) %32, i32 noundef %33)
  %35 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull %.str.5.sink)
  %36 = load i32, ptr @i, align 4, !tbaa !5
  %37 = add nsw i32 %36, 1
  store i32 %37, ptr @i, align 4, !tbaa !5
  %38 = icmp slt i32 %36, 5
  br i1 %38, label %0, label %39, !llvm.loop !15

39:                                               ; preds = %31
  ret i32 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

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

attributes #0 = { 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 #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 = { "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" }

!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 = !{!"_ZTS6Sender", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = !{!13, !6, i64 8}
!13 = !{!"_ZTS8Receiver", !6, i64 0, !6, i64 4, !6, i64 8}
!14 = !{!13, !6, i64 4}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


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