; LLVM IR from ShahjalalShohag/code-library :: Number Theory/Dirichlet Convolution.ll (ZN9Dirichlet5solveEx)

; 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.__gnu_pbds::gp_hash_table" = type { %"class.__gnu_pbds::basic_hash_table" }
%"class.__gnu_pbds::basic_hash_table" = type { %"class.__gnu_pbds::detail::gp_ht_map" }
%"class.__gnu_pbds::detail::gp_ht_map" = type { %"class.__gnu_pbds::hash_standard_resize_policy", %"class.__gnu_pbds::detail::ranged_probe_fn", [8 x i8], i64, i64, ptr }
%"class.__gnu_pbds::hash_standard_resize_policy" = type { %"class.__gnu_pbds::hash_load_check_resize_trigger.base", %"class.__gnu_pbds::hash_exponential_size_policy", i64 }
%"class.__gnu_pbds::hash_load_check_resize_trigger.base" = type <{ ptr, float, float, i64, i64, i8 }>
%"class.__gnu_pbds::hash_exponential_size_policy" = type { i64, i64 }
%"class.__gnu_pbds::detail::ranged_probe_fn" = type { %"class.__gnu_pbds::direct_mask_range_hashing" }
%"class.__gnu_pbds::direct_mask_range_hashing" = type { %"class.__gnu_pbds::detail::mask_based_range_hashing" }
%"class.__gnu_pbds::detail::mask_based_range_hashing" = type { i64 }
%struct.modint = type { i32 }
%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_iterator_" = type { ptr }
%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::iterator_" = type { %"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::const_iterator_" }
%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::const_iterator_" = type { %"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_const_iterator_", ptr, i64 }
%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_const_iterator_" = type { ptr }

@_ZN9Dirichlet2mpE = external dso_local global %"class.__gnu_pbds::gp_hash_table", align 8
@_ZN9Dirichlet2dpE = external dso_local global [10000009 x %struct.modint], align 16
@_ZN9Dirichlet3invE = external dso_local global %struct.modint, align 4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #1 align 2

; 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 uwtable
declare dso_local i32 @_ZN9Dirichlet3p_cEx(i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN9Dirichlet3p_gEx(i64 noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local i32 @_ZN9Dirichlet5solveEx(i64 noundef %0) #3 {
  %2 = alloca %struct.modint, align 4
  %3 = alloca i64, align 8
  %4 = alloca %"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_iterator_", align 8
  %5 = alloca %"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::iterator_", align 8
  %6 = alloca %struct.modint, align 4
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %struct.modint, align 4
  %10 = alloca %struct.modint, align 4
  %11 = alloca %struct.modint, align 4
  %12 = alloca %struct.modint, align 4
  %13 = alloca %struct.modint, align 4
  %14 = alloca %struct.modint, align 4
  %15 = alloca %struct.modint, align 4
  %16 = alloca %struct.modint, align 4
  %17 = alloca %struct.modint, align 4
  %18 = alloca %struct.modint, align 4
  store i64 %0, ptr %3, align 8, !tbaa !5
  %19 = load i64, ptr %3, align 8, !tbaa !5
  %20 = icmp slt i64 %19, 10000009
  br i1 %20, label %21, label %24

21:                                               ; preds = %1
  %22 = load i64, ptr %3, align 8, !tbaa !5
  %23 = getelementptr inbounds [10000009 x %struct.modint], ptr @_ZN9Dirichlet2dpE, i64 0, i64 %22
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %2, ptr align 4 %23, i64 4, i1 false), !tbaa.struct !9
  br label %79

24:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  call void @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEE4findERKx(ptr dead_on_unwind writable sret(%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_iterator_") align 8 %4, ptr noundef nonnull align 8 dereferenceable(104) @_ZN9Dirichlet2mpE, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #6
  call void @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEE3endEv(ptr dead_on_unwind writable sret(%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::iterator_") align 8 %5, ptr noundef nonnull align 8 dereferenceable(104) @_ZN9Dirichlet2mpE)
  %25 = call noundef zeroext i1 @_ZNK10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEE15point_iterator_neERKNSK_21point_const_iterator_E(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br i1 %25, label %26, label %28

26:                                               ; preds = %24
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEEixERKx(ptr noundef nonnull align 8 dereferenceable(104) @_ZN9Dirichlet2mpE, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %2, ptr align 4 %27, i64 4, i1 false), !tbaa.struct !9
  br label %79

28:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store i64 2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  br label %29

29:                                               ; preds = %63, %28
  %30 = load i64, ptr %7, align 8, !tbaa !5
  %31 = load i64, ptr %3, align 8, !tbaa !5
  %32 = icmp sle i64 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %66

34:                                               ; preds = %29
  %35 = load i64, ptr %3, align 8, !tbaa !5
  %36 = load i64, ptr %3, align 8, !tbaa !5
  %37 = load i64, ptr %7, align 8, !tbaa !5
  %38 = sdiv i64 %36, %37
  %39 = sdiv i64 %35, %38
  store i64 %39, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %40 = load i64, ptr %3, align 8, !tbaa !5
  %41 = load i64, ptr %7, align 8, !tbaa !5
  %42 = sdiv i64 %40, %41
  %43 = call i32 @_ZN9Dirichlet5solveEx(i64 noundef %42)
  %44 = getelementptr inbounds %struct.modint, ptr %10, i32 0, i32 0
  store i32 %43, ptr %44, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %45 = load i64, ptr %8, align 8, !tbaa !5
  %46 = call i32 @_ZN9Dirichlet3p_gEx(i64 noundef %45)
  %47 = getelementptr inbounds %struct.modint, ptr %12, i32 0, i32 0
  store i32 %46, ptr %47, align 4
  %48 = load i64, ptr %7, align 8, !tbaa !5
  %49 = sub nsw i64 %48, 1
  %50 = call i32 @_ZN9Dirichlet3p_gEx(i64 noundef %49)
  %51 = getelementptr inbounds %struct.modint, ptr %13, i32 0, i32 0
  store i32 %50, ptr %51, align 4
  %52 = getelementptr inbounds %struct.modint, ptr %13, i32 0, i32 0
  %53 = load i32, ptr %52, align 4
  %54 = call i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 %53)
  %55 = getelementptr inbounds %struct.modint, ptr %11, i32 0, i32 0
  store i32 %54, ptr %55, align 4
  %56 = getelementptr inbounds %struct.modint, ptr %11, i32 0, i32 0
  %57 = load i32, ptr %56, align 4
  %58 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %10, i32 %57)
  %59 = getelementptr inbounds %struct.modint, ptr %9, i32 0, i32 0
  store i32 %58, ptr %59, align 4
  %60 = getelementptr inbounds %struct.modint, ptr %9, i32 0, i32 0
  %61 = load i32, ptr %60, align 4
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 %61)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %63

63:                                               ; preds = %34
  %64 = load i64, ptr %8, align 8, !tbaa !5
  %65 = add nsw i64 %64, 1
  store i64 %65, ptr %7, align 8, !tbaa !5
  br label %29, !llvm.loop !12

66:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  %67 = load i64, ptr %3, align 8, !tbaa !5
  %68 = call i32 @_ZN9Dirichlet3p_cEx(i64 noundef %67)
  %69 = getelementptr inbounds %struct.modint, ptr %15, i32 0, i32 0
  store i32 %68, ptr %69, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %6, i64 4, i1 false), !tbaa.struct !9
  %70 = getelementptr inbounds %struct.modint, ptr %16, i32 0, i32 0
  %71 = load i32, ptr %70, align 4
  %72 = call i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %15, i32 %71)
  %73 = getelementptr inbounds %struct.modint, ptr %14, i32 0, i32 0
  store i32 %72, ptr %73, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %6, ptr align 4 %14, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 @_ZN9Dirichlet3invE, i64 4, i1 false), !tbaa.struct !9
  %74 = getelementptr inbounds %struct.modint, ptr %17, i32 0, i32 0
  %75 = load i32, ptr %74, align 4
  %76 = call i32 @_ZN6modintILi998244353EEdVES0_(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 %75)
  %77 = getelementptr inbounds %struct.modint, ptr %18, i32 0, i32 0
  store i32 %76, ptr %77, align 4
  %78 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEEixERKx(ptr noundef nonnull align 8 dereferenceable(104) @_ZN9Dirichlet2mpE, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %78, ptr align 4 %6, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %2, ptr align 4 %78, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %79

79:                                               ; preds = %66, %26, %21
  %80 = getelementptr inbounds %struct.modint, ptr %2, i32 0, i32 0
  %81 = load i32, ptr %80, align 4
  ret i32 %81
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEE4findERKx(ptr dead_on_unwind noalias writable sret(%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_iterator_") align 8, ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEE3endEv(ptr dead_on_unwind noalias writable sret(%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::iterator_") align 8, ptr noundef nonnull align 8 dereferenceable(104)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEEixERKx(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN6modintILi998244353EEdVES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) #4 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; 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.__gnu_pbds::gp_hash_table" = type { %"class.__gnu_pbds::basic_hash_table" }
%"class.__gnu_pbds::basic_hash_table" = type { %"class.__gnu_pbds::detail::gp_ht_map" }
%"class.__gnu_pbds::detail::gp_ht_map" = type { %"class.__gnu_pbds::hash_standard_resize_policy", %"class.__gnu_pbds::detail::ranged_probe_fn", [8 x i8], i64, i64, ptr }
%"class.__gnu_pbds::hash_standard_resize_policy" = type { %"class.__gnu_pbds::hash_load_check_resize_trigger.base", %"class.__gnu_pbds::hash_exponential_size_policy", i64 }
%"class.__gnu_pbds::hash_load_check_resize_trigger.base" = type <{ ptr, float, float, i64, i64, i8 }>
%"class.__gnu_pbds::hash_exponential_size_policy" = type { i64, i64 }
%"class.__gnu_pbds::detail::ranged_probe_fn" = type { %"class.__gnu_pbds::direct_mask_range_hashing" }
%"class.__gnu_pbds::direct_mask_range_hashing" = type { %"class.__gnu_pbds::detail::mask_based_range_hashing" }
%"class.__gnu_pbds::detail::mask_based_range_hashing" = type { i64 }
%struct.modint = type { i32 }
%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_iterator_" = type { ptr }
%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::iterator_" = type { %"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::const_iterator_" }
%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::const_iterator_" = type { %"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_const_iterator_", ptr, i64 }
%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_const_iterator_" = type { ptr }

@_ZN9Dirichlet2mpE = external dso_local global %"class.__gnu_pbds::gp_hash_table", align 8
@_ZN9Dirichlet2dpE = external dso_local local_unnamed_addr global [10000009 x %struct.modint], align 16
@_ZN9Dirichlet3invE = external dso_local local_unnamed_addr global %struct.modint, align 4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN9Dirichlet3p_cEx(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN9Dirichlet3p_gEx(i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local i32 @_ZN9Dirichlet5solveEx(i64 noundef %0) local_unnamed_addr #2 {
  %2 = alloca i64, align 8
  %3 = alloca %"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_iterator_", align 8
  %4 = alloca %"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::iterator_", align 8
  %5 = alloca %struct.modint, align 4
  %6 = alloca %struct.modint, align 4
  %7 = alloca %struct.modint, align 4
  %8 = alloca %struct.modint, align 4
  store i64 %0, ptr %2, align 8, !tbaa !5
  %9 = icmp slt i64 %0, 10000009
  br i1 %9, label %10, label %12

10:                                               ; preds = %1
  %11 = getelementptr inbounds [10000009 x %struct.modint], ptr @_ZN9Dirichlet2dpE, i64 0, i64 %0
  %.sroa.012.0.copyload = load i32, ptr %11, align 4, !tbaa !9
  br label %36

12:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEE4findERKx(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_iterator_") align 8 %3, ptr noundef nonnull align 8 dereferenceable(104) @_ZN9Dirichlet2mpE, ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::iterator_") align 8 %4, ptr noundef nonnull align 8 dereferenceable(104) @_ZN9Dirichlet2mpE)
  %13 = call noundef zeroext i1 @_ZNK10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEE15point_iterator_neERKNSK_21point_const_iterator_E(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br i1 %13, label %14, label %16

14:                                               ; preds = %12
  %15 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEEixERKx(ptr noundef nonnull align 8 dereferenceable(104) @_ZN9Dirichlet2mpE, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.sroa.012.0.copyload13 = load i32, ptr %15, align 4, !tbaa !9
  br label %36

16:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  call void @_ZN6modintILi998244353EEC2Ei(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 noundef 0)
  %17 = load i64, ptr %2, align 8, !tbaa !5
  %.not17 = icmp slt i64 %17, 2
  br i1 %.not17, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %16
  %.lcssa = phi i64 [ %17, %16 ], [ %35, %.lr.ph ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %18 = call i32 @_ZN9Dirichlet3p_cEx(i64 noundef %.lcssa)
  store i32 %18, ptr %8, align 4
  %.sroa.02.0.copyload = load i32, ptr %5, align 4, !tbaa !9
  %19 = call i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %8, i32 %.sroa.02.0.copyload)
  store i32 %19, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  %.sroa.01.0.copyload = load i32, ptr @_ZN9Dirichlet3invE, align 4, !tbaa !9
  %20 = call i32 @_ZN6modintILi998244353EEdVES0_(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 %.sroa.01.0.copyload)
  %21 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEEixERKx(ptr noundef nonnull align 8 dereferenceable(104) @_ZN9Dirichlet2mpE, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %22 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %22, ptr %21, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %36

.lr.ph:                                           ; preds = %16, %.lr.ph
  %23 = phi i64 [ %35, %.lr.ph ], [ %17, %16 ]
  %.018 = phi i64 [ %34, %.lr.ph ], [ 2, %16 ]
  %24 = udiv i64 %23, %.018
  %25 = sdiv i64 %23, %24
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %26 = sdiv i64 %23, %.018
  %27 = call i32 @_ZN9Dirichlet5solveEx(i64 noundef %26)
  store i32 %27, ptr %6, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  %28 = call i32 @_ZN9Dirichlet3p_gEx(i64 noundef %25)
  store i32 %28, ptr %7, align 4
  %29 = add nsw i64 %.018, -1
  %30 = call i32 @_ZN9Dirichlet3p_gEx(i64 noundef %29)
  %31 = call i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4) %7, i32 %30)
  %32 = call i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 %31)
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4) %5, i32 %32)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %34 = add nuw nsw i64 %25, 1
  %35 = load i64, ptr %2, align 8, !tbaa !5
  %.not.not = icmp slt i64 %25, %35
  br i1 %.not.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

36:                                               ; preds = %._crit_edge, %14, %10
  %.sroa.012.0 = phi i32 [ %.sroa.012.0.copyload, %10 ], [ %.sroa.012.0.copyload13, %14 ], [ %22, %._crit_edge ]
  ret i32 %.sroa.012.0
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEE4findERKx(ptr dead_on_unwind noalias writable sret(%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::point_iterator_") align 8, ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEE3endEv(ptr dead_on_unwind noalias writable sret(%"class.__gnu_pbds::detail::gp_ht_map<long long, modint<998244353>, std::tr1::hash<long long>, std::equal_to<long long>, std::allocator<char>, false, __gnu_pbds::direct_mask_range_hashing<>, __gnu_pbds::linear_probe_fn<>, __gnu_pbds::hash_standard_resize_policy<>>::iterator_") align 8, ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN10__gnu_pbds6detail9gp_ht_mapIx6modintILi998244353EENSt3tr14hashIxEESt8equal_toIxESaIcELb0ENS_25direct_mask_range_hashingImEENS_15linear_probe_fnImEENS_27hash_standard_resize_policyINS_28hash_exponential_size_policyImEENS_30hash_load_check_resize_triggerILb0EmEELb0EmEEEixERKx(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmlES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZNK6modintILi998244353EEmiES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN6modintILi998244353EEpLES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN6modintILi998244353EEdVES0_(ptr noundef nonnull align 4 dereferenceable(4), i32) local_unnamed_addr #3 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 #5 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass