; LLVM IR from turi-code/SFrame :: oss_src/sframe (sarray_v1_block_manager)

; 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.std::pair" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.anon = type { i8 }
%"class.graphlab::v1_block_impl::block_reader" = type { %"struct.graphlab::index_file_information", %"class.std::vector.11", %"class.std::vector.16" }
%"struct.graphlab::index_file_information" = type { %"class.std::__cxx11::basic_string", i32, i64, i64, %"class.std::__cxx11::basic_string", %"class.std::vector", %"class.std::vector.3", %"class.std::map" }
%"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] }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<std::__cxx11::basic_string<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 }
%"class.std::vector.11" = type { %"struct.std::_Vector_base.12" }
%"struct.std::_Vector_base.12" = type { %"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::segment_info, std::allocator<graphlab::v1_block_impl::block_reader::segment_info>>::_Vector_impl" }
%"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::segment_info, std::allocator<graphlab::v1_block_impl::block_reader::segment_info>>::_Vector_impl" = type { %"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::segment_info, std::allocator<graphlab::v1_block_impl::block_reader::segment_info>>::_Vector_impl_data" }
%"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::segment_info, std::allocator<graphlab::v1_block_impl::block_reader::segment_info>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::segment_io_data, std::allocator<graphlab::v1_block_impl::block_reader::segment_io_data>>::_Vector_impl" }
%"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::segment_io_data, std::allocator<graphlab::v1_block_impl::block_reader::segment_io_data>>::_Vector_impl" = type { %"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::segment_io_data, std::allocator<graphlab::v1_block_impl::block_reader::segment_io_data>>::_Vector_impl_data" }
%"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::segment_io_data, std::allocator<graphlab::v1_block_impl::block_reader::segment_io_data>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.graphlab::v1_block_impl::block_reader::segment_info" = type { %"class.graphlab::mutex", i8, i64, i64, i64, %"class.std::vector.21" }
%"class.graphlab::mutex" = type { %union.pthread_mutex_t }
%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::vector.21" = type { %"struct.std::_Vector_base.22" }
%"struct.std::_Vector_base.22" = type { %"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::block_info, std::allocator<graphlab::v1_block_impl::block_reader::block_info>>::_Vector_impl" }
%"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::block_info, std::allocator<graphlab::v1_block_impl::block_reader::block_info>>::_Vector_impl" = type { %"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::block_info, std::allocator<graphlab::v1_block_impl::block_reader::block_info>>::_Vector_impl_data" }
%"struct.std::_Vector_base<graphlab::v1_block_impl::block_reader::block_info, std::allocator<graphlab::v1_block_impl::block_reader::block_info>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.graphlab::v1_block_impl::block_reader::block_info" = type { i64, i64, i64, i64, i64 }

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN8graphlab13v1_block_impl12block_reader22segment_containing_rowEm(ptr noundef nonnull align 8 dereferenceable(232), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local { i64, i64 } @_ZN8graphlab13v1_block_impl12block_reader20block_containing_rowEm(ptr noundef nonnull align 8 dereferenceable(232) %0, i64 noundef %1) #2 align 2 {
  %3 = alloca %"struct.std::pair", align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca %class.anon, align 1
  %15 = alloca i64, align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i64 %1, ptr %5, align 8, !tbaa !9
  %20 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %21 = load i64, ptr %5, align 8, !tbaa !9
  %22 = call noundef i64 @_ZN8graphlab13v1_block_impl12block_reader22segment_containing_rowEm(ptr noundef nonnull align 8 dereferenceable(232) %20, i64 noundef %21)
  store i64 %22, ptr %6, align 8, !tbaa !9
  %23 = load i64, ptr %6, align 8, !tbaa !9
  %24 = icmp eq i64 %23, -1
  br i1 %24, label %25, label %26

25:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  store i64 -1, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 -1, ptr %8, align 8, !tbaa !9
  call void @_ZNSt4pairImmEC2ImmTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  store i32 1, ptr %9, align 4
  br label %73

26:                                               ; preds = %2
  %27 = load i64, ptr %6, align 8, !tbaa !9
  call void @_ZN8graphlab13v1_block_impl12block_reader23load_segment_block_infoEm(ptr noundef nonnull align 8 dereferenceable(232) %20, i64 noundef %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %28 = getelementptr inbounds %"class.graphlab::v1_block_impl::block_reader", ptr %20, i32 0, i32 1
  %29 = load i64, ptr %6, align 8, !tbaa !9
  %30 = call noundef nonnull align 8 dereferenceable(96) ptr @_ZNSt6vectorIN8graphlab13v1_block_impl12block_reader12segment_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %29) #5
  %31 = getelementptr inbounds %"struct.graphlab::v1_block_impl::block_reader::segment_info", ptr %30, i32 0, i32 5
  store ptr %31, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %32 = load ptr, ptr %10, align 8, !tbaa !5
  %33 = call ptr @_ZNSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #5
  %34 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %33, ptr %34, align 8
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = call ptr @_ZNSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #5
  %37 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8
  %40 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  %41 = load ptr, ptr %40, align 8
  %42 = call ptr @"_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPN8graphlab13v1_block_impl12block_reader10block_infoESt6vectorIS5_SaIS5_EEEEmZNS4_20block_containing_rowEmE3$_0ET_SC_SC_RKT0_T1_"(ptr %39, ptr %41, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %43 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %42, ptr %43, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %44 = load ptr, ptr %10, align 8, !tbaa !5
  %45 = call ptr @_ZNSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %44) #5
  %46 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %45, ptr %46, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %11, i64 8, i1 false), !tbaa.struct !11
  %47 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8
  %49 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %50 = load ptr, ptr %49, align 8
  %51 = call noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPN8graphlab13v1_block_impl12block_reader10block_infoESt6vectorIS5_SaIS5_EEEEENSt15iterator_traitsIT_E15difference_typeESC_SC_(ptr %48, ptr %50)
  store i64 %51, ptr %15, align 8, !tbaa !9
  %52 = load i64, ptr %15, align 8, !tbaa !9
  %53 = load ptr, ptr %10, align 8, !tbaa !5
  %54 = call noundef i64 @_ZNKSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #5
  %55 = icmp ult i64 %52, %54
  br i1 %55, label %56, label %68

56:                                               ; preds = %26
  %57 = load ptr, ptr %10, align 8, !tbaa !5
  %58 = load i64, ptr %15, align 8, !tbaa !9
  %59 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %58) #5
  %60 = getelementptr inbounds %"struct.graphlab::v1_block_impl::block_reader::block_info", ptr %59, i32 0, i32 2
  %61 = load i64, ptr %60, align 8, !tbaa !12
  %62 = load i64, ptr %5, align 8, !tbaa !9
  %63 = icmp eq i64 %61, %62
  br i1 %63, label %64, label %65

64:                                               ; preds = %56
  call void @_ZNSt4pairImmEC2IRmS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %15)
  store i32 1, ptr %9, align 4
  br label %72

65:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %66 = load i64, ptr %15, align 8, !tbaa !9
  %67 = sub i64 %66, 1
  store i64 %67, ptr %18, align 8, !tbaa !9
  call void @_ZNSt4pairImmEC2IRmmTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  store i32 1, ptr %9, align 4
  br label %72

68:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = call noundef i64 @_ZNKSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %69) #5
  %71 = sub i64 %70, 1
  store i64 %71, ptr %19, align 8, !tbaa !9
  call void @_ZNSt4pairImmEC2IRmmTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %19)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  store i32 1, ptr %9, align 4
  br label %72

72:                                               ; preds = %68, %65, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %73

73:                                               ; preds = %72, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %74 = load { i64, i64 }, ptr %3, align 8
  ret { i64, i64 } %74
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8graphlab13v1_block_impl12block_reader23load_segment_block_infoEm(ptr noundef nonnull align 8 dereferenceable(232), i64 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPN8graphlab13v1_block_impl12block_reader10block_infoESt6vectorIS5_SaIS5_EEEEmZNS4_20block_containing_rowEmE3$_0ET_SC_SC_RKT0_T1_"(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPN8graphlab13v1_block_impl12block_reader10block_infoESt6vectorIS5_SaIS5_EEEEENSt15iterator_traitsIT_E15difference_typeESC_SC_(ptr, ptr) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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 = !{i64 0, i64 8, !5}
!12 = !{!13, !10, i64 16}
!13 = !{!"_ZTSN8graphlab13v1_block_impl12block_reader10block_infoE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}


; 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.std::pair" = type { i64, i64 }

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(96) ptr @_ZNSt6vectorIN8graphlab13v1_block_impl12block_reader12segment_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN8graphlab13v1_block_impl12block_reader22segment_containing_rowEm(ptr noundef nonnull align 8 dereferenceable(232), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local { i64, i64 } @_ZN8graphlab13v1_block_impl12block_reader20block_containing_rowEm(ptr noundef nonnull align 8 dereferenceable(232) %0, i64 noundef %1) local_unnamed_addr #2 align 2 {
  %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 i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  store i64 %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %11 = tail call noundef i64 @_ZN8graphlab13v1_block_impl12block_reader22segment_containing_rowEm(ptr noundef nonnull align 8 dereferenceable(232) %0, i64 noundef %1)
  store i64 %11, ptr %5, align 8, !tbaa !5
  %12 = icmp eq i64 %11, -1
  br i1 %12, label %13, label %14

13:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  store i64 -1, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  store i64 -1, ptr %7, align 8, !tbaa !5
  call void @_ZNSt4pairImmEC2ImmTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS3_S4_EEEbE4typeELb1EEEOS3_OS4_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  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 %38

14:                                               ; preds = %2
  tail call void @_ZN8graphlab13v1_block_impl12block_reader23load_segment_block_infoEm(ptr noundef nonnull align 8 dereferenceable(232) %0, i64 noundef %11)
  %15 = getelementptr inbounds i8, ptr %0, i64 184
  %16 = tail call noundef nonnull align 8 dereferenceable(96) ptr @_ZNSt6vectorIN8graphlab13v1_block_impl12block_reader12segment_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %11) #4
  %17 = getelementptr inbounds i8, ptr %16, i64 72
  %18 = tail call ptr @_ZNSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  %19 = tail call ptr @_ZNSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  %20 = call ptr @"_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPN8graphlab13v1_block_impl12block_reader10block_infoESt6vectorIS5_SaIS5_EEEEmZNS4_20block_containing_rowEmE3$_0ET_SC_SC_RKT0_T1_"(ptr %18, ptr %19, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %21 = call ptr @_ZNSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  %22 = call noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPN8graphlab13v1_block_impl12block_reader10block_infoESt6vectorIS5_SaIS5_EEEEENSt15iterator_traitsIT_E15difference_typeESC_SC_(ptr %21, ptr %20)
  store i64 %22, ptr %8, align 8, !tbaa !5
  %23 = call noundef i64 @_ZNKSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  %24 = icmp ult i64 %22, %23
  br i1 %24, label %25, label %34

25:                                               ; preds = %14
  %26 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZNSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %17, i64 noundef %22) #4
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %28 = load i64, ptr %27, align 8, !tbaa !9
  %29 = load i64, ptr %4, align 8, !tbaa !5
  %30 = icmp eq i64 %28, %29
  br i1 %30, label %31, label %32

31:                                               ; preds = %25
  call void @_ZNSt4pairImmEC2IRmS2_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %8)
  br label %37

32:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %33 = add i64 %22, -1
  store i64 %33, ptr %9, align 8, !tbaa !5
  call void @_ZNSt4pairImmEC2IRmmTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  br label %37

34:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %35 = call noundef i64 @_ZNKSt6vectorIN8graphlab13v1_block_impl12block_reader10block_infoESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  %36 = add i64 %35, -1
  store i64 %36, ptr %10, align 8, !tbaa !5
  call void @_ZNSt4pairImmEC2IRmmTnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairIS4_S5_EEEbE4typeELb1EEEOS4_OS5_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  br label %37

37:                                               ; preds = %34, %32, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br label %38

38:                                               ; preds = %37, %13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  %.fca.0.load = load i64, ptr %3, align 8
  %.fca.0.insert = insertvalue { i64, i64 } poison, i64 %.fca.0.load, 0
  %.fca.1.gep = getelementptr inbounds i8, ptr %3, i64 8
  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8
  %.fca.1.insert = insertvalue { i64, i64 } %.fca.0.insert, i64 %.fca.1.load, 1
  ret { i64, i64 } %.fca.1.insert
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8graphlab13v1_block_impl12block_reader23load_segment_block_infoEm(ptr noundef nonnull align 8 dereferenceable(232), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt11lower_boundIN9__gnu_cxx17__normal_iteratorIPN8graphlab13v1_block_impl12block_reader10block_infoESt6vectorIS5_SaIS5_EEEEmZNS4_20block_containing_rowEmE3$_0ET_SC_SC_RKT0_T1_"(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZSt8distanceIN9__gnu_cxx17__normal_iteratorIPN8graphlab13v1_block_impl12block_reader10block_infoESt6vectorIS5_SaIS5_EEEEENSt15iterator_traitsIT_E15difference_typeESC_SC_(ptr, ptr) local_unnamed_addr #3

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 16}
!10 = !{!"_ZTSN8graphlab13v1_block_impl12block_reader10block_infoE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass