; LLVM IR from TrainingByPackt/CPP-Data-Structures-and-Algorithm-Design-Principles :: Lesson4/Activity10 (mapreduce_wordcount)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.mapreduce::specification" = type { i64, i64, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.mapreduce::results" = type { %"struct.mapreduce::results::tag_counters", %"class.std::chrono::duration", %"class.std::chrono::duration", %"class.std::chrono::duration", %"class.std::chrono::duration", %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"struct.mapreduce::results::tag_counters" = type { i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%"class.std::chrono::duration" = type { double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::chrono::duration<double>, std::allocator<std::chrono::duration<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::chrono::duration<double>, std::allocator<std::chrono::duration<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::chrono::duration<double>, std::allocator<std::chrono::duration<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::chrono::duration<double>, std::allocator<std::chrono::duration<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.mapreduce::datasource::directory_iterator" = type { %"class.boost::filesystem::directory_iterator", %"class.std::__cxx11::basic_string", ptr, %"class.mapreduce::datasource::detail::file_handler.2" }
%"class.boost::filesystem::directory_iterator" = type { %"class.boost::intrusive_ptr" }
%"class.boost::intrusive_ptr" = type { ptr }
%"class.mapreduce::datasource::detail::file_handler.2" = type { ptr, %"class.std::shared_ptr.3" }
%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.mapreduce::job" = type { ptr, ptr, %"class.mapreduce::intermediates::in_memory" }
%"class.mapreduce::intermediates::in_memory" = type <{ i64, %"class.std::vector.21", [8 x i8] }>
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>, std::allocator<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>, std::allocator<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>, std::allocator<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>, std::allocator<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.10 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [9 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #1

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #2 align 2

declare void @__cxa_end_catch()

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.mapreduce::specification", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.mapreduce::results", align 8
  %16 = alloca %"class.mapreduce::datasource::directory_iterator", align 8
  %17 = alloca %"class.mapreduce::job", align 8
  %18 = alloca ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.6)
  %20 = load i32, ptr %4, align 4, !tbaa !5
  %21 = icmp slt i32 %20, 2
  br i1 %21, label %22, label %24

22:                                               ; preds = %2
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef @.str.7)
  store i32 1, ptr %3, align 4
  br label %129

24:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 88, ptr %6) #8
  call void @_ZN9mapreduce13specificationC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %6)
  %25 = load ptr, ptr %5, align 8, !tbaa !9
  %26 = getelementptr inbounds ptr, ptr %25, i64 1
  %27 = load ptr, ptr %26, align 8, !tbaa !9
  %28 = getelementptr inbounds %"struct.mapreduce::specification", ptr %6, i32 0, i32 3
  %29 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %28, ptr noundef %27)
          to label %30 unwind label %65

30:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %31 = call noundef i32 @_ZNSt6thread20hardware_concurrencyEv() #8
  store i32 %31, ptr %10, align 4, !tbaa !5
  %32 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %33 unwind label %69

33:                                               ; preds = %30
  %34 = load i32, ptr %32, align 4, !tbaa !5
  %35 = zext i32 %34 to i64
  %36 = getelementptr inbounds %"struct.mapreduce::specification", ptr %6, i32 0, i32 0
  store i64 %35, ptr %36, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  %37 = call noundef i32 @_ZNSt6thread20hardware_concurrencyEv() #8
  store i32 %37, ptr %12, align 4, !tbaa !5
  %38 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
          to label %39 unwind label %73

39:                                               ; preds = %33
  %40 = load i32, ptr %38, align 4, !tbaa !5
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds %"struct.mapreduce::specification", ptr %6, i32 0, i32 1
  store i64 %41, ptr %42, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %44 unwind label %65

44:                                               ; preds = %39
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef @.str.8)
          to label %46 unwind label %65

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 1, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %47 = call noundef i32 @_ZNSt6thread20hardware_concurrencyEv() #8
  store i32 %47, ptr %14, align 4, !tbaa !5
  %48 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %49 unwind label %77

49:                                               ; preds = %46
  %50 = load i32, ptr %48, align 4, !tbaa !5
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %45, i32 noundef %50)
          to label %52 unwind label %77

52:                                               ; preds = %49
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef @.str.9)
          to label %54 unwind label %77

54:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 176, ptr %15) #8
  invoke void @_ZN9mapreduce7resultsC2Ev(ptr noundef nonnull align 8 dereferenceable(176) %15)
          to label %55 unwind label %81

55:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 72, ptr %16) #8
  invoke void @_ZN9mapreduce10datasource18directory_iteratorIN9wordcount8map_taskENS0_6detail12file_handlerINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIPKcmEEEEC2ERKNS_13specificationE(ptr noundef nonnull align 8 dereferenceable(72) %16, ptr noundef nonnull align 8 dereferenceable(88) %6)
          to label %56 unwind label %85

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 56, ptr %17) #8
  invoke void @_ZN9mapreduce3jobIN9wordcount8map_taskENS1_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13null_combinerENS_10datasource18directory_iteratorIS2_NSC_6detail12file_handlerIS9_St4pairIPKcmEEEEENS_13intermediates9in_memoryIS2_SA_S9_NS_16hash_partitionerESt4lessIS9_ENSM_18reduce_null_outputIS2_SA_EEEESS_EC2ERSL_RKNS_13specificationE(ptr noundef nonnull align 8 dereferenceable(56) %17, ptr noundef nonnull align 8 dereferenceable(72) %16, ptr noundef nonnull align 8 dereferenceable(88) %6)
          to label %57 unwind label %89

57:                                               ; preds = %56
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.10)
          to label %59 unwind label %93

59:                                               ; preds = %57
  invoke void @_ZN9mapreduce3jobIN9wordcount8map_taskENS1_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13null_combinerENS_10datasource18directory_iteratorIS2_NSC_6detail12file_handlerIS9_St4pairIPKcmEEEEENS_13intermediates9in_memoryIS2_SA_S9_NS_16hash_partitionerESt4lessIS9_ENSM_18reduce_null_outputIS2_SA_EEEESS_E3runINS_15schedule_policy12cpu_parallelISU_EEEEvRNS_7resultsE(ptr noundef nonnull align 8 dereferenceable(56) %17, ptr noundef nonnull align 8 dereferenceable(176) %15)
          to label %60 unwind label %93

60:                                               ; preds = %59
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.11)
          to label %62 unwind label %93

62:                                               ; preds = %60
  invoke void @_ZN12_GLOBAL__N_111write_statsERKN9mapreduce7resultsE(ptr noundef nonnull align 8 dereferenceable(176) %15)
          to label %63 unwind label %93

63:                                               ; preds = %62
  invoke void @_ZN12_GLOBAL__N_121write_frequency_tableIN9mapreduce3jobIN9wordcount8map_taskENS3_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS1_13null_combinerENS1_10datasource18directory_iteratorIS4_NSE_6detail12file_handlerISB_St4pairIPKcmEEEEENS1_13intermediates9in_memoryIS4_SC_SB_NS1_16hash_partitionerESt4lessISB_ENSO_18reduce_null_outputIS4_SC_EEEESU_EEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(56) %17)
          to label %64 unwind label %93

64:                                               ; preds = %63
  call void @_ZN9mapreduce3jobIN9wordcount8map_taskENS1_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13null_combinerENS_10datasource18directory_iteratorIS2_NSC_6detail12file_handlerIS9_St4pairIPKcmEEEEENS_13intermediates9in_memoryIS2_SA_S9_NS_16hash_partitionerESt4lessIS9_ENSM_18reduce_null_outputIS2_SA_EEEESS_ED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr %17) #8
  call void @_ZN9mapreduce10datasource18directory_iteratorIN9wordcount8map_taskENS0_6detail12file_handlerINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIPKcmEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %16) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr %16) #8
  call void @_ZN9mapreduce7resultsD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %15) #8
  call void @llvm.lifetime.end.p0(i64 176, ptr %15) #8
  br label %117

65:                                               ; preds = %44, %39, %24
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %7, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %8, align 4
  br label %128

69:                                               ; preds = %30
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  br label %128

73:                                               ; preds = %33
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %7, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %128

77:                                               ; preds = %52, %49, %46
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %7, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %128

81:                                               ; preds = %54
  %82 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %7, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %8, align 4
  br label %99

85:                                               ; preds = %55
  %86 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %7, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %8, align 4
  br label %98

89:                                               ; preds = %56
  %90 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %7, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %8, align 4
  br label %97

93:                                               ; preds = %63, %62, %60, %59, %57
  %94 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %7, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %8, align 4
  call void @_ZN9mapreduce3jobIN9wordcount8map_taskENS1_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13null_combinerENS_10datasource18directory_iteratorIS2_NSC_6detail12file_handlerIS9_St4pairIPKcmEEEEENS_13intermediates9in_memoryIS2_SA_S9_NS_16hash_partitionerESt4lessIS9_ENSM_18reduce_null_outputIS2_SA_EEEESS_ED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %17) #8
  br label %97

97:                                               ; preds = %93, %89
  call void @llvm.lifetime.end.p0(i64 56, ptr %17) #8
  call void @_ZN9mapreduce10datasource18directory_iteratorIN9wordcount8map_taskENS0_6detail12file_handlerINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIPKcmEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %16) #8
  br label %98

98:                                               ; preds = %97, %85
  call void @llvm.lifetime.end.p0(i64 72, ptr %16) #8
  call void @_ZN9mapreduce7resultsD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %15) #8
  br label %99

99:                                               ; preds = %98, %81
  call void @llvm.lifetime.end.p0(i64 176, ptr %15) #8
  br label %100

100:                                              ; preds = %99
  %101 = load i32, ptr %8, align 4
  %102 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #8
  %103 = icmp eq i32 %101, %102
  br i1 %103, label %104, label %128

104:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %105 = load ptr, ptr %7, align 8
  %106 = call ptr @__cxa_begin_catch(ptr %105) #8
  store ptr %106, ptr %18, align 8
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.12)
          to label %108 unwind label %118

108:                                              ; preds = %104
  %109 = load ptr, ptr %18, align 8, !tbaa !9
  %110 = load ptr, ptr %109, align 8, !tbaa !17
  %111 = getelementptr inbounds ptr, ptr %110, i64 2
  %112 = load ptr, ptr %111, align 8
  %113 = call noundef ptr %112(ptr noundef nonnull align 8 dereferenceable(8) %109) #8
  %114 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef %113)
          to label %115 unwind label %118

115:                                              ; preds = %108
  invoke void @__cxa_end_catch()
          to label %116 unwind label %122

116:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %117

117:                                              ; preds = %116, %64
  store i32 0, ptr %3, align 4
  call void @_ZN9mapreduce13specificationD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %6) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr %6) #8
  br label %129

118:                                              ; preds = %108, %104
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %7, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %8, align 4
  invoke void @__cxa_end_catch()
          to label %126 unwind label %136

122:                                              ; preds = %115
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %7, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %8, align 4
  br label %127

126:                                              ; preds = %118
  br label %127

127:                                              ; preds = %126, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %128

128:                                              ; preds = %127, %100, %77, %73, %69, %65
  call void @_ZN9mapreduce13specificationD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %6) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr %6) #8
  br label %131

129:                                              ; preds = %117, %22
  %130 = load i32, ptr %3, align 4
  ret i32 %130

131:                                              ; preds = %128
  %132 = load ptr, ptr %7, align 8
  %133 = load i32, ptr %8, align 4
  %134 = insertvalue { ptr, i32 } poison, ptr %132, 0
  %135 = insertvalue { ptr, i32 } %134, i32 %133, 1
  resume { ptr, i32 } %135

136:                                              ; preds = %118
  %137 = landingpad { ptr, i32 }
          catch ptr null
  %138 = extractvalue { ptr, i32 } %137, 0
  call void @__clang_call_terminate(ptr %138) #9
  unreachable
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #5

; Function Attrs: nounwind
declare noundef i32 @_ZNSt6thread20hardware_concurrencyEv() #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9mapreduce10datasource18directory_iteratorIN9wordcount8map_taskENS0_6detail12file_handlerINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIPKcmEEEEC2ERKNS_13specificationE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9mapreduce3jobIN9wordcount8map_taskENS1_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13null_combinerENS_10datasource18directory_iteratorIS2_NSC_6detail12file_handlerIS9_St4pairIPKcmEEEEENS_13intermediates9in_memoryIS2_SA_S9_NS_16hash_partitionerESt4lessIS9_ENSM_18reduce_null_outputIS2_SA_EEEESS_EC2ERSL_RKNS_13specificationE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_111write_statsERKN9mapreduce7resultsE(ptr noundef nonnull align 8 dereferenceable(176)) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_121write_frequency_tableIN9mapreduce3jobIN9wordcount8map_taskENS3_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS1_13null_combinerENS1_10datasource18directory_iteratorIS4_NSE_6detail12file_handlerISB_St4pairIPKcmEEEEENS1_13intermediates9in_memoryIS4_SC_SB_NS1_16hash_partitionerESt4lessISB_ENSO_18reduce_null_outputIS4_SC_EEEESU_EEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(56)) #2

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

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

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #7

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noinline noreturn nounwind uwtable "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 #2 = { 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 #3 = { 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 #4 = { mustprogress norecurse 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 = { 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 #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 memory(none) }
attributes #8 = { nounwind }
attributes #9 = { noreturn nounwind }

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

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


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

%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"struct.mapreduce::specification" = type { i64, i64, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.mapreduce::results" = type { %"struct.mapreduce::results::tag_counters", %"class.std::chrono::duration", %"class.std::chrono::duration", %"class.std::chrono::duration", %"class.std::chrono::duration", %"class.std::vector", %"class.std::vector", %"class.std::vector" }
%"struct.mapreduce::results::tag_counters" = type { i64, i64, i64, i64, i64, i64, i64, i64, i64 }
%"class.std::chrono::duration" = type { double }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::chrono::duration<double>, std::allocator<std::chrono::duration<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::chrono::duration<double>, std::allocator<std::chrono::duration<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::chrono::duration<double>, std::allocator<std::chrono::duration<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::chrono::duration<double>, std::allocator<std::chrono::duration<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.mapreduce::datasource::directory_iterator" = type { %"class.boost::filesystem::directory_iterator", %"class.std::__cxx11::basic_string", ptr, %"class.mapreduce::datasource::detail::file_handler.2" }
%"class.boost::filesystem::directory_iterator" = type { %"class.boost::intrusive_ptr" }
%"class.boost::intrusive_ptr" = type { ptr }
%"class.mapreduce::datasource::detail::file_handler.2" = type { ptr, %"class.std::shared_ptr.3" }
%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.mapreduce::job" = type { ptr, ptr, %"class.mapreduce::intermediates::in_memory" }
%"class.mapreduce::intermediates::in_memory" = type <{ i64, %"class.std::vector.21", [8 x i8] }>
%"class.std::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>, std::allocator<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>, std::allocator<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>, std::allocator<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>, std::allocator<std::map<std::__cxx11::basic_string<char>, std::__cxx11::list<unsigned int>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt4cerr = external global %"class.std::basic_ostream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str.6 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@_ZTISt9exception = external constant ptr
@.str.10 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [9 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #1

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #2 align 2

declare void @__cxa_end_catch() local_unnamed_addr

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.mapreduce::specification", align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.mapreduce::results", align 8
  %11 = alloca %"class.mapreduce::datasource::directory_iterator", align 8
  %12 = alloca %"class.mapreduce::job", align 8
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.6)
  %14 = icmp slt i32 %0, 2
  br i1 %14, label %15, label %17

15:                                               ; preds = %2
  %16 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cerr, ptr noundef nonnull @.str.7)
  br label %86

17:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %3) #8
  call void @_ZN9mapreduce13specificationC2Ev(ptr noundef nonnull align 8 dereferenceable(88) %3)
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %3, i64 48
  %21 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef %19)
          to label %22 unwind label %53

22:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #8
  %23 = call noundef i32 @_ZNSt6thread20hardware_concurrencyEv() #8
  store i32 %23, ptr %5, align 4, !tbaa !9
  %24 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %4, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %25 = load i32, ptr %24, align 4, !tbaa !9
  %26 = zext i32 %25 to i64
  store i64 %26, ptr %3, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #8
  store i32 1, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #8
  %27 = call noundef i32 @_ZNSt6thread20hardware_concurrencyEv() #8
  store i32 %27, ptr %7, align 4, !tbaa !9
  %28 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %29 = load i32, ptr %28, align 4, !tbaa !9
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 %30, ptr %31, align 8, !tbaa !16
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #8
  %32 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %33 unwind label %53

33:                                               ; preds = %22
  %34 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef nonnull @.str.8)
          to label %35 unwind label %53

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 1, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #8
  %36 = call noundef i32 @_ZNSt6thread20hardware_concurrencyEv() #8
  store i32 %36, ptr %9, align 4, !tbaa !9
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %38 = load i32, ptr %37, align 4, !tbaa !9
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %34, i32 noundef %38)
          to label %40 unwind label %55

40:                                               ; preds = %35
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @.str.9)
          to label %42 unwind label %55

42:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %10) #8
  invoke void @_ZN9mapreduce7resultsC2Ev(ptr noundef nonnull align 8 dereferenceable(176) %10)
          to label %43 unwind label %57

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %11) #8
  invoke void @_ZN9mapreduce10datasource18directory_iteratorIN9wordcount8map_taskENS0_6detail12file_handlerINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIPKcmEEEEC2ERKNS_13specificationE(ptr noundef nonnull align 8 dereferenceable(72) %11, ptr noundef nonnull align 8 dereferenceable(88) %3)
          to label %44 unwind label %59

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %12) #8
  invoke void @_ZN9mapreduce3jobIN9wordcount8map_taskENS1_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13null_combinerENS_10datasource18directory_iteratorIS2_NSC_6detail12file_handlerIS9_St4pairIPKcmEEEEENS_13intermediates9in_memoryIS2_SA_S9_NS_16hash_partitionerESt4lessIS9_ENSM_18reduce_null_outputIS2_SA_EEEESS_EC2ERSL_RKNS_13specificationE(ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef nonnull align 8 dereferenceable(72) %11, ptr noundef nonnull align 8 dereferenceable(88) %3)
          to label %45 unwind label %61

45:                                               ; preds = %44
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.10)
          to label %47 unwind label %63

47:                                               ; preds = %45
  invoke void @_ZN9mapreduce3jobIN9wordcount8map_taskENS1_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13null_combinerENS_10datasource18directory_iteratorIS2_NSC_6detail12file_handlerIS9_St4pairIPKcmEEEEENS_13intermediates9in_memoryIS2_SA_S9_NS_16hash_partitionerESt4lessIS9_ENSM_18reduce_null_outputIS2_SA_EEEESS_E3runINS_15schedule_policy12cpu_parallelISU_EEEEvRNS_7resultsE(ptr noundef nonnull align 8 dereferenceable(56) %12, ptr noundef nonnull align 8 dereferenceable(176) %10)
          to label %48 unwind label %63

48:                                               ; preds = %47
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.11)
          to label %50 unwind label %63

50:                                               ; preds = %48
  invoke void @_ZN12_GLOBAL__N_111write_statsERKN9mapreduce7resultsE(ptr noundef nonnull align 8 dereferenceable(176) %10)
          to label %51 unwind label %63

51:                                               ; preds = %50
  invoke void @_ZN12_GLOBAL__N_121write_frequency_tableIN9mapreduce3jobIN9wordcount8map_taskENS3_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS1_13null_combinerENS1_10datasource18directory_iteratorIS4_NSE_6detail12file_handlerISB_St4pairIPKcmEEEEENS1_13intermediates9in_memoryIS4_SC_SB_NS1_16hash_partitionerESt4lessISB_ENSO_18reduce_null_outputIS4_SC_EEEESU_EEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(56) %12)
          to label %52 unwind label %63

52:                                               ; preds = %51
  call void @_ZN9mapreduce3jobIN9wordcount8map_taskENS1_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13null_combinerENS_10datasource18directory_iteratorIS2_NSC_6detail12file_handlerIS9_St4pairIPKcmEEEEENS_13intermediates9in_memoryIS2_SA_S9_NS_16hash_partitionerESt4lessIS9_ENSM_18reduce_null_outputIS2_SA_EEEESS_ED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #8
  call void @_ZN9mapreduce10datasource18directory_iteratorIN9wordcount8map_taskENS0_6detail12file_handlerINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIPKcmEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %11) #8
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #8
  call void @_ZN9mapreduce7resultsD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %10) #8
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %10) #8
  br label %80

53:                                               ; preds = %33, %22, %17
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %85

55:                                               ; preds = %40, %35
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %85

57:                                               ; preds = %42
  %58 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %67

59:                                               ; preds = %43
  %60 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %66

61:                                               ; preds = %44
  %62 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %65

63:                                               ; preds = %51, %50, %48, %47, %45
  %64 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZN9mapreduce3jobIN9wordcount8map_taskENS1_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13null_combinerENS_10datasource18directory_iteratorIS2_NSC_6detail12file_handlerIS9_St4pairIPKcmEEEEENS_13intermediates9in_memoryIS2_SA_S9_NS_16hash_partitionerESt4lessIS9_ENSM_18reduce_null_outputIS2_SA_EEEESS_ED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #8
  br label %65

65:                                               ; preds = %63, %61
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %12) #8
  call void @_ZN9mapreduce10datasource18directory_iteratorIN9wordcount8map_taskENS0_6detail12file_handlerINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIPKcmEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(72) %11) #8
  br label %66

66:                                               ; preds = %65, %59
  %.pn.pn = phi { ptr, i32 } [ %.pn, %65 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %11) #8
  call void @_ZN9mapreduce7resultsD2Ev(ptr noundef nonnull align 8 dereferenceable(176) %10) #8
  br label %67

67:                                               ; preds = %66, %57
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %66 ], [ %58, %57 ]
  %.2 = extractvalue { ptr, i32 } %.pn.pn.pn, 1
  call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %10) #8
  %68 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #8
  %69 = icmp eq i32 %.2, %68
  br i1 %69, label %70, label %85

70:                                               ; preds = %67
  %.210 = extractvalue { ptr, i32 } %.pn.pn.pn, 0
  %71 = call ptr @__cxa_begin_catch(ptr %.210) #8
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.12)
          to label %73 unwind label %81

73:                                               ; preds = %70
  %74 = load ptr, ptr %71, align 8, !tbaa !17
  %75 = getelementptr inbounds i8, ptr %74, i64 16
  %76 = load ptr, ptr %75, align 8
  %77 = call noundef ptr %76(ptr noundef nonnull align 8 dereferenceable(8) %71) #8
  %78 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %72, ptr noundef %77)
          to label %79 unwind label %81

79:                                               ; preds = %73
  invoke void @__cxa_end_catch()
          to label %80 unwind label %83

80:                                               ; preds = %79, %52
  call void @_ZN9mapreduce13specificationD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %3) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %3) #8
  br label %86

81:                                               ; preds = %73, %70
  %82 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %85 unwind label %87

83:                                               ; preds = %79
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %85

85:                                               ; preds = %83, %81, %67, %55, %53
  %.merged = phi { ptr, i32 } [ %.pn.pn.pn, %67 ], [ %56, %55 ], [ %54, %53 ], [ %84, %83 ], [ %82, %81 ]
  call void @_ZN9mapreduce13specificationD2Ev(ptr noundef nonnull align 8 dereferenceable(88) %3) #8
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %3) #8
  resume { ptr, i32 } %.merged

86:                                               ; preds = %80, %15
  %.0 = phi i32 [ 1, %15 ], [ 0, %80 ]
  ret i32 %.0

87:                                               ; preds = %81
  %88 = landingpad { ptr, i32 }
          catch ptr null
  %89 = extractvalue { ptr, i32 } %88, 0
  call void @__clang_call_terminate(ptr %89) #9
  unreachable
}

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3maxIjERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #5

; Function Attrs: nounwind
declare noundef i32 @_ZNSt6thread20hardware_concurrencyEv() local_unnamed_addr #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9mapreduce10datasource18directory_iteratorIN9wordcount8map_taskENS0_6detail12file_handlerINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIPKcmEEEEC2ERKNS_13specificationE(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9mapreduce3jobIN9wordcount8map_taskENS1_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13null_combinerENS_10datasource18directory_iteratorIS2_NSC_6detail12file_handlerIS9_St4pairIPKcmEEEEENS_13intermediates9in_memoryIS2_SA_S9_NS_16hash_partitionerESt4lessIS9_ENSM_18reduce_null_outputIS2_SA_EEEESS_EC2ERSL_RKNS_13specificationE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(72), ptr noundef nonnull align 8 dereferenceable(88)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9mapreduce3jobIN9wordcount8map_taskENS1_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_13null_combinerENS_10datasource18directory_iteratorIS2_NSC_6detail12file_handlerIS9_St4pairIPKcmEEEEENS_13intermediates9in_memoryIS2_SA_S9_NS_16hash_partitionerESt4lessIS9_ENSM_18reduce_null_outputIS2_SA_EEEESS_E3runINS_15schedule_policy12cpu_parallelISU_EEEEvRNS_7resultsE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_111write_statsERKN9mapreduce7resultsE(ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_121write_frequency_tableIN9mapreduce3jobIN9wordcount8map_taskENS3_11reduce_taskINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS1_13null_combinerENS1_10datasource18directory_iteratorIS4_NSE_6detail12file_handlerISB_St4pairIPKcmEEEEENS1_13intermediates9in_memoryIS4_SC_SB_NS1_16hash_partitionerESt4lessISB_ENSO_18reduce_null_outputIS4_SC_EEEESU_EEEEvRKT_(ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #2

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

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

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #7

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { noinline noreturn nounwind uwtable "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 #2 = { 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 #3 = { 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 #4 = { mustprogress norecurse 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 = { 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 #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 = { nofree nosync nounwind memory(none) }
attributes #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN9mapreduce13specificationE", !13, i64 0, !13, i64 8, !14, i64 16, !14, i64 48, !13, i64 80}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !15, i64 0, !13, i64 8, !7, i64 16}
!15 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!16 = !{!12, !13, i64 8}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass