; LLVM IR from UBIC-repo/core :: PathSum/PathSum.ll (ZN7PathSum6getSumEmm)

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

%struct.UAmount = type { %"class.std::map" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned char, std::pair<const unsigned char, unsigned long>, std::_Select1st<std::pair<const unsigned char, unsigned long>>, std::less<unsigned char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned char, std::pair<const unsigned char, unsigned long>, std::_Select1st<std::pair<const unsigned char, unsigned long>>, std::less<unsigned char>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%class.Log = type { i8, i8, ptr, %"class.std::basic_filebuf" }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%class.PathSum = type { %"class.std::map.0", %"class.std::map.0", %"class.std::map.0", %"class.std::map.0", %"class.std::map.0", %"class.std::map.0", %"class.std::map.0", i64, i64, i64, i64, i64, i64 }
%"class.std::map.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, UAmount>, std::_Select1st<std::pair<const unsigned long, UAmount>>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, std::pair<const unsigned long, UAmount>, std::_Select1st<std::pair<const unsigned long, UAmount>>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7UAmountC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

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

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 void @_ZN7UAmountD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7PathSum6getSumEmm(ptr dead_on_unwind noalias writable sret(%struct.UAmount) align 8 %0, ptr noundef nonnull align 8 dereferenceable(384) %1, i64 noundef %2, i64 noundef %3) #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i1, align 1
  %10 = alloca i64, align 8
  %11 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %18 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %19 = alloca %class.Log, align 8
  %20 = alloca %struct.UAmount, align 8
  %21 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %22 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %23 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %24 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %25 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %26 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %27 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %28 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  store i64 %3, ptr %8, align 8, !tbaa !9
  %29 = load ptr, ptr %6, align 8
  store i1 false, ptr %9, align 1
  call void @_ZN7UAmountC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %30 = load i64, ptr %7, align 8, !tbaa !9
  store i64 %30, ptr %10, align 8, !tbaa !9
  br label %31

31:                                               ; preds = %301, %273, %237, %201, %151, %101, %61, %4
  %32 = load i64, ptr %10, align 8, !tbaa !9
  %33 = load i64, ptr %8, align 8, !tbaa !9
  %34 = icmp ult i64 %32, %33
  br i1 %34, label %35, label %304

35:                                               ; preds = %31
  %36 = load i64, ptr %10, align 8, !tbaa !9
  %37 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 12
  %38 = load i64, ptr %37, align 8, !tbaa !11
  %39 = urem i64 %36, %38
  %40 = icmp eq i64 %39, 0
  br i1 %40, label %41, label %75

41:                                               ; preds = %35
  %42 = load i64, ptr %8, align 8, !tbaa !9
  %43 = load i64, ptr %10, align 8, !tbaa !9
  %44 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 12
  %45 = load i64, ptr %44, align 8, !tbaa !11
  %46 = add i64 %43, %45
  %47 = icmp uge i64 %42, %46
  br i1 %47, label %48, label %75

48:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %49 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 6
  %50 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %49, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %51 unwind label %66

51:                                               ; preds = %48
  %52 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %11, i32 0, i32 0
  store ptr %50, ptr %52, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %53 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 6
  %54 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %53) #7
  %55 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %14, i32 0, i32 0
  store ptr %54, ptr %55, align 8
  %56 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br i1 %56, label %57, label %74

57:                                               ; preds = %51
  %58 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 6
  %59 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %58, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %60 unwind label %70

60:                                               ; preds = %57
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %59)
          to label %61 unwind label %70

61:                                               ; preds = %60
  %62 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 12
  %63 = load i64, ptr %62, align 8, !tbaa !11
  %64 = load i64, ptr %10, align 8, !tbaa !9
  %65 = add i64 %64, %63
  store i64 %65, ptr %10, align 8, !tbaa !9
  br label %31, !llvm.loop !21

66:                                               ; preds = %48
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %12, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %306

70:                                               ; preds = %295, %292, %272, %269, %236, %233, %200, %197, %136, %133, %100, %97, %60, %57
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %12, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %13, align 4
  br label %306

74:                                               ; preds = %51
  br label %75

