; LLVM IR from eyangch/competitive-programming :: AdventOfCode/2022/day11/day11.ll (Z5part2v)

; 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.__gnu_cxx::__normal_iterator" = type { ptr }

@ans = external dso_local global [20 x i64], align 16
@mk = external dso_local global i64, align 8
@itm = external dso_local global [20 x %"class.std::vector"], align 16
@op = external dso_local global [20 x i64], align 16
@pr = external dso_local global [20 x i64], align 16
@dv = external dso_local global [20 x i64], align 16
@tr = external dso_local global [20 x i64], align 16
@fs = external dso_local global [20 x i64], align 16
@MOD = external dso_local global i64, 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: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5part2v() #3 {
  %1 = alloca i64, align 8
  %2 = alloca i32, align 4
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %1) #4
  store i64 0, ptr %1, align 8, !tbaa !5
  br label %10

10:                                               ; preds = %99, %0
  %11 = load i64, ptr %1, align 8, !tbaa !5
  %12 = icmp slt i64 %11, 10000
  br i1 %12, label %14, label %13

13:                                               ; preds = %10
  store i32 2, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %1) #4
  br label %102

14:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  store i64 0, ptr %3, align 8, !tbaa !5
  br label %15

15:                                               ; preds = %95, %14
  %16 = load i64, ptr %3, align 8, !tbaa !5
  %17 = load i64, ptr @mk, align 8, !tbaa !5
  %18 = icmp sle i64 %16, %17
  br i1 %18, label %20, label %19

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

20:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %21 = load i64, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds [20 x %"class.std::vector"], ptr @itm, i64 0, i64 %21
  store ptr %22, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %23 = load ptr, ptr %4, align 8, !tbaa !9
  %24 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #4
  %25 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %24, ptr %25, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %26 = load ptr, ptr %4, align 8, !tbaa !9
  %27 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #4
  %28 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %27, ptr %28, align 8
  br label %29

29:                                               ; preds = %90, %20
  %30 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br i1 %30, label %32, label %31

31:                                               ; preds = %29
  store i32 8, ptr %2, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %92

32:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  %34 = load i64, ptr %33, align 8, !tbaa !5
  store i64 %34, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %35 = load i64, ptr %7, align 8, !tbaa !5
  store i64 %35, ptr %8, align 8, !tbaa !5
  %36 = load i64, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds [20 x i64], ptr @op, i64 0, i64 %36
  %38 = load i64, ptr %37, align 8, !tbaa !5
  %39 = icmp eq i64 %38, 2
  br i1 %39, label %40, label %44

40:                                               ; preds = %32
  %41 = load i64, ptr %7, align 8, !tbaa !5
  %42 = load i64, ptr %8, align 8, !tbaa !5
  %43 = mul nsw i64 %42, %41
  store i64 %43, ptr %8, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %40, %32
  %45 = load i64, ptr %3, align 8, !tbaa !5
  %46 = getelementptr inbounds [20 x i64], ptr @op, i64 0, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !5
  %48 = icmp eq i64 %47, 1
  br i1 %48, label %49, label %55

49:                                               ; preds = %44
  %50 = load i64, ptr %3, align 8, !tbaa !5
  %51 = getelementptr inbounds [20 x i64], ptr @pr, i64 0, i64 %50
  %52 = load i64, ptr %51, align 8, !tbaa !5
  %53 = load i64, ptr %8, align 8, !tbaa !5
  %54 = mul nsw i64 %53, %52
  store i64 %54, ptr %8, align 8, !tbaa !5
  br label %55

55:                                               ; preds = %49, %44
  %56 = load i64, ptr %3, align 8, !tbaa !5
  %57 = getelementptr inbounds [20 x i64], ptr @op, i64 0, i64 %56
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = icmp eq i64 %58, 0
  br i1 %59, label %60, label %66

60:                                               ; preds = %55
  %61 = load i64, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds [20 x i64], ptr @pr, i64 0, i64 %61
  %63 = load i64, ptr %62, align 8, !tbaa !5
  %64 = load i64, ptr %8, align 8, !tbaa !5
  %65 = add nsw i64 %64, %63
  store i64 %65, ptr %8, align 8, !tbaa !5
  br label %66

66:                                               ; preds = %60, %55
  %67 = load i64, ptr @MOD, align 8, !tbaa !5
  %68 = load i64, ptr %8, align 8, !tbaa !5
  %69 = srem i64 %68, %67
  store i64 %69, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %70 = load i64, ptr %3, align 8, !tbaa !5
  %71 = getelementptr inbounds [20 x i64], ptr @tr, i64 0, i64 %70
  %72 = load i64, ptr %71, align 8, !tbaa !5
  store i64 %72, ptr %9, align 8, !tbaa !5
  %73 = load i64, ptr %8, align 8, !tbaa !5
  %74 = load i64, ptr %3, align 8, !tbaa !5
  %75 = getelementptr inbounds [20 x i64], ptr @dv, i64 0, i64 %74
  %76 = load i64, ptr %75, align 8, !tbaa !5
  %77 = srem i64 %73, %76
  %78 = icmp ne i64 %77, 0
  br i1 %78, label %79, label %83

79:                                               ; preds = %66
  %80 = load i64, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds [20 x i64], ptr @fs, i64 0, i64 %80
  %82 = load i64, ptr %81, align 8, !tbaa !5
  store i64 %82, ptr %9, align 8, !tbaa !5
  br label %83

83:                                               ; preds = %79, %66
  %84 = load i64, ptr %9, align 8, !tbaa !5
  %85 = getelementptr inbounds [20 x %"class.std::vector"], ptr @itm, i64 0, i64 %84
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %85, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %86 = load i64, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds [20 x i64], ptr @ans, i64 0, i64 %86
  %88 = load i64, ptr %87, align 8, !tbaa !5
  %89 = add nsw i64 %88, 1
  store i64 %89, ptr %87, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %90

90:                                               ; preds = %83
  %91 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br label %29

92:                                               ; preds = %31
  %93 = load i64, ptr %3, align 8, !tbaa !5
  %94 = getelementptr inbounds [20 x %"class.std::vector"], ptr @itm, i64 0, i64 %93
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #4
  br label %95

95:                                               ; preds = %92
  %96 = load i64, ptr %3, align 8, !tbaa !5
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %3, align 8, !tbaa !5
  br label %15, !llvm.loop !11

98:                                               ; preds = %19
  br label %99

99:                                               ; preds = %98
  %100 = load i64, ptr %1, align 8, !tbaa !5
  %101 = add nsw i64 %100, 1
  store i64 %101, ptr %1, align 8, !tbaa !5
  br label %10, !llvm.loop !13

102:                                              ; preds = %13
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint 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 #3 = { 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 #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !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.__gnu_cxx::__normal_iterator" = type { ptr }

@ans = external dso_local local_unnamed_addr global [20 x i64], align 16
@mk = external dso_local local_unnamed_addr global i64, align 8
@itm = external dso_local global [20 x %"class.std::vector"], align 16
@op = external dso_local local_unnamed_addr global [20 x i64], align 16
@pr = external dso_local local_unnamed_addr global [20 x i64], align 16
@dv = external dso_local local_unnamed_addr global [20 x i64], align 16
@tr = external dso_local local_unnamed_addr global [20 x i64], align 16
@fs = external dso_local local_unnamed_addr global [20 x i64], align 16
@MOD = external dso_local local_unnamed_addr global i64, 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 nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z5part2v() local_unnamed_addr #3 {
  %1 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %2 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %3 = alloca i64, align 8
  %4 = load i64, ptr @mk, align 8, !tbaa !5
  %5 = icmp slt i64 %4, 0
  br i1 %5, label %.split29.us, label %.preheader

.preheader:                                       ; preds = %0, %._crit_edge26
  %6 = phi i64 [ %7, %._crit_edge26 ], [ %4, %0 ]
  %.01927 = phi i64 [ %8, %._crit_edge26 ], [ 0, %0 ]
  %.not23 = icmp slt i64 %6, 0
  br i1 %.not23, label %._crit_edge26, label %.lr.ph25

.split29.us:                                      ; preds = %._crit_edge26, %0
  ret void

._crit_edge26:                                    ; preds = %._crit_edge, %.preheader
  %7 = phi i64 [ %6, %.preheader ], [ %18, %._crit_edge ]
  %8 = add nuw nsw i64 %.01927, 1
  %exitcond.not = icmp eq i64 %8, 10000
  br i1 %exitcond.not, label %.split29.us, label %.preheader, !llvm.loop !9

.lr.ph25:                                         ; preds = %.preheader, %._crit_edge
  %.02024 = phi i64 [ %17, %._crit_edge ], [ 0, %.preheader ]
  %9 = getelementptr inbounds [20 x %"class.std::vector"], ptr @itm, i64 0, i64 %.02024
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #4
  %10 = call ptr @_ZNSt6vectorIxSaIxEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  store ptr %10, ptr %1, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  %11 = call ptr @_ZNSt6vectorIxSaIxEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  store ptr %11, ptr %2, align 8
  %12 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  br i1 %12, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.lr.ph25
  %13 = getelementptr inbounds [20 x i64], ptr @op, i64 0, i64 %.02024
  %14 = getelementptr inbounds [20 x i64], ptr @pr, i64 0, i64 %.02024
  %15 = getelementptr inbounds [20 x i64], ptr @dv, i64 0, i64 %.02024
  %16 = getelementptr inbounds [20 x i64], ptr @ans, i64 0, i64 %.02024
  br label %19

._crit_edge:                                      ; preds = %.thread22, %.lr.ph25
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #4
  call void @_ZNSt6vectorIxSaIxEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %17 = add nuw nsw i64 %.02024, 1
  %18 = load i64, ptr @mk, align 8, !tbaa !5
  %.not.not = icmp slt i64 %.02024, %18
  br i1 %.not.not, label %.lr.ph25, label %._crit_edge26, !llvm.loop !12

19:                                               ; preds = %.lr.ph, %.thread22
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #4
  %21 = load i64, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %22 = load i64, ptr %13, align 8, !tbaa !5
  switch i64 %22, label %.thread22 [
    i64 2, label %.thread
    i64 1, label %24
    i64 0, label %27
  ]

.thread:                                          ; preds = %19
  %23 = mul nsw i64 %21, %21
  br label %.thread22

24:                                               ; preds = %19
  %25 = load i64, ptr %14, align 8, !tbaa !5
  %26 = mul nsw i64 %21, %25
  br label %.thread22

27:                                               ; preds = %19
  %28 = load i64, ptr %14, align 8, !tbaa !5
  %29 = add nsw i64 %21, %28
  br label %.thread22

.thread22:                                        ; preds = %19, %24, %.thread, %27
  %30 = phi i64 [ %21, %19 ], [ %26, %24 ], [ %23, %.thread ], [ %29, %27 ]
  %31 = load i64, ptr @MOD, align 8, !tbaa !5
  %32 = srem i64 %30, %31
  store i64 %32, ptr %3, align 8, !tbaa !5
  %33 = load i64, ptr %15, align 8, !tbaa !5
  %34 = srem i64 %32, %33
  %.not21 = icmp eq i64 %34, 0
  %spec.select = select i1 %.not21, ptr @tr, ptr @fs
  %.0.in = getelementptr inbounds [20 x i64], ptr %spec.select, i64 0, i64 %.02024
  %.0 = load i64, ptr %.0.in, align 8, !tbaa !5
  %35 = getelementptr inbounds [20 x %"class.std::vector"], ptr @itm, i64 0, i64 %.0
  call void @_ZNSt6vectorIxSaIxEE9push_backERKx(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %36 = load i64, ptr %16, align 8, !tbaa !5
  %37 = add nsw i64 %36, 1
  store i64 %37, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPxSt6vectorIxSaIxEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %1) #4
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPxSt6vectorIxSaIxEEEEbRKNS_17__normal_iteratorIT_T0_EESA_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #4
  br i1 %39, label %19, label %._crit_edge
}

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unswitch.partial.disable"}
!12 = distinct !{!12, !10}


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