; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2020-21/Dec/Plat/sleeping.ll (Z4trani)

; 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.std::array" = type { [2 x %"class.std::vector.7"] }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<mint<1000000007, 5>, std::allocator<mint<1000000007, 5>>>::_Vector_impl" }
%"struct.std::_Vector_base<mint<1000000007, 5>, std::allocator<mint<1000000007, 5>>>::_Vector_impl" = type { %"struct.std::_Vector_base<mint<1000000007, 5>, std::allocator<mint<1000000007, 5>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<mint<1000000007, 5>, std::allocator<mint<1000000007, 5>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@dp = external dso_local global %"struct.std::array", 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3lefSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.7") align 8, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3rigSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.7") align 8, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZplSt6vectorI4mintILi1000000007ELi5EESaIS1_EERKS3_(ptr dead_on_unwind noalias writable sret(%"class.std::vector.7") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4trani(i32 noundef %0) #3 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"struct.std::array", align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::vector.7", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::vector.7", align 8
  %9 = alloca %"class.std::vector.7", align 8
  %10 = alloca %"class.std::vector.7", align 8
  %11 = alloca %"class.std::vector.7", align 8
  %12 = alloca i1, align 1
  %13 = alloca %"struct.std::array", align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.std::vector.7", align 8
  %16 = alloca %"class.std::vector.7", align 8
  %17 = alloca %"class.std::vector.7", align 8
  %18 = alloca i1, align 1
  store i32 %0, ptr %2, align 4, !tbaa !5
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %75

21:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 48, ptr %3) #4
  %22 = getelementptr inbounds %"struct.std::array", ptr %3, i32 0, i32 0
  store i1 true, ptr %12, align 1
  store ptr %22, ptr %4, align 8
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 0) #4
  invoke void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %24 unwind label %36

24:                                               ; preds = %21
  invoke void @_Z3rigSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind writable sret(%"class.std::vector.7") align 8 %22, ptr noundef %5)
          to label %25 unwind label %40

25:                                               ; preds = %24
  %26 = getelementptr inbounds %"class.std::vector.7", ptr %22, i64 1
  store ptr %26, ptr %4, align 8
  %27 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 0) #4
  invoke void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %27)
          to label %28 unwind label %40

28:                                               ; preds = %25
  %29 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 1) #4
  invoke void @_ZplSt6vectorI4mintILi1000000007ELi5EESaIS1_EERKS3_(ptr dead_on_unwind writable sret(%"class.std::vector.7") align 8 %8, ptr noundef %9, ptr noundef nonnull align 8 dereferenceable(24) %29)
          to label %30 unwind label %44

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #4
  %31 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 1) #4
  invoke void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %31)
          to label %32 unwind label %48

32:                                               ; preds = %30
  invoke void @_Z3rigSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind writable sret(%"class.std::vector.7") align 8 %10, ptr noundef %11)
          to label %33 unwind label %52

33:                                               ; preds = %32
  invoke void @_ZplSt6vectorI4mintILi1000000007ELi5EESaIS1_EERKS3_(ptr dead_on_unwind writable sret(%"class.std::vector.7") align 8 %26, ptr noundef %8, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %34 unwind label %56

34:                                               ; preds = %33
  store i1 false, ptr %12, align 1
  %35 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEaSEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @dp, ptr noundef nonnull align 8 dereferenceable(48) %3) #4
  call void @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %3) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #4
  br label %116

36:                                               ; preds = %21
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %6, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %7, align 4
  br label %64

40:                                               ; preds = %25, %24
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %6, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %7, align 4
  br label %63

44:                                               ; preds = %28
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %6, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %7, align 4
  br label %62

48:                                               ; preds = %30
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %6, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %7, align 4
  br label %61

52:                                               ; preds = %32
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %6, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %7, align 4
  br label %60

56:                                               ; preds = %33
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %6, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %7, align 4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  br label %60

60:                                               ; preds = %56, %52
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  br label %61

61:                                               ; preds = %60, %48
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #4
  br label %62

62:                                               ; preds = %61, %44
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  br label %63

63:                                               ; preds = %62, %40
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  br label %64

64:                                               ; preds = %63, %36
  %65 = load i1, ptr %12, align 1
  br i1 %65, label %66, label %74

66:                                               ; preds = %64
  %67 = load ptr, ptr %4, align 8
  %68 = icmp eq ptr %22, %67
  br i1 %68, label %73, label %69

69:                                               ; preds = %69, %66
  %70 = phi ptr [ %67, %66 ], [ %71, %69 ]
  %71 = getelementptr inbounds %"class.std::vector.7", ptr %70, i64 -1
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %71) #4
  %72 = icmp eq ptr %71, %22
  br i1 %72, label %73, label %69

73:                                               ; preds = %69, %66
  br label %74

74:                                               ; preds = %73, %64
  call void @llvm.lifetime.end.p0(i64 48, ptr %3) #4
  br label %117

75:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 48, ptr %13) #4
  %76 = getelementptr inbounds %"struct.std::array", ptr %13, i32 0, i32 0
  store i1 true, ptr %18, align 1
  store ptr %76, ptr %14, align 8
  %77 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 0) #4
  invoke void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %77)
          to label %78 unwind label %87

78:                                               ; preds = %75
  invoke void @_Z3lefSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind writable sret(%"class.std::vector.7") align 8 %15, ptr noundef %16)
          to label %79 unwind label %91

79:                                               ; preds = %78
  %80 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 0) #4
  invoke void @_ZplSt6vectorI4mintILi1000000007ELi5EESaIS1_EERKS3_(ptr dead_on_unwind writable sret(%"class.std::vector.7") align 8 %76, ptr noundef %15, ptr noundef nonnull align 8 dereferenceable(24) %80)
          to label %81 unwind label %95

81:                                               ; preds = %79
  %82 = getelementptr inbounds %"class.std::vector.7", ptr %76, i64 1
  store ptr %82, ptr %14, align 8
  %83 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 1) #4
  invoke void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %83)
          to label %84 unwind label %95

84:                                               ; preds = %81
  invoke void @_Z3lefSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind writable sret(%"class.std::vector.7") align 8 %82, ptr noundef %17)
          to label %85 unwind label %99

85:                                               ; preds = %84
  store i1 false, ptr %18, align 1
  %86 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEaSEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @dp, ptr noundef nonnull align 8 dereferenceable(48) %13) #4
  call void @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #4
  br label %116

87:                                               ; preds = %75
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %6, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %7, align 4
  br label %105

91:                                               ; preds = %78
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %6, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %7, align 4
  br label %104

95:                                               ; preds = %81, %79
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %6, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %7, align 4
  br label %103

99:                                               ; preds = %84
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %6, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %7, align 4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  br label %103

103:                                              ; preds = %99, %95
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  br label %104

104:                                              ; preds = %103, %91
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  br label %105

105:                                              ; preds = %104, %87
  %106 = load i1, ptr %18, align 1
  br i1 %106, label %107, label %115

107:                                              ; preds = %105
  %108 = load ptr, ptr %14, align 8
  %109 = icmp eq ptr %76, %108
  br i1 %109, label %114, label %110

110:                                              ; preds = %110, %107
  %111 = phi ptr [ %108, %107 ], [ %112, %110 ]
  %112 = getelementptr inbounds %"class.std::vector.7", ptr %111, i64 -1
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %112) #4
  %113 = icmp eq ptr %112, %76
  br i1 %113, label %114, label %110

114:                                              ; preds = %110, %107
  br label %115

115:                                              ; preds = %114, %105
  call void @llvm.lifetime.end.p0(i64 48, ptr %13) #4
  br label %117

116:                                              ; preds = %85, %34
  ret void

117:                                              ; preds = %115, %74
  %118 = load ptr, ptr %6, align 8
  %119 = load i32, ptr %7, align 4
  %120 = insertvalue { ptr, i32 } poison, ptr %118, 0
  %121 = insertvalue { ptr, i32 } %120, i32 %119, 1
  resume { ptr, i32 } %121
}

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

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

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

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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; 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.std::array" = type { [2 x %"class.std::vector.7"] }
%"class.std::vector.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = type { %"struct.std::_Vector_base<mint<1000000007, 5>, std::allocator<mint<1000000007, 5>>>::_Vector_impl" }
%"struct.std::_Vector_base<mint<1000000007, 5>, std::allocator<mint<1000000007, 5>>>::_Vector_impl" = type { %"struct.std::_Vector_base<mint<1000000007, 5>, std::allocator<mint<1000000007, 5>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<mint<1000000007, 5>, std::allocator<mint<1000000007, 5>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@dp = external dso_local global %"struct.std::array", 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3lefSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.7") align 8, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z3rigSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.7") align 8, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZplSt6vectorI4mintILi1000000007ELi5EESaIS1_EERKS3_(ptr dead_on_unwind noalias writable sret(%"class.std::vector.7") align 8, ptr noundef, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4trani(i32 noundef %0) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"struct.std::array", align 8
  %3 = alloca %"class.std::vector.7", align 8
  %4 = alloca %"class.std::vector.7", align 8
  %5 = alloca %"class.std::vector.7", align 8
  %6 = alloca %"class.std::vector.7", align 8
  %7 = alloca %"class.std::vector.7", align 8
  %8 = alloca %"struct.std::array", align 8
  %9 = alloca %"class.std::vector.7", align 8
  %10 = alloca %"class.std::vector.7", align 8
  %11 = alloca %"class.std::vector.7", align 8
  %12 = icmp eq i32 %0, 0
  br i1 %12, label %13, label %41

13:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %2) #4
  %14 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 0) #4
  invoke void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %14)
          to label %15 unwind label %.thread

15:                                               ; preds = %13
  invoke void @_Z3rigSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.7") align 8 %2, ptr noundef nonnull %3)
          to label %17 unwind label %.thread53

.thread53:                                        ; preds = %15
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  br label %.loopexit

17:                                               ; preds = %15
  %18 = getelementptr inbounds i8, ptr %2, i64 24
  %19 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 0) #4
  invoke void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %19)
          to label %20 unwind label %39

20:                                               ; preds = %17
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 1) #4
  invoke void @_ZplSt6vectorI4mintILi1000000007ELi5EESaIS1_EERKS3_(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.7") align 8 %4, ptr noundef nonnull %5, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %22 unwind label %29

22:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 1) #4
  invoke void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %23)
          to label %24 unwind label %31

24:                                               ; preds = %22
  invoke void @_Z3rigSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.7") align 8 %6, ptr noundef nonnull %7)
          to label %25 unwind label %33

25:                                               ; preds = %24
  invoke void @_ZplSt6vectorI4mintILi1000000007ELi5EESaIS1_EERKS3_(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.7") align 8 %18, ptr noundef nonnull %4, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %26 unwind label %35

26:                                               ; preds = %25
  %27 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEaSEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @dp, ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  call void @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %2) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #4
  br label %63

.thread:                                          ; preds = %13
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

29:                                               ; preds = %20
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %.thread48

31:                                               ; preds = %22
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %38

33:                                               ; preds = %24
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %37

35:                                               ; preds = %25
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  br label %37

37:                                               ; preds = %35, %33
  %.pn29 = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #4
  br label %38

38:                                               ; preds = %37, %31
  %.pn29.pn = phi { ptr, i32 } [ %.pn29, %37 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  br label %.thread48

.thread48:                                        ; preds = %29, %38
  %.pn29.pn.pn = phi { ptr, i32 } [ %.pn29.pn, %38 ], [ %30, %29 ]
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  br label %.preheader.preheader

39:                                               ; preds = %17
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %.preheader.preheader

.preheader.preheader:                             ; preds = %39, %.thread48
  %.pn29.pn.pn.pn52 = phi { ptr, i32 } [ %.pn29.pn.pn, %.thread48 ], [ %40, %39 ]
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  br label %.loopexit

.loopexit:                                        ; preds = %.preheader.preheader, %.thread53, %.thread
  %.pn29.pn.pn.pn.pn38 = phi { ptr, i32 } [ %28, %.thread ], [ %16, %.thread53 ], [ %.pn29.pn.pn.pn52, %.preheader.preheader ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %2) #4
  br label %64

41:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #4
  %42 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 0) #4
  invoke void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %42)
          to label %43 unwind label %.thread39

43:                                               ; preds = %41
  invoke void @_Z3lefSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.7") align 8 %9, ptr noundef nonnull %10)
          to label %44 unwind label %.thread43

44:                                               ; preds = %43
  %45 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 0) #4
  invoke void @_ZplSt6vectorI4mintILi1000000007ELi5EESaIS1_EERKS3_(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.7") align 8 %8, ptr noundef nonnull %9, ptr noundef nonnull align 8 dereferenceable(24) %45)
          to label %46 unwind label %54

46:                                               ; preds = %44
  %47 = getelementptr inbounds i8, ptr %8, i64 24
  %48 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEixEm(ptr noundef nonnull align 8 dereferenceable(48) @dp, i64 noundef 1) #4
  invoke void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(24) %48)
          to label %49 unwind label %54

49:                                               ; preds = %46
  invoke void @_Z3lefSt6vectorI4mintILi1000000007ELi5EESaIS1_EE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.7") align 8 %47, ptr noundef nonnull %11)
          to label %50 unwind label %56

50:                                               ; preds = %49
  %51 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EEaSEOS5_(ptr noundef nonnull align 8 dereferenceable(48) @dp, ptr noundef nonnull align 8 dereferenceable(48) %8) #4
  call void @_ZNSt5arrayISt6vectorI4mintILi1000000007ELi5EESaIS2_EELm2EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #4
  br label %63

.thread39:                                        ; preds = %41
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit47

.thread43:                                        ; preds = %43
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  br label %.loopexit47

54:                                               ; preds = %46, %44
  %.0 = phi ptr [ %47, %46 ], [ %8, %44 ]
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %58

56:                                               ; preds = %49
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  br label %58

58:                                               ; preds = %54, %56
  %.pn = phi { ptr, i32 } [ %57, %56 ], [ %55, %54 ]
  %.1 = phi ptr [ %47, %56 ], [ %.0, %54 ]
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #4
  %59 = icmp eq ptr %8, %.1
  br i1 %59, label %.loopexit47, label %.preheader46

.preheader46:                                     ; preds = %58, %.preheader46
  %60 = phi ptr [ %61, %.preheader46 ], [ %.1, %58 ]
  %61 = getelementptr inbounds i8, ptr %60, i64 -24
  call void @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %61) #4
  %62 = icmp eq ptr %61, %8
  br i1 %62, label %.loopexit47, label %.preheader46

.loopexit47:                                      ; preds = %.preheader46, %.thread43, %.thread39, %58
  %.pn.pn.pn42 = phi { ptr, i32 } [ %52, %.thread39 ], [ %.pn, %58 ], [ %53, %.thread43 ], [ %.pn, %.preheader46 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #4
  br label %64

63:                                               ; preds = %50, %26
  ret void

64:                                               ; preds = %.loopexit47, %.loopexit
  %.pn29.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn29.pn.pn.pn.pn38, %.loopexit ], [ %.pn.pn.pn42, %.loopexit47 ]
  resume { ptr, i32 } %.pn29.pn.pn.pn.pn.pn
}

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

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

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

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)"}


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