75:                                               ; preds = %74, %41, %35
  %76 = load i64, ptr %10, align 8, !tbaa !9
  %77 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 11
  %78 = load i64, ptr %77, align 8, !tbaa !23
  %79 = urem i64 %76, %78
  %80 = icmp eq i64 %79, 0
  br i1 %80, label %81, label %111

81:                                               ; preds = %75
  %82 = load i64, ptr %8, align 8, !tbaa !9
  %83 = load i64, ptr %10, align 8, !tbaa !9
  %84 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 11
  %85 = load i64, ptr %84, align 8, !tbaa !23
  %86 = add i64 %83, %85
  %87 = icmp uge i64 %82, %86
  br i1 %87, label %88, label %111

88:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %89 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 5
  %90 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %89, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %91 unwind label %106

91:                                               ; preds = %88
  %92 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %15, i32 0, i32 0
  store ptr %90, ptr %92, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %93 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 5
  %94 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %93) #7
  %95 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %16, i32 0, i32 0
  store ptr %94, ptr %95, align 8
  %96 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br i1 %96, label %97, label %110

97:                                               ; preds = %91
  %98 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 5
  %99 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %98, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %100 unwind label %70

100:                                              ; preds = %97
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %99)
          to label %101 unwind label %70

101:                                              ; preds = %100
  %102 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 11
  %103 = load i64, ptr %102, align 8, !tbaa !23
  %104 = load i64, ptr %10, align 8, !tbaa !9
  %105 = add i64 %104, %103
  store i64 %105, ptr %10, align 8, !tbaa !9
  br label %31, !llvm.loop !21

106:                                              ; preds = %88
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %12, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %306

110:                                              ; preds = %91
  br label %111

111:                                              ; preds = %110, %81, %75
  %112 = load i64, ptr %10, align 8, !tbaa !9
  %113 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 10
  %114 = load i64, ptr %113, align 8, !tbaa !24
  %115 = urem i64 %112, %114
  %116 = icmp eq i64 %115, 0
  br i1 %116, label %117, label %175

117:                                              ; preds = %111
  %118 = load i64, ptr %8, align 8, !tbaa !9
  %119 = load i64, ptr %10, align 8, !tbaa !9
  %120 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 10
  %121 = load i64, ptr %120, align 8, !tbaa !24
  %122 = add i64 %119, %121
  %123 = icmp uge i64 %118, %122
  br i1 %123, label %124, label %175

124:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %125 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 4
  %126 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %125, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %127 unwind label %156

127:                                              ; preds = %124
  %128 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %17, i32 0, i32 0
  store ptr %126, ptr %128, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %129 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 4
  %130 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %129) #7
  %131 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %18, i32 0, i32 0
  store ptr %130, ptr %131, align 8
  %132 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br i1 %132, label %133, label %174

133:                                              ; preds = %127
  %134 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 4
  %135 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %134, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %136 unwind label %70

136:                                              ; preds = %133
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %135)
          to label %137 unwind label %70

137:                                              ; preds = %136
  call void @llvm.lifetime.start.p0(i64 256, ptr %19) #7
  invoke void @_ZN3LogC1Eh(ptr noundef nonnull align 8 dereferenceable(256) %19, i8 noundef zeroext 0)
          to label %138 unwind label %160

138:                                              ; preds = %137
  %139 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256) %19, ptr noundef @.str)
          to label %140 unwind label %164

140:                                              ; preds = %138
  %141 = load i64, ptr %10, align 8, !tbaa !9
  %142 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEm(ptr noundef nonnull align 8 dereferenceable(256) %139, i64 noundef %141)
          to label %143 unwind label %164

143:                                              ; preds = %140
  %144 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256) %142, ptr noundef @.str.1)
          to label %145 unwind label %164

145:                                              ; preds = %143
  %146 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 4
  %147 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %146, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %148 unwind label %164

148:                                              ; preds = %145
  invoke void @_ZN7UAmountC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %20, ptr noundef nonnull align 8 dereferenceable(48) %147)
          to label %149 unwind label %164

149:                                              ; preds = %148
  %150 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsE7UAmount(ptr noundef nonnull align 8 dereferenceable(256) %144, ptr noundef %20)
          to label %151 unwind label %168

151:                                              ; preds = %149
  call void @_ZN7UAmountD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %20) #7
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %19) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %19) #7
  %152 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 10
  %153 = load i64, ptr %152, align 8, !tbaa !24
  %154 = load i64, ptr %10, align 8, !tbaa !9
  %155 = add i64 %154, %153
  store i64 %155, ptr %10, align 8, !tbaa !9
  br label %31, !llvm.loop !21

156:                                              ; preds = %124
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %12, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %306

160:                                              ; preds = %137
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %12, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %13, align 4
  br label %173

164:                                              ; preds = %148, %145, %143, %140, %138
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %12, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %13, align 4
  br label %172

168:                                              ; preds = %149
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %12, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %13, align 4
  call void @_ZN7UAmountD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %20) #7
  br label %172

172:                                              ; preds = %168, %164
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %19) #7
  br label %173

173:                                              ; preds = %172, %160
  call void @llvm.lifetime.end.p0(i64 256, ptr %19) #7
  br label %306

174:                                              ; preds = %127
  br label %175

175:                                              ; preds = %174, %117, %111
  %176 = load i64, ptr %10, align 8, !tbaa !9
  %177 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 9
  %178 = load i64, ptr %177, align 8, !tbaa !25
  %179 = urem i64 %176, %178
  %180 = icmp eq i64 %179, 0
  br i1 %180, label %181, label %211

181:                                              ; preds = %175
  %182 = load i64, ptr %8, align 8, !tbaa !9
  %183 = load i64, ptr %10, align 8, !tbaa !9
  %184 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 9
  %185 = load i64, ptr %184, align 8, !tbaa !25
  %186 = add i64 %183, %185
  %187 = icmp uge i64 %182, %186
  br i1 %187, label %188, label %211

188:                                              ; preds = %181
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %189 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 3
  %190 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %189, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %191 unwind label %206

191:                                              ; preds = %188
  %192 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %21, i32 0, i32 0
  store ptr %190, ptr %192, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %193 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 3
  %194 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %193) #7
  %195 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %22, i32 0, i32 0
  store ptr %194, ptr %195, align 8
  %196 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br i1 %196, label %197, label %210

197:                                              ; preds = %191
  %198 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 3
  %199 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %198, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %200 unwind label %70

200:                                              ; preds = %197
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %199)
          to label %201 unwind label %70

201:                                              ; preds = %200
  %202 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 9
  %203 = load i64, ptr %202, align 8, !tbaa !25
  %204 = load i64, ptr %10, align 8, !tbaa !9
  %205 = add i64 %204, %203
  store i64 %205, ptr %10, align 8, !tbaa !9
  br label %31, !llvm.loop !21

206:                                              ; preds = %188
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %12, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %306

210:                                              ; preds = %191
  br label %211

211:                                              ; preds = %210, %181, %175
  %212 = load i64, ptr %10, align 8, !tbaa !9
  %213 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 8
  %214 = load i64, ptr %213, align 8, !tbaa !26
  %215 = urem i64 %212, %214
  %216 = icmp eq i64 %215, 0
  br i1 %216, label %217, label %247

217:                                              ; preds = %211
  %218 = load i64, ptr %8, align 8, !tbaa !9
  %219 = load i64, ptr %10, align 8, !tbaa !9
  %220 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 8
  %221 = load i64, ptr %220, align 8, !tbaa !26
  %222 = add i64 %219, %221
  %223 = icmp uge i64 %218, %222
  br i1 %223, label %224, label %247

224:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %225 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 2
  %226 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %225, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %227 unwind label %242

227:                                              ; preds = %224
  %228 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %23, i32 0, i32 0
  store ptr %226, ptr %228, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #7
  %229 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 2
  %230 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %229) #7
  %231 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %24, i32 0, i32 0
  store ptr %230, ptr %231, align 8
  %232 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br i1 %232, label %233, label %246

233:                                              ; preds = %227
  %234 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 2
  %235 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %234, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %236 unwind label %70

236:                                              ; preds = %233
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %235)
          to label %237 unwind label %70

237:                                              ; preds = %236
  %238 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 8
  %239 = load i64, ptr %238, align 8, !tbaa !26
  %240 = load i64, ptr %10, align 8, !tbaa !9
  %241 = add i64 %240, %239
  store i64 %241, ptr %10, align 8, !tbaa !9
  br label %31, !llvm.loop !21

242:                                              ; preds = %224
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %12, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %306

246:                                              ; preds = %227
  br label %247

247:                                              ; preds = %246, %217, %211
  %248 = load i64, ptr %10, align 8, !tbaa !9
  %249 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 7
  %250 = load i64, ptr %249, align 8, !tbaa !27
  %251 = urem i64 %248, %250
  %252 = icmp eq i64 %251, 0
  br i1 %252, label %253, label %283

253:                                              ; preds = %247
  %254 = load i64, ptr %8, align 8, !tbaa !9
  %255 = load i64, ptr %10, align 8, !tbaa !9
  %256 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 7
  %257 = load i64, ptr %256, align 8, !tbaa !27
  %258 = add i64 %255, %257
  %259 = icmp uge i64 %254, %258
  br i1 %259, label %260, label %283

260:                                              ; preds = %253
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %261 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 1
  %262 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %261, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %263 unwind label %278

263:                                              ; preds = %260
  %264 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %25, i32 0, i32 0
  store ptr %262, ptr %264, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %265 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 1
  %266 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %265) #7
  %267 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %26, i32 0, i32 0
  store ptr %266, ptr %267, align 8
  %268 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br i1 %268, label %269, label %282

269:                                              ; preds = %263
  %270 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 1
  %271 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %270, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %272 unwind label %70

272:                                              ; preds = %269
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %271)
          to label %273 unwind label %70

273:                                              ; preds = %272
  %274 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 7
  %275 = load i64, ptr %274, align 8, !tbaa !27
  %276 = load i64, ptr %10, align 8, !tbaa !9
  %277 = add i64 %276, %275
  store i64 %277, ptr %10, align 8, !tbaa !9
  br label %31, !llvm.loop !21

278:                                              ; preds = %260
  %279 = landingpad { ptr, i32 }
          cleanup
  %280 = extractvalue { ptr, i32 } %279, 0
  store ptr %280, ptr %12, align 8
  %281 = extractvalue { ptr, i32 } %279, 1
  store i32 %281, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %306

282:                                              ; preds = %263
  br label %283

283:                                              ; preds = %282, %253, %247
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %284 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 0
  %285 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %284, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %286 unwind label %297

286:                                              ; preds = %283
  %287 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %27, i32 0, i32 0
  store ptr %285, ptr %287, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %288 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 0
  %289 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %288) #7
  %290 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %28, i32 0, i32 0
  store ptr %289, ptr %290, align 8
  %291 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br i1 %291, label %292, label %301

292:                                              ; preds = %286
  %293 = getelementptr inbounds %class.PathSum, ptr %29, i32 0, i32 0
  %294 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %293, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %295 unwind label %70

295:                                              ; preds = %292
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %294)
          to label %296 unwind label %70

296:                                              ; preds = %295
  br label %301

297:                                              ; preds = %283
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %12, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %306

301:                                              ; preds = %296, %286
  %302 = load i64, ptr %10, align 8, !tbaa !9
  %303 = add i64 %302, 1
  store i64 %303, ptr %10, align 8, !tbaa !9
  br label %31, !llvm.loop !21

304:                                              ; preds = %31
  store i1 true, ptr %9, align 1
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %305 = load i1, ptr %9, align 1
  br i1 %305, label %308, label %307

306:                                              ; preds = %297, %278, %242, %206, %173, %156, %106, %70, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @_ZN7UAmountD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #7
  br label %309

307:                                              ; preds = %304
  call void @_ZN7UAmountD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #7
  br label %308

308:                                              ; preds = %307, %304
  ret void

309:                                              ; preds = %306
  %310 = load ptr, ptr %12, align 8
  %311 = load i32, ptr %13, align 4
  %312 = insertvalue { ptr, i32 } poison, ptr %310, 0
  %313 = insertvalue { ptr, i32 } %312, i32 %311, 1
  resume { ptr, i32 } %313
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #0 align 2

declare void @_ZN3LogC1Eh(ptr noundef nonnull align 8 dereferenceable(256), i8 noundef zeroext) unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef) #5

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEm(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) #5

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsE7UAmount(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef) #5

; Function Attrs: nounwind
declare void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #6

attributes #0 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "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 #7 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 376}
!12 = !{!"_ZTS7PathSum", !13, i64 0, !13, i64 48, !13, i64 96, !13, i64 144, !13, i64 192, !13, i64 240, !13, i64 288, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376}
!13 = !{!"_ZTSSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE", !14, i64 0}
!14 = !{!"_ZTSSt8_Rb_treeImSt4pairIKm7UAmountESt10_Select1stIS3_ESt4lessImESaIS3_EE", !15, i64 0}
!15 = !{!"_ZTSNSt8_Rb_treeImSt4pairIKm7UAmountESt10_Select1stIS3_ESt4lessImESaIS3_EE13_Rb_tree_implIS7_Lb1EEE", !16, i64 0, !18, i64 8}
!16 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessImEE", !17, i64 0}
!17 = !{!"_ZTSSt4lessImE"}
!18 = !{!"_ZTSSt15_Rb_tree_header", !19, i64 0, !10, i64 32}
!19 = !{!"_ZTSSt18_Rb_tree_node_base", !20, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!12, !10, i64 368}
!24 = !{!12, !10, i64 360}
!25 = !{!12, !10, i64 352}
!26 = !{!12, !10, i64 344}
!27 = !{!12, !10, i64 336}


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

%struct.UAmount = type { %"class.std::map" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned char, std::pair<const unsigned char, unsigned long>, std::_Select1st<std::pair<const unsigned char, unsigned long>>, std::less<unsigned char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned char, std::pair<const unsigned char, unsigned long>, std::_Select1st<std::pair<const unsigned char, unsigned long>>, std::less<unsigned char>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%class.Log = type { i8, i8, ptr, %"class.std::basic_filebuf" }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7UAmountC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #0 align 2

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

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 void @_ZN7UAmountD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7PathSum6getSumEmm(ptr dead_on_unwind noalias nonnull writable sret(%struct.UAmount) align 8 %0, ptr noundef nonnull align 8 dereferenceable(384) %1, i64 noundef %2, i64 noundef %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i64, align 8
  %6 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %8 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %10 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %11 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %12 = alloca %class.Log, align 8
  %13 = alloca %struct.UAmount, align 8
  %14 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %16 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %18 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %19 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %20 = alloca %"struct.std::_Rb_tree_iterator", align 8
  %21 = alloca %"struct.std::_Rb_tree_iterator", align 8
  tail call void @_ZN7UAmountC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store i64 %2, ptr %5, align 8, !tbaa !5
  %22 = icmp ult i64 %2, %3
  br i1 %22, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %4
  %23 = getelementptr inbounds i8, ptr %1, i64 376
  %24 = getelementptr inbounds i8, ptr %1, i64 288
  %25 = getelementptr inbounds i8, ptr %1, i64 368
  %26 = getelementptr inbounds i8, ptr %1, i64 240
  %27 = getelementptr inbounds i8, ptr %1, i64 360
  %28 = getelementptr inbounds i8, ptr %1, i64 192
  %29 = getelementptr inbounds i8, ptr %1, i64 352
  %30 = getelementptr inbounds i8, ptr %1, i64 144
  %31 = getelementptr inbounds i8, ptr %1, i64 344
  %32 = getelementptr inbounds i8, ptr %1, i64 96
  %33 = getelementptr inbounds i8, ptr %1, i64 336
  %34 = getelementptr inbounds i8, ptr %1, i64 48
  br label %35

35:                                               ; preds = %.lr.ph, %.backedge
  %36 = phi i64 [ %2, %.lr.ph ], [ %53, %.backedge ]
  %37 = load i64, ptr %23, align 8, !tbaa !9
  %38 = urem i64 %36, %37
  %39 = icmp ne i64 %38, 0
  %40 = add i64 %37, %36
  %.not = icmp ugt i64 %40, %3
  %or.cond = or i1 %39, %.not
  br i1 %or.cond, label %59, label %41

41:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %42 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %24, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %43 unwind label %55

43:                                               ; preds = %41
  store ptr %42, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %44 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %24) #7
  store ptr %44, ptr %7, align 8
  %45 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br i1 %45, label %46, label %._crit_edge30

._crit_edge30:                                    ; preds = %43
  %.pre = load i64, ptr %5, align 8, !tbaa !5
  br label %59

46:                                               ; preds = %43
  %47 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %24, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %48 unwind label %57

48:                                               ; preds = %46
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %47)
          to label %49 unwind label %57

49:                                               ; preds = %48
  %50 = load i64, ptr %23, align 8, !tbaa !9
  %51 = load i64, ptr %5, align 8, !tbaa !5
  %52 = add i64 %51, %50
  store i64 %52, ptr %5, align 8, !tbaa !5
  br label %.backedge

.backedge:                                        ; preds = %49, %73, %106, %134, %154, %174, %190
  %53 = phi i64 [ %52, %49 ], [ %76, %73 ], [ %109, %106 ], [ %137, %134 ], [ %157, %154 ], [ %177, %174 ], [ %192, %190 ]
  %54 = icmp ult i64 %53, %3
  br i1 %54, label %35, label %._crit_edge, !llvm.loop !20

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

57:                                               ; preds = %187, %185, %173, %171, %153, %151, %133, %131, %92, %90, %72, %70, %48, %46
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %193

59:                                               ; preds = %._crit_edge30, %35
  %60 = phi i64 [ %.pre, %._crit_edge30 ], [ %36, %35 ]
  %61 = load i64, ptr %25, align 8, !tbaa !22
  %62 = urem i64 %60, %61
  %63 = icmp ne i64 %62, 0
  %64 = add i64 %61, %60
  %.not16 = icmp ugt i64 %64, %3
  %or.cond25 = or i1 %63, %.not16
  br i1 %or.cond25, label %79, label %65

65:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %66 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %26, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %67 unwind label %77

67:                                               ; preds = %65
  store ptr %66, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %68 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %26) #7
  store ptr %68, ptr %9, align 8
  %69 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br i1 %69, label %70, label %._crit_edge31

._crit_edge31:                                    ; preds = %67
  %.pre32 = load i64, ptr %5, align 8, !tbaa !5
  br label %79

70:                                               ; preds = %67
  %71 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %26, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %72 unwind label %57

72:                                               ; preds = %70
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %71)
          to label %73 unwind label %57

73:                                               ; preds = %72
  %74 = load i64, ptr %25, align 8, !tbaa !22
  %75 = load i64, ptr %5, align 8, !tbaa !5
  %76 = add i64 %75, %74
  store i64 %76, ptr %5, align 8, !tbaa !5
  br label %.backedge

77:                                               ; preds = %65
  %78 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %193

79:                                               ; preds = %._crit_edge31, %59
  %80 = phi i64 [ %.pre32, %._crit_edge31 ], [ %60, %59 ]
  %81 = load i64, ptr %27, align 8, !tbaa !23
  %82 = urem i64 %80, %81
  %83 = icmp ne i64 %82, 0
  %84 = add i64 %81, %80
  %.not17 = icmp ugt i64 %84, %3
  %or.cond26 = or i1 %83, %.not17
  br i1 %or.cond26, label %120, label %85

85:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %86 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %28, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %87 unwind label %110

87:                                               ; preds = %85
  store ptr %86, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %88 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %28) #7
  store ptr %88, ptr %11, align 8
  %89 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br i1 %89, label %90, label %._crit_edge33

._crit_edge33:                                    ; preds = %87
  %.pre34 = load i64, ptr %5, align 8, !tbaa !5
  br label %120

90:                                               ; preds = %87
  %91 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %28, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %92 unwind label %57

92:                                               ; preds = %90
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %91)
          to label %93 unwind label %57

93:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %12) #7
  invoke void @_ZN3LogC1Eh(ptr noundef nonnull align 8 dereferenceable(256) %12, i8 noundef zeroext 0)
          to label %94 unwind label %112

94:                                               ; preds = %93
  %95 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256) %12, ptr noundef nonnull @.str)
          to label %96 unwind label %114

96:                                               ; preds = %94
  %97 = load i64, ptr %5, align 8, !tbaa !5
  %98 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEm(ptr noundef nonnull align 8 dereferenceable(256) %95, i64 noundef %97)
          to label %99 unwind label %114

99:                                               ; preds = %96
  %100 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256) %98, ptr noundef nonnull @.str.1)
          to label %101 unwind label %114

101:                                              ; preds = %99
  %102 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %28, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %103 unwind label %114

103:                                              ; preds = %101
  invoke void @_ZN7UAmountC2ERKS_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(48) %102)
          to label %104 unwind label %114

104:                                              ; preds = %103
  %105 = invoke noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsE7UAmount(ptr noundef nonnull align 8 dereferenceable(256) %100, ptr noundef nonnull %13)
          to label %106 unwind label %116

106:                                              ; preds = %104
  call void @_ZN7UAmountD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #7
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %12) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %12) #7
  %107 = load i64, ptr %27, align 8, !tbaa !23
  %108 = load i64, ptr %5, align 8, !tbaa !5
  %109 = add i64 %108, %107
  store i64 %109, ptr %5, align 8, !tbaa !5
  br label %.backedge

110:                                              ; preds = %85
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %193

112:                                              ; preds = %93
  %113 = landingpad { ptr, i32 }
          cleanup
  br label %119

114:                                              ; preds = %103, %101, %99, %96, %94
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %118

116:                                              ; preds = %104
  %117 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7UAmountD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %13) #7
  br label %118

118:                                              ; preds = %116, %114
  %.pn = phi { ptr, i32 } [ %117, %116 ], [ %115, %114 ]
  call void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256) %12) #7
  br label %119

119:                                              ; preds = %118, %112
  %.pn.pn = phi { ptr, i32 } [ %.pn, %118 ], [ %113, %112 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %12) #7
  br label %193

120:                                              ; preds = %._crit_edge33, %79
  %121 = phi i64 [ %.pre34, %._crit_edge33 ], [ %80, %79 ]
  %122 = load i64, ptr %29, align 8, !tbaa !24
  %123 = urem i64 %121, %122
  %124 = icmp ne i64 %123, 0
  %125 = add i64 %122, %121
  %.not18 = icmp ugt i64 %125, %3
  %or.cond27 = or i1 %124, %.not18
  br i1 %or.cond27, label %140, label %126

126:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %127 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %30, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %128 unwind label %138

128:                                              ; preds = %126
  store ptr %127, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %129 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %30) #7
  store ptr %129, ptr %15, align 8
  %130 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br i1 %130, label %131, label %._crit_edge35

._crit_edge35:                                    ; preds = %128
  %.pre36 = load i64, ptr %5, align 8, !tbaa !5
  br label %140

131:                                              ; preds = %128
  %132 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %30, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %133 unwind label %57

133:                                              ; preds = %131
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %132)
          to label %134 unwind label %57

134:                                              ; preds = %133
  %135 = load i64, ptr %29, align 8, !tbaa !24
  %136 = load i64, ptr %5, align 8, !tbaa !5
  %137 = add i64 %136, %135
  store i64 %137, ptr %5, align 8, !tbaa !5
  br label %.backedge

138:                                              ; preds = %126
  %139 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %193

140:                                              ; preds = %._crit_edge35, %120
  %141 = phi i64 [ %.pre36, %._crit_edge35 ], [ %121, %120 ]
  %142 = load i64, ptr %31, align 8, !tbaa !25
  %143 = urem i64 %141, %142
  %144 = icmp ne i64 %143, 0
  %145 = add i64 %142, %141
  %.not19 = icmp ugt i64 %145, %3
  %or.cond28 = or i1 %144, %.not19
  br i1 %or.cond28, label %160, label %146

146:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %147 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %32, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %148 unwind label %158

148:                                              ; preds = %146
  store ptr %147, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #7
  %149 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %32) #7
  store ptr %149, ptr %17, align 8
  %150 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br i1 %150, label %151, label %._crit_edge37

._crit_edge37:                                    ; preds = %148
  %.pre38 = load i64, ptr %5, align 8, !tbaa !5
  br label %160

151:                                              ; preds = %148
  %152 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %32, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %153 unwind label %57

153:                                              ; preds = %151
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %152)
          to label %154 unwind label %57

154:                                              ; preds = %153
  %155 = load i64, ptr %31, align 8, !tbaa !25
  %156 = load i64, ptr %5, align 8, !tbaa !5
  %157 = add i64 %156, %155
  store i64 %157, ptr %5, align 8, !tbaa !5
  br label %.backedge

158:                                              ; preds = %146
  %159 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %193

160:                                              ; preds = %._crit_edge37, %140
  %161 = phi i64 [ %.pre38, %._crit_edge37 ], [ %141, %140 ]
  %162 = load i64, ptr %33, align 8, !tbaa !26
  %163 = urem i64 %161, %162
  %164 = icmp ne i64 %163, 0
  %165 = add i64 %162, %161
  %.not20 = icmp ugt i64 %165, %3
  %or.cond29 = or i1 %164, %.not20
  br i1 %or.cond29, label %180, label %166

166:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #7
  %167 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %34, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %168 unwind label %178

168:                                              ; preds = %166
  store ptr %167, ptr %18, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #7
  %169 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %34) #7
  store ptr %169, ptr %19, align 8
  %170 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  br i1 %170, label %171, label %180

171:                                              ; preds = %168
  %172 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %34, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %173 unwind label %57

173:                                              ; preds = %171
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %172)
          to label %174 unwind label %57

174:                                              ; preds = %173
  %175 = load i64, ptr %33, align 8, !tbaa !26
  %176 = load i64, ptr %5, align 8, !tbaa !5
  %177 = add i64 %176, %175
  store i64 %177, ptr %5, align 8, !tbaa !5
  br label %.backedge

178:                                              ; preds = %166
  %179 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #7
  br label %193

180:                                              ; preds = %168, %160
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #7
  %181 = invoke ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %182 unwind label %188

182:                                              ; preds = %180
  store ptr %181, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #7
  %183 = call ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %1) #7
  store ptr %183, ptr %21, align 8
  %184 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKm7UAmountEES6_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  br i1 %184, label %185, label %190

185:                                              ; preds = %182
  %186 = invoke noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %187 unwind label %57

187:                                              ; preds = %185
  invoke void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %186)
          to label %190 unwind label %57

188:                                              ; preds = %180
  %189 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #7
  br label %193

190:                                              ; preds = %187, %182
  %191 = load i64, ptr %5, align 8, !tbaa !5
  %192 = add i64 %191, 1
  store i64 %192, ptr %5, align 8, !tbaa !5
  br label %.backedge

._crit_edge:                                      ; preds = %.backedge, %4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  ret void

193:                                              ; preds = %188, %178, %158, %138, %119, %110, %77, %57, %55
  %.pn23 = phi { ptr, i32 } [ %58, %57 ], [ %.pn.pn, %119 ], [ %189, %188 ], [ %179, %178 ], [ %159, %158 ], [ %139, %138 ], [ %111, %110 ], [ %78, %77 ], [ %56, %55 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @_ZN7UAmountD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #7
  resume { ptr, i32 } %.pn23
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE4findERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZNSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEEixERS4_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN7UAmountpLERKS_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0 align 2

declare void @_ZN3LogC1Eh(ptr noundef nonnull align 8 dereferenceable(256), i8 noundef zeroext) unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEPKc(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsEm(ptr noundef nonnull align 8 dereferenceable(256), i64 noundef) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(256) ptr @_ZN3LoglsE7UAmount(ptr noundef nonnull align 8 dereferenceable(256), ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare void @_ZN3LogD1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #6

attributes #0 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind "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 #7 = { 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", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 376}
!10 = !{!"_ZTS7PathSum", !11, i64 0, !11, i64 48, !11, i64 96, !11, i64 144, !11, i64 192, !11, i64 240, !11, i64 288, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376}
!11 = !{!"_ZTSSt3mapIm7UAmountSt4lessImESaISt4pairIKmS0_EEE", !12, i64 0}
!12 = !{!"_ZTSSt8_Rb_treeImSt4pairIKm7UAmountESt10_Select1stIS3_ESt4lessImESaIS3_EE", !13, i64 0}
!13 = !{!"_ZTSNSt8_Rb_treeImSt4pairIKm7UAmountESt10_Select1stIS3_ESt4lessImESaIS3_EE13_Rb_tree_implIS7_Lb1EEE", !14, i64 0, !16, i64 8}
!14 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessImEE", !15, i64 0}
!15 = !{!"_ZTSSt4lessImE"}
!16 = !{!"_ZTSSt15_Rb_tree_header", !17, i64 0, !6, i64 32}
!17 = !{!"_ZTSSt18_Rb_tree_node_base", !18, i64 0, !19, i64 8, !19, i64 16, !19, i64 24}
!18 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!19 = !{!"any pointer", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!10, !6, i64 368}
!23 = !{!10, !6, i64 360}
!24 = !{!10, !6, i64 352}
!25 = !{!10, !6, i64 344}
!26 = !{!10, !6, i64 336}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass