; LLVM IR from Tunghohin/Competitive_Coding :: Codeforces/cf1566_E.ll (Z5solvev)

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

@type = external dso_local global [200010 x i32], align 16
@e = external dso_local global [400010 x %struct.edge], align 16
@head = external dso_local global [200010 x i32], align 16
@tot = external dso_local global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsii(i32 noundef, i32 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  call void @llvm.memset.p0.i64(ptr align 16 @type, i8 -1, i64 800040, i1 false)
  call void @llvm.memset.p0.i64(ptr align 16 @head, i8 0, i64 800040, i1 false)
  store i32 0, ptr @tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %1) #6
  %11 = 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)
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  store i32 1, ptr %2, align 4, !tbaa !5
  br label %12

12:                                               ; preds = %24, %0
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %17, label %16

16:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %27

17:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %19 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %20 = load i32, ptr %3, align 4, !tbaa !5
  %21 = load i32, ptr %4, align 4, !tbaa !5
  call void @_Z8add_edgeii(i32 noundef %20, i32 noundef %21)
  %22 = load i32, ptr %4, align 4, !tbaa !5
  %23 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z8add_edgeii(i32 noundef %22, i32 noundef %23)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %24

24:                                               ; preds = %17
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = add nsw i32 %25, 1
  store i32 %26, ptr %2, align 4, !tbaa !5
  br label %12, !llvm.loop !9

27:                                               ; preds = %16
  store i32 0, ptr getelementptr inbounds ([200010 x i32], ptr @type, i64 0, i64 1), align 4, !tbaa !5
  call void @_Z3dfsii(i32 noundef 1, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  store i8 0, ptr %5, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %28 = load i32, ptr getelementptr inbounds ([200010 x i32], ptr @head, i64 0, i64 1), align 4, !tbaa !5
  store i32 %28, ptr %6, align 4, !tbaa !5
  br label %29

29:                                               ; preds = %49, %27
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %33, label %32

32:                                               ; preds = %29
  store i32 5, ptr %7, align 4
  br label %55

33:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = sext i32 %34 to i64
  %36 = getelementptr inbounds [400010 x %struct.edge], ptr @e, i64 0, i64 %35
  %37 = getelementptr inbounds %struct.edge, ptr %36, i32 0, i32 0
  %38 = load i32, ptr %37, align 8, !tbaa !13
  store i32 %38, ptr %8, align 4, !tbaa !5
  %39 = load i32, ptr %8, align 4, !tbaa !5
  %40 = sext i32 %39 to i64
  %41 = getelementptr inbounds [200010 x i32], ptr @type, i64 0, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = icmp eq i32 %42, 1
  br i1 %43, label %44, label %45

44:                                               ; preds = %33
  store i8 1, ptr %5, align 1, !tbaa !11
  store i32 5, ptr %7, align 4
  br label %46

45:                                               ; preds = %33
  store i32 0, ptr %7, align 4
  br label %46

46:                                               ; preds = %45, %44
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  %47 = load i32, ptr %7, align 4
  switch i32 %47, label %55 [
    i32 0, label %48
  ]

48:                                               ; preds = %46
  br label %49

49:                                               ; preds = %48
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds [400010 x %struct.edge], ptr @e, i64 0, i64 %51
  %53 = getelementptr inbounds %struct.edge, ptr %52, i32 0, i32 1
  %54 = load i32, ptr %53, align 4, !tbaa !15
  store i32 %54, ptr %6, align 4, !tbaa !5
  br label %29, !llvm.loop !16

55:                                               ; preds = %46, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %56

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 0, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 1, ptr %10, align 4, !tbaa !5
  br label %57

57:                                               ; preds = %71, %56
  %58 = load i32, ptr %10, align 4, !tbaa !5
  %59 = load i32, ptr %1, align 4, !tbaa !5
  %60 = icmp sle i32 %58, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %57
  store i32 8, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %74

62:                                               ; preds = %57
  %63 = load i32, ptr %10, align 4, !tbaa !5
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds [200010 x i32], ptr @type, i64 0, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = icmp eq i32 %66, 2
  %68 = zext i1 %67 to i32
  %69 = load i32, ptr %9, align 4, !tbaa !5
  %70 = add nsw i32 %69, %68
  store i32 %70, ptr %9, align 4, !tbaa !5
  br label %71

71:                                               ; preds = %62
  %72 = load i32, ptr %10, align 4, !tbaa !5
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %10, align 4, !tbaa !5
  br label %57, !llvm.loop !17

74:                                               ; preds = %61
  %75 = load i32, ptr %1, align 4, !tbaa !5
  %76 = load i32, ptr %9, align 4, !tbaa !5
  %77 = mul nsw i32 2, %76
  %78 = sub nsw i32 %75, %77
  %79 = load i8, ptr %5, align 1, !tbaa !11, !range !18, !noundef !19
  %80 = trunc i8 %79 to i1
  %81 = zext i1 %80 to i32
  %82 = sub nsw i32 %78, %81
  %83 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %82)
  %84 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %83, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %1) #6
  ret void
}

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

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

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

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


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

@type = external dso_local local_unnamed_addr global [200010 x i32], align 16
@e = external dso_local local_unnamed_addr global [400010 x %struct.edge], align 16
@head = external dso_local local_unnamed_addr global [200010 x i32], align 16
@tot = external dso_local local_unnamed_addr global i32, align 4
@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3dfsii(i32 noundef, i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5solvev() local_unnamed_addr #1 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800040) @type, i8 -1, i64 800040, i1 false)
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800040) @head, i8 0, i64 800040, i1 false)
  store i32 0, ptr @tot, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #7
  %4 = 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)
  %5 = load i32, ptr %1, align 4, !tbaa !5
  %6 = icmp sgt i32 %5, 1
  br i1 %6, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %0
  store i32 0, ptr getelementptr inbounds (i8, ptr @type, i64 4), align 4, !tbaa !5
  call void @_Z3dfsii(i32 noundef 1, i32 noundef 1)
  %.01623 = load i32, ptr getelementptr inbounds (i8, ptr @head, i64 4), align 4, !tbaa !5
  %.not24 = icmp eq i32 %.01623, 0
  br i1 %.not24, label %._crit_edge28, label %.lr.ph27

.lr.ph:                                           ; preds = %0, %.lr.ph
  %.01422 = phi i32 [ %13, %.lr.ph ], [ 1, %0 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #7
  %7 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %8 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = load i32, ptr %3, align 4, !tbaa !5
  call void @_Z8add_edgeii(i32 noundef %9, i32 noundef %10)
  %11 = load i32, ptr %3, align 4, !tbaa !5
  %12 = load i32, ptr %2, align 4, !tbaa !5
  call void @_Z8add_edgeii(i32 noundef %11, i32 noundef %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  %13 = add nuw nsw i32 %.01422, 1
  %14 = load i32, ptr %1, align 4, !tbaa !5
  %15 = icmp slt i32 %13, %14
  br i1 %15, label %.lr.ph, label %._crit_edge, !llvm.loop !9

16:                                               ; preds = %.lr.ph27
  %17 = getelementptr inbounds i8, ptr %19, i64 4
  %.016 = load i32, ptr %17, align 4, !tbaa !5
  %.not = icmp eq i32 %.016, 0
  br i1 %.not, label %._crit_edge28, label %.lr.ph27, !llvm.loop !11

.lr.ph27:                                         ; preds = %._crit_edge, %16
  %.01625 = phi i32 [ %.016, %16 ], [ %.01623, %._crit_edge ]
  %18 = sext i32 %.01625 to i64
  %19 = getelementptr inbounds [400010 x %struct.edge], ptr @e, i64 0, i64 %18
  %20 = load i32, ptr %19, align 8, !tbaa !12
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [200010 x i32], ptr @type, i64 0, i64 %21
  %23 = load i32, ptr %22, align 4, !tbaa !5
  %.not19 = icmp eq i32 %23, 1
  br i1 %.not19, label %._crit_edge28, label %16

._crit_edge28:                                    ; preds = %.lr.ph27, %16, %._crit_edge
  %.2.neg39 = phi i32 [ 0, %._crit_edge ], [ 0, %16 ], [ -1, %.lr.ph27 ]
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %.not2031 = icmp slt i32 %24, 1
  br i1 %.not2031, label %._crit_edge36, label %.lr.ph35.preheader

.lr.ph35.preheader:                               ; preds = %._crit_edge28
  %25 = add nuw i32 %24, 1
  %wide.trip.count = zext i32 %25 to i64
  %26 = zext nneg i32 %24 to i64
  %min.iters.check = icmp ult i32 %24, 8
  br i1 %min.iters.check, label %.lr.ph35.preheader44, label %vector.ph

.lr.ph35.preheader44:                             ; preds = %middle.block, %.lr.ph35.preheader
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph35.preheader ], [ %ind.end, %middle.block ]
  %.01332.ph = phi i32 [ 0, %.lr.ph35.preheader ], [ %36, %middle.block ]
  br label %.lr.ph35

vector.ph:                                        ; preds = %.lr.ph35.preheader
  %n.vec = and i64 %26, 2147483640
  %ind.end = or disjoint i64 %n.vec, 1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %33, %vector.body ]
  %vec.phi42 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %34, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %27 = getelementptr inbounds [200010 x i32], ptr @type, i64 0, i64 %offset.idx
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %wide.load = load <4 x i32>, ptr %27, align 4, !tbaa !5
  %wide.load43 = load <4 x i32>, ptr %28, align 4, !tbaa !5
  %29 = icmp eq <4 x i32> %wide.load, <i32 2, i32 2, i32 2, i32 2>
  %30 = icmp eq <4 x i32> %wide.load43, <i32 2, i32 2, i32 2, i32 2>
  %31 = zext <4 x i1> %29 to <4 x i32>
  %32 = zext <4 x i1> %30 to <4 x i32>
  %33 = add <4 x i32> %vec.phi, %31
  %34 = add <4 x i32> %vec.phi42, %32
  %index.next = add nuw i64 %index, 8
  %35 = icmp eq i64 %index.next, %n.vec
  br i1 %35, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %34, %33
  %36 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %n.vec, %26
  br i1 %cmp.n, label %._crit_edge36.loopexit, label %.lr.ph35.preheader44

._crit_edge36.loopexit:                           ; preds = %.lr.ph35, %middle.block
  %.lcssa = phi i32 [ %36, %middle.block ], [ %45, %.lr.ph35 ]
  %37 = shl nuw i32 %.lcssa, 1
  br label %._crit_edge36

._crit_edge36:                                    ; preds = %._crit_edge36.loopexit, %._crit_edge28
  %.013.lcssa = phi i32 [ 0, %._crit_edge28 ], [ %37, %._crit_edge36.loopexit ]
  %.neg21 = sub i32 %.2.neg39, %.013.lcssa
  %38 = add i32 %.neg21, %24
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEi(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i32 noundef %38)
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c(ptr noundef nonnull align 8 dereferenceable(8) %39, i8 noundef signext 10)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #7
  ret void

.lr.ph35:                                         ; preds = %.lr.ph35.preheader44, %.lr.ph35
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph35 ], [ %indvars.iv.ph, %.lr.ph35.preheader44 ]
  %.01332 = phi i32 [ %45, %.lr.ph35 ], [ %.01332.ph, %.lr.ph35.preheader44 ]
  %41 = getelementptr inbounds [200010 x i32], ptr @type, i64 0, i64 %indvars.iv
  %42 = load i32, ptr %41, align 4, !tbaa !5
  %43 = icmp eq i32 %42, 2
  %44 = zext i1 %43 to i32
  %45 = add nuw nsw i32 %.01332, %44
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge36.loopexit, label %.lr.ph35, !llvm.loop !17
}

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

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 #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) local_unnamed_addr #5

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #6

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass