; LLVM IR from kazunetakahashi/atcoder :: 2019/0727_ABC135/past/E2.ll (Z4calcv)

; 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<std::tuple<long long, long long>, std::allocator<std::tuple<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<long long, long long>, std::allocator<std::tuple<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<long long, long long>, std::allocator<std::tuple<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<long long, long long>, std::allocator<std::tuple<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"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 }
%"class.std::allocator" = type { i8 }

@K = external dso_local global i64, align 8
@X = external dso_local global i64, align 8
@Y = external dso_local global i64, align 8

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

33:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #3
  call void @_ZNSt5tupleIJxxEEC2IRxS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(8) @X, ptr noundef nonnull align 8 dereferenceable(8) @Y) #3
  %34 = getelementptr inbounds %"class.std::initializer_list", ptr %3, i32 0, i32 0
  store ptr %4, ptr %34, align 8, !tbaa !9
  %35 = getelementptr inbounds %"class.std::initializer_list", ptr %3, i32 0, i32 1
  store i64 1, ptr %35, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #3
  call void @_ZNSaISt5tupleIJxxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  %36 = getelementptr inbounds { ptr, i64 }, ptr %3, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8
  %38 = getelementptr inbounds { ptr, i64 }, ptr %3, i32 0, i32 1
  %39 = load i64, ptr %38, align 8
  invoke void @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %37, i64 %39, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %40 unwind label %41

40:                                               ; preds = %33
  call void @_ZNSt15__new_allocatorISt5tupleIJxxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #3
  br label %198

41:                                               ; preds = %33
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %6, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %7, align 4
  call void @_ZNSt15__new_allocatorISt5tupleIJxxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #3
  br label %199

45:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %46 = load i64, ptr @X, align 8, !tbaa !5
  %47 = load i64, ptr @Y, align 8, !tbaa !5
  %48 = add nsw i64 %46, %47
  %49 = load i64, ptr @K, align 8, !tbaa !5
  %50 = add nsw i64 %48, %49
  %51 = sub nsw i64 %50, 1
  %52 = load i64, ptr @K, align 8, !tbaa !5
  %53 = sdiv i64 %51, %52
  %54 = trunc i64 %53 to i32
  store i32 %54, ptr %8, align 4, !tbaa !14
  %55 = load i32, ptr %8, align 4, !tbaa !14
  %56 = icmp sle i32 %55, 1
  br i1 %56, label %57, label %60

57:                                               ; preds = %45
  %58 = load i32, ptr %8, align 4, !tbaa !14
  %59 = add nsw i32 %58, 1
  store i32 %59, ptr %8, align 4, !tbaa !14
  br label %60

60:                                               ; preds = %57, %45
  %61 = load i64, ptr @X, align 8, !tbaa !5
  %62 = load i64, ptr @Y, align 8, !tbaa !5
  %63 = add nsw i64 %61, %62
  %64 = srem i64 %63, 2
  %65 = load i32, ptr %8, align 4, !tbaa !14
  %66 = sext i32 %65 to i64
  %67 = load i64, ptr @K, align 8, !tbaa !5
  %68 = mul nsw i64 %66, %67
  %69 = srem i64 %68, 2
  %70 = icmp ne i64 %64, %69
  br i1 %70, label %71, label %74

71:                                               ; preds = %60
  %72 = load i32, ptr %8, align 4, !tbaa !14
  %73 = add nsw i32 %72, 1
  store i32 %73, ptr %8, align 4, !tbaa !14
  br label %74

74:                                               ; preds = %71, %60
  store i1 false, ptr %9, align 1
  %75 = load i32, ptr %8, align 4, !tbaa !14
  %76 = sext i32 %75 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  call void @_ZNSaISt5tupleIJxxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #3
  invoke void @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %76, ptr noundef nonnull align 1 dereferenceable(1) %10)
          to label %77 unwind label %109

77:                                               ; preds = %74
  call void @_ZNSt15__new_allocatorISt5tupleIJxxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  %78 = load i32, ptr %8, align 4, !tbaa !14
  %79 = icmp eq i32 %78, 3
  br i1 %79, label %80, label %113

80:                                               ; preds = %77
  %81 = load i64, ptr @X, align 8, !tbaa !5
  %82 = load i64, ptr @K, align 8, !tbaa !5
  %83 = icmp slt i64 %81, %82
  br i1 %83, label %84, label %113

84:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %85 = load i64, ptr @K, align 8, !tbaa !5
  %86 = load i64, ptr @X, align 8, !tbaa !5
  %87 = add nsw i64 %85, %86
  %88 = load i64, ptr @Y, align 8, !tbaa !5
  %89 = sub nsw i64 %87, %88
  %90 = sdiv i64 %89, 2
  store i64 %90, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %91 = load i64, ptr @K, align 8, !tbaa !5
  %92 = load i64, ptr @X, align 8, !tbaa !5
  %93 = sub nsw i64 %91, %92
  %94 = sub nsw i64 0, %93
  store i64 %94, ptr %13, align 8, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IRxxTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(8) @X, ptr noundef nonnull align 8 dereferenceable(8) %13) #3
  %95 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #3
  %96 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %95, ptr noundef nonnull align 8 dereferenceable(16) %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %97 = load i64, ptr @X, align 8, !tbaa !5
  %98 = load i64, ptr %11, align 8, !tbaa !5
  %99 = add nsw i64 %97, %98
  store i64 %99, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %100 = load i64, ptr @Y, align 8, !tbaa !5
  %101 = load i64, ptr @K, align 8, !tbaa !5
  %102 = load i64, ptr %11, align 8, !tbaa !5
  %103 = sub nsw i64 %101, %102
  %104 = sub nsw i64 %100, %103
  store i64 %104, ptr %16, align 8, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IxxTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #3
  %105 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #3
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %105, ptr noundef nonnull align 8 dereferenceable(16) %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #3
  call void @_ZNSt5tupleIJxxEEC2IRxS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) @X, ptr noundef nonnull align 8 dereferenceable(8) @Y) #3
  %107 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #3
  %108 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %107, ptr noundef nonnull align 8 dereferenceable(16) %17) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %194

109:                                              ; preds = %74
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %6, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %7, align 4
  call void @_ZNSt15__new_allocatorISt5tupleIJxxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %10) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %199

113:                                              ; preds = %80, %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %114 = load i64, ptr @K, align 8, !tbaa !5
  %115 = load i32, ptr %8, align 4, !tbaa !14
  %116 = sext i32 %115 to i64
  %117 = mul nsw i64 %114, %116
  %118 = load i64, ptr @X, align 8, !tbaa !5
  %119 = load i64, ptr @Y, align 8, !tbaa !5
  %120 = add nsw i64 %118, %119
  %121 = sub nsw i64 %117, %120
  %122 = sdiv i64 %121, 2
  %123 = trunc i64 %122 to i32
  store i32 %123, ptr %18, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  store i32 0, ptr %19, align 4, !tbaa !14
  br label %124

124:                                              ; preds = %190, %113
  %125 = load i32, ptr %19, align 4, !tbaa !14
  %126 = load i32, ptr %8, align 4, !tbaa !14
  %127 = icmp slt i32 %125, %126
  br i1 %127, label %129, label %128

128:                                              ; preds = %124
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  br label %193

129:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %130 = load i32, ptr %19, align 4, !tbaa !14
  %131 = add nsw i32 %130, 1
  %132 = sext i32 %131 to i64
  %133 = load i64, ptr @K, align 8, !tbaa !5
  %134 = mul nsw i64 %132, %133
  %135 = trunc i64 %134 to i32
  store i32 %135, ptr %20, align 4, !tbaa !14
  %136 = load i32, ptr %20, align 4, !tbaa !14
  %137 = sext i32 %136 to i64
  %138 = load i64, ptr @Y, align 8, !tbaa !5
  %139 = load i32, ptr %18, align 4, !tbaa !14
  %140 = sext i32 %139 to i64
  %141 = add nsw i64 %138, %140
  %142 = icmp sle i64 %137, %141
  br i1 %142, label %143, label %148

143:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  store i32 0, ptr %22, align 4, !tbaa !14
  call void @_ZNSt5tupleIJxxEEC2IiRiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %20) #3
  %144 = load i32, ptr %19, align 4, !tbaa !14
  %145 = sext i32 %144 to i64
  %146 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %145) #3
  %147 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %146, ptr noundef nonnull align 8 dereferenceable(16) %21) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #3
  br label %189

148:                                              ; preds = %129
  %149 = load i32, ptr %20, align 4, !tbaa !14
  %150 = sext i32 %149 to i64
  %151 = load i64, ptr @Y, align 8, !tbaa !5
  %152 = load i32, ptr %18, align 4, !tbaa !14
  %153 = sext i32 %152 to i64
  %154 = add nsw i64 %151, %153
  %155 = load i64, ptr @X, align 8, !tbaa !5
  %156 = add nsw i64 %154, %155
  %157 = icmp sle i64 %150, %156
  br i1 %157, label %158, label %174

158:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %159 = load i32, ptr %20, align 4, !tbaa !14
  %160 = sext i32 %159 to i64
  %161 = load i64, ptr @Y, align 8, !tbaa !5
  %162 = sub nsw i64 %160, %161
  %163 = load i32, ptr %18, align 4, !tbaa !14
  %164 = sext i32 %163 to i64
  %165 = sub nsw i64 %162, %164
  store i64 %165, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  %166 = load i64, ptr @Y, align 8, !tbaa !5
  %167 = load i32, ptr %18, align 4, !tbaa !14
  %168 = sext i32 %167 to i64
  %169 = add nsw i64 %166, %168
  store i64 %169, ptr %25, align 8, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IxxTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %23, ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(8) %25) #3
  %170 = load i32, ptr %19, align 4, !tbaa !14
  %171 = sext i32 %170 to i64
  %172 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %171) #3
  %173 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %172, ptr noundef nonnull align 8 dereferenceable(16) %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #3
  br label %188

174:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  %175 = load i64, ptr @Y, align 8, !tbaa !5
  %176 = load i32, ptr %8, align 4, !tbaa !14
  %177 = load i32, ptr %19, align 4, !tbaa !14
  %178 = add nsw i32 %177, 1
  %179 = sub nsw i32 %176, %178
  %180 = sext i32 %179 to i64
  %181 = load i64, ptr @K, align 8, !tbaa !5
  %182 = mul nsw i64 %180, %181
  %183 = add nsw i64 %175, %182
  store i64 %183, ptr %27, align 8, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IRxxTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(8) @X, ptr noundef nonnull align 8 dereferenceable(8) %27) #3
  %184 = load i32, ptr %19, align 4, !tbaa !14
  %185 = sext i32 %184 to i64
  %186 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %185) #3
  %187 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %186, ptr noundef nonnull align 8 dereferenceable(16) %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #3
  br label %188

188:                                              ; preds = %174, %158
  br label %189

189:                                              ; preds = %188, %143
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr %19, align 4, !tbaa !14
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %19, align 4, !tbaa !14
  br label %124, !llvm.loop !16

193:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  br label %194

194:                                              ; preds = %193, %84
  store i1 true, ptr %9, align 1
  %195 = load i1, ptr %9, align 1
  br i1 %195, label %197, label %196

196:                                              ; preds = %194
  call void @_ZNSt6vectorISt5tupleIJxxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  br label %197

197:                                              ; preds = %196, %194
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  br label %198

198:                                              ; preds = %197, %40
  ret void

199:                                              ; preds = %109, %41
  %200 = load ptr, ptr %6, align 8
  %201 = load i32, ptr %7, align 4
  %202 = insertvalue { ptr, i32 } poison, ptr %200, 0
  %203 = insertvalue { ptr, i32 } %202, i32 %201, 1
  resume { ptr, i32 } %203
}

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

; 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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(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 uwtable
declare dso_local void @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxEEC2IRxxTnNSt9enable_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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxEEC2IxxTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxEEC2IiRiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(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 void @_ZNSt6vectorISt5tupleIJxxEESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorISt5tupleIJxxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSSt16initializer_listISt5tupleIJxxEEE", !11, i64 0, !12, i64 8}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!10, !12, i64 8}
!14 = !{!15, !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"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.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::tuple<long long, long long>, std::allocator<std::tuple<long long, long long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::tuple<long long, long long>, std::allocator<std::tuple<long long, long long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::tuple<long long, long long>, std::allocator<std::tuple<long long, long long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::tuple<long long, long long>, std::allocator<std::tuple<long long, long long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 }
%"class.std::allocator" = type { i8 }

@K = external dso_local local_unnamed_addr global i64, align 8
@X = external dso_local global i64, align 8
@Y = external dso_local global i64, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_Z4calcv(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca [1 x %"class.std::tuple"], align 8
  %3 = alloca %"class.std::allocator", align 1
  %4 = alloca %"class.std::allocator", align 1
  %5 = alloca %"class.std::tuple", align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::tuple", align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca %"class.std::tuple", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::tuple", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::tuple", align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca %"class.std::tuple", align 8
  %18 = alloca i64, align 8
  %19 = load i64, ptr @X, align 8, !tbaa !5
  %20 = load i64, ptr @Y, align 8, !tbaa !5
  %21 = add nsw i64 %20, %19
  %22 = load i64, ptr @K, align 8, !tbaa !5
  %23 = icmp eq i64 %21, %22
  br i1 %23, label %24, label %28

24:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #3
  call void @_ZNSt5tupleIJxxEEC2IRxS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(8) @X, ptr noundef nonnull align 8 dereferenceable(8) @Y) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #3
  call void @_ZNSaISt5tupleIJxxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  invoke void @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr nonnull %2, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %3)
          to label %25 unwind label %26

25:                                               ; preds = %24
  call void @_ZNSt15__new_allocatorISt5tupleIJxxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #3
  br label %.loopexit

26:                                               ; preds = %24
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt5tupleIJxxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #3
  br label %100

28:                                               ; preds = %1
  %29 = add i64 %22, -1
  %30 = add i64 %29, %21
  %31 = sdiv i64 %30, %22
  %32 = trunc i64 %31 to i32
  %33 = icmp slt i32 %32, 2
  %34 = zext i1 %33 to i32
  %spec.select = add i32 %34, %32
  %35 = srem i64 %21, 2
  %36 = sext i32 %spec.select to i64
  %37 = mul nsw i64 %22, %36
  %38 = srem i64 %37, 2
  %.not = icmp ne i64 %35, %38
  %39 = zext i1 %.not to i32
  %.1 = add i32 %spec.select, %39
  %40 = sext i32 %.1 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #3
  call void @_ZNSaISt5tupleIJxxEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  invoke void @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %40, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %41 unwind label %63

41:                                               ; preds = %28
  call void @_ZNSt15__new_allocatorISt5tupleIJxxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  %42 = icmp eq i32 %.1, 3
  br i1 %42, label %43, label %65

43:                                               ; preds = %41
  %44 = load i64, ptr @X, align 8, !tbaa !5
  %45 = load i64, ptr @K, align 8, !tbaa !5
  %46 = icmp slt i64 %44, %45
  br i1 %46, label %47, label %.lr.ph

47:                                               ; preds = %43
  %48 = add nsw i64 %45, %44
  %49 = load i64, ptr @Y, align 8, !tbaa !5
  %50 = sub i64 %48, %49
  %51 = sdiv i64 %50, 2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  %.neg = sub nsw i64 %44, %45
  store i64 %.neg, ptr %6, align 8, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IRxxTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(8) @X, ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 0) #3
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %52, ptr noundef nonnull align 8 dereferenceable(16) %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #3
  %54 = load i64, ptr @X, align 8, !tbaa !5
  %55 = add nsw i64 %54, %51
  store i64 %55, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  %56 = load i64, ptr @Y, align 8, !tbaa !5
  %57 = load i64, ptr @K, align 8, !tbaa !5
  %.neg37 = add i64 %56, %51
  %58 = sub i64 %.neg37, %57
  store i64 %58, ptr %9, align 8, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IxxTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #3
  %59 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 1) #3
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %59, ptr noundef nonnull align 8 dereferenceable(16) %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #3
  call void @_ZNSt5tupleIJxxEEC2IRxS2_TnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(8) @X, ptr noundef nonnull align 8 dereferenceable(8) @Y) #3
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef 2) #3
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 8 dereferenceable(16) %10) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #3
  br label %.loopexit

63:                                               ; preds = %28
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorISt5tupleIJxxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #3
  br label %100

65:                                               ; preds = %41
  %66 = icmp sgt i32 %.1, 0
  br i1 %66, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %43, %65
  %67 = load i64, ptr @K, align 8, !tbaa !5
  %68 = mul nsw i64 %67, %40
  %69 = load i64, ptr @X, align 8, !tbaa !5
  %70 = load i64, ptr @Y, align 8, !tbaa !5
  %71 = add i64 %69, %70
  %72 = sub i64 %68, %71
  %73 = sdiv i64 %72, 2
  %sext = shl i64 %73, 32
  %74 = ashr exact i64 %sext, 32
  %wide.trip.count = zext nneg i32 %.1 to i64
  br label %75

75:                                               ; preds = %.lr.ph, %99
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %99 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %76 = load i64, ptr @K, align 8, !tbaa !5
  %77 = trunc i64 %76 to i32
  %78 = trunc nuw nsw i64 %indvars.iv.next to i32
  %79 = mul i32 %78, %77
  store i32 %79, ptr %11, align 4, !tbaa !9
  %80 = sext i32 %79 to i64
  %81 = load i64, ptr @Y, align 8, !tbaa !5
  %82 = add nsw i64 %81, %74
  %.not35 = icmp slt i64 %82, %80
  br i1 %.not35, label %86, label %83

83:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #3
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @_ZNSt5tupleIJxxEEC2IiRiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %11) #3
  %84 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #3
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %84, ptr noundef nonnull align 8 dereferenceable(16) %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #3
  br label %99

86:                                               ; preds = %75
  %87 = load i64, ptr @X, align 8, !tbaa !5
  %88 = add nsw i64 %87, %82
  %.not36 = icmp slt i64 %88, %80
  br i1 %.not36, label %93, label %89

89:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #3
  %90 = sub i64 %80, %82
  store i64 %90, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #3
  store i64 %82, ptr %16, align 8, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IxxTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #3
  %91 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #3
  %92 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %91, ptr noundef nonnull align 8 dereferenceable(16) %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #3
  br label %99

93:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #3
  %94 = sub nsw i64 %40, %indvars.iv.next
  %95 = mul nsw i64 %76, %94
  %96 = add nsw i64 %81, %95
  store i64 %96, ptr %18, align 8, !tbaa !5
  call void @_ZNSt5tupleIJxxEEC2IRxxTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(8) @X, ptr noundef nonnull align 8 dereferenceable(8) %18) #3
  %97 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #3
  %98 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJxxEEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %97, ptr noundef nonnull align 8 dereferenceable(16) %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #3
  br label %99

99:                                               ; preds = %89, %93, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #3
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %75, !llvm.loop !11

.loopexit:                                        ; preds = %99, %65, %47, %25
  ret void

100:                                              ; preds = %63, %26
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %64, %63 ]
  resume { ptr, i32 } %.pn
}

; 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 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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(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 uwtable
declare dso_local void @_ZNSt6vectorISt5tupleIJxxEESaIS1_EEC2EmRKS2_(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxEEC2IRxxTnNSt9enable_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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxEEC2IxxTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS3_T0_EEEbE4typeELb1EEEOS3_OS4_(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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5tupleIJxxEEC2IiRiTnNSt9enable_ifIXclsr4_TCCIXntcl14__is_alloc_argIT_EEEEE29__is_implicitly_constructibleIS4_T0_EEEbE4typeELb1EEEOS4_OS5_(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 void @_ZNSt15__new_allocatorISt5tupleIJxxEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = !{!"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,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass