; LLVM IR from abeaumont/competitive-programming :: cses/1722.ll (Z3fibx)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator" = type { i8 }

@M = external dso_local global i64, align 8
@constinit = external hidden constant [4 x i64], align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3fibx(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, i64 noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"class.std::initializer_list", align 8
  %6 = alloca [4 x i64], align 8
  %7 = alloca %"class.std::allocator", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i1, align 1
  %11 = alloca %"class.std::initializer_list", align 8
  %12 = alloca [4 x i64], align 8
  %13 = alloca %"class.std::initializer_list", align 8
  %14 = alloca [4 x i64], align 8
  store ptr %0, ptr %3, align 8
  store i64 %1, ptr %4, align 8, !tbaa !5
  %15 = load i64, ptr %4, align 8, !tbaa !5
  %16 = icmp eq i64 %15, 1
  br i1 %16, label %17, label %29

17:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #4
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %6, ptr align 8 @constinit, i64 32, i1 false), !tbaa.struct !9
  %18 = getelementptr inbounds %"class.std::initializer_list", ptr %5, i32 0, i32 0
  store ptr %6, ptr %18, align 8, !tbaa !11
  %19 = getelementptr inbounds %"class.std::initializer_list", ptr %5, i32 0, i32 1
  store i64 4, ptr %19, align 8, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  %20 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8
  %22 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  %23 = load i64, ptr %22, align 8
  invoke void @_ZNSt6vectorIxSaIxEEC2ESt16initializer_listIxERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %21, i64 %23, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %24 unwind label %25

24:                                               ; preds = %17
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  br label %157

25:                                               ; preds = %17
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %8, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  br label %158

29:                                               ; preds = %2
  store i1 false, ptr %10, align 1
  %30 = load i64, ptr %4, align 8, !tbaa !5
  %31 = sdiv i64 %30, 2
  call void @_Z3fibx(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %0, i64 noundef %31)
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #4
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %33 = load i64, ptr %32, align 8, !tbaa !5
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %35 = load i64, ptr %34, align 8, !tbaa !5
  %36 = mul nsw i64 %33, %35
  %37 = load i64, ptr @M, align 8, !tbaa !5
  %38 = srem i64 %36, %37
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %40 = load i64, ptr %39, align 8, !tbaa !5
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #4
  %42 = load i64, ptr %41, align 8, !tbaa !5
  %43 = mul nsw i64 %40, %42
  %44 = load i64, ptr @M, align 8, !tbaa !5
  %45 = srem i64 %43, %44
  %46 = add nsw i64 %38, %45
  %47 = load i64, ptr @M, align 8, !tbaa !5
  %48 = srem i64 %46, %47
  store i64 %48, ptr %12, align 8, !tbaa !5
  %49 = getelementptr inbounds i64, ptr %12, i64 1
  %50 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %51 = load i64, ptr %50, align 8, !tbaa !5
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %53 = load i64, ptr %52, align 8, !tbaa !5
  %54 = mul nsw i64 %51, %53
  %55 = load i64, ptr @M, align 8, !tbaa !5
  %56 = srem i64 %54, %55
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %58 = load i64, ptr %57, align 8, !tbaa !5
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %60 = load i64, ptr %59, align 8, !tbaa !5
  %61 = mul nsw i64 %58, %60
  %62 = load i64, ptr @M, align 8, !tbaa !5
  %63 = srem i64 %61, %62
  %64 = add nsw i64 %56, %63
  %65 = load i64, ptr @M, align 8, !tbaa !5
  %66 = srem i64 %64, %65
  store i64 %66, ptr %49, align 8, !tbaa !5
  %67 = getelementptr inbounds i64, ptr %12, i64 2
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #4
  %69 = load i64, ptr %68, align 8, !tbaa !5
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %71 = load i64, ptr %70, align 8, !tbaa !5
  %72 = mul nsw i64 %69, %71
  %73 = load i64, ptr @M, align 8, !tbaa !5
  %74 = srem i64 %72, %73
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %76 = load i64, ptr %75, align 8, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #4
  %78 = load i64, ptr %77, align 8, !tbaa !5
  %79 = mul nsw i64 %76, %78
  %80 = load i64, ptr @M, align 8, !tbaa !5
  %81 = srem i64 %79, %80
  %82 = add nsw i64 %74, %81
  %83 = load i64, ptr @M, align 8, !tbaa !5
  %84 = srem i64 %82, %83
  store i64 %84, ptr %67, align 8, !tbaa !5
  %85 = getelementptr inbounds i64, ptr %12, i64 3
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #4
  %87 = load i64, ptr %86, align 8, !tbaa !5
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %89 = load i64, ptr %88, align 8, !tbaa !5
  %90 = mul nsw i64 %87, %89
  %91 = load i64, ptr @M, align 8, !tbaa !5
  %92 = srem i64 %90, %91
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %94 = load i64, ptr %93, align 8, !tbaa !5
  %95 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %96 = load i64, ptr %95, align 8, !tbaa !5
  %97 = mul nsw i64 %94, %96
  %98 = load i64, ptr @M, align 8, !tbaa !5
  %99 = srem i64 %97, %98
  %100 = add nsw i64 %92, %99
  %101 = load i64, ptr @M, align 8, !tbaa !5
  %102 = srem i64 %100, %101
  store i64 %102, ptr %85, align 8, !tbaa !5
  %103 = getelementptr inbounds %"class.std::initializer_list", ptr %11, i32 0, i32 0
  store ptr %12, ptr %103, align 8, !tbaa !11
  %104 = getelementptr inbounds %"class.std::initializer_list", ptr %11, i32 0, i32 1
  store i64 4, ptr %104, align 8, !tbaa !15
  %105 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8
  %107 = getelementptr inbounds { ptr, i64 }, ptr %11, i32 0, i32 1
  %108 = load i64, ptr %107, align 8
  %109 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIxSaIxEEaSESt16initializer_listIxE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %106, i64 %108)
          to label %110 unwind label %144

110:                                              ; preds = %29
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  %111 = load i64, ptr %4, align 8, !tbaa !5
  %112 = srem i64 %111, 2
  %113 = icmp ne i64 %112, 0
  br i1 %113, label %114, label %152

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #4
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %116 = load i64, ptr %115, align 8, !tbaa !5
  store i64 %116, ptr %14, align 8, !tbaa !5
  %117 = getelementptr inbounds i64, ptr %14, i64 1
  %118 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %119 = load i64, ptr %118, align 8, !tbaa !5
  %120 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %121 = load i64, ptr %120, align 8, !tbaa !5
  %122 = add nsw i64 %119, %121
  %123 = load i64, ptr @M, align 8, !tbaa !5
  %124 = srem i64 %122, %123
  store i64 %124, ptr %117, align 8, !tbaa !5
  %125 = getelementptr inbounds i64, ptr %14, i64 2
  %126 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %127 = load i64, ptr %126, align 8, !tbaa !5
  store i64 %127, ptr %125, align 8, !tbaa !5
  %128 = getelementptr inbounds i64, ptr %14, i64 3
  %129 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #4
  %130 = load i64, ptr %129, align 8, !tbaa !5
  %131 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %132 = load i64, ptr %131, align 8, !tbaa !5
  %133 = add nsw i64 %130, %132
  %134 = load i64, ptr @M, align 8, !tbaa !5
  %135 = srem i64 %133, %134
  store i64 %135, ptr %128, align 8, !tbaa !5
  %136 = getelementptr inbounds %"class.std::initializer_list", ptr %13, i32 0, i32 0
  store ptr %14, ptr %136, align 8, !tbaa !11
  %137 = getelementptr inbounds %"class.std::initializer_list", ptr %13, i32 0, i32 1
  store i64 4, ptr %137, align 8, !tbaa !15
  %138 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8
  %140 = getelementptr inbounds { ptr, i64 }, ptr %13, i32 0, i32 1
  %141 = load i64, ptr %140, align 8
  %142 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIxSaIxEEaSESt16initializer_listIxE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %139, i64 %141)
          to label %143 unwind label %148

143:                                              ; preds = %114
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #4
  br label %152

144:                                              ; preds = %29
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %8, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br label %156

148:                                              ; preds = %114
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %8, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #4
  br label %156

152:                                              ; preds = %143, %110
  store i1 true, ptr %10, align 1
  %153 = load i1, ptr %10, align 1
  br i1 %153, label %155, label %154

154:                                              ; preds = %152
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %155

155:                                              ; preds = %154, %152
  br label %157

156:                                              ; preds = %148, %144
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %158

157:                                              ; preds = %155, %24
  ret void

158:                                              ; preds = %156, %25
  %159 = load ptr, ptr %8, align 8
  %160 = load i32, ptr %9, align 4
  %161 = insertvalue { ptr, i32 } poison, ptr %159, 0
  %162 = insertvalue { ptr, i32 } %161, i32 %160, 1
  resume { ptr, i32 } %162
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{i64 0, i64 32, !10}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSSt16initializer_listIxE", !13, i64 0, !14, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!12, !14, i64 8}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

@M = external dso_local local_unnamed_addr global i64, align 8
@constinit = external hidden local_unnamed_addr constant [4 x i64], align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z3fibx(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, i64 noundef %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca [4 x i64], align 8
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca [4 x i64], align 8
  %6 = alloca [4 x i64], align 8
  %7 = icmp eq i64 %1, 1
  br i1 %7, label %8, label %12

8:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull align 8 dereferenceable(32) @constinit, i64 32, i1 false), !tbaa.struct !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  call void @_ZNSaIxEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt6vectorIxSaIxEEC2ESt16initializer_listIxERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr nonnull %3, i64 4, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %9 unwind label %10

9:                                                ; preds = %8
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  br label %113

10:                                               ; preds = %8
  %11 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIxED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  br label %114

12:                                               ; preds = %2
  %13 = sdiv i64 %1, 2
  tail call void @_Z3fibx(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %0, i64 noundef %13)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %15 = load i64, ptr %14, align 8, !tbaa !9
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %17 = load i64, ptr %16, align 8, !tbaa !9
  %18 = mul nsw i64 %17, %15
  %19 = load i64, ptr @M, align 8, !tbaa !9
  %20 = srem i64 %18, %19
  %21 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #4
  %24 = load i64, ptr %23, align 8, !tbaa !9
  %25 = mul nsw i64 %24, %22
  %26 = load i64, ptr @M, align 8, !tbaa !9
  %27 = srem i64 %25, %26
  %28 = add nsw i64 %27, %20
  %29 = srem i64 %28, %26
  store i64 %29, ptr %5, align 8, !tbaa !9
  %30 = getelementptr inbounds i8, ptr %5, i64 8
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = mul nsw i64 %34, %32
  %36 = load i64, ptr @M, align 8, !tbaa !9
  %37 = srem i64 %35, %36
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %39 = load i64, ptr %38, align 8, !tbaa !9
  %40 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %41 = load i64, ptr %40, align 8, !tbaa !9
  %42 = mul nsw i64 %41, %39
  %43 = load i64, ptr @M, align 8, !tbaa !9
  %44 = srem i64 %42, %43
  %45 = add nsw i64 %44, %37
  %46 = srem i64 %45, %43
  store i64 %46, ptr %30, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %5, i64 16
  %48 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #4
  %49 = load i64, ptr %48, align 8, !tbaa !9
  %50 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %51 = load i64, ptr %50, align 8, !tbaa !9
  %52 = mul nsw i64 %51, %49
  %53 = load i64, ptr @M, align 8, !tbaa !9
  %54 = srem i64 %52, %53
  %55 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %56 = load i64, ptr %55, align 8, !tbaa !9
  %57 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #4
  %58 = load i64, ptr %57, align 8, !tbaa !9
  %59 = mul nsw i64 %58, %56
  %60 = load i64, ptr @M, align 8, !tbaa !9
  %61 = srem i64 %59, %60
  %62 = add nsw i64 %61, %54
  %63 = srem i64 %62, %60
  store i64 %63, ptr %47, align 8, !tbaa !9
  %64 = getelementptr inbounds i8, ptr %5, i64 24
  %65 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #4
  %66 = load i64, ptr %65, align 8, !tbaa !9
  %67 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %68 = load i64, ptr %67, align 8, !tbaa !9
  %69 = mul nsw i64 %68, %66
  %70 = load i64, ptr @M, align 8, !tbaa !9
  %71 = srem i64 %69, %70
  %72 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %73 = load i64, ptr %72, align 8, !tbaa !9
  %74 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %75 = load i64, ptr %74, align 8, !tbaa !9
  %76 = mul nsw i64 %75, %73
  %77 = load i64, ptr @M, align 8, !tbaa !9
  %78 = srem i64 %76, %77
  %79 = add nsw i64 %78, %71
  %80 = srem i64 %79, %77
  store i64 %80, ptr %64, align 8, !tbaa !9
  %81 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIxSaIxEEaSESt16initializer_listIxE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr nonnull %5, i64 4)
          to label %82 unwind label %108

82:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  %83 = and i64 %1, 1
  %.not = icmp eq i64 %83, 0
  br i1 %.not, label %113, label %84

84:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %86 = load i64, ptr %85, align 8, !tbaa !9
  store i64 %86, ptr %6, align 8, !tbaa !9
  %87 = getelementptr inbounds i8, ptr %6, i64 8
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #4
  %89 = load i64, ptr %88, align 8, !tbaa !9
  %90 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #4
  %91 = load i64, ptr %90, align 8, !tbaa !9
  %92 = add nsw i64 %91, %89
  %93 = load i64, ptr @M, align 8, !tbaa !9
  %94 = srem i64 %92, %93
  store i64 %94, ptr %87, align 8, !tbaa !9
  %95 = getelementptr inbounds i8, ptr %6, i64 16
  %96 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %97 = load i64, ptr %96, align 8, !tbaa !9
  store i64 %97, ptr %95, align 8, !tbaa !9
  %98 = getelementptr inbounds i8, ptr %6, i64 24
  %99 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #4
  %100 = load i64, ptr %99, align 8, !tbaa !9
  %101 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIxSaIxEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 3) #4
  %102 = load i64, ptr %101, align 8, !tbaa !9
  %103 = add nsw i64 %102, %100
  %104 = load i64, ptr @M, align 8, !tbaa !9
  %105 = srem i64 %103, %104
  store i64 %105, ptr %98, align 8, !tbaa !9
  %106 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIxSaIxEEaSESt16initializer_listIxE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr nonnull %6, i64 4)
          to label %107 unwind label %110

107:                                              ; preds = %84
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br label %113

108:                                              ; preds = %12
  %109 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  br label %112

110:                                              ; preds = %84
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br label %112

112:                                              ; preds = %110, %108
  %.pn = phi { ptr, i32 } [ %111, %110 ], [ %109, %108 ]
  call void @_ZNSt6vectorIxSaIxEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  br label %114

113:                                              ; preds = %82, %107, %9
  ret void

114:                                              ; preds = %112, %10
  %.pn13 = phi { ptr, i32 } [ %11, %10 ], [ %.pn, %112 ]
  resume { ptr, i32 } %.pn13
}

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{i64 0, i64 32, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass