; LLVM IR from sunkafei/xcpc-algorithm-templates :: 算法/图论 (一般图最大权匹配)

; 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.edge = type { i32, i32, i32 }
%"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" }
%"struct.std::pair" = type <{ i64, i32, [4 x i8] }>

@g = external dso_local global [1023 x [1023 x %struct.edge]], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@match = external dso_local global [1023 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_Z14weight_blossomv() #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #3 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %struct.edge, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.std::pair", align 8
  %11 = alloca { i64, i32 }, align 8
  %12 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  %13 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %14 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 4 dereferenceable(4) @m)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %15

15:                                               ; preds = %42, %0
  %16 = load i32, ptr %2, align 4, !tbaa !5
  %17 = load i32, ptr @n, align 4, !tbaa !5
  %18 = icmp sle i32 %16, %17
  br i1 %18, label %20, label %19

19:                                               ; preds = %15
  store i32 2, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %45

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 1, ptr %4, align 4, !tbaa !5
  br label %21

21:                                               ; preds = %38, %20
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = load i32, ptr @n, align 4, !tbaa !5
  %24 = icmp sle i32 %22, %23
  br i1 %24, label %26, label %25

25:                                               ; preds = %21
  store i32 5, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  br label %41

26:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 12, ptr %5) #6
  %27 = getelementptr inbounds %struct.edge, ptr %5, i32 0, i32 0
  %28 = load i32, ptr %2, align 4, !tbaa !5
  store i32 %28, ptr %27, align 4, !tbaa !9
  %29 = getelementptr inbounds %struct.edge, ptr %5, i32 0, i32 1
  %30 = load i32, ptr %4, align 4, !tbaa !5
  store i32 %30, ptr %29, align 4, !tbaa !11
  %31 = getelementptr inbounds %struct.edge, ptr %5, i32 0, i32 2
  store i32 0, ptr %31, align 4, !tbaa !12
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [1023 x [1023 x %struct.edge]], ptr @g, i64 0, i64 %33
  %35 = load i32, ptr %4, align 4, !tbaa !5
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds [1023 x %struct.edge], ptr %34, i64 0, i64 %36
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %37, ptr align 4 %5, i64 12, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 12, ptr %5) #6
  br label %38

38:                                               ; preds = %26
  %39 = load i32, ptr %4, align 4, !tbaa !5
  %40 = add nsw i32 %39, 1
  store i32 %40, ptr %4, align 4, !tbaa !5
  br label %21, !llvm.loop !14

41:                                               ; preds = %25
  br label %42

42:                                               ; preds = %41
  %43 = load i32, ptr %2, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  store i32 %44, ptr %2, align 4, !tbaa !5
  br label %15, !llvm.loop !16

45:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  br label %46

46:                                               ; preds = %70, %45
  %47 = load i32, ptr %6, align 4, !tbaa !5
  %48 = load i32, ptr @m, align 4, !tbaa !5
  %49 = icmp slt i32 %47, %48
  br i1 %49, label %51, label %50

50:                                               ; preds = %46
  store i32 8, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %73

51:                                               ; preds = %46
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %55 = load i32, ptr %9, align 4, !tbaa !5
  %56 = load i32, ptr %8, align 4, !tbaa !5
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [1023 x [1023 x %struct.edge]], ptr @g, i64 0, i64 %57
  %59 = load i32, ptr %7, align 4, !tbaa !5
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds [1023 x %struct.edge], ptr %58, i64 0, i64 %60
  %62 = getelementptr inbounds %struct.edge, ptr %61, i32 0, i32 2
  store i32 %55, ptr %62, align 4, !tbaa !12
  %63 = load i32, ptr %7, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [1023 x [1023 x %struct.edge]], ptr @g, i64 0, i64 %64
  %66 = load i32, ptr %8, align 4, !tbaa !5
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds [1023 x %struct.edge], ptr %65, i64 0, i64 %67
  %69 = getelementptr inbounds %struct.edge, ptr %68, i32 0, i32 2
  store i32 %55, ptr %69, align 4, !tbaa !12
  br label %70

70:                                               ; preds = %51
  %71 = load i32, ptr %6, align 4, !tbaa !5
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %6, align 4, !tbaa !5
  br label %46, !llvm.loop !17

73:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  %74 = call { i64, i32 } @_Z14weight_blossomv()
  store { i64, i32 } %74, ptr %11, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %10, ptr align 8 %11, i64 12, i1 false)
  %75 = getelementptr inbounds %"struct.std::pair", ptr %10, i32 0, i32 0
  %76 = load i64, ptr %75, align 8, !tbaa !18
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %76)
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %77, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !5
  br label %79

79:                                               ; preds = %91, %73
  %80 = load i32, ptr %12, align 4, !tbaa !5
  %81 = load i32, ptr @n, align 4, !tbaa !5
  %82 = icmp sle i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 11, ptr %3, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  br label %94

84:                                               ; preds = %79
  %85 = load i32, ptr %12, align 4, !tbaa !5
  %86 = sext i32 %85 to i64
  %87 = getelementptr inbounds [1023 x i32], ptr @match, i64 0, i64 %86
  %88 = load i32, ptr %87, align 4, !tbaa !5
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 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 32)
  br label %91

91:                                               ; preds = %84
  %92 = load i32, ptr %12, align 4, !tbaa !5
  %93 = add nsw i32 %92, 1
  store i32 %93, ptr %12, align 4, !tbaa !5
  br label %79, !llvm.loop !21

94:                                               ; preds = %83
  %95 = load i32, ptr %1, align 4
  ret i32 %95
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 0}
!10 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8}
!11 = !{!10, !6, i64 4}
!12 = !{!10, !6, i64 8}
!13 = !{i64 0, i64 4, !5, i64 4, i64 4, !5, i64 8, i64 4, !5}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}
!18 = !{!19, !20, i64 0}
!19 = !{!"_ZTSSt4pairIxiE", !20, i64 0, !6, i64 8}
!20 = !{!"long long", !7, i64 0}
!21 = distinct !{!21, !15}


; 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.edge = type { i32, i32, i32 }
%"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" }

@g = external dso_local local_unnamed_addr global [1023 x [1023 x %struct.edge]], align 16
@n = external dso_local global i32, align 4
@m = external dso_local global i32, align 4
@match = external dso_local local_unnamed_addr global [1023 x i32], align 16
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i32 } @_Z14weight_blossomv() local_unnamed_addr #1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #2 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) @n)
  %5 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 4 dereferenceable(4) @m)
  %6 = load i32, ptr @n, align 4, !tbaa !5
  %.not25 = icmp slt i32 %6, 1
  br i1 %.not25, label %._crit_edge27, label %.preheader.preheader

.preheader.preheader:                             ; preds = %0
  %7 = add nuw i32 %6, 1
  %wide.trip.count40 = zext i32 %7 to i64
  %8 = zext nneg i32 %6 to i64
  %9 = add nsw i64 %wide.trip.count40, -2
  %xtraiter = and i64 %8, 3
  %10 = icmp ult i64 %9, 3
  %unroll_iter = and i64 %8, 2147483644
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %indvars.iv37 = phi i64 [ 1, %.preheader.preheader ], [ %indvars.iv.next38, %._crit_edge ]
  %11 = trunc nuw nsw i64 %indvars.iv37 to i32
  br i1 %10, label %._crit_edge.unr-lcssa, label %.preheader.new

._crit_edge27:                                    ; preds = %._crit_edge, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #5
  %12 = load i32, ptr @m, align 4, !tbaa !5
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph, label %._crit_edge30

._crit_edge.unr-lcssa:                            ; preds = %.preheader.new, %.preheader
  %indvars.iv.unr = phi i64 [ 1, %.preheader ], [ %indvars.iv.next.3, %.preheader.new ]
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.unr-lcssa, %.epil.preheader
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.unr-lcssa ]
  %14 = getelementptr inbounds [1023 x [1023 x %struct.edge]], ptr @g, i64 0, i64 %indvars.iv37, i64 %indvars.iv.epil
  store i32 %11, ptr %14, align 4, !tbaa !5
  %.sroa.47.0..sroa_idx.epil = getelementptr inbounds i8, ptr %14, i64 4
  %15 = trunc nuw nsw i64 %indvars.iv.epil to i32
  store i32 %15, ptr %.sroa.47.0..sroa_idx.epil, align 4, !tbaa !5
  %.sroa.58.0..sroa_idx.epil = getelementptr inbounds i8, ptr %14, i64 8
  store i32 0, ptr %.sroa.58.0..sroa_idx.epil, align 4, !tbaa !5
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !9

._crit_edge:                                      ; preds = %.epil.preheader, %._crit_edge.unr-lcssa
  %indvars.iv.next38 = add nuw nsw i64 %indvars.iv37, 1
  %exitcond41.not = icmp eq i64 %indvars.iv.next38, %wide.trip.count40
  br i1 %exitcond41.not, label %._crit_edge27, label %.preheader, !llvm.loop !11

.preheader.new:                                   ; preds = %.preheader, %.preheader.new
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %.preheader.new ], [ 1, %.preheader ]
  %niter = phi i64 [ %niter.next.3, %.preheader.new ], [ 0, %.preheader ]
  %16 = getelementptr inbounds [1023 x [1023 x %struct.edge]], ptr @g, i64 0, i64 %indvars.iv37, i64 %indvars.iv
  store i32 %11, ptr %16, align 4, !tbaa !5
  %.sroa.47.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 4
  %17 = trunc nuw nsw i64 %indvars.iv to i32
  store i32 %17, ptr %.sroa.47.0..sroa_idx, align 4, !tbaa !5
  %.sroa.58.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  store i32 0, ptr %.sroa.58.0..sroa_idx, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = getelementptr inbounds [1023 x [1023 x %struct.edge]], ptr @g, i64 0, i64 %indvars.iv37, i64 %indvars.iv.next
  store i32 %11, ptr %18, align 4, !tbaa !5
  %.sroa.47.0..sroa_idx.1 = getelementptr inbounds i8, ptr %18, i64 4
  %19 = trunc nuw nsw i64 %indvars.iv.next to i32
  store i32 %19, ptr %.sroa.47.0..sroa_idx.1, align 4, !tbaa !5
  %.sroa.58.0..sroa_idx.1 = getelementptr inbounds i8, ptr %18, i64 8
  store i32 0, ptr %.sroa.58.0..sroa_idx.1, align 4, !tbaa !5
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %20 = getelementptr inbounds [1023 x [1023 x %struct.edge]], ptr @g, i64 0, i64 %indvars.iv37, i64 %indvars.iv.next.1
  store i32 %11, ptr %20, align 4, !tbaa !5
  %.sroa.47.0..sroa_idx.2 = getelementptr inbounds i8, ptr %20, i64 4
  %21 = trunc nuw nsw i64 %indvars.iv.next.1 to i32
  store i32 %21, ptr %.sroa.47.0..sroa_idx.2, align 4, !tbaa !5
  %.sroa.58.0..sroa_idx.2 = getelementptr inbounds i8, ptr %20, i64 8
  store i32 0, ptr %.sroa.58.0..sroa_idx.2, align 4, !tbaa !5
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %22 = getelementptr inbounds [1023 x [1023 x %struct.edge]], ptr @g, i64 0, i64 %indvars.iv37, i64 %indvars.iv.next.2
  store i32 %11, ptr %22, align 4, !tbaa !5
  %.sroa.47.0..sroa_idx.3 = getelementptr inbounds i8, ptr %22, i64 4
  %23 = trunc nuw nsw i64 %indvars.iv.next.2 to i32
  store i32 %23, ptr %.sroa.47.0..sroa_idx.3, align 4, !tbaa !5
  %.sroa.58.0..sroa_idx.3 = getelementptr inbounds i8, ptr %22, i64 8
  store i32 0, ptr %.sroa.58.0..sroa_idx.3, align 4, !tbaa !5
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.unr-lcssa, label %.preheader.new, !llvm.loop !13

._crit_edge30:                                    ; preds = %.lr.ph, %._crit_edge27
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #5
  %24 = call { i64, i32 } @_Z14weight_blossomv()
  %.fca.0.extract = extractvalue { i64, i32 } %24, 0
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %.fca.0.extract)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %25, i8 noundef signext 10)
  %27 = load i32, ptr @n, align 4, !tbaa !5
  %.not2131 = icmp slt i32 %27, 1
  br i1 %.not2131, label %._crit_edge35, label %.lr.ph34

.lr.ph:                                           ; preds = %._crit_edge27, %.lr.ph
  %.02028 = phi i32 [ %38, %.lr.ph ], [ 0, %._crit_edge27 ]
  %28 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %29 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %31 = load i32, ptr %3, align 4, !tbaa !5
  %32 = load i32, ptr %2, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = load i32, ptr %1, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [1023 x [1023 x %struct.edge]], ptr @g, i64 0, i64 %33, i64 %35, i32 2
  store i32 %31, ptr %36, align 4, !tbaa !14
  %37 = getelementptr inbounds [1023 x [1023 x %struct.edge]], ptr @g, i64 0, i64 %35, i64 %33, i32 2
  store i32 %31, ptr %37, align 4, !tbaa !14
  %38 = add nuw nsw i32 %.02028, 1
  %39 = load i32, ptr @m, align 4, !tbaa !5
  %40 = icmp slt i32 %38, %39
  br i1 %40, label %.lr.ph, label %._crit_edge30, !llvm.loop !16

._crit_edge35:                                    ; preds = %.lr.ph34, %._crit_edge30
  ret i32 0

.lr.ph34:                                         ; preds = %._crit_edge30, %.lr.ph34
  %indvars.iv42 = phi i64 [ %indvars.iv.next43, %.lr.ph34 ], [ 1, %._crit_edge30 ]
  %41 = getelementptr inbounds [1023 x i32], ptr @match, i64 0, i64 %indvars.iv42
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %42)
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %43, i8 noundef signext 32)
  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
  %45 = load i32, ptr @n, align 4, !tbaa !5
  %46 = sext i32 %45 to i64
  %.not21.not = icmp slt i64 %indvars.iv42, %46
  br i1 %.not21.not, label %.lr.ph34, label %._crit_edge35, !llvm.loop !17
}

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

; 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 #4

; 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 #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 = { 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 #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.unroll.disable"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = !{!15, !6, i64 8}
!15 = !{!"_ZTS4edge", !6, i64 0, !6, i64 4, !6, i64 8}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}


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