; LLVM IR from eyangch/competitive-programming :: Codeforces/618 (d)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"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::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i64, align 8
@X = external dso_local global i64, align 8
@Y = external dso_local global i64, align 8
@deg = external dso_local global [200000 x i64], align 16
@ans = external dso_local global [200000 x i64], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3dfsx(i64 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 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() #2 {
  %1 = alloca i32, align 4
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %11 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %12 = getelementptr i8, ptr %11, i64 -24
  %13 = load i64, ptr %12, align 8
  %14 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %13
  %15 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %14, ptr noundef null)
  %16 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) @X)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(8) @Y)
  call void @llvm.lifetime.start.p0(i64 8, ptr %2) #6
  store i64 0, ptr %2, align 8, !tbaa !8
  br label %20

20:                                               ; preds = %49, %0
  %21 = load i64, ptr %2, align 8, !tbaa !8
  %22 = load i64, ptr @N, align 8, !tbaa !8
  %23 = sub nsw i64 %22, 1
  %24 = icmp slt i64 %21, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %2) #6
  br label %52

26:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %29 = load i64, ptr %3, align 8, !tbaa !8
  %30 = sub nsw i64 %29, 1
  %31 = getelementptr inbounds [200000 x i64], ptr @deg, i64 0, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !8
  %33 = add nsw i64 %32, 1
  store i64 %33, ptr %31, align 8, !tbaa !8
  %34 = load i64, ptr %4, align 8, !tbaa !8
  %35 = sub nsw i64 %34, 1
  %36 = getelementptr inbounds [200000 x i64], ptr @deg, i64 0, i64 %35
  %37 = load i64, ptr %36, align 8, !tbaa !8
  %38 = add nsw i64 %37, 1
  store i64 %38, ptr %36, align 8, !tbaa !8
  %39 = load i64, ptr %3, align 8, !tbaa !8
  %40 = sub nsw i64 %39, 1
  %41 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %42 = load i64, ptr %4, align 8, !tbaa !8
  %43 = sub nsw i64 %42, 1
  store i64 %43, ptr %5, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  %44 = load i64, ptr %4, align 8, !tbaa !8
  %45 = sub nsw i64 %44, 1
  %46 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %47 = load i64, ptr %3, align 8, !tbaa !8
  %48 = sub nsw i64 %47, 1
  store i64 %48, ptr %6, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %46, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  br label %49

49:                                               ; preds = %26
  %50 = load i64, ptr %2, align 8, !tbaa !8
  %51 = add nsw i64 %50, 1
  store i64 %51, ptr %2, align 8, !tbaa !8
  br label %20, !llvm.loop !11

52:                                               ; preds = %25
  %53 = call noundef i64 @_Z3dfsx(i64 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %54 = load i64, ptr @N, align 8, !tbaa !8
  %55 = sub nsw i64 %54, 1
  store i64 %55, ptr %7, align 8, !tbaa !8
  %56 = load i64, ptr @X, align 8, !tbaa !8
  %57 = load i64, ptr @Y, align 8, !tbaa !8
  %58 = icmp sgt i64 %56, %57
  br i1 %58, label %59, label %91

59:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %60 = load i64, ptr %7, align 8, !tbaa !8
  %61 = load i64, ptr @Y, align 8, !tbaa !8
  %62 = mul nsw i64 %60, %61
  store i64 %62, ptr %8, align 8, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !8
  br label %63

63:                                               ; preds = %83, %59
  %64 = load i64, ptr %9, align 8, !tbaa !8
  %65 = load i64, ptr @N, align 8, !tbaa !8
  %66 = icmp slt i64 %64, %65
  br i1 %66, label %68, label %67

67:                                               ; preds = %63
  store i32 5, ptr %10, align 4
  br label %86

68:                                               ; preds = %63
  %69 = load i64, ptr %9, align 8, !tbaa !8
  %70 = getelementptr inbounds [200000 x i64], ptr @deg, i64 0, i64 %69
  %71 = load i64, ptr %70, align 8, !tbaa !8
  %72 = load i64, ptr @N, align 8, !tbaa !8
  %73 = sub nsw i64 %72, 1
  %74 = icmp eq i64 %71, %73
  br i1 %74, label %75, label %82

75:                                               ; preds = %68
  %76 = load i64, ptr @Y, align 8, !tbaa !8
  %77 = load i64, ptr %8, align 8, !tbaa !8
  %78 = sub nsw i64 %77, %76
  store i64 %78, ptr %8, align 8, !tbaa !8
  %79 = load i64, ptr @X, align 8, !tbaa !8
  %80 = load i64, ptr %8, align 8, !tbaa !8
  %81 = add nsw i64 %80, %79
  store i64 %81, ptr %8, align 8, !tbaa !8
  store i32 5, ptr %10, align 4
  br label %86

82:                                               ; preds = %68
  br label %83

83:                                               ; preds = %82
  %84 = load i64, ptr %9, align 8, !tbaa !8
  %85 = add nsw i64 %84, 1
  store i64 %85, ptr %9, align 8, !tbaa !8
  br label %63, !llvm.loop !13

86:                                               ; preds = %75, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %87

87:                                               ; preds = %86
  %88 = load i64, ptr %8, align 8, !tbaa !8
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %88)
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %89, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %103

91:                                               ; preds = %52
  %92 = load i64, ptr @ans, align 16, !tbaa !8
  %93 = load i64, ptr @X, align 8, !tbaa !8
  %94 = mul nsw i64 %92, %93
  %95 = load i64, ptr %7, align 8, !tbaa !8
  %96 = load i64, ptr @ans, align 16, !tbaa !8
  %97 = sub nsw i64 %95, %96
  %98 = load i64, ptr @Y, align 8, !tbaa !8
  %99 = mul nsw i64 %97, %98
  %100 = add nsw i64 %94, %99
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %100)
  %102 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %101, i8 noundef signext 10)
  br label %103

103:                                              ; preds = %91, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %104 = load i32, ptr %1, align 4
  ret i32 %104
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #3 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 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 = { 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 = { 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 #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 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::basic_istream" = type { ptr, i64, %"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::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@N = external dso_local global i64, align 8
@X = external dso_local global i64, align 8
@Y = external dso_local global i64, align 8
@deg = external dso_local local_unnamed_addr global [200000 x i64], align 16
@ans = external dso_local local_unnamed_addr global [200000 x i64], align 16
@graph = external dso_local global [200000 x %"class.std::vector"], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z3dfsx(i64 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 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 #2 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  %10 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %11 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) @N)
  %12 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) @X)
  %13 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(8) @Y)
  %14 = load i64, ptr @N, align 8, !tbaa !8
  %15 = icmp sgt i64 %14, 1
  br i1 %15, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  %16 = call noundef i64 @_Z3dfsx(i64 noundef 0)
  %17 = load i64, ptr @N, align 8, !tbaa !8
  %18 = add nsw i64 %17, -1
  %19 = load i64, ptr @X, align 8, !tbaa !8
  %20 = load i64, ptr @Y, align 8, !tbaa !8
  %21 = icmp sgt i64 %19, %20
  br i1 %21, label %44, label %55

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.01216 = phi i64 [ %40, %.lr.ph ], [ 0, %0 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 8 dereferenceable(8) %1)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERx(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %24 = load i64, ptr %1, align 8, !tbaa !8
  %25 = add nsw i64 %24, -1
  %26 = getelementptr inbounds [200000 x i64], ptr @deg, i64 0, i64 %25
  %27 = load i64, ptr %26, align 8, !tbaa !8
  %28 = add nsw i64 %27, 1
  store i64 %28, ptr %26, align 8, !tbaa !8
  %29 = load i64, ptr %2, align 8, !tbaa !8
  %30 = add nsw i64 %29, -1
  %31 = getelementptr inbounds [200000 x i64], ptr @deg, i64 0, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !8
  %33 = add nsw i64 %32, 1
  store i64 %33, ptr %31, align 8, !tbaa !8
  %34 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  store i64 %30, ptr %3, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  %35 = load i64, ptr %2, align 8, !tbaa !8
  %36 = add nsw i64 %35, -1
  %37 = getelementptr inbounds [200000 x %"class.std::vector"], ptr @graph, i64 0, i64 %36
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %38 = load i64, ptr %1, align 8, !tbaa !8
  %39 = add nsw i64 %38, -1
  store i64 %39, ptr %4, align 8, !tbaa !8
  call void @_ZNSt6vectorIxSaIxEE9push_backEOx(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #6
  %40 = add nuw nsw i64 %.01216, 1
  %41 = load i64, ptr @N, align 8, !tbaa !8
  %42 = add nsw i64 %41, -1
  %43 = icmp slt i64 %40, %42
  br i1 %43, label %.lr.ph, label %._crit_edge, !llvm.loop !11

44:                                               ; preds = %._crit_edge
  %45 = mul nsw i64 %20, %18
  %46 = icmp sgt i64 %17, 0
  br i1 %46, label %.lr.ph19, label %.loopexit

47:                                               ; preds = %.lr.ph19
  %48 = add nuw nsw i64 %.017, 1
  %exitcond.not = icmp eq i64 %48, %17
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph19, !llvm.loop !13

.lr.ph19:                                         ; preds = %44, %47
  %.017 = phi i64 [ %48, %47 ], [ 0, %44 ]
  %49 = getelementptr inbounds [200000 x i64], ptr @deg, i64 0, i64 %.017
  %50 = load i64, ptr %49, align 8, !tbaa !8
  %51 = icmp eq i64 %50, %18
  br i1 %51, label %52, label %47

52:                                               ; preds = %.lr.ph19
  %53 = sub i64 %19, %20
  %54 = add i64 %53, %45
  br label %.loopexit

55:                                               ; preds = %._crit_edge
  %56 = load i64, ptr @ans, align 16, !tbaa !8
  %57 = mul nsw i64 %56, %19
  %58 = sub nsw i64 %18, %56
  %59 = mul nsw i64 %58, %20
  %60 = add nsw i64 %59, %57
  br label %.loopexit

.loopexit:                                        ; preds = %47, %52, %44, %55
  %.sink20 = phi i64 [ %60, %55 ], [ %54, %52 ], [ %45, %44 ], [ %45, %47 ]
  %61 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.sink20)
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %61, i8 noundef signext 10)
  ret i32 0
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #3 align 2

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8), i8 noundef signext) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #0 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 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 = { 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 #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 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"long long", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass