; LLVM IR from VastoLorde95/Competitive-Programming :: Codeforces/356 Division 1/Problem B/B.ll (Z2gox)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_map.2" = type { %"class.std::_Hashtable.3" }
%"class.std::_Hashtable.3" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::pair" = type { i32, i64 }

@dp = external dso_local global %"class.std::unordered_map", align 8
@vol = external dso_local global %"class.std::unordered_map.2", align 8

; Function Attrs: mustprogress uwtable
define dso_local { i32, i64 } @_Z2gox(i64 noundef %0) #0 {
  %2 = alloca %"struct.std::pair", align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca %"struct.std::pair", align 8
  store i64 %0, ptr %3, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56) @dp, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %21 = icmp ne i64 %20, 0
  br i1 %21, label %22, label %30

22:                                               ; preds = %1
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @dp, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @vol, ptr noundef nonnull align 8 dereferenceable(8) %3)
  %25 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %23, ptr noundef nonnull align 8 dereferenceable(8) %24)
  %26 = getelementptr inbounds { i32, i64 }, ptr %2, i32 0, i32 0
  %27 = extractvalue { i32, i64 } %25, 0
  store i32 %27, ptr %26, align 8
  %28 = getelementptr inbounds { i32, i64 }, ptr %2, i32 0, i32 1
  %29 = extractvalue { i32, i64 } %25, 1
  store i64 %29, ptr %28, align 8
  br label %168

30:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #4
  %31 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @dp, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store ptr %31, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @vol, ptr noundef nonnull align 8 dereferenceable(8) %3)
  store ptr %32, ptr %5, align 8, !tbaa !9
  %33 = load ptr, ptr %5, align 8, !tbaa !9
  store i64 0, ptr %33, align 8, !tbaa !5
  %34 = load ptr, ptr %4, align 8, !tbaa !9
  store i32 0, ptr %34, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #4
  call void @_ZNSt4pairIixEC2IixTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %35 = load i64, ptr %3, align 8, !tbaa !5
  %36 = call noundef double @_ZSt4cbrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %35)
  %37 = fptosi double %36 to i64
  store i64 %37, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %38 = load i64, ptr %7, align 8, !tbaa !5
  %39 = trunc i64 %38 to i32
  store i32 %39, ptr %10, align 4, !tbaa !11
  br label %40

40:                                               ; preds = %156, %30
  %41 = load i32, ptr %10, align 4, !tbaa !11
  %42 = icmp sgt i32 %41, 0
  br i1 %42, label %44, label %43

43:                                               ; preds = %40
  store i32 2, ptr %11, align 4
  br label %159

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %45 = load i32, ptr %10, align 4, !tbaa !11
  %46 = add nsw i32 %45, 1
  store i32 %46, ptr %12, align 4, !tbaa !11
  %47 = load i32, ptr %10, align 4, !tbaa !11
  %48 = sext i32 %47 to i64
  %49 = mul nsw i64 1, %48
  %50 = load i32, ptr %10, align 4, !tbaa !11
  %51 = sext i32 %50 to i64
  %52 = mul nsw i64 %49, %51
  %53 = load i32, ptr %10, align 4, !tbaa !11
  %54 = sext i32 %53 to i64
  %55 = mul nsw i64 %52, %54
  store i64 %55, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %56 = load i32, ptr %12, align 4, !tbaa !11
  %57 = sext i32 %56 to i64
  %58 = mul nsw i64 1, %57
  %59 = load i32, ptr %12, align 4, !tbaa !11
  %60 = sext i32 %59 to i64
  %61 = mul nsw i64 %58, %60
  %62 = load i32, ptr %12, align 4, !tbaa !11
  %63 = sext i32 %62 to i64
  %64 = mul nsw i64 %61, %63
  store i64 %64, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %65 = load i64, ptr %3, align 8, !tbaa !5
  %66 = add nsw i64 %65, 1
  store i64 %66, ptr %14, align 8, !tbaa !5
  %67 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14)
  %68 = load i64, ptr %67, align 8, !tbaa !5
  store i64 %68, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %69 = load i64, ptr %9, align 8, !tbaa !5
  %70 = sub nsw i64 %69, 1
  %71 = load i64, ptr %8, align 8, !tbaa !5
  %72 = sub nsw i64 %70, %71
  store i64 %72, ptr %15, align 8, !tbaa !5
  %73 = call noundef i64 @_ZNKSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56) @dp, ptr noundef nonnull align 8 dereferenceable(8) %15)
  %74 = icmp ne i64 %73, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  br i1 %74, label %75, label %85

75:                                               ; preds = %44
  %76 = load i64, ptr %9, align 8, !tbaa !5
  %77 = sub nsw i64 %76, 1
  %78 = load i64, ptr %8, align 8, !tbaa !5
  %79 = sub nsw i64 %77, %78
  store i64 %79, ptr %16, align 8, !tbaa !5
  %80 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEEixEOx(ptr noundef nonnull align 8 dereferenceable(56) @dp, ptr noundef nonnull align 8 dereferenceable(8) %16)
  %81 = load i32, ptr %80, align 4, !tbaa !11
  %82 = load ptr, ptr %4, align 8, !tbaa !9
  %83 = load i32, ptr %82, align 4, !tbaa !11
  %84 = icmp slt i32 %81, %83
  br label %85

85:                                               ; preds = %75, %44
  %86 = phi i1 [ false, %44 ], [ %84, %75 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br i1 %86, label %87, label %88

87:                                               ; preds = %85
  store i32 2, ptr %11, align 4
  br label %153

88:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %89 = load i64, ptr %8, align 8, !tbaa !5
  store i64 %89, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store i64 1, ptr %18, align 8, !tbaa !5
  br label %90

90:                                               ; preds = %146, %88
  %91 = load i64, ptr %17, align 8, !tbaa !5
  %92 = load i64, ptr %9, align 8, !tbaa !5
  %93 = icmp slt i64 %91, %92
  br i1 %93, label %95, label %94

94:                                               ; preds = %90
  store i32 5, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %152

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #4
  %96 = load i64, ptr %9, align 8, !tbaa !5
  %97 = sub nsw i64 %96, 1
  %98 = load i64, ptr %17, align 8, !tbaa !5
  %99 = sub nsw i64 %97, %98
  %100 = call { i32, i64 } @_Z2gox(i64 noundef %99)
  %101 = getelementptr inbounds { i32, i64 }, ptr %19, i32 0, i32 0
  %102 = extractvalue { i32, i64 } %100, 0
  store i32 %102, ptr %101, align 8
  %103 = getelementptr inbounds { i32, i64 }, ptr %19, i32 0, i32 1
  %104 = extractvalue { i32, i64 } %100, 1
  store i64 %104, ptr %103, align 8
  %105 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIixEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %19) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #4
  %106 = load i64, ptr %18, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.std::pair", ptr %6, i32 0, i32 0
  %108 = load i32, ptr %107, align 8, !tbaa !13
  %109 = sext i32 %108 to i64
  %110 = add nsw i64 %109, %106
  %111 = trunc i64 %110 to i32
  store i32 %111, ptr %107, align 8, !tbaa !13
  %112 = load i64, ptr %17, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.std::pair", ptr %6, i32 0, i32 1
  %114 = load i64, ptr %113, align 8, !tbaa !15
  %115 = add nsw i64 %114, %112
  store i64 %115, ptr %113, align 8, !tbaa !15
  %116 = getelementptr inbounds %"struct.std::pair", ptr %6, i32 0, i32 0
  %117 = load i32, ptr %116, align 8, !tbaa !13
  %118 = load ptr, ptr %4, align 8, !tbaa !9
  %119 = load i32, ptr %118, align 4, !tbaa !11
  %120 = icmp sgt i32 %117, %119
  br i1 %120, label %121, label %128

121:                                              ; preds = %95
  %122 = getelementptr inbounds %"struct.std::pair", ptr %6, i32 0, i32 0
  %123 = load i32, ptr %122, align 8, !tbaa !13
  %124 = load ptr, ptr %4, align 8, !tbaa !9
  store i32 %123, ptr %124, align 4, !tbaa !11
  %125 = getelementptr inbounds %"struct.std::pair", ptr %6, i32 0, i32 1
  %126 = load i64, ptr %125, align 8, !tbaa !15
  %127 = load ptr, ptr %5, align 8, !tbaa !9
  store i64 %126, ptr %127, align 8, !tbaa !5
  br label %145

128:                                              ; preds = %95
  %129 = getelementptr inbounds %"struct.std::pair", ptr %6, i32 0, i32 0
  %130 = load i32, ptr %129, align 8, !tbaa !13
  %131 = load ptr, ptr %4, align 8, !tbaa !9
  %132 = load i32, ptr %131, align 4, !tbaa !11
  %133 = icmp eq i32 %130, %132
  br i1 %133, label %134, label %144

134:                                              ; preds = %128
  %135 = getelementptr inbounds %"struct.std::pair", ptr %6, i32 0, i32 1
  %136 = load i64, ptr %135, align 8, !tbaa !15
  %137 = load ptr, ptr %5, align 8, !tbaa !9
  %138 = load i64, ptr %137, align 8, !tbaa !5
  %139 = icmp sgt i64 %136, %138
  br i1 %139, label %140, label %144

140:                                              ; preds = %134
  %141 = getelementptr inbounds %"struct.std::pair", ptr %6, i32 0, i32 1
  %142 = load i64, ptr %141, align 8, !tbaa !15
  %143 = load ptr, ptr %5, align 8, !tbaa !9
  store i64 %142, ptr %143, align 8, !tbaa !5
  br label %144

144:                                              ; preds = %140, %134, %128
  br label %145

145:                                              ; preds = %144, %121
  br label %146

146:                                              ; preds = %145
  %147 = load i64, ptr %8, align 8, !tbaa !5
  %148 = load i64, ptr %17, align 8, !tbaa !5
  %149 = add nsw i64 %148, %147
  store i64 %149, ptr %17, align 8, !tbaa !5
  %150 = load i64, ptr %18, align 8, !tbaa !5
  %151 = add nsw i64 %150, 1
  store i64 %151, ptr %18, align 8, !tbaa !5
  br label %90, !llvm.loop !16

152:                                              ; preds = %94
  store i32 0, ptr %11, align 4
  br label %153

153:                                              ; preds = %152, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %154 = load i32, ptr %11, align 4
  switch i32 %154, label %159 [
    i32 0, label %155
  ]

155:                                              ; preds = %153
  br label %156

156:                                              ; preds = %155
  %157 = load i32, ptr %10, align 4, !tbaa !11
  %158 = add nsw i32 %157, -1
  store i32 %158, ptr %10, align 4, !tbaa !11
  br label %40, !llvm.loop !18

159:                                              ; preds = %153, %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %160

160:                                              ; preds = %159
  %161 = load ptr, ptr %4, align 8, !tbaa !9
  %162 = load ptr, ptr %5, align 8, !tbaa !9
  %163 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %161, ptr noundef nonnull align 8 dereferenceable(8) %162)
  %164 = getelementptr inbounds { i32, i64 }, ptr %2, i32 0, i32 0
  %165 = extractvalue { i32, i64 } %163, 0
  store i32 %165, ptr %164, align 8
  %166 = getelementptr inbounds { i32, i64 }, ptr %2, i32 0, i32 1
  %167 = extractvalue { i32, i64 } %163, 1
  store i64 %167, ptr %166, align 8
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #4
  br label %168

168:                                              ; preds = %160, %22
  %169 = load { i32, i64 }, ptr %2, align 8
  ret { i32, i64 } %169
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4cbrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { nounwind }

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

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_map.2" = type { %"class.std::_Hashtable.3" }
%"class.std::_Hashtable.3" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::pair" = type { i32, i64 }

@dp = external dso_local global %"class.std::unordered_map", align 8
@vol = external dso_local global %"class.std::unordered_map.2", align 8

; Function Attrs: mustprogress uwtable
define dso_local { i32, i64 } @_Z2gox(i64 noundef %0) local_unnamed_addr #0 {
  %2 = alloca i64, align 8
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"struct.std::pair", align 8
  store i64 %0, ptr %2, align 8, !tbaa !5
  %9 = call noundef i64 @_ZNKSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56) @dp, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.not = icmp eq i64 %9, 0
  %10 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @dp, ptr noundef nonnull align 8 dereferenceable(8) %2)
  %11 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56) @vol, ptr noundef nonnull align 8 dereferenceable(8) %2)
  br i1 %.not, label %14, label %12

12:                                               ; preds = %1
  %13 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  br label %65

14:                                               ; preds = %1
  store i64 0, ptr %11, align 8, !tbaa !5
  store i32 0, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #4
  call void @_ZNSt4pairIixEC2IixTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES3_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(16) %3)
  %15 = load i64, ptr %2, align 8, !tbaa !5
  %16 = call noundef double @_ZSt4cbrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef %15)
  %17 = fptosi double %16 to i64
  %18 = trunc i64 %17 to i32
  %19 = icmp sgt i32 %18, 0
  br i1 %19, label %.lr.ph50, label %.critedge45

.lr.ph50:                                         ; preds = %14
  %20 = getelementptr inbounds i8, ptr %8, i64 8
  %21 = getelementptr inbounds i8, ptr %3, i64 8
  %22 = and i64 %17, 2147483647
  br label %23

23:                                               ; preds = %.lr.ph50, %._crit_edge
  %indvars.iv = phi i64 [ %22, %.lr.ph50 ], [ %indvars.iv.next, %._crit_edge ]
  %24 = add nuw nsw i64 %indvars.iv, 1
  %25 = mul nuw nsw i64 %indvars.iv, %indvars.iv
  %26 = mul nuw nsw i64 %25, %indvars.iv
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %27 = mul nuw nsw i64 %24, %24
  %28 = mul nuw nsw i64 %27, %24
  store i64 %28, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %29 = load i64, ptr %2, align 8, !tbaa !5
  %30 = add nsw i64 %29, 1
  store i64 %30, ptr %5, align 8, !tbaa !5
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %32 = load i64, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %33 = add nsw i64 %32, -1
  %34 = sub nsw i64 %33, %26
  store i64 %34, ptr %6, align 8, !tbaa !5
  %35 = call noundef i64 @_ZNKSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56) @dp, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %.not41 = icmp eq i64 %35, 0
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  br i1 %.not41, label %.critedge, label %36

36:                                               ; preds = %23
  store i64 %34, ptr %7, align 8, !tbaa !5
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEEixEOx(ptr noundef nonnull align 8 dereferenceable(56) @dp, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = load i32, ptr %10, align 4, !tbaa !9
  %40 = icmp slt i32 %38, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br i1 %40, label %.critedge45, label %41

.critedge:                                        ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %41

41:                                               ; preds = %.critedge, %36
  %42 = icmp slt i64 %26, %32
  br i1 %42, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %41, %59
  %.047 = phi i32 [ %61, %59 ], [ 1, %41 ]
  %.03546 = phi i64 [ %60, %59 ], [ %26, %41 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  %43 = sub nsw i64 %33, %.03546
  %44 = call { i32, i64 } @_Z2gox(i64 noundef %43)
  %45 = extractvalue { i32, i64 } %44, 0
  store i32 %45, ptr %8, align 8
  %46 = extractvalue { i32, i64 } %44, 1
  store i64 %46, ptr %20, align 8
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt4pairIixEaSEOS0_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %8) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #4
  %48 = load i32, ptr %3, align 8, !tbaa !11
  %49 = add i32 %48, %.047
  store i32 %49, ptr %3, align 8, !tbaa !11
  %50 = load i64, ptr %21, align 8, !tbaa !13
  %51 = add nsw i64 %50, %.03546
  store i64 %51, ptr %21, align 8, !tbaa !13
  %52 = load i32, ptr %10, align 4, !tbaa !9
  %53 = icmp sgt i32 %49, %52
  br i1 %53, label %54, label %55

54:                                               ; preds = %.lr.ph
  store i32 %49, ptr %10, align 4, !tbaa !9
  br label %.sink.split

55:                                               ; preds = %.lr.ph
  %56 = icmp eq i32 %49, %52
  %57 = load i64, ptr %11, align 8
  %58 = icmp sgt i64 %51, %57
  %or.cond = select i1 %56, i1 %58, i1 false
  br i1 %or.cond, label %.sink.split, label %59

.sink.split:                                      ; preds = %55, %54
  store i64 %51, ptr %11, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %.sink.split, %55
  %60 = add nuw nsw i64 %.03546, %26
  %61 = add i32 %.047, 1
  %62 = icmp slt i64 %60, %32
  br i1 %62, label %.lr.ph, label %._crit_edge, !llvm.loop !14

._crit_edge:                                      ; preds = %59, %41
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %63 = icmp sgt i64 %indvars.iv, 1
  br i1 %63, label %23, label %.critedge45, !llvm.loop !16

.critedge45:                                      ; preds = %._crit_edge, %36, %14
  %64 = call { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #4
  br label %65

65:                                               ; preds = %.critedge45, %12
  %.pn = phi { i32, i64 } [ %13, %12 ], [ %64, %.critedge45 ]
  ret { i32, i64 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_mapIxiSt4hashIxESt8equal_toIxESaISt4pairIKxiEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { i32, i64 } @_ZSt9make_pairIRiRxESt4pairINSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeENS3_INS4_IT0_E4typeEE6__typeEEOS5_OSA_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt13unordered_mapIxxSt4hashIxESt8equal_toIxESaISt4pairIKxxEEEixERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt4cbrtIxEN9__gnu_cxx11__enable_ifIXsr12__is_integerIT_EE7__valueEdE6__typeES2_(i64 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIxERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { nounwind }

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

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


; Effective O3 passes: AggressiveInstCombinePass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass