; LLVM IR from DionysiosB/CodeForces :: 0001-0099 (18A-Triangle)

; 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"

%"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 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z7isRightPi(ptr noundef) #0

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca [6 x i32], align 16
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %2) #7
  call void @llvm.memset.p0.i64(ptr align 16 %2, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 0, ptr %3, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %20, %0
  %11 = load i32, ptr %3, align 4, !tbaa !5
  %12 = icmp slt i32 %11, 6
  br i1 %12, label %14, label %13

13:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %23

14:                                               ; preds = %10
  %15 = getelementptr inbounds [6 x i32], ptr %2, i64 0, i64 0
  %16 = load i32, ptr %3, align 4, !tbaa !5
  %17 = sext i32 %16 to i64
  %18 = getelementptr inbounds i32, ptr %15, i64 %17
  %19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef @.str, ptr noundef %18)
  br label %20

20:                                               ; preds = %14
  %21 = load i32, ptr %3, align 4, !tbaa !5
  %22 = add nsw i32 %21, 1
  store i32 %22, ptr %3, align 4, !tbaa !5
  br label %10, !llvm.loop !9

23:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %24 unwind label %31

24:                                               ; preds = %23
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #7
  %25 = getelementptr inbounds [6 x i32], ptr %2, i64 0, i64 0
  %26 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef %25)
          to label %27 unwind label %35

27:                                               ; preds = %24
  br i1 %26, label %28, label %39

28:                                               ; preds = %27
  %29 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.2)
          to label %30 unwind label %35

30:                                               ; preds = %28
  br label %83

31:                                               ; preds = %23
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %6, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %7, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #7
  br label %90

35:                                               ; preds = %85, %83, %28, %24
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %6, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %7, align 4
  br label %89

39:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !5
  br label %40

40:                                               ; preds = %78, %39
  %41 = load i32, ptr %8, align 4, !tbaa !5
  %42 = icmp slt i32 %41, 6
  br i1 %42, label %44, label %43

43:                                               ; preds = %40
  store i32 5, ptr %9, align 4
  br label %81

44:                                               ; preds = %40
  %45 = load i32, ptr %8, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %47 = getelementptr inbounds [6 x i32], ptr %2, i64 0, i64 %46
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %47, align 4, !tbaa !5
  %50 = getelementptr inbounds [6 x i32], ptr %2, i64 0, i64 0
  %51 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef %50)
          to label %52 unwind label %56

52:                                               ; preds = %44
  br i1 %51, label %53, label %60

53:                                               ; preds = %52
  %54 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.3)
          to label %55 unwind label %56

55:                                               ; preds = %53
  store i32 5, ptr %9, align 4
  br label %81

56:                                               ; preds = %69, %60, %53, %44
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %89

60:                                               ; preds = %52
  %61 = load i32, ptr %8, align 4, !tbaa !5
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds [6 x i32], ptr %2, i64 0, i64 %62
  %64 = load i32, ptr %63, align 4, !tbaa !5
  %65 = sub nsw i32 %64, 2
  store i32 %65, ptr %63, align 4, !tbaa !5
  %66 = getelementptr inbounds [6 x i32], ptr %2, i64 0, i64 0
  %67 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef %66)
          to label %68 unwind label %56

68:                                               ; preds = %60
  br i1 %67, label %69, label %72

69:                                               ; preds = %68
  %70 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.3)
          to label %71 unwind label %56

71:                                               ; preds = %69
  store i32 5, ptr %9, align 4
  br label %81

72:                                               ; preds = %68
  %73 = load i32, ptr %8, align 4, !tbaa !5
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds [6 x i32], ptr %2, i64 0, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !5
  %77 = add nsw i32 %76, 1
  store i32 %77, ptr %75, align 4, !tbaa !5
  br label %78

78:                                               ; preds = %72
  %79 = load i32, ptr %8, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %8, align 4, !tbaa !5
  br label %40, !llvm.loop !11

81:                                               ; preds = %71, %55, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %82

82:                                               ; preds = %81
  br label %83

83:                                               ; preds = %82, %30
  %84 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %85 unwind label %35

85:                                               ; preds = %83
  %86 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %87 unwind label %35

87:                                               ; preds = %85
  store i32 0, ptr %1, align 4
  store i32 1, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #7
  %88 = load i32, ptr %1, align 4
  ret i32 %88

89:                                               ; preds = %56, %35
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #7
  br label %90

90:                                               ; preds = %89, %31
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %2) #7
  br label %91

91:                                               ; preds = %90
  %92 = load ptr, ptr %6, align 8
  %93 = load i32, ptr %7, align 4
  %94 = insertvalue { ptr, i32 } poison, ptr %92, 0
  %95 = insertvalue { ptr, i32 } %94, i32 %93, 1
  resume { ptr, i32 } %95
}

declare i32 @__isoc99_scanf(ptr noundef, ...) #4

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #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 = { mustprogress 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 #6 = { 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 #7 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}


; 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"

%"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 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [7 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z7isRightPi(ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %1 = alloca [6 x i32], align 16
  %2 = alloca %"class.std::__cxx11::basic_string", align 8
  %3 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %1) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %1, i8 0, i64 24, i1 false)
  %4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %1)
  %5 = getelementptr inbounds i8, ptr %1, i64 4
  %6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %5)
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  %8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %7)
  %9 = getelementptr inbounds i8, ptr %1, i64 12
  %10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %9)
  %11 = getelementptr inbounds i8, ptr %1, i64 16
  %12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %11)
  %13 = getelementptr inbounds i8, ptr %1, i64 20
  %14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %13)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %15 unwind label %23

15:                                               ; preds = %0
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  %16 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %17 unwind label %25

17:                                               ; preds = %15
  br i1 %16, label %21, label %.preheader.preheader

.preheader.preheader:                             ; preds = %17
  %18 = load i32, ptr %1, align 16, !tbaa !5
  %19 = add nsw i32 %18, 1
  store i32 %19, ptr %1, align 16, !tbaa !5
  %20 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %27 unwind label %.loopexit16

21:                                               ; preds = %17
  %22 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.2)
          to label %.loopexit unwind label %25

23:                                               ; preds = %0
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  br label %86

25:                                               ; preds = %82, %.loopexit, %21, %15
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %85

27:                                               ; preds = %.preheader.preheader
  br i1 %20, label %.invoke, label %29

.invoke:                                          ; preds = %27, %37, %46, %55, %64, %73, %33, %42, %51, %60, %69, %78
  %28 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull @.str.3)
          to label %.loopexit unwind label %.loopexit.split-lp

.loopexit16:                                      ; preds = %74, %.preheader.5, %65, %.preheader.4, %56, %.preheader.3, %47, %.preheader.2, %38, %.preheader.1, %.preheader.preheader, %29
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %85

.loopexit.split-lp:                               ; preds = %.invoke
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %85

29:                                               ; preds = %27
  %30 = load i32, ptr %1, align 16, !tbaa !5
  %31 = add nsw i32 %30, -2
  store i32 %31, ptr %1, align 16, !tbaa !5
  %32 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %33 unwind label %.loopexit16

33:                                               ; preds = %29
  br i1 %32, label %.invoke, label %.preheader.1

.preheader.1:                                     ; preds = %33
  %34 = load <2 x i32>, ptr %1, align 16, !tbaa !5
  %35 = add nsw <2 x i32> %34, <i32 1, i32 1>
  store <2 x i32> %35, ptr %1, align 16, !tbaa !5
  %36 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %37 unwind label %.loopexit16

37:                                               ; preds = %.preheader.1
  br i1 %36, label %.invoke, label %38

38:                                               ; preds = %37
  %39 = load i32, ptr %5, align 4, !tbaa !5
  %40 = add nsw i32 %39, -2
  store i32 %40, ptr %5, align 4, !tbaa !5
  %41 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %42 unwind label %.loopexit16

42:                                               ; preds = %38
  br i1 %41, label %.invoke, label %.preheader.2

.preheader.2:                                     ; preds = %42
  %43 = load <2 x i32>, ptr %5, align 4, !tbaa !5
  %44 = add nsw <2 x i32> %43, <i32 1, i32 1>
  store <2 x i32> %44, ptr %5, align 4, !tbaa !5
  %45 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %46 unwind label %.loopexit16

46:                                               ; preds = %.preheader.2
  br i1 %45, label %.invoke, label %47

47:                                               ; preds = %46
  %48 = load i32, ptr %7, align 8, !tbaa !5
  %49 = add nsw i32 %48, -2
  store i32 %49, ptr %7, align 8, !tbaa !5
  %50 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %51 unwind label %.loopexit16

51:                                               ; preds = %47
  br i1 %50, label %.invoke, label %.preheader.3

.preheader.3:                                     ; preds = %51
  %52 = load <2 x i32>, ptr %7, align 8, !tbaa !5
  %53 = add nsw <2 x i32> %52, <i32 1, i32 1>
  store <2 x i32> %53, ptr %7, align 8, !tbaa !5
  %54 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %55 unwind label %.loopexit16

55:                                               ; preds = %.preheader.3
  br i1 %54, label %.invoke, label %56

56:                                               ; preds = %55
  %57 = load i32, ptr %9, align 4, !tbaa !5
  %58 = add nsw i32 %57, -2
  store i32 %58, ptr %9, align 4, !tbaa !5
  %59 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %60 unwind label %.loopexit16

60:                                               ; preds = %56
  br i1 %59, label %.invoke, label %.preheader.4

.preheader.4:                                     ; preds = %60
  %61 = load <2 x i32>, ptr %9, align 4, !tbaa !5
  %62 = add nsw <2 x i32> %61, <i32 1, i32 1>
  store <2 x i32> %62, ptr %9, align 4, !tbaa !5
  %63 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %64 unwind label %.loopexit16

64:                                               ; preds = %.preheader.4
  br i1 %63, label %.invoke, label %65

65:                                               ; preds = %64
  %66 = load i32, ptr %11, align 16, !tbaa !5
  %67 = add nsw i32 %66, -2
  store i32 %67, ptr %11, align 16, !tbaa !5
  %68 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %69 unwind label %.loopexit16

69:                                               ; preds = %65
  br i1 %68, label %.invoke, label %.preheader.5

.preheader.5:                                     ; preds = %69
  %70 = load <2 x i32>, ptr %11, align 16, !tbaa !5
  %71 = add nsw <2 x i32> %70, <i32 1, i32 1>
  store <2 x i32> %71, ptr %11, align 16, !tbaa !5
  %72 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %73 unwind label %.loopexit16

73:                                               ; preds = %.preheader.5
  br i1 %72, label %.invoke, label %74

74:                                               ; preds = %73
  %75 = load i32, ptr %13, align 4, !tbaa !5
  %76 = add nsw i32 %75, -2
  store i32 %76, ptr %13, align 4, !tbaa !5
  %77 = invoke noundef zeroext i1 @_Z7isRightPi(ptr noundef nonnull %1)
          to label %78 unwind label %.loopexit16

78:                                               ; preds = %74
  br i1 %77, label %.invoke, label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %78
  %79 = load i32, ptr %13, align 4, !tbaa !5
  %80 = add nsw i32 %79, 1
  store i32 %80, ptr %13, align 4, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.invoke, %.loopexit.loopexit, %21
  %81 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %82 unwind label %25

82:                                               ; preds = %.loopexit
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %84 unwind label %25

84:                                               ; preds = %82
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  ret i32 0

85:                                               ; preds = %.loopexit16, %.loopexit.split-lp, %25
  %.pn = phi { ptr, i32 } [ %26, %25 ], [ %lpad.loopexit, %.loopexit16 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %2) #7
  br label %86

86:                                               ; preds = %85, %23
  %.pn.pn = phi { ptr, i32 } [ %.pn, %85 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %1) #7
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #5 align 2

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { 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 #4 = { nofree 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 #5 = { mustprogress 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 #6 = { 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 #7 = { 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"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass