; LLVM IR from kazunetakahashi/atcoder :: 2018/0714_AGC026/D2.ll (Z4funciix)

; 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::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i64 }
%"struct.std::_Head_base.1" = type { i64 }

@H = external dso_local global [110 x i64], align 16

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5powerxx(i64 noundef, i64 noundef) #0

; 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 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 i32 @_Z5h_indii(i32 noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4funciix(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8 %0, i32 noundef %1, i32 noundef %2, i64 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %"class.std::tuple", align 8
  %17 = alloca %"class.std::tuple", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca %"class.std::tuple", align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  store ptr %0, ptr %5, align 8
  store i32 %1, ptr %6, align 4, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !5
  store i64 %3, ptr %8, align 8, !tbaa !9
  %29 = load i32, ptr %6, align 4, !tbaa !5
  %30 = load i32, ptr %7, align 4, !tbaa !5
  %31 = icmp eq i32 %29, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 1, ptr %10, align 4, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %115

33:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %34 = load i32, ptr %6, align 4, !tbaa !5
  %35 = load i32, ptr %7, align 4, !tbaa !5
  %36 = call noundef i32 @_Z5h_indii(i32 noundef %34, i32 noundef %35)
  store i32 %36, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %37 = load i32, ptr %11, align 4, !tbaa !5
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds [110 x i64], ptr @H, i64 0, i64 %38
  %40 = load i64, ptr %39, align 8, !tbaa !9
  %41 = load i64, ptr %8, align 8, !tbaa !9
  %42 = sub nsw i64 %40, %41
  store i64 %42, ptr %12, align 8, !tbaa !9
  %43 = load i32, ptr %6, align 4, !tbaa !5
  %44 = add nsw i32 %43, 1
  %45 = load i32, ptr %7, align 4, !tbaa !5
  %46 = icmp eq i32 %44, %45
  br i1 %46, label %47, label %51

47:                                               ; preds = %33
  %48 = load i64, ptr %12, align 8, !tbaa !9
  %49 = icmp eq i64 %48, 1
  br i1 %49, label %50, label %51

50:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 2, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 1, ptr %14, align 4, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  store i32 1, ptr %15, align 4
  br label %114

51:                                               ; preds = %47, %33
  %52 = load i64, ptr %12, align 8, !tbaa !9
  %53 = icmp eq i64 %52, 1
  br i1 %53, label %54, label %80

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #3
  %55 = load i32, ptr %6, align 4, !tbaa !5
  %56 = load i32, ptr %11, align 4, !tbaa !5
  %57 = load i64, ptr %8, align 8, !tbaa !9
  call void @_Z4funciix(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %16, i32 noundef %55, i32 noundef %56, i64 noundef %57)
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #3
  %58 = load i32, ptr %11, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  %60 = load i32, ptr %7, align 4, !tbaa !5
  %61 = load i64, ptr %8, align 8, !tbaa !9
  call void @_Z4funciix(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %17, i32 noundef %59, i32 noundef %60, i64 noundef %61)
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %62 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %16) #3
  %63 = load i64, ptr %62, align 8, !tbaa !9
  store i64 %63, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %64 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %16) #3
  %65 = load i64, ptr %64, align 8, !tbaa !9
  store i64 %65, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %17) #3
  %67 = load i64, ptr %66, align 8, !tbaa !9
  store i64 %67, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %17) #3
  %69 = load i64, ptr %68, align 8, !tbaa !9
  store i64 %69, ptr %21, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %70 = load i64, ptr %18, align 8, !tbaa !9
  %71 = mul nsw i64 2, %70
  %72 = srem i64 %71, 1000000007
  %73 = load i64, ptr %20, align 8, !tbaa !9
  %74 = mul nsw i64 %72, %73
  %75 = srem i64 %74, 1000000007
  store i64 %75, ptr %22, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %76 = load i64, ptr %19, align 8, !tbaa !9
  %77 = load i64, ptr %21, align 8, !tbaa !9
  %78 = mul nsw i64 %76, %77
  %79 = srem i64 %78, 1000000007
  store i64 %79, ptr %23, align 8, !tbaa !9
  call void @_ZNSt5tupleIJxxEEC2IRxS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 8 dereferenceable(8) %23) #3
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #3
  br label %114

80:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #3
  %81 = load i32, ptr %6, align 4, !tbaa !5
  %82 = load i32, ptr %7, align 4, !tbaa !5
  %83 = load i64, ptr %8, align 8, !tbaa !9
  %84 = load i64, ptr %12, align 8, !tbaa !9
  %85 = add nsw i64 %83, %84
  %86 = sub nsw i64 %85, 1
  call void @_Z4funciix(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %24, i32 noundef %81, i32 noundef %82, i64 noundef %86)
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  %87 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %24) #3
  %88 = load i64, ptr %87, align 8, !tbaa !9
  store i64 %88, ptr %25, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %24) #3
  %90 = load i64, ptr %89, align 8, !tbaa !9
  store i64 %90, ptr %26, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  %91 = load i64, ptr %25, align 8, !tbaa !9
  store i64 %91, ptr %27, align 8, !tbaa !9
  %92 = load i64, ptr %26, align 8, !tbaa !9
  %93 = sub nsw i64 1000000007, %92
  %94 = mul nsw i64 2, %93
  %95 = load i64, ptr %27, align 8, !tbaa !9
  %96 = add nsw i64 %95, %94
  store i64 %96, ptr %27, align 8, !tbaa !9
  %97 = load i64, ptr %27, align 8, !tbaa !9
  %98 = srem i64 %97, 1000000007
  store i64 %98, ptr %27, align 8, !tbaa !9
  %99 = load i64, ptr %12, align 8, !tbaa !9
  %100 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %99)
  %101 = load i64, ptr %26, align 8, !tbaa !9
  %102 = mul nsw i64 %100, %101
  %103 = srem i64 %102, 1000000007
  %104 = load i64, ptr %27, align 8, !tbaa !9
  %105 = add nsw i64 %104, %103
  store i64 %105, ptr %27, align 8, !tbaa !9
  %106 = load i64, ptr %27, align 8, !tbaa !9
  %107 = srem i64 %106, 1000000007
  store i64 %107, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  %108 = load i64, ptr %12, align 8, !tbaa !9
  %109 = sub nsw i64 %108, 1
  %110 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %109)
  %111 = load i64, ptr %26, align 8, !tbaa !9
  %112 = mul nsw i64 %110, %111
  %113 = srem i64 %112, 1000000007
  store i64 %113, ptr %28, align 8, !tbaa !9
  call void @_ZNSt5tupleIJxxEEC2IRxS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #3
  store i32 1, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #3
  br label %114

114:                                              ; preds = %80, %54, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  br label %115

115:                                              ; preds = %114, %32
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxEEC2IRxS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 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 = { 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 = { nounwind }

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

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


; 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::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.0", %"struct.std::_Head_base.1" }
%"struct.std::_Tuple_impl.0" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i64 }
%"struct.std::_Head_base.1" = type { i64 }

@H = external dso_local local_unnamed_addr global [110 x i64], align 16

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_Z5powerxx(i64 noundef, i64 noundef) local_unnamed_addr #0

; 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 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 i32 @_Z5h_indii(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4funciix(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8 %0, i32 noundef %1, i32 noundef %2, i64 noundef %3) local_unnamed_addr #0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::tuple", align 8
  %10 = alloca %"class.std::tuple", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca %"class.std::tuple", align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = icmp eq i32 %1, %2
  br i1 %16, label %17, label %18

17:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  store i32 1, ptr %5, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #3
  store i32 1, ptr %6, align 4, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  br label %63

18:                                               ; preds = %4
  %19 = tail call noundef i32 @_Z5h_indii(i32 noundef %1, i32 noundef %2)
  %20 = sext i32 %19 to i64
  %21 = getelementptr inbounds [110 x i64], ptr @H, i64 0, i64 %20
  %22 = load i64, ptr %21, align 8, !tbaa !9
  %23 = sub nsw i64 %22, %3
  %24 = add nsw i32 %1, 1
  %25 = icmp eq i32 %24, %2
  %26 = icmp eq i64 %23, 1
  %or.cond = select i1 %25, i1 %26, i1 false
  br i1 %or.cond, label %27, label %28

27:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  store i32 2, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  store i32 1, ptr %8, align 4, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  br label %63

28:                                               ; preds = %18
  br i1 %26, label %29, label %45

29:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  call void @_Z4funciix(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %9, i32 noundef %1, i32 noundef %19, i64 noundef %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #3
  %30 = add nsw i32 %19, 1
  call void @_Z4funciix(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %10, i32 noundef %30, i32 noundef %2, i64 noundef %3)
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %9) #3
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %9) #3
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %10) #3
  %36 = load i64, ptr %35, align 8, !tbaa !9
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %10) #3
  %38 = load i64, ptr %37, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  %39 = shl nsw i64 %32, 1
  %40 = srem i64 %39, 1000000007
  %41 = mul nsw i64 %36, %40
  %42 = srem i64 %41, 1000000007
  store i64 %42, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #3
  %43 = mul nsw i64 %38, %34
  %44 = srem i64 %43, 1000000007
  store i64 %44, ptr %12, align 8, !tbaa !9
  call void @_ZNSt5tupleIJxxEEC2IRxS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  br label %63

45:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #3
  %46 = add nsw i64 %22, -1
  call void @_Z4funciix(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %13, i32 noundef %1, i32 noundef %2, i64 noundef %46)
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm0EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %13) #3
  %48 = load i64, ptr %47, align 8, !tbaa !9
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3getILm1EJxxEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS4_(ptr noundef nonnull align 8 dereferenceable(16) %13) #3
  %50 = load i64, ptr %49, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #3
  %reass.sub = add i64 %48, 2000000014
  %51 = shl i64 %50, 1
  %52 = sub i64 %reass.sub, %51
  %53 = srem i64 %52, 1000000007
  %54 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %23)
  %55 = mul nsw i64 %54, %50
  %56 = srem i64 %55, 1000000007
  %57 = add nsw i64 %56, %53
  %.lhs.trunc = trunc nsw i64 %57 to i32
  %58 = srem i32 %.lhs.trunc, 1000000007
  %.sext = sext i32 %58 to i64
  store i64 %.sext, ptr %14, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #3
  %59 = add nsw i64 %23, -1
  %60 = call noundef i64 @_Z5powerxx(i64 noundef 2, i64 noundef %59)
  %61 = mul nsw i64 %60, %50
  %62 = srem i64 %61, 1000000007
  store i64 %62, ptr %15, align 8, !tbaa !9
  call void @_ZNSt5tupleIJxxEEC2IRxS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #3
  br label %63

63:                                               ; preds = %27, %29, %45, %17
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxEEC2IiiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxEEC2IRxS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 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 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 = { nounwind }

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass