; LLVM IR from ShahjalalShohag/code-library :: Number Theory/Sum of The Number of Divisors in cbrt(n).ll (Z10sum_sigma0y)

; 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.anon = type { i64 }
%class.anon.0 = type { i64 }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { ptr }
%"struct.std::_Head_base.2" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef { i64, i64 } @_Z10sum_sigma0y(i64 noundef %0) #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca i128, align 16
  %3 = alloca i64, align 8
  %4 = alloca %class.anon, align 8
  %5 = alloca %class.anon.0, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i128, align 16
  %11 = alloca %"class.std::stack", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %"class.std::tuple", align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca %"class.std::tuple", align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  store i64 %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %27 = getelementptr inbounds %class.anon, ptr %4, i32 0, i32 0
  %28 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %28, ptr %27, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %29 = getelementptr inbounds %class.anon.0, ptr %5, i32 0, i32 0
  %30 = load i64, ptr %3, align 8, !tbaa !5
  store i64 %30, ptr %29, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %31 = load i64, ptr %3, align 8, !tbaa !5
  %32 = uitofp i64 %31 to x86_fp80
  %33 = call x86_fp80 @sqrtl(x86_fp80 noundef %32) #5
  %34 = fptoui x86_fp80 %33 to i64
  store i64 %34, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %35 = load i64, ptr %3, align 8, !tbaa !5
  %36 = call noundef double @_ZSt3powIydEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef %35, double noundef 3.400000e-01)
  %37 = fptoui double %36 to i64
  store i64 %37, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %38 = load i64, ptr %3, align 8, !tbaa !5
  %39 = load i64, ptr %6, align 8, !tbaa !5
  %40 = udiv i64 %38, %39
  store i64 %40, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %41 = load i64, ptr %3, align 8, !tbaa !5
  %42 = load i64, ptr %8, align 8, !tbaa !5
  %43 = udiv i64 %41, %42
  %44 = add i64 %43, 1
  %45 = trunc i64 %44 to i32
  store i32 %45, ptr %9, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  store i128 0, ptr %10, align 16, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 80, ptr %11) #5
  call void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  store i32 1, ptr %12, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !13
  %46 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE7emplaceIJiiEEEDcDpOT_(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 4 dereferenceable(4) %12, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %47 unwind label %90

47:                                               ; preds = %1
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 1, ptr %16, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 1, ptr %17, align 4, !tbaa !13
  %48 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE7emplaceIJiiEEEDcDpOT_(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 4 dereferenceable(4) %16, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %49 unwind label %94

49:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %50

50:                                               ; preds = %181, %49
  br label %51

51:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %52 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %53 unwind label %98

53:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #5
  call void @_ZSt3tieIJjjEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %20, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19) #5
  %54 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRjS0_EEaSIjjEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 4 dereferenceable(8) %52) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #5
  invoke void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %55 unwind label %98

55:                                               ; preds = %53
  br label %56

56:                                               ; preds = %66, %55
  %57 = load i64, ptr %8, align 8, !tbaa !5
  %58 = load i32, ptr %18, align 4, !tbaa !13
  %59 = zext i32 %58 to i64
  %60 = add i64 %57, %59
  %61 = load i32, ptr %9, align 4, !tbaa !13
  %62 = load i32, ptr %19, align 4, !tbaa !13
  %63 = sub i32 %61, %62
  %64 = invoke noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_0clEyj"(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %60, i32 noundef %63)
          to label %65 unwind label %98

65:                                               ; preds = %56
  br i1 %64, label %66, label %102

66:                                               ; preds = %65
  %67 = load i64, ptr %8, align 8, !tbaa !5
  %68 = load i32, ptr %19, align 4, !tbaa !13
  %69 = zext i32 %68 to i64
  %70 = mul i64 %67, %69
  %71 = load i32, ptr %19, align 4, !tbaa !13
  %72 = add i32 %71, 1
  %73 = zext i32 %72 to i64
  %74 = load i32, ptr %18, align 4, !tbaa !13
  %75 = sub i32 %74, 1
  %76 = zext i32 %75 to i64
  %77 = mul i64 %73, %76
  %78 = udiv i64 %77, 2
  %79 = add i64 %70, %78
  %80 = zext i64 %79 to i128
  %81 = load i128, ptr %10, align 16, !tbaa !15
  %82 = add i128 %81, %80
  store i128 %82, ptr %10, align 16, !tbaa !15
  %83 = load i32, ptr %18, align 4, !tbaa !13
  %84 = zext i32 %83 to i64
  %85 = load i64, ptr %8, align 8, !tbaa !5
  %86 = add i64 %85, %84
  store i64 %86, ptr %8, align 8, !tbaa !5
  %87 = load i32, ptr %19, align 4, !tbaa !13
  %88 = load i32, ptr %9, align 4, !tbaa !13
  %89 = sub i32 %88, %87
  store i32 %89, ptr %9, align 4, !tbaa !13
  br label %56, !llvm.loop !17

90:                                               ; preds = %1
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %14, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %210

94:                                               ; preds = %47
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %14, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %210

98:                                               ; preds = %56, %53, %51
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %14, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %15, align 4
  br label %183

102:                                              ; preds = %65
  %103 = load i32, ptr %9, align 4, !tbaa !13
  %104 = zext i32 %103 to i64
  %105 = load i64, ptr %7, align 8, !tbaa !5
  %106 = icmp ule i64 %104, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %102
  store i32 3, ptr %21, align 4
  br label %179

108:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %109 = load i32, ptr %18, align 4, !tbaa !13
  store i32 %109, ptr %22, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %110 = load i32, ptr %19, align 4, !tbaa !13
  store i32 %110, ptr %23, align 4, !tbaa !13
  br label %111

111:                                              ; preds = %133, %108
  br label %112

112:                                              ; preds = %111
  %113 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %114 unwind label %126

114:                                              ; preds = %112
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #5
  call void @_ZSt3tieIJjjEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind writable sret(%"class.std::tuple") align 8 %24, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19) #5
  %115 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRjS0_EEaSIjjEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(8) %113) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #5
  %116 = load i64, ptr %8, align 8, !tbaa !5
  %117 = load i32, ptr %18, align 4, !tbaa !13
  %118 = zext i32 %117 to i64
  %119 = add i64 %116, %118
  %120 = load i32, ptr %9, align 4, !tbaa !13
  %121 = load i32, ptr %19, align 4, !tbaa !13
  %122 = sub i32 %120, %121
  %123 = invoke noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_0clEyj"(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %119, i32 noundef %122)
          to label %124 unwind label %126

124:                                              ; preds = %114
  br i1 %123, label %125, label %130

125:                                              ; preds = %124
  br label %134

126:                                              ; preds = %130, %114, %112
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %14, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %15, align 4
  br label %182

130:                                              ; preds = %124
  %131 = load i32, ptr %18, align 4, !tbaa !13
  store i32 %131, ptr %22, align 4, !tbaa !13
  %132 = load i32, ptr %19, align 4, !tbaa !13
  store i32 %132, ptr %23, align 4, !tbaa !13
  invoke void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %11)
          to label %133 unwind label %126

133:                                              ; preds = %130
  br label %111, !llvm.loop !19

134:                                              ; preds = %125
  br label %135

135:                                              ; preds = %177, %134
  br label %136

136:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %137 = load i32, ptr %18, align 4, !tbaa !13
  %138 = load i32, ptr %22, align 4, !tbaa !13
  %139 = add i32 %137, %138
  store i32 %139, ptr %25, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %26) #5
  %140 = load i32, ptr %19, align 4, !tbaa !13
  %141 = load i32, ptr %23, align 4, !tbaa !13
  %142 = add i32 %140, %141
  store i32 %142, ptr %26, align 4, !tbaa !13
  %143 = load i64, ptr %8, align 8, !tbaa !5
  %144 = load i32, ptr %25, align 4, !tbaa !13
  %145 = zext i32 %144 to i64
  %146 = add i64 %143, %145
  %147 = load i32, ptr %9, align 4, !tbaa !13
  %148 = load i32, ptr %26, align 4, !tbaa !13
  %149 = sub i32 %147, %148
  %150 = invoke noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_0clEyj"(ptr noundef nonnull align 8 dereferenceable(8) %4, i64 noundef %146, i32 noundef %149)
          to label %151 unwind label %157

151:                                              ; preds = %136
  br i1 %150, label %152, label %161

152:                                              ; preds = %151
  %153 = load i32, ptr %25, align 4, !tbaa !13
  store i32 %153, ptr %18, align 4, !tbaa !13
  %154 = load i32, ptr %26, align 4, !tbaa !13
  store i32 %154, ptr %19, align 4, !tbaa !13
  %155 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE7emplaceIJRjS7_EEEDcDpOT_(ptr noundef nonnull align 8 dereferenceable(80) %11, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef nonnull align 4 dereferenceable(4) %19)
          to label %156 unwind label %157

156:                                              ; preds = %152
  br label %174

157:                                              ; preds = %161, %152, %136
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %14, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %182

161:                                              ; preds = %151
  %162 = load i64, ptr %8, align 8, !tbaa !5
  %163 = load i32, ptr %25, align 4, !tbaa !13
  %164 = zext i32 %163 to i64
  %165 = add i64 %162, %164
  %166 = load i32, ptr %18, align 4, !tbaa !13
  %167 = load i32, ptr %19, align 4, !tbaa !13
  %168 = invoke noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_1clEyjj"(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %165, i32 noundef %166, i32 noundef %167)
          to label %169 unwind label %157

169:                                              ; preds = %161
  br i1 %168, label %170, label %171

170:                                              ; preds = %169
  store i32 9, ptr %21, align 4
  br label %175

171:                                              ; preds = %169
  %172 = load i32, ptr %25, align 4, !tbaa !13
  store i32 %172, ptr %22, align 4, !tbaa !13
  %173 = load i32, ptr %26, align 4, !tbaa !13
  store i32 %173, ptr %23, align 4, !tbaa !13
  br label %174

174:                                              ; preds = %171, %156
  store i32 0, ptr %21, align 4
  br label %175

175:                                              ; preds = %174, %170
  call void @llvm.lifetime.end.p0(i64 4, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  %176 = load i32, ptr %21, align 4
  switch i32 %176, label %216 [
    i32 0, label %177
    i32 9, label %178
  ]

177:                                              ; preds = %175
  br label %135, !llvm.loop !20

178:                                              ; preds = %175
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  store i32 0, ptr %21, align 4
  br label %179

179:                                              ; preds = %178, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  %180 = load i32, ptr %21, align 4
  switch i32 %180, label %216 [
    i32 0, label %181
    i32 3, label %184
  ]

181:                                              ; preds = %179
  br label %50, !llvm.loop !21

182:                                              ; preds = %157, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %183

183:                                              ; preds = %182, %98
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %210

184:                                              ; preds = %179
  %185 = load i32, ptr %9, align 4, !tbaa !13
  %186 = add i32 %185, -1
  store i32 %186, ptr %9, align 4, !tbaa !13
  br label %187

187:                                              ; preds = %198, %184
  %188 = load i32, ptr %9, align 4, !tbaa !13
  %189 = icmp ugt i32 %188, 0
  br i1 %189, label %190, label %201

190:                                              ; preds = %187
  %191 = load i64, ptr %3, align 8, !tbaa !5
  %192 = load i32, ptr %9, align 4, !tbaa !13
  %193 = zext i32 %192 to i64
  %194 = udiv i64 %191, %193
  %195 = zext i64 %194 to i128
  %196 = load i128, ptr %10, align 16, !tbaa !15
  %197 = add i128 %196, %195
  store i128 %197, ptr %10, align 16, !tbaa !15
  br label %198

198:                                              ; preds = %190
  %199 = load i32, ptr %9, align 4, !tbaa !13
  %200 = add i32 %199, -1
  store i32 %200, ptr %9, align 4, !tbaa !13
  br label %187, !llvm.loop !22

201:                                              ; preds = %187
  %202 = load i128, ptr %10, align 16, !tbaa !15
  %203 = mul i128 %202, 2
  %204 = load i64, ptr %6, align 8, !tbaa !5
  %205 = load i64, ptr %6, align 8, !tbaa !5
  %206 = mul i64 %204, %205
  %207 = zext i64 %206 to i128
  %208 = sub i128 %203, %207
  store i128 %208, ptr %2, align 16
  store i32 1, ptr %21, align 4
  call void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  %209 = load { i64, i64 }, ptr %2, align 16
  ret { i64, i64 } %209

210:                                              ; preds = %183, %94, %90
  call void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %11) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %211

211:                                              ; preds = %210
  %212 = load ptr, ptr %14, align 8
  %213 = load i32, ptr %15, align 4
  %214 = insertvalue { ptr, i32 } poison, ptr %212, 0
  %215 = insertvalue { ptr, i32 } %214, i32 %213, 1
  resume { ptr, i32 } %215

216:                                              ; preds = %179, %175
  unreachable
}

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

; Function Attrs: nounwind
declare x86_fp80 @sqrtl(x86_fp80 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIydEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef, double noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE7emplaceIJiiEEEDcDpOT_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJjjEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_0clEyj"(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE7emplaceIJRjS7_EEEDcDpOT_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_1clEyjj"(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef, i32 noundef) #3 align 2

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !6, i64 0}
!10 = !{!"_ZTSZ10sum_sigma0yE3$_0", !6, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSZ10sum_sigma0yE3$_1", !6, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"__int128", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = distinct !{!20, !18}
!21 = distinct !{!21, !18}
!22 = distinct !{!22, !18}


; 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.anon = type { i64 }
%class.anon.0 = type { i64 }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Deque_impl" }
%"struct.std::_Deque_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Deque_impl" = type { %"struct.std::_Deque_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Deque_impl_data" }
%"struct.std::_Deque_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Tuple_impl.1", %"struct.std::_Head_base.2" }
%"struct.std::_Tuple_impl.1" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { ptr }
%"struct.std::_Head_base.2" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef { i64, i64 } @_Z10sum_sigma0y(i64 noundef %0) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %2 = alloca %class.anon, align 8
  %3 = alloca %class.anon.0, align 8
  %4 = alloca %"class.std::stack", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::tuple", align 8
  %12 = alloca %"class.std::tuple", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  store i64 %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  store i64 %0, ptr %3, align 8, !tbaa !10
  %13 = uitofp i64 %0 to x86_fp80
  %sqrt = tail call x86_fp80 @llvm.sqrt.f80(x86_fp80 %13)
  %14 = fptoui x86_fp80 %sqrt to i64
  %15 = tail call noundef double @_ZSt3powIydEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef %0, double noundef 3.400000e-01)
  %16 = fptoui double %15 to i64
  %17 = udiv i64 %0, %14
  %18 = udiv i64 %0, %17
  %19 = trunc i64 %18 to i32
  %20 = add i32 %19, 1
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #5
  call void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 1, ptr %5, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store i32 0, ptr %6, align 4, !tbaa !12
  %21 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE7emplaceIJiiEEEDcDpOT_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %22 unwind label %53

22:                                               ; preds = %1
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #5
  store i32 1, ptr %7, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  store i32 1, ptr %8, align 4, !tbaa !12
  %23 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE7emplaceIJiiEEEDcDpOT_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(4) %7, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %24 unwind label %55

24:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %25

25:                                               ; preds = %.thread, %24
  %.055 = phi i128 [ 0, %24 ], [ %.156.lcssa, %.thread ]
  %.042 = phi i32 [ %20, %24 ], [ %.143.lcssa, %.thread ]
  %.0 = phi i64 [ %17, %24 ], [ %.1.lcssa, %.thread ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  %26 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  call void @_ZSt3tieIJjjEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %11, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #5
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRjS0_EEaSIjjEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 4 dereferenceable(8) %26) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  %28 = load i32, ptr %9, align 4, !tbaa !12
  %29 = zext i32 %28 to i64
  %30 = add i64 %.0, %29
  %31 = load i32, ptr %10, align 4, !tbaa !12
  %32 = sub i32 %.042, %31
  %33 = call noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_0clEyj"(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %30, i32 noundef %32)
  br i1 %33, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %25, %.lr.ph
  %.175 = phi i64 [ %48, %.lr.ph ], [ %.0, %25 ]
  %.14374 = phi i32 [ %49, %.lr.ph ], [ %.042, %25 ]
  %.15673 = phi i128 [ %46, %.lr.ph ], [ %.055, %25 ]
  %34 = load i32, ptr %10, align 4, !tbaa !12
  %35 = zext i32 %34 to i64
  %36 = mul i64 %.175, %35
  %37 = add i32 %34, 1
  %38 = zext i32 %37 to i64
  %39 = load i32, ptr %9, align 4, !tbaa !12
  %40 = add i32 %39, -1
  %41 = zext i32 %40 to i64
  %42 = mul nuw i64 %41, %38
  %43 = lshr i64 %42, 1
  %44 = add i64 %43, %36
  %45 = zext i64 %44 to i128
  %46 = add i128 %.15673, %45
  %47 = zext i32 %39 to i64
  %48 = add i64 %.175, %47
  %49 = sub i32 %.14374, %34
  %50 = add i64 %48, %47
  %51 = sub i32 %49, %34
  %52 = call noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_0clEyj"(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %50, i32 noundef %51)
  br i1 %52, label %.lr.ph, label %._crit_edge, !llvm.loop !14

53:                                               ; preds = %1
  %54 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  br label %105

55:                                               ; preds = %22
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #5
  br label %105

._crit_edge:                                      ; preds = %.lr.ph, %25
  %.156.lcssa = phi i128 [ %.055, %25 ], [ %46, %.lr.ph ]
  %.143.lcssa = phi i32 [ %.042, %25 ], [ %49, %.lr.ph ]
  %.1.lcssa = phi i64 [ %.0, %25 ], [ %48, %.lr.ph ]
  %57 = zext i32 %.143.lcssa to i64
  %.not = icmp ugt i64 %57, %16
  br i1 %.not, label %58, label %.critedge

58:                                               ; preds = %._crit_edge
  %59 = load i32, ptr %9, align 4, !tbaa !12
  %60 = load i32, ptr %10, align 4, !tbaa !12
  br label %61

61:                                               ; preds = %70, %58
  %.047 = phi i32 [ %59, %58 ], [ %71, %70 ]
  %.044 = phi i32 [ %60, %58 ], [ %72, %70 ]
  %62 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #5
  call void @_ZSt3tieIJjjEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple") align 8 %12, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10) #5
  %63 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt5tupleIJRjS0_EEaSIjjEENSt9enable_ifIXcl12__assignableIRKT_RKT0_EEERS1_E4typeERKSt4pairIS4_S7_E(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 4 dereferenceable(8) %62) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #5
  %64 = load i32, ptr %9, align 4, !tbaa !12
  %65 = zext i32 %64 to i64
  %66 = add i64 %.1.lcssa, %65
  %67 = load i32, ptr %10, align 4, !tbaa !12
  %68 = sub i32 %.143.lcssa, %67
  %69 = call noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_0clEyj"(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %66, i32 noundef %68)
  br i1 %69, label %.preheader66.outer, label %70

70:                                               ; preds = %61
  %71 = load i32, ptr %9, align 4, !tbaa !12
  %72 = load i32, ptr %10, align 4, !tbaa !12
  call void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
  br label %61, !llvm.loop !16

.preheader66:                                     ; preds = %.preheader66.outer, %81
  %73 = load i32, ptr %9, align 4, !tbaa !12
  %74 = add i32 %73, %.148.ph
  %75 = load i32, ptr %10, align 4, !tbaa !12
  %76 = add i32 %75, %.145.ph
  %77 = zext i32 %74 to i64
  %78 = add i64 %.1.lcssa, %77
  %79 = sub i32 %.143.lcssa, %76
  %80 = call noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_0clEyj"(ptr noundef nonnull align 8 dereferenceable(8) %2, i64 noundef %78, i32 noundef %79)
  br i1 %80, label %81, label %85

81:                                               ; preds = %.preheader66
  store i32 %74, ptr %9, align 4, !tbaa !12
  store i32 %76, ptr %10, align 4, !tbaa !12
  %82 = invoke noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE7emplaceIJRjS7_EEEDcDpOT_(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %.preheader66 unwind label %83

83:                                               ; preds = %81
  %84 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %105

85:                                               ; preds = %.preheader66
  %86 = load i32, ptr %9, align 4, !tbaa !12
  %87 = load i32, ptr %10, align 4, !tbaa !12
  %88 = call noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_1clEyjj"(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %78, i32 noundef %86, i32 noundef %87)
  br i1 %88, label %.thread, label %.preheader66.outer

.preheader66.outer:                               ; preds = %61, %85
  %.148.ph = phi i32 [ %74, %85 ], [ %.047, %61 ]
  %.145.ph = phi i32 [ %76, %85 ], [ %.044, %61 ]
  br label %.preheader66

.thread:                                          ; preds = %85
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %25

.critedge:                                        ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  %.278 = add i32 %.143.lcssa, -1
  %.not5979 = icmp eq i32 %.278, 0
  br i1 %.not5979, label %._crit_edge83, label %.lr.ph82.preheader

.lr.ph82.preheader:                               ; preds = %.critedge
  %89 = zext i32 %.278 to i64
  %xtraiter = and i32 %.278, 1
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph82.prol.loopexit, label %.lr.ph82.prol

.lr.ph82.prol:                                    ; preds = %.lr.ph82.preheader
  %90 = udiv i64 %0, %89
  %91 = zext i64 %90 to i128
  %92 = add i128 %.156.lcssa, %91
  %indvars.iv.next.prol = add nsw i64 %89, -1
  br label %.lr.ph82.prol.loopexit

.lr.ph82.prol.loopexit:                           ; preds = %.lr.ph82.prol, %.lr.ph82.preheader
  %.lcssa.unr = phi i128 [ poison, %.lr.ph82.preheader ], [ %92, %.lr.ph82.prol ]
  %indvars.iv.unr = phi i64 [ %89, %.lr.ph82.preheader ], [ %indvars.iv.next.prol, %.lr.ph82.prol ]
  %.25780.unr = phi i128 [ %.156.lcssa, %.lr.ph82.preheader ], [ %92, %.lr.ph82.prol ]
  %93 = icmp eq i32 %.143.lcssa, 2
  br i1 %93, label %._crit_edge83, label %.lr.ph82

.lr.ph82:                                         ; preds = %.lr.ph82.prol.loopexit, %.lr.ph82
  %indvars.iv = phi i64 [ %indvars.iv.next.1, %.lr.ph82 ], [ %indvars.iv.unr, %.lr.ph82.prol.loopexit ]
  %.25780 = phi i128 [ %99, %.lr.ph82 ], [ %.25780.unr, %.lr.ph82.prol.loopexit ]
  %94 = udiv i64 %0, %indvars.iv
  %95 = zext i64 %94 to i128
  %96 = add i128 %.25780, %95
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %97 = udiv i64 %0, %indvars.iv.next
  %98 = zext i64 %97 to i128
  %99 = add i128 %96, %98
  %indvars.iv.next.1 = add nsw i64 %indvars.iv, -2
  %100 = and i64 %indvars.iv.next.1, 4294967295
  %.not59.1 = icmp eq i64 %100, 0
  br i1 %.not59.1, label %._crit_edge83, label %.lr.ph82, !llvm.loop !17

._crit_edge83:                                    ; preds = %.lr.ph82.prol.loopexit, %.lr.ph82, %.critedge
  %.257.lcssa = phi i128 [ %.156.lcssa, %.critedge ], [ %.lcssa.unr, %.lr.ph82.prol.loopexit ], [ %99, %.lr.ph82 ]
  %101 = shl i128 %.257.lcssa, 1
  %102 = mul i64 %14, %14
  %103 = zext i64 %102 to i128
  %104 = sub i128 %101, %103
  %.sroa.0.0.extract.trunc = trunc i128 %104 to i64
  %.sroa.2.0.extract.shift = lshr i128 %104, 64
  %.sroa.2.0.extract.trunc = trunc nuw i128 %.sroa.2.0.extract.shift to i64
  call void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %.fca.0.insert = insertvalue { i64, i64 } poison, i64 %.sroa.0.0.extract.trunc, 0
  %.fca.1.insert = insertvalue { i64, i64 } %.fca.0.insert, i64 %.sroa.2.0.extract.trunc, 1
  ret { i64, i64 } %.fca.1.insert

105:                                              ; preds = %83, %55, %53
  %.pn = phi { ptr, i32 } [ %84, %83 ], [ %56, %55 ], [ %54, %53 ]
  call void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIydEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(i64 noundef, double noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEEC2IS4_vEEv(ptr noundef nonnull align 8 dereferenceable(80)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE7emplaceIJiiEEEDcDpOT_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE3topEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt3tieIJjjEESt5tupleIJDpRT_EES3_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE3popEv(ptr noundef nonnull align 8 dereferenceable(80)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_0clEyj"(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt5stackISt4pairIjjESt5dequeIS1_SaIS1_EEE7emplaceIJRjS7_EEEDcDpOT_(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden noundef zeroext i1 @"_ZZ10sum_sigma0yENK3$_1clEyjj"(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare x86_fp80 @llvm.sqrt.f80(x86_fp80) #4

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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !7, i64 0}
!6 = !{!"_ZTSZ10sum_sigma0yE3$_0", !7, i64 0}
!7 = !{!"long long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !7, i64 0}
!11 = !{!"_ZTSZ10sum_sigma0yE3$_1", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}
!17 = distinct !{!17, !15}


; Effective O3 passes: AggressiveInstCombinePass,ConstraintEliminationPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass